Re: PATH ~/bin under gnome



On Thu, 23 Nov 2006 11:12:25 +0000
Adam Funk <a24061@xxxxxxxxx> wrote:

There's a nearly universal solution: use ~/.xsession, place your environment
variable modification at the top and exec the appropriate session script
at the end (e.g. exec /usr/bin/gnome-session). Then choose "custom" in
your login manager.
...
The downside to this approach is that you cannot choose different
sessions in your display manager's menu and expect your environment
variable settings to appear in each of them.

Hmm. I like having the flexibility of being able to use a different
DM occasionally. I recently saw a cryptic reference to ~/.xprofile
somewhere --- is that relevant?

One work-around is to edit the *.desktop files in /usr/share/xsessions to
point at a number of ~/.xsession files with different names - for example
~/.xsession.enlightenment , ~/.xsession.fluxbox , and so on , and add your
modifications there. (Of course you can call those files whatever you like
and put them elsewhere if you wish, as long as the "Exec= " line points at
them and they are executable. ) This way you get entries for each DE/ wm in
your gdm login screen .

This tends to be easiest with simple window managers like fluxbox, or
enlightenment etc - you have a chicken-and-egg problem if you put
modifications to gnome-session in such a file for example, since
you would normally have to call gnome-session from the script as its last
line, and that would reverse your intentions unless you did some tricky
legwork. Of course, using ~/.gnomerc gets rid of that issue as discussed
earlier in the thread.

One hack is to start your ~/.xsession.foo (or whatever) pointed to
from /usr/share/xsessions/foo.desktop with something like

#!/bin/bash

# window manager or DE session here

/usr/bin/foo & wmpid=$!

#Insert your bits and pieces here with ampersands to background as requir
blah blah &
more stuff &
something that exits anyway #no ampersand required

# Hang point

wait $wmpid

I do this with fluxbox - this way fluxbox starts up first rather than
last, but the script only exits when fluxbox exits, which is the same
behaviour as if you put the "fluxbox" command last.

Hope that makes sense...

Peter


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • howto serialize tasks in .xsession
    ... Fluxbox is my WM; but I remove gnome-session as a Session ... Manager so I have No Session Manager. ... gnome-settings-daemon so I just run that directly. ...
    (Debian-User)
  • Re: stupid IE7 question
    ... closer look on session handling. ... Obscure methods like hiding an URI always ... rewrites itself to another script of yours with the session key as the ... I am currently testing a proprietary secure web based ...
    (Pen-Test)
  • Re: (Sloppy correction) Re: session management with database: optimal parameters in php.ini
    ... looking then another script read N! ... make it so simple that there are obviously no deficiencies, ... but I never used their db session management ... I avoid MySQL since I consider it an inferior db. ...
    (alt.php)
  • Re: X is broke... freeing multiple contexts (2)
    ... > HW: Laptop, IBM Thinkpad ... > "blinkem" run as root claims unable to open sound card. ... > Was this a graphical X session? ... Logout gui button in X session manager? ...
    (comp.os.linux.setup)
  • Re: Access 2003 / Forms / Data Entry
    ... > Manager of the Employer. ... >>> Manager, Contract and Department the Employee is working on, related to ... >>> and used the caption for the checkbox labels as the question name (Hand ... >>> type of questions change depending what department the session is being ...
    (microsoft.public.access.formscoding)