Thursday, July 31, 2008

Little linux tragedies

Occasionally, some annoying and seemingly unfixable thing may happen to the system. It is that class of things that does not make the system unstable, but it is hard to tolerate the annoyance even though it is small. It is difficult to find any help for this class of thing because it is a rare occurrence and is difficult to replicate. I restored from a recent backup to correct the little linux tragedy that happened to me.

Normally when starting xfce4 with startxfce4, the splash screen would display, and then the xfce4 desktop would appear before the count of 2. I have discovered that icons for Audio Cdrom can be prevented from popping onto the desktop by creating a file ~/.config/xfce4/desktop/xfdesktoprc with these contents:

[file-icons]

show-removable=false

I removed that file to test what I consider undesireable side effects of having icons for Audio Cdrom pop onto the desktop. I put Led Zeppelin in the Cdrom drive and the icon popped onto the desktop. I don't know what I did, but I must have spasmodically waved the mouse and either clicked a button or pressed a key. A ghost of that Audio Cdrom icon followed the mouse and it looked like it wanted to paste somewhere. By a stroke of "genius", I hit the escape key. The mouse let go of the ghost and it floated back to the Audio Cdrom icon on the desktop. Then, the xfce panel turned into a thin flat line. I tried clicking on the panel, but nothing happened. I panicked and started doing left-click, right-click, click-here and click-there, and then I saw something pop up and I saw "Restart", and immediately clicked it without looking. The panel came back and everything seemed to be ok again.

But it was it really ok? I wanted to reassure myself, so I logged out of xfce and started it up again. This time, once the spash screen displayed, I counted 1 ... 2 ... 3 ... 4 ... all the way to ... 10 before the desktop appeared. I shut down and powered off, then restarted ... same nonsense ... count to 10. I tried completely deleting ~/.config which is xfce4's user configuration directory. Still no good. Something was fried and the snappy desktop startup before the count of 2 ... was gone. However trivial this nusiance may be, it seems intolerable when I know that it shouldn't be that way.

The choices were to live with the nusiance, spend time groping for an answer, spend time reinstalling things, or restore from a recent backup. I chose the easy way which was to restore from a recent backup and recreate the little recent work that would be lost.

And then I created the ~/.config/xfce4/desktop/xfdesktoprc file because I have no need to have Audio Cdrom icons on the desktop which don't serve any useful purpose for me. Then I replicated a little recent work. Then I made another rsync snapshot backup.

So with everything fixed, that was the end of that. Or was it? I was browsing around at the xfce forum and someone had asked "How to restart the xfce panel?" There was a reply "xfce4-panel --restart". Ok then, let's see if we can break it again. I did "xfce4-panel --restart", logged out and did "startxfce4". Same nonsense ... 10 second delay added to the splash screen. Enough of this xfce slow starting business.

Let us find out what was changed by using a crafted rsync command as a --dry-run that shows what would be done if it was to be restored for real:

rsync -aH --numeric-ids --delete --filter=exclude_/back_ups/ --filter=exclude_/lib/modules/ --filter=exclude_/boot/ --filter=exclude_/jhalfs/ --filter=exclude_/sources/ --filter=exclude_/proc/ --filter=exclude_/sys/ --filter=exclude_/dev/ --filter=exclude_/var/ --filter=exclude_**.mozilla/ --dry-run -v /back_ups/root_fs/back_up.0/ / 2>&1 > backtest.log

Of the few things that changed was a ~/.cache directory.

I did "rm -r ~/.cache"

Then everything was fixed again.
What an absolutely marvelous booby-trap.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

Click blog title for the latest post