LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Starting up programs in .xinitrc ? (https://www.linuxquestions.org/questions/linux-software-2/starting-up-programs-in-xinitrc-201601/)

BajaNick 07-06-2004 01:29 AM

Starting up programs in .xinitrc ?
 
Trying to startup xmms when fluxbox starts. I changed the .xinitrc to each of these.

exec wmxmms &

exec xmms &

wmxmms &

xmms &

None of these starts up xmms in fluxbox. I read several threads and they say to use
" exec wmxmms & " but that does not work. What am I missing? thanks

Mega Man X 07-06-2004 01:38 AM

It should work. Maybe when you type startx, it's either reading .xinitrc at /etc/X11/ or /home/.xinitrc. Try editing both and see which one is being used ;)

Cerbere 07-06-2004 05:30 AM

Where are you putting those commands in .xinitrc? You should put the command 'xmms &' before 'exec fluxbox'. The command 'exec command' tells the computer to execute the command and ignore anything that comes after it in a script.

Enjoy!
--- Cerbere

[edit] BTW the command 'wmxmms &' will launch a small dockable version of xmms in the fluxbox slit. [/edit]

BajaNick 07-06-2004 04:25 PM

I tried both .xinitrc files, the one in home and the one in X11. When I type ./xinitrc in the console it reloads fluxbox and xmms starts up, but what is strange is that when I reboot, xmms does not start like .xinitrc is not getting read on boot.

Komakino 07-06-2004 04:26 PM

you want:
Code:

wmxmms &
xmms &
exec fluxbox

What do you mean you type xinitrc at console? .xinitrc should not be executable. It's not a script, it's a configuration file read by startx.

BajaNick 07-06-2004 05:05 PM

I just tried :

wmxmms &
xmms &
exec fluxbox

and that did not work:cry:

my .xinitrc also had: exec/X11R6/bin/fluxbox &

I tried it with every combination and still does not start up xmms or any other prog.

The other file was something different I was working on and got confused, lol.
Im jumping back and forth between 2 slack systems trying to configure each of them differently.

Komakino 07-06-2004 05:15 PM

I have no idea why that isn't working...unless you're logging in from gdm/kdm/xdm...in which case it may be that you need those lines in your .xsession file instead.

Yep, just realised...if you're logging in graphically then the file used is .xsession - .xinitrc is used only by startx.

BajaNick 07-06-2004 05:24 PM

Yes I am logging in as runlevel 4, graphical. I will edit the .sessions file and let you know. Thanks

BajaNick 07-06-2004 06:07 PM

Ok, Im pissed. I cannot find a .xsession file anywhere so I created one in my /home/"USER" directory according to an article I found on the net, but it does nothing. Where is this file? and if I have to make one is it really involved? Thanks

Komakino 07-07-2004 07:06 AM

No, it's not hard...just an empty text file containing the commands you want to run - in your case:
xmms &
wmxmms &

Is all you need I think, saved as .xsession in your home directory.

If that doesn't work then I'm out of ideas.

BajaNick 07-07-2004 08:58 PM

I created a .xsession file and Its still not working. Ive come to the conclussion that it cant be done the way that it is described on all the threads and the other places ive seen it described. There must be something that is not being mentioned that I dont know about.

daisaa 07-19-2004 10:40 AM

What login manager do you use? gdm, kdm, or xdm. In that case of gdm, which is the default, you also have to edit the /etc/X11/gdm/Xsession file. At about line 97 you will come to some lines that look like this. You will have to uncomment the if block, and I also changed the code in the if block to what I perfer and think works best.
Code:

# Some people say that an .xsession file should always be given priority, even if a
# different window manager was requested in $SESSION.  If you want that behavior, uncomment
# the lines below.  This is not recommended (nor, in general, is the use of an
# .xsession file as a default... it should be left for the advanced users).
if [ -x $HOME/.xsession ]; then
        . $HOME/.xsession
fi

Then all you have to do is edit the ~/.xsession file, create it if it doesn't exist. Mine looks like this
Code:

/usr/libexec/gnome-settings-daemon &
xmms -p &
bbkeys -i &
xscreensaver -no-splash &
gkrellm -w &

After these apps are executed control will be given back to /etc/X11/gdm/Xsession and it should start the correct session type (in your case fluxbox)

Hope this helps.


All times are GMT -5. The time now is 12:09 AM.