Friday 16 May 2014

How to remotely lock screen in CentOS

To lock
ssh -X user@node "export DISPLAY=:0; gnome-screensaver; gnome-screensaver-command -l;"
to unlock
ssh -X user@node "export DISPLAY=:0; gnome-screensaver; gnome-screensaver-command -d;"

Tuesday 13 May 2014

How to release yum lock

To find out what's locking up yum, try running:

ps aux | grep yum
Note the PID number of the process and run this to kill the process:
kill insert_PID_number
For eg:
$ ps aux | grep yum
root     23861  0.7  0.1 567568 26084 ?        S    10:34   0:01 /usr/bin/python 
/usr/share/PackageKit/helpers/yum/yumBackend.py simulate-install-files 
/tmp/wync_redhat64_v2.0.97.rpm
$ kill 23861