个人工具

UbuntuHelp:IceWM

来自Ubuntu中文

跳转至: 导航, 搜索

<<Include(Tag/NeedsExpansion)>> IceWM is a window manager like Fluxbox or Metacity. It is not a desktop environment like Gnome or KDE (and is usually used independently of one). It is designed for lightweight simplicity and ease of use, but not focused on customizability. The look and feel is similar to that of Windows 95. There is also Icebuntu, a Ubuntu based distribution that uses IceWM as the default Window Manager. More information on this project can be found here

Why should I use IceWM?

There are many reasons why you may want to run IceWM instead of Gnome or KDE. One important reason is that IceWM requires very little memory, and this can be important to systems that have little memory to begin with, or ones where every bit is needed (for hardcore gamers, for example). Others like to set up IceWM for their family members who just want something that looks and acts like Windows, and doesn't get in their way. IceWM is also known for being so simple and plain, that you forget it's there. This is a good thing for expert users who don't need to customize the look of their desktop every day but just have something that's solid and easy on the eyes. Various Screenshots of IceWM can also be found here and here

Installing IceWM

(The following installation instructions assume you are installing IceWM on a default Ubuntu installation, which uses GDM or KDM. Users wishing to install the absolute minimum should first consult the Installation/LowMemorySystems wikipage for instructions more particularly directed to minimal installations.) This is the easy part. IceWM is in the universe repositories. Enable the universe repositories (if necessary) and then install the following packages: icewm icemc iceconf.

$ sudo apt-get install icewm icemc iceconf

After you install, logout and select IceWM on the Sessions menu.

Configuration

In the Unix tradition, IceWM uses plain text files stored in the ~/.icewm folder for its settings. Originally they are at /usr/share/icewm, so you may create the .icewm folder in you home directory and copy the 'keys', 'menu', 'preferences', 'toolbar' and 'winoptions' files to it so you may configure IceWM without needing to be root. The most important file is ~/.icewm/preferences. It can be edited by hand, but the easiest way is to use the graphical configuration tool iceconf.

$ iceconf

There are many configuration options in ~/.icewm/preferences but two of them are almost essential if IceWM is to become your day-to-day window manager:

#  Command to shutdown the system
ShutdownCommand="sudo halt"

#  Command to reboot the system
RebootCommand="sudo reboot"

otherwise you'll have to logout to be able to reboot or shutdown. But for these commands to work you must edit /etc/sudoers so they can be executed without a password. For this, use visudo, which checks for any mistakes that may have been made while editing:

$ sudo visudo

then add this line at the end of the file:

%admin ALL=NOPASSWD: /sbin/halt, /sbin/reboot

If you wish to edit IceWM's menus, you can do so graphically using the icemc tool:

$ icemc

If you want certain programs to start automatically when you log in, you can use a startup file, much like the one in Fluxbox. It's located in the ~/.icewm folder. It's not there by default, so let's create it:

$ nano .icewm/startup

Here's an example:

!#/bin/sh

conky&
Eterm -O -x -f white --scrollbar 0 --buttonbar 0&
xscreensaver -nosplash&
gnome-volume-manager&

Save, and quit nano. Don't forget to add an & after each app to keep them running. Now, you need to make it executable:

chmod +x .icewm/startup

And that's all. Next time you log in, you should see the added programs running. More IceWM Configuration Applications can also be found here, which are not in the Ubuntu Repositories.

Keys

You can setup shortcut keys in the ~./icewm/keys file to launch some quickly needed programs while using IceWM. Here is an example of setting up Xscreensaver to lock the screen when pressing Super+L:

$ nano .icewm/keys

You will find alot of different shortcut keys in here. Now anywhere in this file, add this:

key "Super+L" xscreensaver-command -lock

Alternately, the key can be changed to suit your needs, and multiple different keys can be added to this file to allow you to make different shortcut keys for launching programs. Save and quit nano. You will need to restart IceWM for the changes to take effect.

Toolbar

You may place quick-launch icons at the taskbar by editing ~/.icewm/toolbar. The syntax is simple:

prog    "name" icon command

where:

  • name is what will be shown when the cursor hovers the icon; e.g.: "VLC Media Player".
  • icon is an icon name in /usr/share/pixmaps or an icon path; e.g.: vlc or /usr/share/icons/gnome/16x16/categories/applications-multimedia.png.
  • command is the command to launch the application or the path to its executable; e.g.: qvlc or /usr/bin/qvlc.

Themes

IceWM comes with around 72 preinstalled themes; some nicer themes are to be found elsewhere on the Internet. Here are some examples: IceBuntu: http://themes.freshmeat.net/projects/icebuntu/ Silver XP: http://themes.freshmeat.net/projects/icewmsilverxp/ TrueCurve: http://themes.freshmeat.net/projects/truecurve/ IceGil: http://themes.freshmeat.net/projects/icegilgrey/ ThinBlack: http://themes.freshmeat.net/projects/thinblack/ VistaBlack: http://box-look.org/content/show.php/VistaBlack?content=59925 The first three themes are just clones of other popular themes: the first is Dapper's Human theme, the second is Windows XP, and the third is Fedora's theme. More themes can also be found at Box-Look.org. Installing themes is easy. User themes are installed in the folder ~/.icewm/themes/. This may not exist yet, so let's create it:

$ mkdir .icewm/themes

Now, we need to move the downloaded theme to this folder:

$ mv yourdownloadlfolder/youricewmtheme.tar.gz .icewm/themes/

Next, go to the themes folder and unpack your downloaded theme:

$ cd .icewm/themes
$ tar xvzf youricewmtheme.tar.gz

Done! Now, go to your start button and go to the themes section. You should now see your downloaded theme listed.

Desktop

If you want a desktop with IceWM, you can do so in several ways. The best is to get ROX-Filer.

$ sudo apt-get install rox-filer

Then, to launch your new desktop:

$ rox --pinboard=MyPinboard

You can also add the above command to the startup script mentioned in the configuration section and the rox-filer will automatically start.