Difference between revisions of "Fluxbox"

From ArchWiki
Jump to: navigation, search
m (Method 2: xintrc)
Line 2: Line 2:
 
[[Category:HOWTOs (English)]]
 
[[Category:HOWTOs (English)]]
  
{{stub}}
 
 
===Installing Fluxbox===
 
===Installing Fluxbox===
 
Install fluxbox from the repositories. New users may want to also install menumaker and/or fluxconf.
 
Install fluxbox from the repositories. New users may want to also install menumaker and/or fluxconf.
Line 29: Line 28:
 
or if you like to use the 'startfluxbox' file use :
 
or if you like to use the 'startfluxbox' file use :
 
  exec startfluxbox  
 
  exec startfluxbox  
 +
It is beter to use 'startfluxbox', because only then file ~/.fluxbox/startup file is used.
 
Remember: there can only be one exec line in your .xinitrc file
 
Remember: there can only be one exec line in your .xinitrc file
  
 
''Note'' : if it crashes on startup, it may be a locale problem.. Setting LC_ALL to the default "C" locale, may avoid this crash. [http://bbs.archlinux.org/viewtopic.php?t=25797 1]
 
''Note'' : if it crashes on startup, it may be a locale problem.. Setting LC_ALL to the default "C" locale, may avoid this crash. [http://bbs.archlinux.org/viewtopic.php?t=25797 1]
 +
Then you can start fluxbox with startx command.
  
 
===Configuring Fluxbox===
 
===Configuring Fluxbox===
Line 65: Line 66:
  
 
Remember to hit save before closing
 
Remember to hit save before closing
 +
=====Manualy=====
 +
Use comand:
 +
nano ~/.fluxbox/menu
 +
Then write lines in this style:
 +
[exec] (name) {command}
 +
If you want to make submenu write:
 +
[submenu] (Name)
 +
...
 +
...
 +
[end]
 +
Then done save and exit. There is no need to restart fluxbox.
 
====Hotkeys====
 
====Hotkeys====
 
Fluxbox offers a basic hotkeys functionality. fluxbox key file is:
 
Fluxbox offers a basic hotkeys functionality. fluxbox key file is:

Revision as of 19:29, 3 July 2007


Installing Fluxbox

Install fluxbox from the repositories. New users may want to also install menumaker and/or fluxconf.

pacman -Sy fluxbox fluxconf

Menumaker was moved to unsupported, to install you need download tarball from aur.

wget http://aur.archlinux.org/packages/menumaker/menumaker.tar.gz
tar xvf menumaker.tar.gz
cd menumaker
makepkg

Install it with:

pacman -U menumaker-0.99.7-2-i686.pkg.tar.gz

Modify if necessary.

Remove fluxconf and menumaker if you want a more minimal install, usage of each will be covered but not required

Starting Fluxbox

Method 1: kdm/gdm

This will automaticly be added to the session types. Select fluxbox from the menu.

Note: you will have to have login manager enabled at first. For instructions how to do that, look here.

Method 2: xinitrc

In your home folder add the code below to your .xinitrc file

exec fluxbox 

or if you like to use the 'startfluxbox' file use :

exec startfluxbox 

It is beter to use 'startfluxbox', because only then file ~/.fluxbox/startup file is used. Remember: there can only be one exec line in your .xinitrc file

Note : if it crashes on startup, it may be a locale problem.. Setting LC_ALL to the default "C" locale, may avoid this crash. 1 Then you can start fluxbox with startx command.

Configuring Fluxbox

Menus

Fast method:

build in command :

fluxbox-generate_menu

this command will generate a .fluxbox/menu/ file based on your installed programms. There is also "helper / regenerate menu" in the fluxbox menu.

Recommended method: menumaker

This method requires you installed menumaker.
this command will generate a default .fluxbox/menu/ file

mmaker -vf Fluxbox
Creating a custom menu with fluxconf

To start the menu section of fluxconf run:

fluxmenu

In the window you will see three columns: Type, Title, & Command/Comment.
Clicking on an entry in this will allow you to edit it.
Clicking on "Add sub" will add a submenu.
Clicking on "Add exec" will add a command.

the type column has several valid options:

  1. begin, required to start the menu file. The title option is the menu header.
  2. submenu, a "folder" inside the menu. Title is the name of the submenu.
  3. exec, a command line. Title is what is shown and Command/Comment is the command to be executed.
  4. separator, a divider in the menu. No arguments to this one.
  5. workspaces, a list of workspaces and what applications are running on each. Title is what will be shown to the user.
  6. stylesdir, a directory containing styles. Title is the path to the dir. Recommended that you put this into its own subdirectory as it can get quite large. directories to use: /usr/share/fluxbox/styles ~/.fluxbox/styles .
  7. config, a menu with many options for configuring behavior of fluxbox. Title is the name of the menu shown to the user.
  8. reconfig, reloads the config file. Title is the title shown to the user.
  9. restart, restarts fluxbox. Title is the title shown to the user.
  10. exit, exit fluxbox, will drop back to the desktop manager or exit X depending on the startup method you used. Title is the title shown to the user.

Remember to hit save before closing

Manualy

Use comand: nano ~/.fluxbox/menu Then write lines in this style: [exec] (name) {command} If you want to make submenu write: [submenu] (Name) ... ... [end] Then done save and exit. There is no need to restart fluxbox.

Hotkeys

Fluxbox offers a basic hotkeys functionality. fluxbox key file is:

~/.fluxbox/keys

fluxconf offers a method of editing this in GUI with the command:

fluxkeys

The Mod1 button corresponds to Alt and Mod4 corresponds to Meta (not a standard key but many map meta to the win key)
The First text box is for a button and the second is for an action. select execCommand to set a command and put the name of the command into the 3rd text box.

More functions of this can be used from the 2nd text box (A drop down menu is available)

Workspaces

Fluxbox defaults to having four workspaces available to the user. available with the alt+F1-4 keys or the arrows on the toolbar next to where it says "one"
Right clicking on desktop and going to your Workspaces menu (menumaker users: FluxBox>Workspaces, fluxconf users: the workspaces title) will let you interact with the workspaces. Workspaces Menu:

Icons - shows minimized applications
--separator--
Workspaces names (default: one,two,three,four) - Shows all the applications on that desktop
--separator--
New Workspace - Adds a workspace
Edit Current workspace name - lets you title your workspace whatever you want. Will show up on the left side of the toolbar 
Remove Last - Removes the last workspace on the list, dumps all of the applications running on that desktop into the one before it

Background

Setting the background requires a background setter you will need to install one of these packages:

  • eterm (recommended)
  • feh (lacks menu transparency)

there are others but these are the most recommended two, to see others check out the fbsetbg documentation in the "Additional Links section" To set the background:

fbsetbg /path/to/background.image

Fluxbox however does not set your background on bootup however you can make it do so by adding the below code to a bootup script, covered below:

fbsetbg -l

(It is of use only if you have previously issued the command with a valid image)

You can also add (or modify) the following line to the file ~/.fluxbox/init to something like this:

session.screen0.rootCommand:	fbsetbg /path/to/wallpaper

Or simply:

session.screen0.rootCommand:	fbsetbg -l


Additional notes for people who like to change wallpaper a lot.

Place the following submenu in your fluxbox menu

[submenu] (Backgrounds)
[wallpapers] (~/.fluxbox/backgrounds)
[wallpapers] (/usr/share/fluxbox/backgrounds)
[end]

Then put your background images into ~/.fluxbox/backgrounds or any other folder you specify, they will then appear in the same fashion as your styles.

Theming

Links to some theme sites are provided below.
To install a theme extract the archive to a stylesdir the default ones are:

  • global - /usr/share/fluxbox/styles
  • user only - ~/.fluxbox/styles

Autostarting Applications

xinitrc users should put all code into thier .xinitrc. However, fluxbox provides functionality to autostart applications on its own.
The ~/.fluxbox/startup file is a script for autostarting applications as well as starting fluxbox itself.
The # symbol denotes a comment.

a sample file:

fbsetbg -l # sets the last background set, very useful and recommended.
# In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. 
# failure to provide them will cause fluxbox not to start.
idesk & 
xterm &
# exec is for starting fluxbox itself, don't put an ampersand (&) after this or fluxbox will exit immediately
exec /usr/bin/fluxbox
# or if you want to keep a log, uncomment the below command and comment out the above command:
# exec /usr/bin/fluxbox -log ~/.fluxbox/log

Additional Links

Fluxbox Homepage
gentoo-wiki Fluxbox HowTo
gentoo Fluxbox Documentation
Themes for Fluxbox
Fluxbox Wiki
fbsetbg documentation