Stop Microsoft

Miscellaneous => Technical Support => Topic started by: GenuineAdvantage on 30 April 2006, 15:54

Title: Ok, simplest way to startup apps in XFCE
Post by: GenuineAdvantage on 30 April 2006, 15:54
And I mean in the old version, not in the 4.4beta1. Any seasoned tip to get this done easily?

Or maybe even on Fluxbox? I'd be willing to try getting around the bugs I have with it if I could do this cleanly.

And what I mean by startup is having them start at login automatically, of course.
Title: Re: Ok, simplest way to startup apps in XF
Post by: piratePenguin on 30 April 2006, 16:36
When X11 starts under your username it runs whatever is in ~/.xinitrc
Add e.g. 'firefox &' to (the end of) that file and firefox will start with X11 after any WM.
Title: Re: Ok, simplest way to startup apps in XF
Post by: H_TeXMeX_H on 30 April 2006, 18:40
For fluxbox there is a startup script in ~/.fluxbox (or in other words ~/.fluxbox/startup), do the same thing piratePenguin says except you can put the startup entries in there instead of in ~/.xinitrc. The things you put in there will only start with fluxbox though ... so use /.xinitrc if you want them to start with all your window managers.
Title: Re: Ok, simplest way to startup apps in XF
Post by: GenuineAdvantage on 1 May 2006, 04:51
Saving the session starts up some things, like gkrellm, but not others. I'm trying to startup gdesklets. Thanks for the tips but I've already tried all this. I've tried everything suggested to me and nothing works for me for some reason. And I don't have a .xinitrc in the home dir. Creating it doesn't work either.
Title: Re: Ok, simplest way to startup apps in XF
Post by: H_TeXMeX_H on 1 May 2006, 18:29
That's strange ... so if your run gdesklets in a terminal it runs just fine ? In the startup script it should be "gdesklets &". What distro are you running ? It shouldn't matter too much unless it's ubuntu ... ubuntu likes to do things differently sometimes and put things in different places than usual.
Title: Re: Ok, simplest way to startup apps in XF
Post by: piratePenguin on 1 May 2006, 18:42
Quote from: GenuineAdvantage
Saving the session starts up some things, like gkrellm, but not others. I'm trying to startup gdesklets. Thanks for the tips but I've already tried all this. I've tried everything suggested to me and nothing works for me for some reason. And I don't have a .xinitrc in the home dir. Creating it doesn't work either.
I think that could be because the way your display manager starts X11... Not the same way as starting it with 'startx'.
Title: Re: Ok, simplest way to startup apps in XF
Post by: GenuineAdvantage on 2 May 2006, 09:33
You were right, it's because of ubuntu. Starting x with gdm not startx. I tried it on 2 other distros and there is no problem with this. On PCLOS I had to do it another way though, by making a script in /usr/local/bin and setting it in the xfce rc, but it worked. As of now I have ubuntu 5.10 the most nicely tweaked besides this problem. I'd still like to know how to do it on it. Anyone running ubuntu for a while now know it's behaviors? How do I change gdm to startx and would there be any problems doing so?
Title: Re: Ok, simplest way to startup apps in XF
Post by: piratePenguin on 2 May 2006, 19:52
Quote from: GenuineAdvantage
You were right, it's because of ubuntu. Starting x with gdm not startx. I tried it on 2 other distros and there is no problem with this. On PCLOS I had to do it another way though, by making a script in /usr/local/bin and setting it in the xfce rc, but it worked. As of now I have ubuntu 5.10 the most nicely tweaked besides this problem. I'd still like to know how to do it on it. Anyone running ubuntu for a while now know it's behaviors? How do I change gdm to startx and would there be any problems doing so?
KDM also does not obey my ~/.xinitrc script.

I'm guessing it's just the way graphical login managers work. X is already started so there's no point in running 'startx'.

Infact startx is just a shell script that calls 'xinit' which is what actually processes ~/.xinitrc. I dunno why, but graphical mangers seem to not like using xinit, and do everything themselves.

For GDM, /etc/gdm/PreSession/ and /etc/gdm/PostSession/ hold shell scripts which are executed before or after a session is setup. From /etc/gdm/gdm.conf:
Quote
# Note that a post login script is run before a PreSession script.
# It is run after the login is successful and before any setup is
# run on behalf of the user
So stick a shell script in one of those directories (PostSession).