Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (No Questions)
FedoraForum Search

Forgot Password? Join Us!

Guides & Solutions (No Questions) Post your guides here (No links to Blogs accepted). You can also append your comments/questions to a guide, but don't start a new thread to ask a question. Use another forum for that.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 20th July 2012, 08:06 AM
secipolla Offline
Registered User
 
Join Date: May 2011
Posts: 700
linuxfirefox
IceWM install and setup guide.

IceWM is a window and session manager that in a sense emulated old Windows look and feel.
Its features are that it's light and simple to use. It's particularly useful for very old computers.

Some lightweight display managers that can be used to keep system light are slim, lxdm and lightdm.

1) Installation
Code:
# yum install icewm icewm-xdgmenu icewm-clearlooks
2) Set-up

Code:
$ mkdir ~/.icewm
$ cd /usr/share/icewm/
$ cp keys menu preferences startup toolbar winoptions ~/.icewm/
Set-up is done through normal text files or bash scripts (for startup and shutdown).

2a) Menu (menu file)

The default menu comes with a couple of 'favourite' apps and, due to icewm-xdg-menu, a nested 'Programs' sub-menu.

First we'll fix the 'Programs' sub-menu.
icewm-xdg-menu (the python script that's installed by the package icewm-xdgmenu) uses /etc/xdg/menus/applications.menu to generate the 'Programs' sub-menu.
/etc/xdg/menus/applications.menu (from redhat-menus) isn't good enough for us because it leaves out the Settings/Preferences applications and (cosmetics; bug) refers to non-existing .directory files so the menu categories don't have icons. We fix that by having our own local applications.menu and .directory files.

Create ~/.config/menus/applications.menu like http://pastebin.com/B6igWPFt (the file already excludes Xfce specific apps, if you use other desktop environments and see that the menu displays apps that aren't relevant to IceWM, just edit applications.menu accordingly).
Also extract https://www.dropbox.com/s/pe3ddjzfpd...tories.tar.bz2 to ~/.local/share/

The sample 'favourite' apps are xterm and an entry for the web-browser, which is broken as it is. To fix it, replace about:blank for http://start.fedoraproject.org/ , for instance, or just use firefox in place of xdg-open ....
You can add other favourite apps by following a similar syntax to the samples.

The image below is my current menu, which has no favourites (they can go on the task bar) and uses the application menu directly (how-to plus other options to configure the menu script on the Start-up section further down the page):



2b) Task bar (toolbar file)

The toolbar file, which defines the launchers on the task bar, has the same syntax as the menu file. The default file needs fixing for the web-browser entry (see Menu section above). Below is mine:
Code:
prog Terminal /usr/share/icons/gnome/24x24/apps/utilities-terminal.png sakura
prog "File manager" /usr/share/icons/gnome/24x24/apps/system-file-manager.png pcmanfm
prog "Text editor" /usr/share/icons/gnome/24x24/apps/accessories-text-editor.png geany
prog "Web browser" /usr/share/icons/gnome/24x24/apps/web-browser.png firefox
The icons can either be in the png format, in which case the full path is needed, or in xpm format, in which case IceWM will look for them in the icons folder for the IceWM theme used and if that doesn't exist, in ~/.icewm/icons and if that also doesn't exist, in /usr/share/icewm/icons. These xpm icons are named with <name>_<size>.xpm (for example: xterm_16x16.xpm).

2c) "Hotkeys" (keys file)

The keys file, which defines keyboard shortcuts to launch applications, is self-explanatory.
In IceWM by default the "Super" or "Windows" key works as the "Alt+Ctrl" combo (this can be disabled in the preferences file - see Preferences section further down the page).

The default keys file has entries for audio volume shifting that calls alsamixer. If you prefer to use pulseaudio directly, the script at http://forums.debian.net/viewtopic.php?f=16&t=74762 can be useful.
Pnmixer 5.1 in Fedora 18 can set hotkeys for mute/unmute and raise/lower the volume.

It also has that misconfigured web-browser entry.

Below are examples based on my current file, which doesn't have the multimedia keys as my keyboard doesn't have them:
Code:
key "Alt+Ctrl+b" firefox
key "Alt+Ctrl+e" beesu - geany
key "Alt+Ctrl+f" pcmanfm
key "Alt+Ctrl+m" dmenu_run -fn '-*-terminus-*-*-*-*-14'
key "Alt+Ctrl+t" sakura
key "Alt+F2" xfce4-appfinder --collapsed
key "Alt+Ctrl+r" beesu - sakura
key "Alt+Ctrl+l" i3lock -c 000000
key "Alt+Ctrl+x" icewm-exit
key "Ctrl+Print" xfce4-screenshooter -r
key "Print" xfce4-screenshooter -fm
key "Super+Print" xfce4-screenshooter -wm
key "Super+KP_Add" pavol increase
key "Super+KP_Decimal" pavol toggle
key "Super+KP_Subtract" pavol decrease
Here I set "Alt+F2" for a run dialogue. IceWM also has a limited run box on its task bar (panel) that can be accessed with "Super+Space" (or "Alt+Ctrl+Space").

IceWM has several of its own keyboard shortcuts set in the preferences file (see Preferences section further down the page).
One that's worth mentioning both because it can conflict with a custom keyboard shortcut and also because it's quite useful, is "Super+h" that hides the task bar (panel).
We can launch apps with "Alt+F2" or with dmenu, if installed, we can switch between open apps with "Alt+Tab" (and browse between all open windows with "Super+Esc"), there are shortcuts to switch between workspaces and we can even open the menu by right-clicking the desktop (or by simply pressing the "Super" key, which will also re-activate the task bar), so by hiding the task bar one gains that extra screen space that is ever so useful with low height screens.

2d) Start-up (startup shell script)

The startup file is a shell script for whatever must be run when icewm-session starts.
Below is my current file and then comments on it:
Code:
#!/bin/sh
[ ! -d ~/.icewm ] && mkdir ~/.icewm
icewm-xdg-menu --entire-menu --with-theme-paths --icon-size 16 --theme Fedora > ~/.icewm/menu

/usr/libexec/polkit-gnome-authentication-agent-1 &
/usr/lib/xfce4/notifyd/xfce4-notifyd &
numlockx &
pcmanfm -d &
xfce4-clipman &
pnmixer &
The first part is remnant from the default file. It checks if ~/.icewm exists and creates it in case it doesn't then generates the applications menu.
You can see that I use the Fedora icon theme and direct the generated menu to the menu file itself (not to a 'Programs' sub-menu).
icewm-xdg-menu --help will give its options.

The menu file is thus generated at login but you should run that command after installing an application too. The easy way is to add to ~/.bashrc
Code:
alias update-icewm-menu='icewm-xdg-menu --entire-menu --with-theme-paths --icon-size 16 --theme Fedora > ~/.icewm/menu'
replacing that command with the one you use in your startup file.

Next comes polkit-gnome-authentication-agent-1. It's needed for apps, like yumex, that uses the polkit authentication dialogue.
After each command we append an & so the next command doesn't need to wait to be started.

Then comes xfce4-notifyd, which is a notification daemon and is used for desktop notifications, if you want them.

Then comes numlockx, to set NumLock to on.

Then comes pcmanfm -d which is the pcmanfm (file manager) daemon. It's useful because pcmanfm manages auto-mounting pretty well and by starting the daemon, auto-mounting works right away:



pcmanfm is a very light-weight (quick) file manager. It can manage desktop icons too. If you want those, replace pcmanfm -d for pcmanfm --desktop*
* Note that if you use this you will need a custom logout command as explained in section 2g) Custom logout script on the next post.

If using Thunar as the file manager instead of PCManFM, just install thunar-volman and it can be set to auto-mount removable drives or to start chosen applications when inserting media.

Then comes xfce4-clipman which is a clipboard manager.

And last in that sample comes pnmixer which is the audio volume and mixer applet.

Note that we disabled all Xfce specific configuration apps from showing in the menu. xfce4-notifyd has a configuration app, so to make it show on the menu we modify its desktop (menu) file, removing the Xfce specific category:
Code:
$ cp /usr/share/applications/xfce4-notifyd-config.desktop ~/.local/share/applications/xfce4-notifyd-config-icewm.desktop
Then edit the latter, removing:
< OnlyShowIn=XFCE;
< Categories=X-XFCE;Settings;DesktopSettings;
< X-XfcePluggable=true
and adding in their place:
> NotShowIn=XFCE;
> Categories=Settings;DesktopSettings;

This can be done similarly with any other Xfce settings applications that you may use (like for Thunar or thunar-volman).

continues on the next post...

Last edited by secipolla; 30th November 2012 at 05:00 PM. Reason: Adding reference to thunar/thunar-volman
Reply With Quote
  #2  
Old 20th July 2012, 08:08 AM
secipolla Offline
Registered User
 
Join Date: May 2011
Posts: 700
linuxfirefox
IceWM install and setup guide (part 2).

2e) Preferences (preferences file)

The preferences file sets the bulk of IceWM's preferences. The .theme file(s) inside an IceWM theme folder can override them.
It comes with all entries commented and set with the default values.

Below are just some entries that might be interesting to change from the default values:

Code:
#  Menus track mouse even with no mouse buttons held
#  (otherwise you need to keep clicking on the menu items just to browse it)
MenuMouseTracking=1 # 0/1
Code:
#  Alt+Tab to hidden windows
QuickSwitchToHidden=0 # 0/1
Code:
#  Alt+Tab to windows on other workspaces
QuickSwitchToAllWorkspaces=1 # 0/1
Code:
#  Show mailbox status on task bar
#  (not needed if you don't have a console mail client like mutt or alpine set-up)
TaskBarShowMailboxStatus=0 # 0/1
Code:
#  See which tooltip items over the CPU monitor on the task bar work
#  for you and disable the ones that don't
CPUStatusShowAcpiTemp=0 # 0/1
CPUStatusShowCpuFreq=0 # 0/1
Code:
#  Show a mini desktop preview on each workspace button
#  (instead of just the workspace number)
PagerShowPreview=1 # 0/1
Code:
#  Show number of workspace on workspace button (if PagerShowPreview=1)
PagerShowNumbers=0 # 0/1
Code:
#  Show the window menu item
#  (you might want to disable this if you keep the window list on the task bar)
ShowWindowList=0 # 0/1
Code:
#  Preselect to Cancel (0) or the OK (1) button in message boxes
#  (logout, restart and shutdown)
MsgBoxDefaultAction=1 # [0-1]
Code:
#  Command to lock display/screensaver (i3lock is a nice and tiny screen locker)
LockCommand="i3lock -c 000000"
Code:
#  Command to run on clock
ClockCommand="gsimplecal"
http://dmedvinsky.github.com/gsimplecal/


Code:
#  Command to select and run a program (I use xfce4-appfinder
#  because I have Xfce already installed but gmrun is great for this
# - Run... entry on the menu)
RunCommand="xfce4-appfinder --collapsed"
Code:
#  Use this if you want a 'Places' like entry on the menu (use your file manager of choice)
OpenCommand="pcmanfm"
Code:
#  The commands below allow to restart/shutdown from within IceWM
#  Make sure you allow for the apps to terminate before calling these
#  otherwise the desktop may get stuck for a while
#  Command to shutdown the system
ShutdownCommand="dbus-send --system --print-reply --dest=\"org.freedesktop.ConsoleKit\" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop"

#  Command to reboot the system
RebootCommand="dbus-send --system --print-reply --dest=\"org.freedesktop.ConsoleKit\" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart"
Code:
#  Command to run on CPU status (htop is better than top)
CPUStatusCommand="sakura -t Htop -x htop"
Code:
#  Network device to show status for (there's no eth0 in F17 anymore)
NetworkStatusDevice="em1"
Etc.

A very handy IceWM feature is tiling windows. By default "Alt+Shift+F2" tiles vertically, "Alt+Shift+F3" tiles horizontally, "Alt+Shift+F7" undoes them.
Look for those shortcuts in the preferences file, change them if you will and explore the other related features it has.

2f) Window options (winoptions file)

The winoptions file allows to set window properties to specific windows. It works, but a little trial and error might be needed as some windows may need to be referenced in some specific way.
For instance, it won't recognize the class for some windows or for others, like Firefox and Thunderbird it needs both the name and the class.
Also, contrarily to the stated on IceWM's manual, it needs first the window name and then the window class (the default sample file is correct on this matter).

Some useful tips:
Code:
#  You would want the run dialogue (xfce4-appfinder, gmrun) to be on the center
#  of the screen but IceWM doesn't place it there by default
#  Here's for xfce4-appfinder in a 1024x768 screen
xfce4-appfinder.geometry: +312+340

#  Thunderbird and Firefox opening in specific workspaces (first workspace is 0)
Mail.Thunderbird.workspace: 3
Navigator.Firefox.workspace: 1

# It doesn't do it automatically in IceWM
xfce4-notes.allWorkspaces: 1

# Prevent the notification bubble from stealing the focus (not working :-( )
xfce4-notifyd.noFocusOnAppRaise: 1
Other apps that are useful to set window properties (in place of the winoptions file) are devilspie, wmctrl and xdotool.

2g) Custom logout script

If pcmanfm --desktop is managing the desktop icons it blocks IceWM's logout command and so we need to set a custom command for that.

This command can be set in ~/.icewm/preferences
Code:
#  Command to start logout
LogoutCommand="icewm-logout"
icewm-logout being a custom script in $PATH like
Code:
#!/bin/sh
pcmanfm --desktop-off > /dev/null 2>&1
killall pnmixer > /dev/null 2>&1
killall xfce4-clipman > /dev/null 2>&1
killall icewm-session
Here I terminate pnmixer and xfce4-clipman, the apps I have by default in tray, just for cleanliness' sake.

3) Appearance

IceWM, like other stand-alone window managers and simple session managers, uses two files to set the GTK related properties like GTK and icon themes, fonts etc.: ~/.gtkrc-2.0 and ~/.config/gtk-3.0/settings.ini
I'll post my current files that will serve as a template (edit for your preferences).

~/.gtkrc-2.0
Code:
gtk-theme-name="MediterraneanNight"
gtk-icon-theme-name="Fedora"
gtk-font-name="Cantarell 11"
gtk-cursor-theme-name="Bluecurve"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintmedium"
include "/home/first/.gtkrc-2.0.mine"
~/.config/gtk-3.0/settings.ini
Code:
[Settings] 
gtk-theme-name=MediterraneanNight
gtk-icon-theme-name=Fedora
gtk-font-name=Cantarell 11
gtk-cursor-theme-name=Bluecurve
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintmedium
If you build lxappearance from source (git clone git://lxde.git.sourceforge.net/gitroot/lxde/lxappearance) without the --enable-dbus option, it will serve as a GUI to configure those appearance settings. lxappearance from the repo apparently needs lxsession running and so doesn't serve us here.

Also, by default, X will force a 96 DPI setting. To use the one that looks better for your taste and monitor size, create ~/.Xresources with your custom value.
Mine is (leave a blank line at the beginning):
Code:
Xft.dpi: 81
Finally there are the IceWM themes. Besides the not so glamorous collection that's installed by default, one can find more themes at http://box-look.org/index.php?xcontentmode=7311

I'm currently using a combination of the MediterraneanNight GTK theme and a darkened Clearlooks IceWM theme (which I'm calling "Bland" - updated on Sep 21).

Last edited by secipolla; 7th December 2012 at 03:50 AM. Reason: xfce4-notes reference in winoptions.
Reply With Quote
  #3  
Old 20th July 2012, 08:54 AM
Adunaic's Avatar
Adunaic Online
Registered User
 
Join Date: Mar 2009
Location: Lancaster, UK
Posts: 883
linuxfirefox
Re: IceWM install and setup guide.

Wow. Looks great, if I get some free time I shall try it out at some point. Thank you.
Reply With Quote
  #4  
Old 15th August 2012, 05:32 PM
secipolla Offline
Registered User
 
Join Date: May 2011
Posts: 700
linuxfirefox
Power-off options

1) Exit dialogue

IceWM has a built-in exit dialogue bound by default to "Alt+Ctrl+Del" (KeySysDialog in the preferences file) that roughly shows the same options as the Logout... menu.
Thus it doesn't display suspend/hibernate options but this can be done with a custom exit dialogue, useful for other standalone window managers/simple session managers as well.

This one requires yad and the 'Logout' button works with different window managers: http://pastebin.com/uLdqgPyC
It has a 'Switch User' button that works with lightdm. To make it work with LXDM, I think one can just replace 'gdmflexiserver' for 'lxdm -c USER_SWITCH'.


It requires ConsoleKit for the 'Reboot'/'Power Off' actions. I think there's a way for systemd to take care of that (and also suspend/hibernate) but I don't know how yet.

This other one has the 'Switch User' button removed: http://pastebin.com/JM3kZnqX

The scripts can be edited to remove the 'Logout' option if using IceWM's built-in Logout... and not a custom command.

Then we can bind it, for instance, with the 'Power' key. So, if we name the script icewm-exit, make it executable and place it in $PATH, we add to ~/.icewm/keys
Code:
key "XF86PowerOff" icewm-exit
To know the name of a key, use the xev command (package xorg-x11-utils).
The 'Sleep' key is XF86Sleep, the 'StandBy' key is XF86Standby.

2) Poweroff, suspend etc. with key press

Another option is to bind the exit dialogue to some key combo and leave the 'Power', 'Sleep', 'StandBy' etc. keys for direct power-down, suspend etc.
This can be done, for instance, with acpid.
Code:
# yum install acpid
It already comes pre-configured to shutdown the computer when the 'Power' key on the keyboard is pressed.
As an example of extending its actions, to configure it to suspend when pressing the 'Sleep' key, create /etc/acpi/events/sleepconf like
Code:
# ACPID config to suspend machine if sleepbutton is pressed, but only if
# no gnome/xfce4-power-manager is running

event=button/sleep.*
action=/etc/acpi/actions/sleep.sh
Then run
Code:
# cd /etc/acpi/actions/
# cp power.sh sleep.sh
and edit sleep.sh replacing shutdown -h now for pm-suspend on the last line.

Last edited by secipolla; 7th November 2012 at 09:49 AM.
Reply With Quote
  #5  
Old 16th August 2012, 03:48 PM
PatMcLJr's Avatar
PatMcLJr Offline
Registered User
 
Join Date: Apr 2005
Location: earth
Posts: 1,130
macosmidori
Re: IceWM install and setup guide.

Oh! IceWM nice.
Thanks for the post.
__________________
x--x--x
http://www.gnu.org/philosophy/free-sw.html
Freedom is never Free.
Pat Jr.
Reply With Quote
  #6  
Old 7th November 2012, 07:45 PM
MarcusMoeller Offline
Registered User
 
Join Date: Nov 2012
Location: Switzerland
Posts: 5
linuxfirefox
Re: IceWM install and setup guide.

Sadly, xfce4-notifyd steals the focus. Have you found a way to prevent that?
Reply With Quote
  #7  
Old 8th November 2012, 10:59 PM
secipolla Offline
Registered User
 
Join Date: May 2011
Posts: 700
linuxfirefox
Re: IceWM install and setup guide.

Quote:
Originally Posted by MarcusMoeller View Post
Sadly, xfce4-notifyd steals the focus. Have you found a way to prevent that?
I didn't look at it but in the winoptions documentation (in Fedora: file:///usr/share/doc/icewm-1.3.7/ic...tml#winoptions ) there's:
Quote:
noFocusOnAppRaise

if set to 1, window will not automatically get focus as application raises it.
It seems IceWM is buggy here. For instance if we set it to skip quickswitch and winlist for xfce4-notifyd it will skip winlist but will skip qwickswitch only if we activate winlist first (ctrl+esc or from menu/taskbar).
So if it has the same bug for the focus then that makes the skip focus useless as it would need an input anyway.

Last edited by secipolla; 11th November 2012 at 06:01 PM. Reason: typo
Reply With Quote
  #8  
Old 9th November 2012, 11:49 PM
secipolla Offline
Registered User
 
Join Date: May 2011
Posts: 700
linuxfirefox
Re: IceWM install and setup guide.

Here's a theme that happens to match very well with F18s default wallpaper:
http://box-look.org/content/show.php/Sky?content=143636

Click image for larger version

Name:	screenshot 2012-11-09 21-45.jpg
Views:	42
Size:	70.9 KB
ID:	23997
Reply With Quote
Reply

Tags
guide, icewm, install, setup

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aide Setup Guide newhelpeeps Security and Privacy 4 2nd November 2009 07:08 PM
It said could't found imlibconfig when I install Icewm terrylai Using Fedora 1 10th November 2005 05:29 AM
want to install icewm masterzzz Using Fedora 6 20th June 2005 05:53 PM
Minor IceWM install symptom = major system problem? jsmaye Using Fedora 7 24th April 2005 04:12 PM
Can I install IceWM on Fedora? Inward_Spiral Using Fedora 3 7th April 2004 05:44 PM


Current GMT-time: 14:24 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat