HOWTO: start X through ssh for vncviewer?


I just did an apt-get on „vncserver“, and was able to run that and get the desired effect! Just like you said, I get my normal gnome desktop.

In case anyone else is reading this, I also got a nicer display like this:
vncserver -geometry 1024×768 -depth 24


Даваше грешка на другата машина:

Server did not offer supported security type


I was havingthe same issue and resolved it by removing the „Require Encryption“ option in the advanced tab of the Remote Desktop Preferences window -на сървъра!


Това до тук не работи – трябва да съм се лонал на сървъра, за да имам връзка със сървъра от друг РС.


I don’t know you particular needs, but maybe this will help…

Do X forwarding through ssh. I have a headless server at home (I unplugged monitor & keyboard, just a stand alone box now) and if I want to access some application via GUI then I log into the server with X forwarding, then call up the app I want to work with and then it looks like it is running on my local computer, but in fact it is running on the remote server.

I wrote a bit of a „how to“ here:

In short, to do X forwarding ssh into your S1 computer with the „-X“ flag (note „X“ is capitolized)
ssh -X user@your-IP-or-FQD

then if, for example, you want to run FireFox then type:
and you’ll get your browser appear as though it is local, but it is actually running from your remote computer, just displayed on your local screen.

if you want to run nautilus to explore the files on your computer then type:

I believe you can even run krdc this way too, though not so sure about krfb.

Bottom line is you can run virtually any GUI program from your remote machine achieving pretty much the same effect as running VNC, however it is far more secure, and in some ways easier to do.


Here is a cool tip…

A way to accomplish VNC like use through ssh, but even running your full desktop then do the following:

When you boot up your laptop in Ubuntu, at the login screen don’t log in. Select to go into terminal shell mode.

Then log into your remote with the -X flag:
ssh -X user@your-IP-or-FQD

Then type:

After a few seconds the remote computer’s gnome desktop will appear, and it behaves like a local desktop session, but infact it is from the remote machine (evidenced by the fact that it acts a bit slower).

Hope these solutions have you some alternate ways to access your other computer. BTW, IMHO, for many purposes this is better than VNC for working on the remote machine (again, depending on what you’re trying to do).

P.S. Obviously you’ll need to install openssh on the remote machine, and configure your firewall(s) to allow port 22 to that machine (or better yet, a different non-standard port for extra security).





Вашият коментар

Вашият имейл адрес няма да бъде публикуван. Задължителните полета са отбелязани с *