Saturday, October 29, 2011

xfce4 irritations

In order to monitor the state of my RAID set, I needed to install the 3ware software pieces, especially the GUI.  The install documentation from 3ware is poor.  So I thought I'd create my own by taking some screenshots.  I was going to take screenshots using my window manager's screenshot program.  Unfortunately, ALT-PRINT did not work in XFCE.

I'm running XFCE instead of GNOME 3 because of GNOME 3's vertical workspace changing behavior.  You see, I edit video in Cinelerra and have the Program timeline, Resource and Viewer windows in one monitor and the Compositor in the right monitor.  Also, I use NVidia drivers in Twinview mode.  So for this video editing layout, I need the old GNOME2 horizontal workspaces.  GNOME3 breaks up the left and right monitor when you switch workspaces and you can only switch workspace vertically using CTRL-ALT-Up/Down.  Dumb.

Anyway, ALT-PRINT did not work in XFCE.  Reading here said it might have been a problem with multiple lines in .config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml

Reviewing that file, indeed I find multiple lines referencing the same keys (some under a "default" section, some lines under a "custom" section).  So I edited the file to remove the duplicate references and saved only those with my custom keyboard shortcuts.  My edits to get xfce-screenshooter to bind with both PrtScn and Alt-PrtScn ended looking like this:
      <property name="Print" type="string" value="xfce4-screenshooter -f"/>
      <property name="&lt;Alt&gt;Print" type="string" value="xfce4-screenshooter -w"/>

After removing the multiple entries for the Print key and restarting XFCE, I had my keyboard shortcuts back!  Yay!

Also, while reading that article, I noticed another user had a secondary problem that I had where the logout button for Xfce doesn't have the startup/shutdown option.  So here, it look like the problem might have been with xfce4-session.  I noticed I didn't have this program installed, so I installed it.  And now, I am happily running with a proper logout window:

Lastly, you can also customize what is displayed in the Log Out dialog using syntax like this:
xfconf-query -c xfce4-session -np '/shutdown/ShowSuspend' -t 'bool' -s 'false'

This edits the settings in this file:
.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml

So you see, this is why Linux is a pain in the ass.  You want to do something simple and basic stuff like screenshotting and shutdown/restart and power management is not installed by default or doesn't work.

argh!
sodo


Reference
http://forum.xfce.org/viewtopic.php?id=4781
Feel free to drop me a line or ask me a question.