01/05/2008

fglrx 8.476: Play movies at your own risk!

It is well known that the ATI fglrx driver produces flickering video in combination with compiz/AIGLX. One solution is to switch to kwin while playing DivX files, DVDs etc.; in this case fusion-icon is your friend ;-)
Nevertheless, with the latest driver (fglrx 8.476 aka AMD Catalyst 8.4) I was in for something special: trying to watch a movie with kaffeine on any window manager crashed my X session instantly. I ruefully reverted to fglrx 8.455.
Morale: Always keep a backup of the last remotely stable driver installer.

25/04/2008

Compiz-fusion: Blur and Shadows

Taaris has already posted about this with respect to katapult in dark and foggy November.
Some remarks about how to get the full monty with compiz-fusion: no shadows behind "flat" windows like the kicker panel and katapult and blurry window borders.

Taaris' tip concerning ugly shadows behind katapult's fake transparency works also for kicker, e. g.
CCSM->Window Decoration->Shadow windows: any -(name="katapult" | name="kicker")

Window decoration blurring seems to work quite well by now with nVidia AIGLX, just check the following settings:
  • CCSM->Blur Windows (activated)-> Alpha Blur (activated)

  • Emerald Theme Manager->Emerald Settings->Compiz Decoration Blur Type: All decoration

20/04/2008

Slow resizing in compiz

This has been posted all over the net, so it's more a personal memo stolen from All My Brain.
Window resizing on compiz/ATI is excruciatingly slow with the default settings. To fix that, configure the "Resize Window" plugin in the CompizConfig Settings Manager.
Resize modes Outline, Rectangle and Stretch work OK, Normal (default) keeps slowing you down.

Compiz and vanishing icons in kicker

Compiz tends to interfere with other startup processes, especially the kicker icons - in Xanthippe's case everything vanished except fusion-icon. If you start compiz with compiz-manager, there is a simple solution:
Insert a wait statement right at the beginning of the compiz-manager script (/usr/bin/compiz-manager), which should take care of any processes started right before compiz. In my case, an arbitrary number of icons still got eaten, so I added a sleep statement before that:

sleep 5
wait

ARCH=`arch`
if [ $ARCH == "x86_64" ]; then
      LIB=lib64
else
     LIB=lib
fi
...

Bash wait and sleep statements
The wait statement waits for the termination of a specific job (process ID or job spec given as argument). With no argument given, it waits for all processes to finish (that's what we did with compiz-manager). See the help wait shell command.
sleep n just delays the execution of your script by n seconds. More information in man sleep.

19/04/2008

Solving (almost) any boot problems

After reinstalling a windows in a dual boot environment, GRUB will be deleted because Windows will overwrite any MBR boot manager. The easy solution without hassle is to get a copy of the Super Grub Disk available at www.supergrubdisk.org. This nice tool will help you either reinstalling GRUB or even writing back the MBR of Windows in case you want to to so, so it should actually always be in your CDROM collection BEFORE anything goes wrong. You will be guided throught all steps, so just use it.

HowTo mount a partition image

Ok, just did a backup of a whole partition, changed the partition size and right after something went wrong - so how to restore the image?

In my case I extended an Ext3 Partition because of disk space issues. Now there is a problem, if I did dd the image (see the previous post in this blog) back to the partition, it would be exactly the same size as I created it, which I do not want to have. I would actually like to copy the CONTENT of the image to the new partition. Here is how to do this:

Uncompress the image (if it was compressed) via the command
gunzip /pathtoyourfile/file

If you stored the file on an external harddrive, I recommend to use a (k/x)ubuntu live cd. By opening a terminal and commanding sudo -s you will get a root console to do anything you want.

Now create a mountpoint whereever you want and then mount the uncompressed image as root (sudo) in the shell commanding:
mount -t ext3 -o loop,ro /pathtoyourfile/filename.img /mountpointyouwanttouse

The option loop will create a virtual device mimicing a block device for your image, the option ro will mount your image in read-only mode (to avoid accidental deletion of anything!)
As you see you can specify the file system, so this will work for all known file systems, e.g. cd/dvd iso images or ntfs images. Here's the command for mounting a CD/DVD iso image:
mount -o loop -t iso9660 /pathtoisofile/filename.iso /mountpointyouwanttouse

Now you can access the content of your image and e.g. copy it via cp or get just single files.

To restore the whole content of a linux partition you might want to use the command
cp -r -p -P /pathtoyourimage/* /pathtomountpointofyourLinuxInstallation/


For explanation: -r will do it recursively for you, -p will preserve the owner information, mode and so on (otherwise everything would belong to root afterwards!!) and -P will tell cp not to follow symbolic links (due to that recursion you would otherwise write your installation several times until the partition is out of free space!)

17/04/2008

How to create and restore partition images

You like your long-finely tuned Linux? You play around with a system often and would like to have a clean ready-to-use system in the back-hand if anything goes wrong? This might interest you then.

How to create images of partitions and restore them. (Without expensive software)

  1. Get a Live-Linux of your choice and start it
  2. Use the following command as superuser (sudo or root) to create a zipped image file of the partition of your choice
    dd if=/dev/hdax | gzip > /mntpoint/filename.img.gz
    or an uncompressed image by
    dd if=/dev/hdax of=/mntpoint/filename.img
    replace hdax by sdax where appropriate
  3. For recovering the image use (root)
    # gunzip -c /mntpoint/filename.img.gz | dd of=/dev/hdax
    or for the uncompressed version, have a look at this blog post.
    Again, replace hdax by sdax where appropriate. Ubuntu users: you need a root console (sudo -s)
A very good article about dd can be found on Wikipedia (dd)

If you want to save your image file on an external harddrive (which is probably a good idea) be careful with the file system you use and remember this limitation:

FAT32 allows for file sizes of maximal 4 GB (which most likely is much too small for any reasonable image file nowadays...)

You can use NTFS on an external harddrive but you need to mount your external harddrive by hand with read/write access - the magic word: ntfs-3g.
Another possibility to use NTFS-formatted external harddrives without manual mounting is to use a current live-cd from (x/k)ubuntu - they mount external harddrives always in read/write mode.
Backuping of a large file does indeed work, but the processing speed is very low (about 30 min for a 7,5 GB partition) due to the fact that ntfs-3g eats up a lot of processor power.

Webmin is great

Just to let you know: if you don't want to look for all the fancy configuration files your linux offers you and to edit them via vi, then this might be THE solution for you:

Webmin is a graphical webbrowser based configuration interface which you can access locally (or, as mentioned before via an ssh-port forwarding securely remotely) by typing in

https://localhost:10000

after a successful install in your preferred browser - well in konqueror because the current version seems to bitch with Mozilla Firefox

With webmin, administraton of an ssh server, filesharing via samba, user and group administration (and synchronization between the modules) and many more things you might find handy is just one mouse-click away [... that sounds like a Windows Ad]