bobb
By:
bobb

Why unable to ssh to vnc xfce4 desktop on Ubuntu 16.04 server?

April 3, 2017 1.3k views
Development DigitalOcean Ubuntu 16.04

Followed tutorials on setting up Ubuntu 16.04 server and using vnc to open xfce4 desktop.
Always end up with gray blank screen.
Google seems to suggest that many people who encounter this problem are using Digital Ocean. Many people claim different solutions; none of which work for me.
Using debian based OS on computer, tightvncserver, and vncviewer.

Thanks.

5 Answers
hansen April 3, 2017
Accepted Answer

Would it be possible for you to use X2Go instead of VNC? It's more stable for something like you're trying and has SSH built in, which makes it more secure.
http://wiki.x2go.org/doku.php/doc:installation:x2goserver

Thanks for the tip, hansen!
X2Go Client works, for me vncviewer and Remmina do not.

Root sign in works perfectly using x2go client.
For some reason, user sign in using the x2go client session opens the x2go window, but it shuts down
immediately, with message "session terminated."

Currently using password (ssh keys next step).
User password accepted after entering "ssh user@ip_address" , so password is working.

Tried useradd <username> in server desktop; username is already in system.
Reset password using passwd <username>.

Still can't sign in as user.
Tried logging out as root, but desktop shuts down immediately, so can't log in as user.
Google shows user log in should work x2go client.
Anybody have any ideas?

Thanks.

  • Hi @bobb
    I didn't get a notification - just use the @ to notify people when writing a comment.

    Okay, so it works if you login as root, but not a regular user. Then it's access rights somewhere that's not correct.

    I've never used x2go, but have you added the user to the x2gogroup - which seems like a typical problem, when searching about this problem.

    There's also something about the file ~/.Xauthority which needs the correct rights too - have a look at this thread:
    https://ubuntuforums.org/showthread.php?t=2313021

    • Hi@hansen,

      Sorry, missed your last post.
      Thank for the heads up on using the '@' to keep up on communications, and
      also for the info on permissions.

      I had been reading up on the permissions for the .ssh and key files, but hadn't considered
      the x2gogroup and ~/.Xauthority files.

      It's not real clear to me why x2go permissions would affect xfce4 and not LXDE, but
      a lot of things are not real clear to me.

      For Ubuntu 16.04 32 bit, x2go and LXDE are a good combination.

If I ssh as root into server, I can sudo -l <user>.
But, I have heard it is insecure to ssh as root, so I would rather start out as user.

LXDE with x2go work for root and user sign in (add <startlxde &> to .vnc).
Xfce4 with x2go did not allow user sign in, only root.
Thanks again, hansen.

Have another answer? Share your knowledge.