X and Gnome session startup 

http://www.cse.cuhk.edu.hk/~wongyb/knoppix.shtml

Session manager 

/etc/X11/Xsession.d/45xsession checks which session manager /etc/alternatives/x-session-manager is pointed to. If it is gnome-session, DESKTOP is set to gnome. If it is startkde, DESKTOP is set to kde. (DESKTOP determines which desktop 45xsession will run.)

/etc/X11/Xsession.d/55gnome-session_gnomerc determines if /etc/alternatives/x-session-manager is /usr/bin/gnome-session. If it is true, it sources ~/.gnomerc.

How gnome-session works 

/usr/bin/gnome-session will look for user's own session file ~/.gnome2/session. If it is not present, the system's default /usr/share/gnome/default.session is used.

Start Fcitx 

http://ldfsys.livedoor.cn/man/linux/debian/Debian_learning/Chapter7.htm#id2879172 === Under Gnome 

Example: File ~/.gnomerc
export XIM_PROGRAM=fcitx
export XIM=fcitx
export XMODIFIERS="@im=fcitx"
fcitx&

set LANG=zh_CN.GB2312 in Gnome.

Under KDE 

Gnome session startup programs 

I believe 'gnome-session-properties' is what you are looking for. It has a tab called 'Startup Program' where you can add such apps you want to run at GNOME startup.

Gnome session startup programs 

open the gnome control center, go to 'advanced' and open 'Sessions'.

You can just add programs to the list under the 'startup programs' tab.

Gnome session startup programs 

The syntax for Gnome session startup programs are strick:

I.e., the following commands will fail:

/usr/bin/numlockx on &
LANG=zh_CN.GB2312 /usr/bin/chinput

Only this can work:

/usr/bin/numlockx on
/usr/bin/chinput

Also remember to set the order very high, e.g. 75, so it starts absolutely last. If you dont do this, it hangs things and gives problems.

documented on: 2005.05.05

startup applications 

To: Fedora Core development releases
Date: Fri, 07 May 2004 20:42:47 -0400
> there a place where I can run an application at GNOME startup?  In FC1
> (and RedHat9) there was a place where you could run GNOME/gui startup
> apps.  I am tempted to use (from the GConf editor)
> desktop/accessibility/startup, but surely there must be a better place
> to run my application.

I believe 'gnome-session-properties' is what you are looking for. It has a tab called 'Startup Program' where you can add such apps you want to run at GNOME startup.

I'm not sure why gnome-session-properties is not in the Preferences sub-menu anymore, i think it use to be there before. Anyway you can always run it from the command-line.

Deji Akingunola

making a program start up when X loads 

Jun 3 06:32:02 CST 2004

> Is there a sane way of enabling gkrellm (or any program)to load when X
> loads? kinda like items that are placed in a windows start menu effect...
> just saves a few clicks here and there

If you're using KDE, just put a link to gkrellm in ~/.kde/AutoStart

either a symlink or a script that runs it will do fine.

Steve Pryde

making a program start up when X loads 

> im loggin in via session manager, (not typing startx from the shell)
> and im using gnome ..

in that case, open the gnome control center, go to 'advanced' and open 'Sessions'.

You can just add programs to the list under the 'startup programs' tab :-)

otherwise, the ~/.xsession option should work in any case, no matter what you're running.

Steve Pryde

equivalent of .xinitrc ? 

Newsgroups: comp.os.linux.x
Date: Wed, 14 Aug 2002 04:21:22 GMT
> >I want a file into which I put a bunch of commands
> >that get executed after the session initializes.
>
> Why not just use the gnome control-centre app, it has a place to put this
> stuff in (I can't recall the name of it at the moment tho).

I found it and had trouble with it. But you are essentially right — I put into it the command .gnome/startup and then created a shell script of the same name.

Now I just have to figure out how to get the gnome-terminals not to come back in the next session, but that shouldn't be too hard.

Eddie

equivalent of .xinitrc ? 

> +> Now I just have to figure out how to get the gnome-terminals not to
> +> come back in the next session, but that shouldn't be too hard.
>
> Go back into the control panel, the startup section, there should be a
> check box about "automatically save setup" or some such, check that
> off. When you go to log off, set your desktop the way you want to have
> it come back, then select log off. Now you should see another check
> box on the logoff (yes/cancel/help) dialog titled "save this setup?"
> Check it. Log off. Log back in. It should be as you saved it.

It is not quite that simple. The gnome terminals have a memory that is outside of saving the session, but it doesn't quite work [they randomly forget size or placement]. I want to set up an environment with an assortment of different gnome terminals with different geometries at each startup [among other things].

I figure to start them at startup and have them die at logout. Saving a blank session doesn't help since the next time you log in and log out without exiting each and every gnome terminal [which I don't want to have to do] the nuisances remember to come back next time even though the session was not explicitly saved.

I guess I will end up doing something like overwriting .gnome/session during logout. Maybe during logout I should also delete all those gnome-terminal-XXXXXX files cluttering up the place.

Eddie