How to launch applications at login in Gnome

6 Jan 2005

During my investigation of the Novell Linux Desktop, I quickly realized there was no "startup folder" like there is in Windows. In windows, this provides an easy way to get applications to automatically start when your system boots up. I needed GroupWise and iFolder to automatically launch for all users at my school as they log in.

I wasn't able to find a solution on my own, so I popped a question to the people whom I knew could give me an anwer: the Novell Support-Forums Sysops. Shortly after asking, Danita Zanre (thanks, Danita!) pointed me to a system file called default.session.

The default.session file gave me the ability to add programs which would automatically start when users log in. Here is what I did to modify this file:

  1. Make sure you are logged in as the root user.
    • open a terminal
    • type: su
    • When it asks for your password, type it in
    • You are now acting as the root user.
  2. Open the file: /opt/gnome/share/gnome/default.session with your favorite text editor.
  3. You'll most likely see something like this: (please disregard the path given in the window title-bar below, the file is a copy):



    Some things to take note of are:
    1. num_clients=4. This means there are four applications set up to launch. Each application has a number, or an ID. These are used to identify each application.
    2. Each application has a different priority ranging from 0 to 50. The lower the priority, the sooner it will launch, i.e. 0 launches first, then 1, etc... Priority number 50 is the default, and since the applications I launch are not critical, I use the priority=50 for these apps.
  4. Browse to the files you wish to launch, copy the path and file, and paste their location in to the default.session file.

    Example: The file /opt/novell/ifolder/bin/novell-ifolder-client launches iFolder.

    So I have to add this to my default.session file:

    4,id=default4
    4,Priority=50
    4,RestartCommand=/opt/novell/ifolder/bin/novell-ifolder-client default4


    As you can see, I have given iFolder an ID of 4, and the groupwise and ID of 5. If I wanted to add more, I would use 6 and then 7, etc...

    You must remember to change the num_clients= to reflect how many apps will be launched. The first application is 0, so num_clients equals the number of applications launched minus 1.

    This is how my edited file looked after I added iFolder and GroupWise:



If you have individual users that want certain apps launched at login, but you don't want that to happen for all users, simply go to System -> Personal Settings -> Sessions -> Startup Programs and add the apps to that list.

For more information, please click here



Informacja z serwisu http://www.djack.com.pl