From owner-freebsd-gnome@FreeBSD.ORG Mon Oct 10 10:48:38 2005 Return-Path: X-Original-To: freebsd-gnome@freebsd.org Delivered-To: freebsd-gnome@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D8FA516A41F for ; Mon, 10 Oct 2005 10:48:38 +0000 (GMT) (envelope-from euro@i.com.ua) Received: from tuminfo2.informatik.tu-muenchen.de (tuminfo2.informatik.tu-muenchen.de [131.159.0.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C5AE43D48 for ; Mon, 10 Oct 2005 10:48:37 +0000 (GMT) (envelope-from euro@i.com.ua) Received: from a137.tum.vpn.lrz-muenchen.de (a137.tum.vpn.lrz-muenchen.de [129.187.51.137]) by mail.in.tum.de (Postfix) with ESMTP id 583322210 for ; Mon, 10 Oct 2005 12:48:32 +0200 (MEST) From: Eugene Rogoza To: freebsd-gnome@freebsd.org Content-Type: text/plain Date: Mon, 10 Oct 2005 12:48:35 +0200 Message-Id: <1128941315.788.0.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new/sophie/sophos at mailrelay2.informatik.tu-muenchen.de Subject: gnome-session and mobile profiles X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: euro@i.com.ua List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Oct 2005 10:48:39 -0000 Hello everybody, 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 Exec=gnome-session to Exec=gnome-session --choose-session=SessionName 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 incorrectly? Thanks Eugene