Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

There is a Linux desktop/server co-located at location-b.

I am stationed at location-a and use a VNC client to connect to location-b.

To prevent others from watching my desktop actions, how can I disable/blank the remote desktop at location-b when my VNC client connects?

share|improve this question
    
Do you want to blank the local desktop and work on it remotely, or do you want to connect to some other X session using VNC that is not displayed, and during that time blank the screen so people know you are working? –  Timo Jan 29 at 7:52
    
When the VPN client connects, I want to blank/blackout the remote desktop and work on it remotely. Usually, the monitor is turned off, but I want to make sure it's blacked out even if someone decides to turn on the monitor. –  Level1Coder Jan 29 at 9:30
    
That doesn't really answer my question, so one more try: you can connect with VNC to an X session that does not show up even if the monitor is on do you want that and blank the screen while you do that (answer A), or do you want to connect to the running X on the monitor and blank that (answer B). Please answer A or B. (B is AFAIK not possible, A is possible) –  Timo Jan 29 at 9:38
    
Answer A is fine. –  Level1Coder Jan 29 at 9:48
add comment

2 Answers 2

What you should do is create a new X session using x11vnc (you have to install that on the server). Login with ssh to the server and run:

 x11vnc -display :9

You can now connect to the server using, e.g., vncviewer:

 vncviewer server:9

make sure the numbers in both commands are the same. The normal display is :0, so that will not show anything. You could explicitly blank that screen programmatically, but if you just want to prevent others from seeing what you are doing this should be enough.

Please note that you don't have a full desktop, just an X session.

More background info can be found on this site

share|improve this answer
    
was hoping I could stay within openbox gui env, but I'll give x11vnc a try in the future. –  Level1Coder Jan 29 at 15:18
add comment

I don't think it can be done (as far as I know). A couple of alternatives are to use use the X protocol on top of ssh (using ssh -x or ssh -y) or to use a new tightvnc session.

Both options don't affect the local display, but don't let you see what's currently on it though.

share|improve this answer
add comment

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.