Note: this wiki is no longer maintained. If you have any questions related to this wiki, please post them on the CrunchBang forums.

Translations of this page?:

DESKTOP Add Desktop Icons in Crunchbang

While the iconless Openbox system is powerful and efficient to use once you get used to it, it can be unsettling to new users at first. For those of us who want a desktop with icons, there are a few different methods available.

Set a file manager to draw your desktop

Both nautilus and pcmanfm can manage desktop icons.

* Note: pcmanfm, nautilus, and xfdesktop4 create a second “desktop” on top of your previous desktop, covering conky. Conky can be brought to the top layer of the desktop by changing the “own_window_type” setting to “normal”.

Use pcmanFM to manage desktop icons

For a complete explanation of using pcmanFM to draw desktop icons, see the full forum post.

Install pcmanFM:

sudo apt-get install pcmanfm

Tell pcmanfm to manage the desktop:

pcmanfm --desktop

You will see desktop icons for all the folders and files in your /home folder. Create a “desktop” folder and point pcmanfm at the folder by modifying ~/.config/user-dirs.dirs:

mkdir ~/desktop
nano ~/config/user-dirs.dirs

(This example uses nano, but you can of course use a different editor) Find this line in user-dirs.dirs:

XDG_DESKTOP_DIR="$HOME"

and change it to

XDG_DESKTOP_DIR="$HOME/desktop"

Save the file. Now pcmanfm will only display files and folders in your desktop folder.

You also need to change a few more things in a standard #! install. #! usually uses nitrogen to manage the desktop wallpaper, but because pcmanfm is now managing your desktop, you also have to use it to change the wallpaper. Back in the man page, you will see several wallpaper-related options. Edit the openbox autostart file (~/.config/openbox/autostart); remove all references to nitrogen, and add this code:

pcmanfm --desktop &
sleep 1s
pcmanfm --set-wallpaper=/home/user/images/wallpaper/nicepic.jpg

Now after you log out and log back in, you should have icons and a nice desktop. If you are using conky and it's not visible, make sure you have

own_window_type normal

in your .conkyrc.

If you want shortcuts for applications on your desktop, you can copy .desktop files from /usr/share/applications into your desktop folder. For example, this code puts a shortcut for Terminator on the desktop:

cp /usr/share/applications/terminator.desktop ~/desktop

You will probably still find your openbox menu available from a right click on the desktop. If it is not, you can get it back using the pcmanfm desktop menu: on the “Advanced” tab, select “Show menus provided by window managers when desktop is clicked”.

You can change the wallpaper using “pcmanfm –set-wallpaper=” in a terminal or by using the pcmanfm desktop menu. If this menu is not available when you right-click the desktop, you can start it with

pcmanfm --desktop-pref

If you always want this menu from a right click, unselect the “Show menus provided by window managers…” on the Advanced tab of the menu.

Use XFCE's xfdesktop4 to draw your desktop

xfdesktop4 works well with Thunar, Crunchbang's current default file manager, and draws the contents of your ~/Desktop folder over a background wallpaper. This might be the easiest way to get desktop icons with openbox.
(If you are using the XFCE version of Crunchbang you are already using xfdesktop4.)

To install:

sudo apt-get install xfdesktop4

Then edit your ~/.config/openbox/autostart.sh file. Comment out the line calling nitrogen, and replace with xfdesktop, thus:

## Set desktop wallpaper
#nitrogen --restore &
xfdesktop &

(NB while the app name is xfdesktop4, the command is xfdesktop!)

* It looks as if XFCE 4.10 will transfer this function from xfdesktop4 to thunar, possibly in 2012, outdating these instructions.

* Don't forget to edit your ~/.config/user-dirs.dirs file:
Change

XDG_DESKTOP_DIR="$HOME"

to

XDG_DESKTOP_DIR="$HOME/Desktop"

otherwise you will have the contents of your home folder on the desktop.

* xfdesktop4 will replace openbox's right-click menu with xfce's menu but you can still call the openbox menu from the tint2 panel and/or from the keyboard.
tint2: edit ~/.config/tint2/tint2rc and make sure the wm_menu option reads

wm_menu = 1

You can then right-click the panel to get the openbox menu.
Keyboard: the default is Win + Space, but the “Menu” key might also be appropriate. Add this code to the <keyboard> section of ~/.config/openbox/rc.xml:

    <keybind key="Menu">
      <action name="ShowMenu">
        <menu>root-menu</menu>
      </action>
    </keybind>

Add icons with other applications

Using an application such as iDesk will give you access to highly customizeable icons with a very light resource usage footprint.

Other known applications for adding desktop icons:

Links to related Forum threads

 
howto/add_desktop_icons.txt · Last modified: 2012/06/15 22:07 by pidsley
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported

Powered by DokuWiki. Hosted by Linode.
Copyright © 2010 CrunchBang Linux.
Proudly powered by Debian GNU/Linux.
Debian is a registered trademark of Software in the Public Interest, Inc.