LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Disable Shutdown Request on Control-Alt-Delete KeyPress (https://www.linuxquestions.org/questions/linux-newbie-8/disable-shutdown-request-on-control-alt-delete-keypress-4175435141/)

marsigme 11-01-2012 04:13 PM

Disable Shutdown Request on Control-Alt-Delete KeyPress
 
Hello...

I'm new to this forum and new to Linux so I've started the hands-on experience of working with Linux by installing CentOS 6.3 as a guest OS in my VMware Workstation v8 environment. Didn't catch it the first time but the second time around, I found that my CentOS VM installation powered off after locking my workstation. Found a number of posts regarding the inittab and control-alt-delete.conf file. I followed the instructions of commenting out the shutdown command and reloading the config by running 'init q' but unfortunately, the ctrl-alt-del still posts the shutdown request. Also, restarted the OS since it was diffcult to determine whether the 'init q' was successful or not.

Wondering if there are other config files that need to be modified? Perhaps, VMware has slipped a config hook or two into the guest OS ctrl-alt-del signal.

Any help with this issue would be greatly appreciated...

Thanks,
Mike

kaz2100 11-01-2012 07:14 PM

Hya,

I do not know much about CentOS, but have you checked /etc/inittab?

cheers

marsigme 11-02-2012 07:47 AM

Thanks for the reply. Yes, I checked the inittab file. There is a comment in the file stating that the /etc/init/control-alt-delete.conf file manages the ctrl-alt-del event handler. I commented out the following in the ctrl-alt-del file...

# start on control-alt-delete
# exec /sbin/shutdown -r now "Control-Alt-Delete pressed"

Saved the file, ran the 'init q' command. When I pressing ctrl-alt-del in my Windows session, VMware passes the key sequence to the running guest OS. In the CentOS case, a dialog prompt is displayed stating the system will shutdown in 60 seconds. The dialog gives me the opportunity to cancel the shutdown request.

Kind of a pain given out Windows group policy locks our workstation after 15 minutes of idle time.

unSpawn 11-02-2012 08:53 AM

Quote:

Originally Posted by marsigme (Post 4820001)
VMware has slipped a config hook or two into the guest OS ctrl-alt-del signal.

Yes, the Knowledge Base says VMware intercepts CTRL-ALT+{DEL,INS} and passes the key combo on to the guest OS.


Quote:

Originally Posted by marsigme (Post 4820448)
When I pressing ctrl-alt-del in my Windows session

Maybe you shouldn't but try using different key combos instead? Like "windows flag"+L, etc, etc?

mmheera 11-02-2012 01:17 PM

Quote:

To make VMware ignore this key combination all you have to do is add the line: mks.ctlAltDel.ignore = "TRUE" to the "C:\Users\All Users\VMware\VMware Workstation\config.ini" file.
From here: http://vmblog.com/archive/2007/08/29...nd-tricks.aspx

Thanks!

marsigme 11-02-2012 02:06 PM

Also, I noticed that if ctrl-alt-del is pressed in the guest OS is not the selected tab in VMware Workstation then the signal will not be sent to the guest OS. Think I'll use the VMware config change as a last resort.

I guess what's more curious to me at this point is why CentOS continues to execute a shutdown even after modifying the control-alt-delete.conf file?

mmheera 11-02-2012 03:49 PM

If you are using a graphical desktop it might happen because of separate desktop environment configuration. As for Ubuntu, they are mentioning it clearly in https://help.ubuntu.com/community/UpstartHowto:


Quote:

Note that this only affects the behaviour of Control-Alt-Delete when at a text console. In a desktop environment, this key combination is handled by the desktop itself and must be reconfigured there.

You might try to change your short-cut key settings for your desktop or desktop configuration.


All times are GMT -5. The time now is 06:40 AM.