Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old February 26th, 2007   #1
RedSquirrel
Chocolate Ubuntu Mocha Blend
 
RedSquirrel's Avatar
 
Join Date: Dec 2006
Beans: 1,783
HOWTO: get a Fluxbox menu (and customization)

Contents

General Information

The Default Menu

Tips for Creating a Custom Menu

More Fluxbox Information and Links


*****


General Information

Basic Requirements for the Fluxbox Menu

The Fluxbox menu is created from a simple text file.

The default menu configuration file is created automatically using the menu package.

The menu package is a dependency for fluxbox. If you installed the fluxbox package from the Ubuntu repositories, the menu package was installed automatically when you installed fluxbox.



Editing the Fluxbox configuration files

The Fluxbox configuration files that you will be editing are located in the directory ~/.fluxbox.

If you have another window manager or desktop environment installed on your system (Openbox, IceWM, GNOME, KDE, XFCE, etc.), you can edit all of your Fluxbox configuration files from there, if you prefer. The next time you run Fluxbox you will see the changes you made.

If you are running Fluxbox and you edit the menu configuration file (~/.fluxbox/menu), you can see the changes you made by simply right-clicking on the desktop to bring up the menu; there is no need to restart Fluxbox to see the changes.


Backups

Before you edit a configuration file, it is a good idea to make a backup in case something goes wrong.

Example:

Code:
cp ~/.fluxbox/menu ~/.fluxbox/menu.backup




Fluxconf


fluxconf has some nasty bugs, particularly in fluxkeys.

My recommendation is to avoid the program altogether and learn to configure Fluxbox by editing the configuration files directly.



Testing

This tutorial has been tested on the following systems:

  • Fluxbox 1.0.0 on Ubuntu 8.04
  • Fluxbox 1.0.0 on Ubuntu 8.10
  • Fluxbox 1.1.1 on Ubuntu 9.04
  • Fluxbox 1.1.1 on Ubuntu 9.10




*****



The Default Menu

In your ~/.fluxbox directory, you have a file named menu. It is a text file.

The contents of the default menu file look like this:

Code:
[begin] (fluxbox)
[include] (/etc/X11/fluxbox/fluxbox-menu)
[end]
As you can see, the default ~/.fluxbox/menu uses the contents of the file /etc/X11/fluxbox/fluxbox-menu as the menu.

If for any reason you need to recreate a default fluxbox menu, simply create a text file with the above three lines and save it as ~/.fluxbox/menu.

Steps:

1. Open the menu file using a text editor:

Code:
nano -w ~/.fluxbox/menu
2. Copy and paste the following three lines:

Code:
[begin] (fluxbox)
[include] (/etc/X11/fluxbox/fluxbox-menu)
[end]
3. Save and Close the file.





Tips for Creating a Custom Menu

Sample file

The default menu is a good place to look for ideas. Make a copy of the default menu:

Code:
cp /etc/X11/fluxbox/fluxbox-menu ~/.fluxbox/fluxbox-menu_ideas.txt




Read the section from the man page that deals with the menu syntax


Run (in a terminal):
Code:
man fluxbox

Look for the section entitled, "MENUS".

Press "q" when you have finished reading the man page.

Helpful Menu Sections


Backgrounds Menu

This will create a menu item that lists all of the backgrounds (wallpapers) in the directories you supply. Adjust the paths to suit wherever you store your wallpapers.

Code:
[submenu] (Backgrounds)
 [wallpapers] (/usr/share/backgrounds)
 [wallpapers] (~/.fluxbox/backgrounds)
 [wallpapers] (~/misc/wallpapers)
[end]
desktop-2009-10-31_14:56:07.jpg



Debian Menu

Most of the applications on your system can be found in this menu. When you install new programs, the menu is updated automatically to include them.

Code:
[submenu] (Debian Menu) </usr/share/pixmaps/debian-logo.png>
[include] (/etc/X11/fluxbox/menudefs.hook)
[end]
The Debian menu contains the same entries as the default menu, but without the Fluxbox configuration entries. You can see this in the following screenshots:

desktop-2009-10-31_14:46:15.jpgdesktop-2009-10-31_14:48:04.jpg




The Fluxbox Configuration Menu


Here is an example:

Code:
[submenu] (Fluxbox Menu)

      [config] (Configure) 

      [submenu] (System Styles) {Choose a style...}
        [stylesdir] (/usr/share/fluxbox/styles) 
      [end]

      [submenu] (User Styles) {Choose a style...}
        [stylesdir] (~/.fluxbox/styles)  
      [end] 

      [workspaces] (Workspace List) 
      [reconfig] (Reload config) 
      [restart] (Restart) 
      [exit] (Exit) 

[end]
desktop-2009-10-31_15:12:32.jpg



Icons

Locations for icon files that you may wish to use in your menu can be found by looking in the sample menu file mentioned above. You can start by looking in the following directories:

/usr/share/pixmaps
/usr/share/icons

A Fluxbox menu with icons:
desktop-2009-04-25_21:15:59.jpg



Menu delay/click to open or close submenus

(from the man page and the Fluxbox source code Changelog)

Quote:
Menu Behavior

The behavior of the submenus in a menu can be configured in the init
file, with the following entries (default for both is 0):

session.screen0.menuDelay: <msec>
session.screen0.menuDelayClose: <msec>

The menuDelay is the delay to open an submenu.

The menuDelayClose is so you don't need to aim that much when
you're moving the cursor to the submenu, over the item below
or above, so it stays visible.

"menuMode: Click" => this means you need to click on the menu item to open it.

session.screen0.menuMode: can be either Click or Delay (default: Delay)
session.screen0.menuDelay: in msec (default: 0 )
session.screen0.menuDelayClose: in msec (default: 0 )

example:

session.screen0.menuMode: Delay
session.screen0.menuDelay: 400
session.screen0.menuDelayClose: 300

Notice how the menuDelay is a bit larger than menuCloseDelay.
This is so the previous menu can close before you open the next.


*****



More Fluxbox Information and Links

The man pages for fluxbox and fluxstyle are definitely worth reading.

Code:
man fluxbox
Code:
man fluxstyle
Here are some links you might find helpful:

Main Fluxbox site
http://fluxbox.org

Fluxbox wiki (This is an excellent reference.)
http://fluxbox-wiki.org










Credits

1. Fluxbox wiki -- http://fluxbox-wiki.org

2. posts on ubuntuforums.org (especially by yabbadabbadont and kerry_s)

3. the man page for fluxbox

4. the Changelog of the fluxbox source code



Recent changes

December 10, 2009

Some minor changes.


October 31, 2009

Some small additions. Tested on Karmic Koala (Ubuntu 9.10). Works well.


April 25, 2009

The default Fluxbox menu on older versions of Ubuntu had several issues. This tutorial contained detailed information about getting the menu to work properly. The default Fluxbox menu on recent versions of Ubuntu works very well and that problem-solving information is no longer necessary. For this reason, I removed it.

Last edited by RedSquirrel; December 10th, 2009 at 11:40 PM..
RedSquirrel is offline   Reply With Quote
Old March 7th, 2007   #2
Syr0
5 Cups of Ubuntu
 
Syr0's Avatar
 
Join Date: Oct 2006
Location: Perth, WA, Australia
Beans: 21
Ubuntu 7.04 Feisty Fawn
Send a message via MSN to Syr0
Re: HOWTO: get a Fluxbox menu (and customization)

Thankyou! You've helped a lot!
Syr0 is offline   Reply With Quote
Old March 8th, 2007   #3
RedSquirrel
Chocolate Ubuntu Mocha Blend
 
RedSquirrel's Avatar
 
Join Date: Dec 2006
Beans: 1,783
Re: HOWTO: get a Fluxbox menu (and customization)

Glad I could help.

Thank you for taking the time to say Thank you! I was having a pretty good day already and your post made it even better, Cheers!
RedSquirrel is offline   Reply With Quote
Old March 13th, 2007   #4
celadine
First Cup of Ubuntu
 
Join Date: Mar 2007
Beans: 1
Re: HOWTO: get a Fluxbox menu (and customization)

Thanks for that info! I'm a long time fluxbox/blackbox user from other distros, and that automatic menu config was driving me nuts.
celadine is offline   Reply With Quote
Old March 19th, 2007   #5
RedSquirrel
Chocolate Ubuntu Mocha Blend
 
RedSquirrel's Avatar
 
Join Date: Dec 2006
Beans: 1,783
Re: HOWTO: get a Fluxbox menu (and customization)

Glad you found it useful.
RedSquirrel is offline   Reply With Quote
Old May 15th, 2007   #6
bodhi.zazen
Ubuntu Guru
 
bodhi.zazen's Avatar
 
Join Date: Apr 2006
Location: Montana
My beans are hidden!
Xubuntu Development Release
Send a message via Yahoo to bodhi.zazen
Thumbs down Re: HOWTO: get a Fluxbox menu (and customization)

Great how-to RedSquirrel.

This is a common question.

You *might* want to mention fluxconf. It is in the ubuntu repository

Screenshot

Also, if anyone just wants to check out Fluxbox and what it can do, it is on the gparted cd, DSL, and wolvix. All 3 distro's have a polished, mauture Fluxbox interface.

Fluxbuntu is based on Ubuntu and is due out in a few weeks.
__________________
A person with ubuntu is open and available to others, affirming of others, does not feel threatened that others are able and good, for he or she has a proper self-assurance that comes from knowing that he or she belongs in a greater whole and is diminished when others are humiliated or diminished, when others are tortured or oppressed. ~ Archbishop Desmond Tutu, 1999

bodhi.zazen is offline   Reply With Quote
Old May 16th, 2007   #7
foureight84
A Carafe of Ubuntu
 
Join Date: Mar 2006
Beans: 89
Re: HOWTO: get a Fluxbox menu (and customization)

sweet tutorial dude.
foureight84 is offline   Reply With Quote
Old May 18th, 2007   #8
RedSquirrel
Chocolate Ubuntu Mocha Blend
 
RedSquirrel's Avatar
 
Join Date: Dec 2006
Beans: 1,783
Re: HOWTO: get a Fluxbox menu (and customization)

Quote:
Originally Posted by bodhi.zazen View Post
Great how-to RedSquirrel.

This is a common question.
Thanks.


Quote:
Originally Posted by bodhi.zazen View Post
You *might* want to mention fluxconf. It is in the ubuntu repository
Done.


Quote:
Originally Posted by foureight84 View Post
sweet tutorial dude.
Thanks.
RedSquirrel is offline   Reply With Quote
Old June 7th, 2007   #9
Thug14
5 Cups of Ubuntu
 
Join Date: Feb 2007
Location: India
Beans: 19
Ubuntu 6.06 Dapper
Re: HOWTO: get a Fluxbox menu (and customization)

thnks a ton mate,ur how to really helped me a lot :cheers:
__________________
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away. --Antoine de Saint-Exupery
Thug14 is offline   Reply With Quote
Old June 7th, 2007   #10
RedSquirrel
Chocolate Ubuntu Mocha Blend
 
RedSquirrel's Avatar
 
Join Date: Dec 2006
Beans: 1,783
Re: HOWTO: get a Fluxbox menu (and customization)

Quote:
Originally Posted by Thug14 View Post
thnks a ton mate,ur how to really helped me a lot :cheers:
Glad I could help. Enjoy your Fluxbox!
RedSquirrel is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:04 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry