auto start program

Peter Garrett peter.garrett at optusnet.com.au
Tue Oct 9 15:01:06 UTC 2007


On Tue, Oct 09, 2007 at 10:32:26AM -0300, Derek Broughton wrote:
> Andrew Glen-Young wrote:
> 
> > On 09/10/2007, August <tan.august at gmail.com> wrote:
> >> add commands/programs in ~/.bashrc to start when user log in system
> > 
> > My apologies, I missed the start of this thread. I would like to
> > comment that using '~/.bashrc' will run the command whenever the
> > user's bash shell is run. If you want to run the command only once per
> > session then you should probably use '~/.bash_profile' instead (or
> > more accurately - when a login shell is run).
> 
> or ~/.xsession (once per X session), or KDE has a per-user Autostart folder
> and I would have thought Gnome would too.

The equivalent to KDE's Autostart directory is a file, in GNOME - viz.

~/.gnomerc

You can put commands in that file -  I use it to start the synergy
server/client setup I use to mouse from one machine's screen to another on the 
network ( desktop <-> laptop , for example).

For fluxbox I use ~/.xsession as you say - but this only works if you either choose
the "default session" option in GDM or set up your own fluxbox.desktop file in
/usr/share/xsessions/  ( I do the latter )

For GUI apps with GNOME, it is easier to simply save the session, assuming 
the app concerned understands GNOME's session management. 

Peter




More information about the ubuntu-users mailing list