AddingProgramToSessionStartup

Differences between revisions 1 and 9 (spanning 8 versions)
Revision 1 as of 2005-11-15 03:12:58
Size: 971
Editor: 0147072
Comment: LucasArruda_2005-11-15_01-12
Revision 9 as of 2006-01-03 06:07:53
Size: 6373
Editor: 66-215-246-37
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
"AddingProgramToSessionStartup" There are two ways to get Ubuntu to load programs automatically each time you start up:
Line 3: Line 3:
This is very easy although very dificult to find. At least for me.  1. Save your session when you log off, and the programs will be restarted when you sign back on.
 1. Configure Ubuntu to run a program every time you sign on.
Line 5: Line 6:
I wanted that every time I restart Ubuntu, It would have the applications I left open. But I didn't know how to do it.
So what I looked for is to initialize some apps. that I have choosen at the startup.
I found after many hours of search and reading this link:
This article focuses on the second of these approaches.

Each time you logon to Ubuntu you are creating a "session." To customize your session, you have to modify the session settings. To do this go to:

 * System > Preferences > Sessions

Ubuntu opens a dialog box that allows you to configure your session settings. In Ubuntu 5.10 (Breezy Badger) there are three tabs: "Session Options", "Current Sessions" and "Startup Programs".

== Session Options ==

This tab allows you to create mutliple custom sessions, each with its own settings. If you only need one setup, you can use the session named "Default"

 * "Show splash screen on login"
 * "Ask on logout" -- if checked, you will be asked each time you log out whether you want to save the current configuration.
 * "Automatically save changes to session" -- If checked, Ubuntu will save your session at each logout and restore the same configuration when you login again. This can have unwanted side effects like restarting the program that you cannot get out of, so consider carefully what you want to achieve.

== Current Session ==

This tab shows the processes that are currently running.

== Startup Programs ==

This tab allows you to specify any programs that you want to run each time you begin a session, as well as the priority or ordering of these startup programs. An example of such a program would be the network-manager applet (nm-applet), which allows easier access to wireless networks.

To add a program click the "Add" button and type in the command you would use on the command line to run the program (see below). Then set the priority by adjusting the 'Order' field. Lower numbers load first, higher numbers later.

== How to find the appropriate startup command ==

To determine the text for the startup command, you can check the 'Basic' tab of the properties for the program's icon.

As an example consider the Evolution mail client. Imagine you want to load Evolution every time you start up. Instead of clicking on the "Evolution Mail" icon in the title bar each time you start up, you can add the appropriate command to the Startup Sessions tab.

Find the icon for Evolution in the title bar at the top of the screen. Right click on it, and select 'Properties'. This will bring up the 'Launcher Properties' dialog box. The 'Basic' tab lists the appropriate command under the 'Command' field; in this case the appropriate text is:

 * evolution --component=mail

Select the text in the Command field and copy it using control-c.

Now we want to add this to our startup programs.

 * Go to System > Preferences > Sessions
 * Select the "Startup Programs" tab
 * Click add
 * In the "Startup command" box, paste the command you copied with control-v (see above)
 * Click OK (You should see your new command)
 * Click Close

Test by logging on and off.

== If the program you want to add doesn't have an icon in the menu bar ==

First, locate the program in the menu structure -- ''do not select it to run'', right mouse click to get the ''context menu'' and select "Add this launcher to panel."

This will place an icon for the program on the panel at the top of the desktop. Now you can follow the steps above to find and copy the appropriate command.

If you wish to remove the icon from your panel after you have done this you simply right click and select 'Remove from panel'.

== To stop a program from running at startup ==

If you no longer want the program to startup when you logon:

 * Go to System > Preferences > Sessions
 * Select the "Startup Programs" tab
 * Select the program you want to remove
 * Click delete
 * Click Close

== Modifying program run options ==

Now you may wish to modify the way a program works at startup. This is possible through command line options, there are parts to the command line:

  evolution --component=mail

The first part "evolution" is the command that is running.

The second part "--component=mail" is called an option. You can modify they way evolution starts up by changing this option. The real trick is to findout what the command line supports. You might try [http://www.google.com google] to search for these options. You can test these out on a command line:

 * Applications > Accessories > terminal

And try out variations first. Once you have it right then you can change the settings in startup.

Good luck...

== Moving appliactions to a workspace on startup and other more advanced stuff ==

Using the way described above, all the applications start in one workspace, maximized and so on. If you wished for example to start an application in workspace 2 minimized, you would have to do it manually - unless you install devilspie! Detailed howto can be found on the forums: [http://ubuntuforums.org/showthread.php?t=75749t]

== Comments ==

This is very handy to start [http://gdesklets.gnomedesktop.org/ gdesklet] every time I turn on my pc.

== Original text ==

This is very easy to do, although very difficult to find. At least for me.

I wanted my system set up so that every time I restart Ubuntu, it would remember the applications that I had left open in the previous session. But I didn't know how to do it. So I looked for a way to initialize some applications that I have chosen at startup. After many hours of searching, I found and read this link:
Line 13: Line 107:
- Go to System > Preferences > Sessions (most people know what to do when they get here, the problem is just to get :( )
- At the startup tab just include your program and be happy :)
 * Go to System > Preferences > Sessions (most people will know what to do when they get here, the problem is just to get there :( )
 * At the startup tab just include your program and be happy :)
Line 16: Line 110:
After this, I also discovered the option "Save sessions changes automatically", or something like that, under the first tab, "Session Options". Select it to mantain applications that you have opened in your session and changes you have made.
Line 17: Line 112:
After this, I also discovered the option "Save sessions changes automatically", or smth. like that, under the first tab, "Session Options". Select it to mantain apps. you have opened in your section and changes you have done. Very handy to [http://gdesklets.gnomedesktop.org/ gdesklet] so that I don't need to start every time I turn on my pc.
Line 19: Line 114:

Very handful to gdesklet soft that I don't need to start every time I turn on my pc.
CategoryDocumentation CategoryCleanup

There are two ways to get Ubuntu to load programs automatically each time you start up:

  1. Save your session when you log off, and the programs will be restarted when you sign back on.
  2. Configure Ubuntu to run a program every time you sign on.

This article focuses on the second of these approaches.

Each time you logon to Ubuntu you are creating a "session." To customize your session, you have to modify the session settings. To do this go to:

  • System > Preferences > Sessions

Ubuntu opens a dialog box that allows you to configure your session settings. In Ubuntu 5.10 (Breezy Badger) there are three tabs: "Session Options", "Current Sessions" and "Startup Programs".

Session Options

This tab allows you to create mutliple custom sessions, each with its own settings. If you only need one setup, you can use the session named "Default"

  • "Show splash screen on login"
  • "Ask on logout" -- if checked, you will be asked each time you log out whether you want to save the current configuration.
  • "Automatically save changes to session" -- If checked, Ubuntu will save your session at each logout and restore the same configuration when you login again. This can have unwanted side effects like restarting the program that you cannot get out of, so consider carefully what you want to achieve.

Current Session

This tab shows the processes that are currently running.

Startup Programs

This tab allows you to specify any programs that you want to run each time you begin a session, as well as the priority or ordering of these startup programs. An example of such a program would be the network-manager applet (nm-applet), which allows easier access to wireless networks.

To add a program click the "Add" button and type in the command you would use on the command line to run the program (see below). Then set the priority by adjusting the 'Order' field. Lower numbers load first, higher numbers later.

How to find the appropriate startup command

To determine the text for the startup command, you can check the 'Basic' tab of the properties for the program's icon.

As an example consider the Evolution mail client. Imagine you want to load Evolution every time you start up. Instead of clicking on the "Evolution Mail" icon in the title bar each time you start up, you can add the appropriate command to the Startup Sessions tab.

Find the icon for Evolution in the title bar at the top of the screen. Right click on it, and select 'Properties'. This will bring up the 'Launcher Properties' dialog box. The 'Basic' tab lists the appropriate command under the 'Command' field; in this case the appropriate text is:

  • evolution --component=mail

Select the text in the Command field and copy it using control-c.

Now we want to add this to our startup programs.

  • Go to System > Preferences > Sessions

  • Select the "Startup Programs" tab
  • Click add
  • In the "Startup command" box, paste the command you copied with control-v (see above)
  • Click OK (You should see your new command)
  • Click Close

Test by logging on and off.

If the program you want to add doesn't have an icon in the menu bar

First, locate the program in the menu structure -- do not select it to run, right mouse click to get the context menu and select "Add this launcher to panel."

This will place an icon for the program on the panel at the top of the desktop. Now you can follow the steps above to find and copy the appropriate command.

If you wish to remove the icon from your panel after you have done this you simply right click and select 'Remove from panel'.

To stop a program from running at startup

If you no longer want the program to startup when you logon:

  • Go to System > Preferences > Sessions

  • Select the "Startup Programs" tab
  • Select the program you want to remove
  • Click delete
  • Click Close

Modifying program run options

Now you may wish to modify the way a program works at startup. This is possible through command line options, there are parts to the command line:

  • evolution --component=mail

The first part "evolution" is the command that is running.

The second part "--component=mail" is called an option. You can modify they way evolution starts up by changing this option. The real trick is to findout what the command line supports. You might try [http://www.google.com google] to search for these options. You can test these out on a command line:

  • Applications > Accessories > terminal

And try out variations first. Once you have it right then you can change the settings in startup.

Good luck...

Moving appliactions to a workspace on startup and other more advanced stuff

Using the way described above, all the applications start in one workspace, maximized and so on. If you wished for example to start an application in workspace 2 minimized, you would have to do it manually - unless you install devilspie! Detailed howto can be found on the forums: [http://ubuntuforums.org/showthread.php?t=75749t]

Comments

This is very handy to start [http://gdesklets.gnomedesktop.org/ gdesklet] every time I turn on my pc.

Original text

This is very easy to do, although very difficult to find. At least for me.

I wanted my system set up so that every time I restart Ubuntu, it would remember the applications that I had left open in the previous session. But I didn't know how to do it. So I looked for a way to initialize some applications that I have chosen at startup. After many hours of searching, I found and read this link:

http://www.neowin.net/forum/lofiversion/index.php/t385487.html

And it's just so easy.

  • Go to System > Preferences > Sessions (most people will know what to do when they get here, the problem is just to get there Sad :( )

  • At the startup tab just include your program and be happy Smile :)

After this, I also discovered the option "Save sessions changes automatically", or something like that, under the first tab, "Session Options". Select it to mantain applications that you have opened in your session and changes you have made.

Very handy to [http://gdesklets.gnomedesktop.org/ gdesklet] so that I don't need to start every time I turn on my pc.

CategoryDocumentation CategoryCleanup

AddingProgramToSessionStartup (last edited 2008-08-06 16:32:59 by localhost)