Home
Home Blogs k4tz's blog
    • Blog
    • Clinic
    • Contact
    • Download
    • Login
    • Sitemap

Poll

Best of Ubuntu:

Archives

November 2008
SunMonTueWedThuFriSat
1
2345678
9101112131415
16171819202122
23242526272829
30

LXer -- Linux and Open Source News

  • Reliable Linux netbooks for Black Friday
  • S3 Announces New GPU, Magical Linux Driver
  • Anonymous Proxy Using Squid 3 On CentOS 5.x
  • 5 Ways To Beat The IT Budget Blues
  • No Love, but Plenty of Like, for the G1
more

Linux Today

  • Setting Up Master-Master Replication On Four Nodes With MySQL 5 On Debian Etch
  • Plain English Explanation Of An Awk Statement For Linux Or Unix
  • Can't Print in Evince, GEdit, Claws-Mail
  • Kubuntu Moves Forward: You Can't Please Everyone, All the Time
  • Editor's Note: Linux Should Copy Amiga
more

Linux Insider

  • No Love, but Plenty of Like, for the G1
  • Mozilla Cautions Against Experimental Firefox Plug-Ins
  • By the People: Citizen Involvement the Open Source Way
  • The Rocky Legal Landscape of Virtual Worlds, Part 2: Patents
  • The Linux Licensing Labyrinth
more

Fluxbox Beginners Guide Part 2

Submitted by k4tz on Tue, 08/19/2008 - 11:21
  • Blog
  • Ubuntu

Let’s say you want your wallpaper to be there when you start up your pc instead of having to type the command.

Look for the

Quote:
# fbsetbg -f ~/pictures/wallpaper.png

line and remove the “#” in front of it. Then adjust the path to point to the actual wallpaper.

Note that in Ubuntu ~/pictures/wallpaper.png won’t work. Everything in linux in case sensitive so it has to be ~/Pictures/wallpaper.png

Or lets say you want to add conky.

Look for this block of text

Quote:
# 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 add “conky &” to the bottom without an “#”.

Mine looks like this:

Quote:
# 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 /home/rw/Pictures/wall.jpg
#
# This sets a black background

#/usr/bin/fbsetroot -solid black

# This shows the fluxbox-splash-screen
fbsetbg -C /usr/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/rw/.fonts”
#
# Your favourite mouse cursor:
# xsetroot -cursor_name right_ptr
#
# Change your keymap:
# xmodmap “/home/rw/.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 &
conky &
mpd &
mediatomb &

# 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/bin/fluxbox
# or if you want to keep a log:
# exec /usr/bin/fluxbox -log “/home/rw/.fluxbox/log”

7. Editing the menu

Because the menu is automatically generated by ubuntu, you’ll see that /home/username/.fluxbox/menu points to /etc/X11/fluxbox/fluxbox-menu .

So let’s copy the content of that last file to /home/username/.fluxbox/menu .

The file is easy once you know what to do.

It basically goes like this:

Quote:
[begin] (Fluxbox)
[exec] (xterm) {xterm}
[separator]
[submenu] (Tools)
[exec] (Galculator) {galculator}
[exec] (Gnome Commander) {gnome-commander}
[exec] (File Roller) {file-roller}
[exec] (K3B) {k3b}
[exec] (Gramps) {gramps}
[end]

[submenu] (fluxbox menu)
[config] (Configure)
[submenu] (Styles) {Choose a Style…}
[stylesdir] (/usr/X11R6/share/fluxbox/styles)
[end]
[workspaces] (Workspace List)
[submenu] (Tools)
[exec] (Window name) {xprop WM_CLASS|cut -d \” -f 2|xmessage -file - -center}
[end]
[commanddialog] (Fluxbox Command)
[reconfig] (Reload config)
[restart] (Restart Fluxbox)
[exec] (About) {fluxbox -v 2>/dev/null | head -n1 | xmessage -file - -center}
[exit] (Exit Fluxbox)
[separator]
[exec] (Reboot) {shutdown -r now}
[exec] (Shutdown) {shutdown -p now}
[end]
[end]

You always start with

Quote:
[begin] (Fluxbox)

[end]

Everything else goes in there. Kind of like the <html> </html> tags for those familiar with html.

If you want to list a program in the main menu, you use this code:

Quote:
[exec] (xterm) {xterm}

Where (xterm) is the word that will appear in the menu and {xterm} the command to launch the app.

If you want a little separator, use this

Quote:
[separator]

Most likely you’ll want sub-menu’s.

You use

Quote:
[submenu] (name you come up with)

[end]

So between those two, you can use the [exec] to list applications or open another submenu.

The second part of text in the example, is the fluxbox menu.

I didn’t touch it, but you could throw some things around in there if you like.

Mine looks like this:

Quote:
[begin] (Fluxbox)
[exec] (Xterm) {xterm}
[separator]
[submenu] (Tools)
[exec] (File Roller) {file-roller}
[exec] (Mirage Image Viewer) {mirage}
[exec] (Synaptic) {gksu synaptic}
[end]
[submenu] (Internet)
[exec] (Firefox) {firefox}
[exec] (Emesene) {emesene}
[exec] (Transmission) {transmission}
[exec] (Xchat) {xchat}
[exec] (Frostwire) {frostwire}
[exec] (Nicotine Plus) {nicotine}
[end]
[submenu] (Editors)
[exec] (Mousepad) {mousepad}
[exec] (Abiword) {abiword}
[exec] (Gnumeric) {gnumeric}
[end]
[submenu] (Multimedia)
[exec] (VLC Media Player) {vlc}
[exec] (Sonata) {sonata}
[exec] (Brasero) {brasero}
[exec] (Audio Tag Tool) {tagtool}
[exec] (Avidemux) {avidemux}
[end]
[submenu] (Graphics)
[exec] (Gimp) {gimp}
[exec] (Xpdf) {xpdf}
[end]
[separator]
[submenu] (Fluxbox Menu)
[config] (Configure)
[submenu] (Styles) {Choose a Style…}
[stylesdir] (/usr/X11R6/share/fluxbox/styles)
[end]
[workspaces] (Workspace List)
[submenu] (Tools)
[exec] (Window name) {xprop WM_CLASS|cut -d \” -f 2|xmessage -file - -center}
[end]
[commanddialog] (Fluxbox Command)
[reconfig] (Reload config)
[restart] (Restart Fluxbox)
[exec] (About) {fluxbox -v 2>/dev/null | head -n1 | xmessage -file - -center}
[exit] (Exit Fluxbox)
[separator]
[exec] (Reboot) {shutdown -r now}
[exec] (Shutdown) {shutdown -p now}
[end]
[end]

It’s nice and simple.

(watch first screenshot to view menu)

8. Set your own icons

Open up /home/username/.gtkrc-2.0 and add this line to it

Quote:
gtk-icon-theme-name = “ALLBLACK”

ALLBLACK is the name of the folder containing my icon set in /home/username/.icons .

So just put the name of the theme you extracted there instead of ALLBLACK.

Note you can also set your gtk theme like that instead of using the app.

Use

Quote:
gtk-theme-name = “NovaBlue”

for that, where NovaBlue would be the name of the folder containing your gtk theme in /home/username/.themes .

9. Select your keyboard layout

You will have to edit your xorg.conf file. Use this command to do so:

Code:
sudo mousepad /etc/X11/xorg.conf

(presuming you use mousepad, if not change to the editor of your liking)

In the first block of text you’ll see:

Quote:
Section “InputDevice”
Identifier “Generic Keyboard”
Driver “kbd”
Option “XkbRules” “xorg”
Option “XkbModel” “pc105″
Option “XkbLayout” “be”

You would change the last one to the keyboard layout you would like.

Mine is now “be” (azerty), so change that to yours.

You can put more that one.

You could set

Quote:
Option “XkbLayout” “be,us”

You could then switch between layouts by using the command

Code:

Code:
setxkbmap be

or

Code:

Code:
setxkbmap us

The first command would set your keyboard layout to azerty (be), the second one to qwerty (us).

Now, you could add those commands to your menu by editing your menu file.

Code:

Code:
sudo mousepad /home/username/.fluxbox/menu

You would use the following to add those:

Quote:
[exec] (azerty) {setxkbmap be}
[exec] (qwerty) {setxkbmap us}

But it would be best to add a submenu for changing keyboard layouts.

Quote:
[submenu] (Layouts)
[exec] (azerty) {setxkbmap be}
[exec] (qwerty) {setxkbmap en}
[end]

Then when you right-click your desktop, a mentioning of “Layouts” will be there, with the options to load the “azerty” or “qwerty” keyboard layouts.

–

Hope this helped.

————————–

---------

PREVIOUS

Guide taken from my Ubuntu blog http://linuxowns.wordpress.com

Source: http://ubuntuforums.org/showthread.php?t=878781

 

  • k4tz's blog
  • Add new comment

Recent blog posts

  • How to check which IP's a particular program is connected to
  • Compiling Audacity from source to work with JACK
  • Quickly change an encrypted volume's password
  • Play RealMedia on Ubuntu 8.10
  • JDownloader - error java version
  • Problems with Nvidia drivers: video run slow
  • Realtek ALC861 microfone in Ubuntu trouble
  • Hide terminal which linux keylogger running
  • Firefox for small screens (EEE, Wind, 4211, Aspire One etc)
  • Update to openoffice 3 in Ubuntu 8.10 Intrepid
more

Linux World

  • More Milestones in Linux Kernel Development History
  • Classifying a Linux Knowledge Base
  • Case stories of good and bad community interaction
  • Canonical launches U.S.-based shop.ubuntu.com in time for holiday season
  • USN-674-1: HPLIP vulnerabilities
  • USN-673-1: libxml2 vulnerabilities
  • Set up Sound Juicer to rip from CD as VBR mp3s
  • USN-672-1: ClamAV vulnerability
  • USN-671-1: MySQL vulnerabilities
  • USN-667-1 Firefox and xulrunner vulnerabilities
Archive XML feed
All contents copyright © 2008, Dhuha Net. All rights reserved
Ubuntudoctor® is a member of the Dhuha Network. Privacy Policy
RoopleTheme