Friday, February 13, 2009

How to en/disable Compositing in Metacity

I'm having a strange problem with renaming a file or creating a folder or document in Nautilus. When I create a new file, the Nautilus seems to crash, the window disappears, and Nautilus comes back again with the new folder/document created, but I will have to navigate to the folder. This also happens on the desktop. Renaming there is impossible; in nautilus also in in the icon view, but it is possible in the list view.


As a solution I disabled compositing in Metacity. Go to Applications System tools Gnome config editor and there to apps, metacity, general and en- or disable compositing_true by ticking the box.
Another way of doing this:

At the time of writing (Feb 2009) the following actions are required to enable compositing functionality in Metacity, part of the Gnome desktop. This compositing functionality should not be confused with Compiz, Compiz Fusion or various derivitives.

I have to say it works rather nicely on recent hardware although I have found it to significantly slow down on some older integrated laptop chipsets.

1. Execute this (Tells Gnome to use the metacity compositor):
gconftool-2 -s –type bool /apps/metacity/general/compositing_manager true

2. Appended this to the end of xorg.conf (tells Xorg to use compositing):

1.
Section “Extensions”
2.
Option “Composite” “enable”
3.
EndSection

3. Log out of your session, the changes should have taken place next time you log in.

Saturday, February 7, 2009

Remove residual configuration files: Go to System –> Administration –> Synaptic Package Manager In the left column of the package manager, select Status, and then check for Not Installed (residual config packages). If this option appears, then you will have to right-click each package individually, and select Mark for Complete Removal. After selecting all the packages, click Apply.

1. Remove isolated libraries: Open Terminal and type…

sudo apt-get install deborphan

sudo deborphan

If it appears you have some isolated libraries, then use the following commands in Terminal to remove them:

sudo deborphan | xargs sudo apt-get -y remove --purge

and then
sudo apt-get autoremove

Tuesday, February 3, 2009

screen magnifiers

Full screen magnification:Orca

In order to get the Gui admin tools to work you need to either log in as root (disabled in Ubuntu by default) this can be enabled in the login manager screen but you need admin rights to enable it so it won't work with speech (catch 22). The other way is to stop orca, restart it in the --no-setup mode open the gui using sudo and making the changes.

e.g in a terminal type

sudo pkill orca
(enter password)
sudo orca --no-setup
sudo (name of admin gui app)

afterwards I recommend you restart the computer to regain normal service.
You will have to disable Compiz for the screen magnification to work!!

Orca uses gnome-mag.

Kmag for partial magnification
Xzoom for partial magnification
Use commands xzoom or kmag after installation.

When you use Compiz, you can use Ezoom:
http://wiki.compiz-fusion.org/Plugins/Ezoom

I got some problem with windoows rendering in Nautilus which I blame on these screen magnifiers and deinstalled gnome-orca, kmag and xscreen and prevented at sessionsm start up the visual disability choice.

Sunday, February 1, 2009

Backup selected files only

* Difficulty: Intermediate
* Application: tar

Want to use tar to backup only certain files in a directory? Then you'll want to use the -T flag as follows. First, create a file with the file you want to backup:

cat >> /etc/backup.conf
# /etc/passwd
# /etc/shadow
# /etc/yp.conf
# /etc/sysctl.conf
EOF

Then run tar with the -T flag pointing to the file just created:

tar -cjf bck-etc-`date +%Y-%m-%d`.tar.bz2 -T /etc/backup.conf

Now you have your backup.

source: http://www.linuxformat.co.uk/wiki/index.php/58_Cool_Hacks

Unmount busy drives

* Difficulty: Easy
* Application: bash

You are probably all too familiar with the situation - you are trying to unmount a drive, but keep getting told by your system that it's busy. But what application is tying it up? A quick one-liner will tell you:

lsof +D /mnt/windows

This will return the command and process ID of any tasks currently accessing the /mnt/windows directory. You can then locate them, or use the kill command to finish them off.

Running multiple X sessions

* Difficulty: Easy
* Application: X

If you share your Linux box with someone and you are sick of continually logging in and out, you may be relieved to know that this is not really needed. Assuming that your computer starts in graphical mode (runlevel 5), by simultaneously pressing the keys Control+Alt+F1 - you will get a login prompt. Insert your login and password and then execute:

startx -- :1


to get into your graphical environment. To go back to the previous user session, press Ctrl+Alt+F7, while to get yours back press Ctrl+Alt+F8.

You can repeat this trick: the keys F1 to F6 identify six console sessions, while F7 to F12 identify six X sessions. Caveat: although this is true in most cases, different distributions can implement this feature in a different way.

Save ways to exit with system freeze

In Linux, when your entire system freezes, there are plenty of safe ways to exit and get back on track immediately. Alt + SysRq + (a selection of other keys) will do the magic trick. Note: 'SysRq' key is equivalent to the 'Print Screen' key.

Alt + SysR + K
Kill all processes (including X), which are running on the currently active virtual console.

Alt + SysRq + E
Send the TERM signal to all running processes except init, asking them to exit.

Alt + SysRq + I
Send the KILL signal to all running processes except init.

Alt + SysRq + L
Send the KILL signal to all processes, including init.

Alt + SysRq + S
Run an emergency sync (cache write) on all mounted filesystems. This can prevent data loss.

Alt + SysRq + U
Remount all mounted filesystems as read-only. This has the same effect as the sync combination above, but with one important benefit: if the operation is successful, fsck won't have to check all filesystems after a computer hardware reset.

Alt + SysRq + R
Turn off keyboard raw mode. This can be useful when your X session hangs. After issueing this command you may be able to use .

Alt + SysRq + B
Reboot immediately without syncing or unmounting your disks. Using this, you will likely end up with filesystem errors, so this is not highly recommended.

Alt + SysRq + O
Shut the system off right away.

If all these ‘Alt + SysRq’ keyboard combo are hard to remember, you can press Alt + SysRq + H to display a helpful list of the shortcuts above.

http://www.junauza.com/2009/01/linux-keyboard-shortcuts-to-exit-safely.html


Useful comments:
The first thing you should try in something hangs, is just Alt-SysRq-K (or Ctrl-Shift-Backspace while in a graphic X environment, which is a little less brutal). But mostly plain patience will do the trick.

A great way to use these keys is holding down Alt-SysRq while slowly typing REISUB (BUSIER backwards). This will reboot your system in a safe way (just look at the explanations above).

Also note: Alt-SysRq-H only helps you out in the command line.
---------------
If you're having the screenshot (screen capture) try this; it worked for me in Ubuntu:
add this line to the end of /etc/sysctl.conf

kernel.sysrq = 1

then reboot.

For it to work properly, you need to press alt+sysrq simultaneously, then press your exit code (eg k) while holding the other keys down.
-------------
Ctrl+Alt+Esc usually do the thrick for me ;)

Blog Archive

About Me

Exclusion of liability Regarding StillStupid: The use you make of the guides, tips and downloads that you listed on this web site or on another website to which I refer is entirely at your own risk. In no way can I be held liable for damage or consequential damages of any kind, which occurs as a result of that use.