Saturday, 17 July 2010

Installing LXDE on Fedora13 - some adventures

Why: installing LInux on laptop, want complete security - encrypt entire disk and swap, and support from the distro to make this easy. And full support for multimedia.

Summary:
  • From the full DVD, do not try to install LXDE or Enlightenment or Openbox or anything other than Gnome (or maybe KDE) as the only desktop. You will spend a lot of time and end up with a half-arsed system.
  • Do install Gnome and then the desktop of choice, and maybe later remove the things you dont need.


The adventure

Which Distro?

I've been using Arch as my main distro for some time, but although the flexibility and support from the wiki and forums is tremendous, the constant need to apply updates has become a complete ball-ache. I've got caught between a rock and a hardplace - the tendency for things to be broken after an update leads me to do fewer and fewer updates, and then suddenly I cant install something because I'm too far behind. Hundreds of megabytes a week, and hours of effort just to stand still. Enough.

Tried Mint, and although it makes life easy on the multimedia front. in Isadora it's taken a very bad route, choosing to standardise on some components that basically just aren't ready, e.g. Grub2. Jeez.

Tried PCLinux, but couldn't get it to boot without disabling acpi. Useless for my laptop.

Briefly tried Mepis / KDE but you have to laugh at KDE4. What a joke. (Aside: I see Gnome Shell is going the same way. Sigh)

I've never had a lot of success with RPM based distros, so it was a bit of a surprise to discover that Fedora 13 looked the best candidate. Package management wih yum has come a long way from the rpm-dependency hell that used to prevail.

Fedora 13:
Pros
  • Can manage and install to LVM
  • Good management of other volumes from the running system via palimpsest
  • Easy setup for full disk encryption, and non-ugly screen while capturing initial passwords during boot.
  • Multimedia works fine, with new codecs found and installed as needed (after adding rpmfusion repos, that is)
  • Can remove components of Gnome that on other distros (e.g. Ubuntu) would cause tantrums and attempts to remove more than you intend.
Cons
  • SeLinux (but it can be disabled)
  • sudo - wont run in batch scripts (but you can fix this)
  • automatic networking needs a bit if a nudge (does work eventually)
  • dependencies for desktops other than Gnome and KDE are a bit broken.
  • no long-term distro stability - another release every 6 months ... will need to see if that is an irritant or whether upgrading is easy

Tried installing from Live spins of Gnome and XFCE. These worked ok, but I've used openbox as a window manager before, so I thought it would be good to have a look at LXDE. Installing it after Gnome (or XFCE) seemed to work (except for some issues with function keys, which I'll get to later), so I set out to do a full install from DVD of only LXDE.

This was a mistake.

And why was I not content with the install from Live?
Because all the Live spins insist on installing the root filesystem to ext4. I think it's a bit early to jump on that particular bandwagon. I don't like the developers' attitude (as I perceive it) that data security is the responsibility of the programmer rather than the file system.


more to come ...

some notes on things installed:
  • groupinstall "LXDE"
  • sylpheed
  • gconf-editor (so we can modify behaviour of Nautilus - which unfortunately is required by palimpsest
  • imlib2
  • conky
  • feh
  • qt3 (for dvbcut)
and remove
  • evolution

Building tint2 panel on fedora13

Why: trying to make LXDE usable on Fedora13.
Want: try tint2, e.g. howto replace lxpanel with tint2 trayer
Because: I've observed the window list extending behind other items (the system tray or pager) in my lxpanel.

Starting from:
  • install Fedora13 from DVD (not a Live disk) choosing default Gnome desktop.
  • Add LXDE by yum groupinstall LXDE

This might or might not be overkill, but it works:
  • Add development tools:
yum groupinstall "Development Tools" "Legacy Software Development"
Download, build and install cmake
  • from cmake
  • tar zxf , cd into cmake directory:
./bootstrap
gmake
sudo make install
Download tint2 sources,
  • in my case from tint2
  • tar jxf, cd into tint2 directory
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ../
and at this point discover that many dependencies are not met.
sudo yum install imlib2-devel glib2-devel cairo-devel pango-devel libXcomposite-devel libXdamage-devel libXinerama-devel libXrandr-devel gtk2-devel
then
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ../
make
sudo make install
Now then: trayer?
sources for this came from fbpanel but have migrated to fvwm-crystal.
Hmm not sure about that; it's pretty ancient, and doesn't compile; and doesn't attempt to build a program, its only a plugin for fvwm.
Source and executables are available from debian repositories; comments note that someone has hacked a standalone app from the fvwm code.
I unpacked the debian sources, applied the patches, and attempted the build, but there were some problems that I didn't pursue.
Unpacked the debian binary which is just /usr/bin/trayer and some man pages.
Copied trayer to my own /usr/local/bin, and it works.

Applied the config changes described in the link given at the start of this page.
Sort of - my installation of openbox doesn't have an autostart as described, so I added lines to /etc/xdg/lxsession/LXDE/autostart instead - without the sleep instructions.
@tint
@trayer --expand true --transparent true --alpha 255 --edge bottom --align right --expand true --SetDockType true --widthtype request --margin 130
Hmm. tint fails. It isn't called tint anymore, it should be tint2.
Now it starts, but two problems
  1. an error is issued about a tray already running.
  2. tint2 and trayer do not work well together. Each can expand until they meet - and after they meet, so that eventually tint2 obscures trayer.
Turns out I've started from an old document. The most recent tint2 contains its own system tray, so trayer is not required. I've used it as part of fvwm, where it works quite well, but it has no place with lxpanel or tint2.
Also, the tint configuration file has moved to .config/tint2/tint2rc, and usefully a default version is created by tint2 itself. The documentation in the current tint website is pretty good too. See the wiki page here

Finally, I'm starting tint2 and lxpanel from ./config/lxsession/LXDE/autostart (which I created myself, instead of editing the global /etc/xdg/lxsession... )
@lxpanel --profile LXDE
@tint2
@conky
This is set up so that the lxpanel is top of screen, and contains a pager and various app starters, while tint2 is at the bottom and has only a window list and a tray.

So, time to return to the initial requirements: is tint2 better than lxpanel?
I'm not sure. It doesn't really have a pager, although the window list can be split to show windows on different screens simultaneously - this clutters the panel too much. Similar windows can't be grouped. The clock has no calendar function.
Running with lxpanel is an interesting compromise.

I've tried reverting to lxpanel top and bottom, and strangely now I can't repeat the original problem where the window list and pager items overlap.

I still have an issue with lxpanel where the "show desktop" button hides one of the panels as well as the open windows. But I can live without that feature.

tint2 might become more interesting as it matures. Not sure if its ready for prime time yet.

Tuesday, 7 July 2009

Clear Thunderbird Cache

Scenario: something weird happening with stored mail in Thunderbird. e.g. I was notified by mail notifier that a new message had arrived but it never appeared in my Thunderbird mailbox. However, it could be located by Thunderbird's Search apparently in the Inbox; but when attempting to open it from the Search results the message is entirely blank. (Note: IMAP server).

Solution: close Thunderbird, remove Thunderbird's cache and restart. Cache is rebuilt and missing message appears in Inbox.

HowTo: somewhere in your home folder is Thunderbird's local storage.
Mine is below $HOME/.mozilla-thunderbird/ uisfqgoc.default

: cd $HOME/.mozilla-thunderbird/ uisfqgoc.default
: find . -name '*.msf' -exec rm {} \;

Done.

Sunday, 19 April 2009

dvbcut patched to add navigation buttons.

dvbcut patched to add navigation buttons.

(derived from svn 11, Sep 24 2006)


The modes are
  • Fr : Step by frames.
  • I-Fr : Step by I-frames
  • Aspect : Step by frames which describe a change in aspect ratio. (see below)
  • Black : Step by frames which are entirely black (does not work)
  • Time : Step by approximate time
The current mode is highlighted (I-Fr is the default).

The nav buttons change the current position, depending on the current mode.
The digit shown on each button is not the number of units moved, but is just a marker.
The number of units moved is (intended to be) configurable, depends on the current mode, and is usually non-linear.
e.g. for each mode, my nav buttons are programmed to move the current position by ...
  • Fr: 1,5,10,25,100 (frames)
  • I-Fr: 1,2,5,10,50 (I-frames)
  • Aspect: 1,2,3,4,5 (changes of aspect)
  • Black: broken
  • Time: 1,10,60,180,300 (seconds)

In each case the movement to the new position is accompanied by "fast-play",
i.e. all or some I-Frames ares displayed.
  • Fr: all I-Frames are shown
  • I-Fr: all I-frames are shown
  • Aspect: some I-Frames are shown
  • Time: movement is "quiet" until some I-Frame is found "close" to the target, then all I-Frames are shown.

There was originally intended to be a ValN label (value) for each nav button, to
display the magnitude of the step associated with each - but this was never
implemented.




The context nav button fast-plays a small region around the current position.
It does this:
  1. Remember current position as "currentpos"
  2. Jump back 10 Iframes. (remember this as "leftpos")
  3. Pause 1 second.
  4. Fast-play forward until currentpos
  5. Pause 1 second.
  6. Fast-play forward until find 10-Iframes.
  7. Pause 1 second.
  8. Jump back to leftpos.
  9. Fast-play forward to currentpos.


Footnotes:
Aspect: Navigating by change-of-aspect is particularly useful when processing an "old" tv program in 4:3 format which is interrupted by "new" adverts in widescreen.

Thursday, 16 April 2009

OpenOffice opens fullscreen without window controls

Running OpenOffice 3.0.1 - OOO300m15 (Build:9379)

Windows appear with no X-window borders or controls, kinda full-screen.
Just noticed it recently.

Fix: rm $HOME/.openoffice.org*

Reference

Mount USB stick with mixed case

Scenario: USB stick formatted with as FAT32 for wind0ze compatibility, but when you mount it on linux any file or directory created with an entirely uppercase name appears as lowercase. Or maybe everything appears as lowercase.

Here's some magic for /etc/fstab to mount a volume labelled FOO on /mnt/foo with mixed-case support.
- enter this all on one line, the "\ " are just for (in)convenience here.

LABEL=FOO /mnt/foo vfat \
nodev,exec,noauto,user,users,umask=000,gid=1000,uid=1000,\
shortname=win95,codepage=850,iocharset=iso8859-1 0 0

This isn't specific to USB sticks, but that's where I commonly hit the problem.

Install Unixmail reader in Thunderbird

As delivered recently, (200904) Thunderbird does not offer the option of setting up an account to read local (unix) mail.

This is due to the absence of a configuration file "movemail.rdf". Possibly due to madness in the Mac (the way the change is described smacks of developer arrogance) but you can find a description and clues to fixing it on the Mac (here)

To fix on linux, grab the rdf file from Thunderbird sources or from here and copy it into the installed thunderbird lib directory.

On Archlinux, that is /usr/lib/thunderbird-2/isp/.