Editing the startup file

From Fluxbox-wiki

Jump to: navigation, search

Contents

Editing the startup file to launch apps you want

The default ~/.fluxbox/startup file which is used by startfluxbox looks like the following: (If you don't have it, make sure you start fluxbox with startfluxbox)

# fluxbox startup-script:
#
# Lines starting with a '#' are ignored.

# You can set your favourite wallpaper here if you don't want
# to do it from your style.
#
# fbsetbg -f ~/pictures/wallpaper.png
#
# This sets a black background

/usr/local/bin/fbsetroot -solid black

# This shows the fluxbox-splash-screen
# fbsetbg -C /usr/local/share/fluxbox/splash.jpg

# Other examples. Check man xset for details.
#
# Turn off beeps:
# xset -b
#
# Increase the keyboard repeat-rate:
# xset r rate 195 35
#
# Your own fonts-dir:
# xset +fp $HOME/.font
#
# Your favourite mouse cursor:
# xsetroot -cursor_name right_ptr
# 
# Change your keymap:
# xmodmap ~/.Xmodmap



# Applications you want to run with fluxbox.
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN & AT THE END.
#
# unclutter -idle 2 &
# wmnd &
# wmsmixer -w &
# idesk &

# And last but not least we start fluxbox.
# Because it is the last app you have to run it with exec before it.

exec /usr/local/bin/fluxbox
# or if you want to keep a log:
# exec /usr/local/bin/fluxbox -log ~/.fluxbox/log


Now just add any applications you want to run after the

# Applications you want to run with fluxbox.
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN & AT THE END.

and before

exec /usr/local/bin/fluxbox

All applications should have & after them, so if you want to run gaim and firefox, add following lines:

gaim &
firefox &

and you're set. Remember that lines starting with # are comments.

How do I start an application after fluxbox starts

This is pretty easy to do, and for some apps like gdesklets is often needed. The best thing to do is to take and make a custom startup file like this one I modified that orignally was made by akira

 #!/bin/sh
 # fluxbox startup-script: 
 #
 
 # repeat rate
 xset r rate 195 35
 xmodmap ~/.Xmodmap
 # hides the mousepointer when not in use
 unclutter -idle 2 -jitter 10 -root &
 # keeps the different cut-buffers in sync
 autocutsel  &
 
 exec fluxbox &
 fbpid=$!
 
 sleep 1 
 { 
    xsetroot -cursor_name left_ptr -fg white -bg black &
    ipager &
    gkrellm2 &
 } &
 
 wait $fbpid

Notice the sleep 1 this is where we tell our apps how long to wait before they start. If you need to wait 10 seconds to start the app fluxbox will already be running so setting sleep 10 will not affect how long fluxbox takes to start this will just mean there is a 10 second delay to start your said application.

You have to make this startup script executable and run it like above explained!

Personal tools
Google Ads