Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create an automated monitoring system that other people can see but cannot do commands.

I have a problem where the user is automatically connected to a screen where the monitoring is happening but they can close the screen.

I would like some way so that any user except root to have their keyboard disabled.

share|improve this question
    
do you want it to make users just check mail or something like that? – poz2k4444 Oct 8 '12 at 20:53
    
I run a Siri Proxy but I need other people to monitor it so I am trusted with that the proxy does. – Muktadir Miah Oct 8 '12 at 21:08
    
So, you just want other people run a specific application? – poz2k4444 Oct 8 '12 at 21:31
    
Yes, I have setup, so when the user logs in they are automatically connected to a screen. The script runs "screen -x root/" All I need it to do is stop the keyboard from typing and make them control the screen. – Muktadir Miah Oct 8 '12 at 22:29
    
@MuktadirMiah I added screen-related stuff to my answer – artistoex Oct 9 '12 at 10:38
up vote 0 down vote accepted

Screen-based solution

You can configure screen to open a window, share the session and write-lock it for USER on startup. Put the following commands in your .screenrc:

screen 1
multiuser on
aclchg <USER> +x detach
writelock on

This prevents the USER from executing any commands except detach (so he can log-off).

X-based solution

You can expose your X display read-only via vnc

x11vnc -viewonly -display :0

where :0 is the display number. You can also create an X server by the -create option.

On the ordinary user accounts you can start up all X sessions with the vnc client as the only program.

share|improve this answer
    
Do you know any way to make user connect to the screen as soon as they log in? And make it automatically run the "multiuser on.." when I make a new screen e.g. I make a new screen by typing "screen -S 1234" Then the "multiuser on", "aclchg <USER> -x ?", etc runs automatically. – Muktadir Miah Oct 9 '12 at 17:00
    
You can put the commands into root's .screenrc. For the user append the lines screen -x root/ and logout to the .bash_login and make sure bash is the login shell for the user (usermod $USER -s /bin/bash). If you like the answer, you can also vote it up. – artistoex Oct 9 '12 at 18:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .