Showing posts with label Cinnamon. Show all posts
Showing posts with label Cinnamon. Show all posts

Tuesday, February 3, 2015

Auto-login LightDM to Cinnamon when Boot and Resume from Hibernate on Centos 7

I am setting my home file server and use its monitor to display cctv.


I don't want to enter password every time when boot and hibernate.
I want to only press the power button when turn on and off.

Here is how:

vi /etc/lightdm/lightdm.conf

[SeatDefaults]
autologin-user=<<username>>
autologin-user-timeout=0

Set the power button to hibernate the computer
vi /etc/systemd/logind.conf
HandlePowerKey=hibernate


To avoid login screen when resume from hibernate,
I disable lock screen.

gsettings set org.cinnamon.desktop.lockdown disable-lock-screen true


Monday, February 2, 2015

Install Cinnamon, LightDM to CentOS 7 Minimal Install

yum install -y epel-release
yum groupinstall "X Window System"
yum install -y cinnamon gnome-icon-theme-legacy.noarch
yum groupinstall Fonts

(execute this command as a ordinary user / not as root)
echo "exec /usr/bin/cinnamon-session" >> ~/.xinitrc

yum install -y lightdm
systemctl set-default graphical.target# rm '/etc/systemd/system/default.target'
# ln -s '/usr/lib/systemd/system/graphical.target' '/etc/systemd/system/default.target'
# systemctl enable lightdm.service
# startx

When resume from hibernate, all open applications always gone.
If I switched to text mode by pressing Ctrl+Alt+F2
then pm-hibernate or systemctl hibernate,
the applications will still alive.

So Here is how I fix it:

vi /etc/systemd/system/display-manager.service
[Service]
;Restart=always


Thanks
http://centoshowtos.org/desktop/cinnamon-on-centos-7/
http://unix.stackexchange.com/questions/181503/how-to-install-desktop-environments-on-centos-7
http://jensd.be/?p=125