Tuesday, September 4, 2007

Make gnome-screensaver opaque with Compiz

If you use Compiz and GNOME, you might have noticed that you can still see your screen after you lock it. This is because, Compiz allows gnome-screensaver's window(the window that normally turns your screen black) to be slightly transparent. To fix this, go to the CompizConfig Settings Manager (most likely in System > Preferences), click on General Options and go to the Opacity Settings tab. You will see something like

((type=Menu | PopupMenu | DropdownMenu | Tooltip | Notification | Combo | Dnd | name=sun-awt-X11-XWindowPeer) | (type=Normal & override_redirect=1)) & !(name=sun-awt-X11-XFramePeer | name=sun-awt-X11-XDialogPeer)

This is a conditional statement which tells Compiz which windows to make transparent. You can either add name=gnome-screensaver to the opacity windows listbox and change the opacity to full or you can add it to the original item in the listbox to change it into:

((type=Menu | PopupMenu | DropdownMenu | Tooltip | Notification | Combo | Dnd | name=sun-awt-X11-XWindowPeer) | (type=Normal & override_redirect=1)) & !(name=sun-awt-X11-XFramePeer | name=sun-awt-X11-XDialogPeer | name=gnome-screensaver)


[via www.tedcarnahan.com]