gnome-session and mobile profiles
euro at i.com.ua
Mon Oct 10 03:48:39 PDT 2005
I'd like to share several thoughts regarding the usage of gnome-session.
Perhaps I'm inventing the wheel, but I haven't found any other way to
accomplish my task.
I have a laptop which physically travels from one building to another
and is thus a mobile client. Each time it has to connect to a new
network. What I'm trying to do is to tell FreeBSD my current location
via GDM login (session selection), so that the proper (self-made)
network initialization script would be run. In other words, for the same
user I want to be able to choose among "network profiles".
The first thing I noticed is that "GNOME sessions" and "GDM sessions"
are not the same, although, as stated in (GNOME) documentation, "...When
you log in on GDM, you choose a session. When you choose a session, you
can select which of the multiple sessions to use". Gnome sessions use a
file '~/.gnome2/session' whereas GDM sessions are usual '.desktop' files
residing in '/usr/X11R6/share/gnome/xsessions' (or alternatively in the
directories described in GDM help page). So, to be able to add a
GDM-session (exactly what I need) one has to copy and customize
some .desktop-file. After that one has to change one line
in .desktop-file, which is
which reads the contents of '~/.gnome2/session' as well as
'~/.gnome2/session-manual'. The latter one contains the list of
"additional" programs that are to be started automatically (as defined
via "Sessions" -> "Startup programs" dialog box). This is exactly the
facility which allows me to run my network init scripts.
The question is: could I have done all of that using only
"Buttons-and-dialog-boxes-mode" without having to explore and manually
edit various configuration files and manually adding "Exec=gnome-session
--choose-session=SessionName"? I believe that GNOME GUI (and
'gnome-session' in particular) has been designed exactly for that.
Otherwise I see no point in "Sessions" dialog box. To be precise, I see
no point in that part of it which allows me to add a new session, edit
the existing one or delete it. The entries to '~/.gnome2/session' are
being made, but they are not being used anyhow afterwards.
Am I expecting too much from gnome-session? Or am I using it
More information about the freebsd-gnome