Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am working on a python project, Where i am displaying a graphical window with log in screen, I've also disabled the close, re size and minimize buttons

My problem:

I have to disable all the interrupts, including disabling system shortcuts like alt + tab, alt + f4 etc, so that user can log in only after entering the username and passwords on the screen.

Is there any linux command or any bash script is there ? 

platform : ubuntu

Thanks for any help !

share|improve this question
    
Cross-posted (please don't do this) at U&L.SE: unix.stackexchange.com/q/97768/46659 –  minerz029 Oct 27 '13 at 6:43

1 Answer 1

up vote 0 down vote accepted

If use the following commands:

xmodmap -e "keycode 64 = "
xmodmap -e "keycode 108 = "

both Alt (left and right) will be disabled/blocked. In the same mode you can disable Tab, respectively F4:

xmodmap -e "keycode 23 = "
xmodmap -e "keycode 70 = "

To enable them back to their normal behavior, use:

xmodmap -e "keycode  64 = Alt_L Meta_L Alt_L Meta_L"
xmodmap -e "keycode 108 = Alt_R Meta_R Alt_R Meta_R"
xmodmap -e "keycode  23 = Tab ISO_Left_Tab Tab ISO_Left_Tab"
xmodmap -e "keycode  70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4"

Use xmodmap -pke command to see all keycodes and their map assignment.

share|improve this answer
    
thanks for the help, how to block tab? ex: xmodmap -e "keycode 23 = " whatToWriteHere –  pavan Oct 27 '13 at 8:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.