6

earlier today (or yesterday -_-) I've rented a VPS (from aruba cloud) for a personal project. I've managed to establish SSH connection in putty so I can run shell commands alright. What I want to do now is get access to my VPS's graphical interface. I've been trying to use X2go (from a computer running windows 10) and it returns error message:

ttyname failed: Inappropriate ioctl for device.

After googling this for a while I've found out that this means that some device has been called in a way that it can't interpret, but I can't figure out what device (networking card?) exactly is the source of this issue, much less how to resolve it. Does anybody know how to do that using terminal commands only?

Verrierr
  • 71
  • 1
  • 1
  • 3
  • Is there an X2Go server running on the target? – ridgy Sep 02 '16 at 11:45
  • Yes, there is. And so is ubuntu-desktop. – Verrierr Sep 02 '16 at 15:06
  • As you are able to log in via ssh/putty, open one terminal session and issue `tail -f /var/log/syslog`; leave the terminal open and try to open the X2Go session. Maybe syslog will show more information on errors. – ridgy Sep 02 '16 at 19:42

1 Answers1

13

In your /home/user/.profile add the following line :

tty -s && mesg n

... and remove any other "mesg" line which is the root cause of the problem

xybal
  • 131
  • 3
  • 3
    WHY is this working? what's different in comparison to `mesg n || true` which I had before? None of these commands seems to make any real difference, at least if I run them in my ssh session. – velis Mar 29 '18 at 17:07
  • This worked! I didn't expect it to work at all. I commented out `mesg n || true`, and added beneath it `tty -s && mesg n` as instructured, but it would be good to know what it did! Can you clarify? Do you know @xybal and @velis? – Fiddy Bux Dec 23 '18 at 21:37
  • 1
    I should add, that I was having this problem with root account SSH key-pair access using X2GO, whereas my standard user account works fine without this modification. I edited `/root/.profile`, rather than my standard user .profile. Would really like to know what the change does though. Link? – Fiddy Bux Dec 23 '18 at 21:48
  • Is all that it does silences tty (print nothing, return exit status) and disallow messages in mesg? I got this info by simply `man tty` and `man mesg`. Both options are near the top of the manual pages. – Fiddy Bux Dec 23 '18 at 21:52