LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Running programs when Flux starts (https://www.linuxquestions.org/questions/linux-newbie-8/running-programs-when-flux-starts-163349/)

mattp 03-28-2004 08:54 AM

Running programs when Flux starts
 
I am (very) new to fluxbox; I just started with it yesterday. Here is my goal, for now: I want flux to have my own background, and run gkrellm when it starts up.

The docs say, to make my own bg, I add:

session0.rootCommand: wmsetbg /home/matt/bgs/supercooledmetal_1024.jpg

to the .fluxbox/init to set my bg, and it works! well, at least for a little while...

I figure, to run any command at start up, you can use:

session0.rootCommand: command

When I try to run gkrellm that way, I only get gkrellm, and not the background. It seems like flux only wants me to have one "rootCommand" line.

I try adding gkrellm to the .initrc. I know I added it right, because when I click the script in Rox, gkrellm pops up, however, when I start flux, nothing.... gkrellm doesn't open.

Any thoughts?

Thanks

dawizman 03-28-2004 10:15 AM

Ok, first, it sounds like your background isn't staying? Here is a fix for that. Just replace the line you put into your .fluxbox/inint

Code:

session.screen0.rootCommand: bsetbg -f ~/backgrounds/zimdib_dark.png
As for starting programs at start of flux, take a look at this:

http://fluxbox.sourceforge.net/docbo...app-setup.html

Longinus 03-28-2004 10:52 AM

for your backgrounds you do that with fluxbox as dawziman has said

for the rest of your apps:

in your .xinitrc file in your home directory

you must add all your programs you want before the line that starts fluxbox

to start gkrellm:

justt add this line right before the exec /usr/local/bin/fluxbox

/usr/local/bin/gkrellm &

make sure you have the ampersand because that makes it run in the background, if you dont have it, it will stop reading the file right there and wont start fluxbox!

hope this helps

mattp 03-28-2004 12:32 PM

Thanks, I will try that when I get home. About the backgrounds, I don't have a problem with it staying if I have the line:
session.screen0.rootCommand: wmsetbg ~/backgrounds/zimdib_dark.png

But, when I was tinkering around trying to get gkrellm to run at start up, I added the line:
session.screen0.rootCommand: gkrellm

below it. Thats when my bg disappeared. If I reversed the order, and put the wmsetbg below the gkrellm line, I would only get the bg, not the gkrellm. That has to do with flux only wanting one command that says:

session.screen0.rootCommand: command

but since I was using two, it would only run the second one.

As for the .xinitrc problem, perhaps I was using improper syntax, that is why I didn't get gkrellm to pop up. Hopefully Longinus' syntax will work, but we shall have to wait and see.

Thanks!

mattp 03-28-2004 07:05 PM

Nope, it dont work. For one, I don't have

exec /usr/local/bin/fluxbox

anywhere in my .xinitrc file. I have flux 1.4. Anyone know whats going on?

Kovacs 03-28-2004 07:13 PM

What is in your .xinitrc then? All you should need is:

gkrellm -w &
exec /usr/local/bin/fluxbox

You can probably just do cat > .xinitrc and type that in. This load gkrellm into the slit (hence the -w) and then starts fluxbox.

Also, fluxbox 0.9.8 (the development version, but it is actually very stable) is a lot nicer than 0.1.14. :D

Also you are better off IMO just putting the command to change the background in whatever style you are using. This line in your ~/.fluxbox/init:
session.screen0.rootCommand: wmsetbg ~/backgrounds/zimdib_dark.png

is only to set the visual background in fluxbox, it has nothing to do with launching processes that run in the background, so you shouldn't be trying to use it to launch gkrellm.

mattp 03-28-2004 07:20 PM

I am using 1.4 cuz it came with Slack. Do you have any tips/site that will help me convert to the other version?

Kovacs 03-28-2004 07:42 PM

Just remove the 0.1.14 package with removepkg, get the 0.98 source from fluxbox.sourceforge.net and compile from source ( it's just a simple ./configure && make && make install, nothing tricky). There is also a package for it at linuxpackages.net if you prefer to go that route. All the documentation on that site is well worth reading, and another good site for fluxbox tips and themes is fluxmod.dk.

mattp 03-28-2004 08:04 PM

Thanks for the info. I will try tonight!

mattp 03-29-2004 09:09 AM

Here is my unmodified .xinitrc. Any ideas?

#!/bin/sh
# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap



# merge in defaults and keymaps

if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
xmodmap $usermodmap
fi

# If the user lacks $HOME/GNUstep, install it:
if [ ! -f $HOME/GNUstep/Defaults/WindowMaker ]; then
wmaker.inst
fi

# Test for cpp, which wmaker uses to process config files:
if [ ! -x /usr/bin/cpp ]; then
NOCPP="--no-cpp"
fi

# Start the window manager:
exec /usr/bin/wmaker $NOCPP

Dabria 03-29-2004 12:21 PM

In ver. 0.9.8 go in ~/.fluxbox/ and you should find a file called apps. If it's not there just create it, put in the following line and that should do the trick.

[startup] {gkrellm -w}


My Desktop

dawizman 03-29-2004 04:35 PM

Quote:

Originally posted by Dabria
In ver. 0.9.8 go in ~/.fluxbox/ and you should find a file called apps. If it's not there just create it, put in the following line and that should do the trick.

[startup] {gkrellm -w}


My Desktop

Sorry for the slight hi-jack here,

Out of curiousity, whick console emulator are you using, and how did you make it compltely transparent?

Crashed_Again 03-29-2004 05:08 PM

Here is my .xinitrc:

Code:

# window manager
fluxbox & wmpid=$!

xset m 1 &
aterm +sb -tr -fn -artwiz-smoothansi-medium-r-normal--13-130-75-75-m-60-iso10646-1 -fg white -bg "#F909F1" -g 179x25+0+0 &
aterm +sb -tr -fn -artwiz-smoothansi-medium-r-normal--13-130-75-75-m-60-iso10646-1 -fg white -bg "#F909F1" -g 179x25+124+370 &
gkrellm2 -w &
xscreensaver -nosplash &

#HANG POINT - wait for windowmanager to exit
wait $wmpid

Hope that helps.

mattp 03-29-2004 10:40 PM

Okay, I will see what I can do with the files you guys posted. Ill be back tommorrow with results. Thanks!

Dabria 03-30-2004 01:12 PM

Dawizman

I'm using aterm.

Lauch it using aterm +sb - tr to make it transparent and remove the scroll border thingies.

Than in ~/.fluxbox/keys I added a modifier to ToggleDecor like this

Mod1 Q :ToggleDecor

Now when aterm lauches just need to hit Alt+Q and it does the trick



My Desktop


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