Take a JPEG image of your choice. Move/copy it to Your Home folder. Rename it to ".face". Yes, a dot-file without extension. Log out, and You should see it!
It should be JPEG and also a square. PNG will not be shown (it works for User Manager, but not for LightDM login, unfortunately). Image of irregular dimensions will get streched.
This works for me on Xubuntu 13.04. Good luck!
Type in a terminal (e.g. Xubuntu, Ubuntu Server with XCFE (e.g. Raspberry PI 3):
sudo -e /etc/lightdm/lightdm.conf
(Better than sudo nano /etc/lightdm/lightdm.conf
or sudo mousepad /etc/lightdm/lightdm.conf
, see below the reasoning* - Thank you red_trumpet for the hint)
Add these lines to the file:
[Seat:*]
autologin-session=xubuntu
autologin-user=YourDesiredAutoLoginUserName
autologin-user-timeout=0
You could use e.g. file /etc/lightdm/lightdm.conf.d/autologin-xubuntu.conf, instead, but then you should make sure settings in another file in that directory or in file /etc/lightdm/lightdm.conf do not override it.
Extra:
To remove password on resume, right-click the system tray power icon then Preferences. This brings up the XFCE power manager (Alternatively you can navigate to XFCE/Settings/Settings Manager/Power Manager). Click Extended in the left pane. Uncheck Lock screen when going for suspend/hibernate.
The last place is XFCE/System/Users and Groups. If it's set "Password: Asked on login" you can change it, and thereafter, if you logout or switch user, you can get back without entering password.
*Reason for using sudo -e instead of the editor directly:
sudo -e copies the file with user privileges, and opens it with your preferred editor. After saving, the file gets copied back to the original file. In this way, the editor does not obtain root privileges, which is a security improvement. (And if configured correctly, your preferred editor is chosen automatically, which is quite convenient).
Sources: lightdm/Read.me, Ubuntu Forum, SuperUser
Best Answer
*For Xubuntu 14.04 : The image must be as high as wide : 200x200 for ex. Open Terminal (CTRL-ATL-T) and copy it to ~/.face Reboot to see if all is OK ?
For Xubuntu versions before 11.10
Create a 96x96 jpg (JPEG) and renamed it as
~/.face
.For Xubuntu versions 11.10 and above
Create a 96x72 png (PNG) and renamed it as
~/.face
.Log-out to see your masterpiece.
how to
The in-built image editor in Xubuntu is Gimp.
Load the image in Gimp and crop the image to approximately 96x96 or 96x72 pixels depending upon your xubuntu version as described above.
Then fine-tune your image via Image - Scale Image...
Break the scale link as shown and enter the pixel size
96 x 96
or96 x 72
as appropriate. Complete the scale by clicking the Scale buttonSave the file. If necessary save the file type when saving (jpg or png).