Password protected auto login on Ubuntu : auto lock screen after login
If you have one single user on your Ubuntu box and want to allow auto login to speed up boot process and avoid typing your user name every time you boot, but feel concerned about security, this is for you.
In fact, if auto login is activated, everybody can turn on your box and use it. This is even more annoying when you have a laptop.
To prevent that, you can lock the screen as soon as gnome desktop gets started. This will lock your screen, but Ubuntu will load in background while you type in your pass, so there is no time loss.
Here we go :
- First activate auto login in Ubuntu :
Go in Ubuntu Menu > System > Administration > Login Window and select a user for auto login - Then add auto lock at Gnome start up :
press Alt + F2
type "gedit .profile"
paste following lines at the end of the file :if [ !"$AUTOLOGINDONE" ] then export AUTOLOGINDONE=true gnome-screensaver gnome-screensaver-command --lock gnome-screensaver-command --poke fi
- Save the file and restart your computer, the system will auto login and ask for password while finishing loading Gnome.
Aero Snap feature for Ubuntu
Windows 7 came with some good UI features like Aero Snap.
Here's how to make it available on Ubuntu :
First you need compiz config settings manager and wmctrl. The first is used to configure compiz and add custom commands like snap to the left, right or top. The second to change size and state of active window.
Type this in your shell to install those packages :
sudo apt-get install compizconfig-settings-manager wmctrl
Next you need to add some custom commands in compiz that will snap the window :Open ConpizConfig Settings Manager
Click on the Commands button
Enter following three lines respectively in command 0, command 1 and command 2:
wmctrl -r :ACTIVE: -b remove,maximized_horz && WIDTH=`xdpyinfo | grep 'dimensions:' | cut -f 2 -d ':' | cut -f 1 -d 'x'` && HALF=$(($WIDTH/2)) && wmctrl -r :ACTIVE: -b add,maximized_vert && wmctrl -r :ACTIVE: -e 0,0,0,$HALF,-1
wmctrl -r :ACTIVE: -b remove,maximized_horz && WIDTH=`xdpyinfo | grep 'dimensions:' | cut -f 2 -d ':' | cut -f 1 -d 'x'` && HALF=$(($WIDTH/2)) && wmctrl -r :ACTIVE: -b add,maximized_vert && wmctrl -r :ACTIVE: -e 0,$HALF,0,$HALF,-1
wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz
Finally you must activate those three commands when you click respectively to the left edge, the right edge and the top edge of the screen.
Click on Button Bindings tab
Activate Run command 0 by pressing Deactivated button right of it, click on Activate, select left edge and validate
Activate Run command 1 by pressing Deactivated button right of it, click on Activate, select right edge and validate
Activate Run command 2 by pressing Deactivated button right of it, click on Activate, select top edge and validate
Close CompizConfig, open a random window and click to the left, top or right edge to enjoy window snapping on Ubuntu.
Fix Compiz memory leak on Ubuntu Jaunty Jackalope 9.04 with Intel graphic cards
There's a memory leak in Compiz when you are using UXA mode for Intel graphic cards driver. After a few hours, Compiz eats all available memory and the system crash.
To prevent this you must change some Compiz startup options :
Open a console and type
sudo vim /usr/bin/compiz
Round line 74 replace the line ...
COMPIZ_OPTIONS="--ignore-desktop-hints --replace"
... by this one
COMPIZ_OPTIONS="--replace --sm-disable --ignore-desktop-hints ccp --indirect-rendering"
This will fix Compiz memory leak, but there seams to be a problem about rendering transparent windows when intirect rendering is activated.
I didn't notice this problem on my configuration. I followed tutorial in ticket Drastically improve Intel graphics performance under Ubuntu Jackalope 9.04 before, this might help... or not.
For further informations you can read this bug report, especially comment 17.
Drastically improve Intel graphics performance under Ubuntu Jackalope 9.04
The new Ubuntu Jackalope 9.04 has some performance issues with the EXA acceleration method of Intel graphic cards due to actual Kernel. This causes poor 2D performance (eg in Compiz).
There is no available fixes atm in Ubuntu Jackalope repositories but you can update to kernel 2.6.30.3 and configure your Intel graphic device following instructions on this page : HOWTO: Jaunty Intel Graphics Performance Guide.
I used "Optimal configuration" on a Dell Vostro 220s and noticed a drastic performance improvement, especially in Compiz (even in normal mode).