Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Remote desktop to ubuntu and locking the server display

  1. #1
    Join Date
    Aug 2009
    Location
    London, UK
    Beans
    179
    Distro
    Ubuntu Development Release

    Question Remote desktop to ubuntu and locking the server display

    Hi,

    I'd like to control my Ubuntu Karmic install remotely but without the ability for what I'm doing to be shown on the remote display.

    Similar to the way Windows XP works with remote desktop - when someone is connected then it just shows a locked screen and doesn't actually display what is being done.

    Is this possible? I don't mind which protocol I use, but he above requirement is very important security wise.

    ... and no I can't turn off the monitor because it's an Apple and doesn't have an off switch for the monitor.

    Thanks ..

  2. #2
    Join Date
    Apr 2008
    Location
    England
    Beans
    260
    Distro
    Ubuntu

    Re: Remote desktop to ubuntu and locking the server display

    If you are happy using the command line you could use SSH. Take a look at:

    https://help.ubuntu.com/community/SSH

  3. #3
    Join Date
    Aug 2009
    Location
    London, UK
    Beans
    179
    Distro
    Ubuntu Development Release

    Re: Remote desktop to ubuntu and locking the server display

    No, I need graphical access.

    I know I can do "ssh -X .." etc but that is really slow.

    VNC works apart from the fact that what I do is visible remotely at that someone can just sit at my terminal and take control. It's a security issue.

  4. #4
    Join Date
    Apr 2008
    Location
    England
    Beans
    260
    Distro
    Ubuntu

    Re: Remote desktop to ubuntu and locking the server display

    In which case you could....

    1.On the remote machine: install vncserver:

    Code:
    sudo apt-get install vnc4server
    2. Create a second desktop that will run in the background and create a password for it:

    Code:
    sudo vncserver :1
    3. Edit $HOME/.vnc/xstartup to look like the following using fav text editor:

    Code:
    #!/bin/sh
    
    # Uncomment the following two lines for normal desktop:
    unset SESSION_MANAGER
    exec /etc/X11/xinit/xinitrc
    
    #[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
    #[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
    #xsetroot -solid grey
    #vncconfig -iconic &
    #xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
    4. Restart vncserver:

    Code:
    sudo vncserver -kill :1
    sudo vncserver :1
    5. Use vnc viewer to access this desktop and instead of port 5900 repleace the end digit with desktop number. E.g. to connect to 192.168.0.10 desktop :1 it would be 192.168.0.10::5901. The desktop that the user sees by default is desktop :0.

    Hope this helps!

  5. #5
    Join Date
    Aug 2009
    Location
    London, UK
    Beans
    179
    Distro
    Ubuntu Development Release

    Re: Remote desktop to ubuntu and locking the server display

    That almost works. I have a few issues though.

    I can see my desktop if I don't edit $HOME/.vnc/xstartup ... but if I change it to what you said then I get nothing but a grey box with an X cursor in it.

    Once in the desktop my keyboard doesn't work - all the keys seems to be mapped to something else...

    So near and yet ... so far

  6. #6
    Join Date
    Apr 2008
    Location
    England
    Beans
    260
    Distro
    Ubuntu

    Re: Remote desktop to ubuntu and locking the server display

    Try this for your $HOME/.vnc/xstartup file:

    Code:
        #!/bin/sh
    
        xrdb $HOME/.Xresources
        xsetroot -solid grey
        #x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
        #x-window-manager &
        export XKL_XMODMAP_DISABLE=1
        /etc/X11/Xsession

  7. #7
    Join Date
    Aug 2009
    Location
    London, UK
    Beans
    179
    Distro
    Ubuntu Development Release

    Re: Remote desktop to ubuntu and locking the server display

    That's done the trick - thank you!

    What did it do?

  8. #8
    Join Date
    Apr 2008
    Location
    England
    Beans
    260
    Distro
    Ubuntu

    Re: Remote desktop to ubuntu and locking the server display

    It seems as though the keyboard mapping gets all corrupted. This just disables the remapping.

    The crucial line is:

    Code:
    export XKL_XMODMAP_DISABLE=1
    Glad I could help. You should mark your thread as solved now if you are happy it is working. It's good to keep a tidy house!!

  9. #9
    Join Date
    Dec 2005
    Location
    Western Australia
    Beans
    11,480
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Remote desktop to ubuntu and locking the server display

    Quote Originally Posted by magneze View Post
    No, I need graphical access.

    I know I can do "ssh -X .." etc but that is really slow.
    Do ssh -Y instead. It's faster. Having said that, ssh -X should still be fast enough over a local area network.
    I try to treat the cause, not the symptom. I avoid the terminal in instructions, unless it's easier or necessary. My instructions will work within the Ubuntu system, instead of breaking or subverting it. Those are the three guarantees to the helpee.

  10. #10
    Join Date
    Aug 2009
    Location
    London, UK
    Beans
    179
    Distro
    Ubuntu Development Release

    Re: Remote desktop to ubuntu and locking the server display

    Quote Originally Posted by cj13579 View Post
    It seems as though the keyboard mapping gets all corrupted. This just disables the remapping.

    The crucial line is:

    Code:
    export XKL_XMODMAP_DISABLE=1
    Glad I could help. You should mark your thread as solved now if you are happy it is working. It's good to keep a tidy house!!
    Done. Many thanks for your help again.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •