X and Fluxbox :: Using .xinitrc to launch programs at startup



Hello Dsl users,

I am a newbie in linux (and dsl). My first contact was with red hat 6.2 on my 486 dx5(or dx4?). I have not used linux since.. A couple  of months ago my hard drive stopped working (in windows) and I was thanking God when i managed to retrieve all the data with a Mepis distro. This incident aroused my curiosity about linux and invoked the desire to learn how to use linux and unix-based operating systems.

I have already installed a fedora distro in my laptop with dual boot, and i am trying to make gentoo work in another laptop. Now i have a laptop i bought from ebay for £20 and i want to give it to my parents in the form of a digital picture frame. The laptop is a Compaq Armada 1580 DT. I have managed to install DSL (after four days reading posts and books for linux - thanks to the damn screen   ) to this old guy and he works better than i have expected..(with only 32MB). Dsl is becoming one of my favorite distros since it runs on every old junk ( respect to third age laptops) as good as it runs on my new compaq r4000!!! :laugh: :laugh:

I have installed GQview and trying to make it work at startup with slideshow in fullscreen.I understand that I have to mess with the .xinitrc file to make it work. What I did was to append " /usr/bin/gqview -f -s &>/dev/null & " in the end of the file.

Ha ... Didn't work..

Then i did
" /usr/bin/gqview -f -s &>/dev/null &
exec fluxbox 2>/dev/null "

same thing.. Then i have putted the line in the middle of the case function (which is already there) and prayed.

Ok this starts but the Gqview window is between me and the fulscreen slideshow in the background... Not nice at all!!!

After several experiments (trial and error here i come) i have managed to make it work without displaying the GQview window.

i have left everything else as it was (i do not know what everything exactly does inside that file)

Code Sample

#a few lines with if's and kbd specs, icons etc.

torsmo 2>/dev/null &

#then the case function:

case $DESKTOP in
fluxbox )
 fluxter &>/dev/null &
 wmswallow -geometry 70x80 docked docked.lua &
 /usr/bin/gqview -f -s &>/dev/null
exec fluxbox 2>/dev/null
;;
*)
./.background
 sleep 2
 exec jmw 2>/dev/null
;;
*)
 exec fluxbox 2>/dev/null
;;
*)
 exec fluxbox 2>/dev/null
esac



If i ommit the "&" at the end of the sentence it doesn't put the window in front of the slideshow.The problem is that untill i quit the gqview it doesn't load the background. I do not really care about the background but i want everything loaded before the slideshow begins.

Can i use cli commands to minimize the window of Gqview?

I am not sure where to put xset -s off , xset -s noblank, as well.

Any help and ideas would be appreciated.

P.S. Fluxbox is really nice!!!!  :p  :p
P.S. 2 I am really sorry for the long post. I wanted to introduce myself before discussing this issue.

#a few lines with if's and kbd specs, icons etc.

torsmo 2>/dev/null &
xset -s off &>/dev/null &
xset -s blank &>/dev/null &
sleep 2
exec /usr/bin/gqview -f -s &
#then the case function:

case $DESKTOP in
fluxbox )
fluxter &>/dev/null &
wmswallow -geometry 70x80 docked docked.lua &
exec fluxbox 2>/dev/null
;;
*)
./.background
sleep 2
exec jmw 2>/dev/null
;;
*)
exec fluxbox 2>/dev/null
;;
*)
exec fluxbox 2>/dev/null
esac


Try that. :D

Works like charm !!!!!

:p  :p  :p

Thank you very much kerry!!!

If you do not mind and you have the time could you please explain me why it needs "sleep 2 " after the xset command , and what is the difference in using "exec" rather than just writing the path (As i did in the case command..)

Thanx again for you time and reply !  :D

oups, Actually it worked for the exit startx procedure. :(  :(
when i rebooted the laptop, it did again the same thing:
starts gqview , fullscreen slideshow on the background and the gqview window in front of the slideshow.

Is there any way to minimize the main window of the gqview through .xinitrc file after it loads?

Maybe try the -geometry (size) and see if that works. "sleep" pause's it so everything else has time to load before gqview. If i'm understaning you right. you need gqview to load first then, so change to.


exec /usr/bin/gqview -f -s &
sleep 5
torsmo 2>/dev/null &
xset -s off &>/dev/null &
xset -s blank &>/dev/null &

#then the case function:

Hopefully that gives enough time for gqview to finish loading then load the others.

Next Page...
original here.