LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Setting up VNC only using SSH (https://www.linuxquestions.org/questions/linux-newbie-8/setting-up-vnc-only-using-ssh-603739/)

JohnyK 12-01-2007 08:19 AM

Setting up VNC only using SSH
 
I have a linux box running on SuSE 9.3. The only way at this moment how i can access it, is using SSH but since i'm new at linux i thought i should start with some graphic interface. Then i read that majority is using VNC for that, but i have no idea how to set it up without having direct access to that box.
So can any1 help me? Or at least give a link to any tutorial - i've been searching the web for few hours without any success.

tredegar 12-01-2007 08:55 AM

ssh to your box.
Make sure vncserver is installed, if not, install it.
In your ~/.vnc/xstartup you'll need something like this:
Code:

#!/bin/sh
startkde &

if you are using KDE

Then start it, and have it run in the background. eg
vnserver :1 1024x768 -depth 24 &

On your other box, connect to the vncserver that is running on display 1 on the suse box:
vncviewer name_of_suse_box:1
or
vncviewer LAN.IP.OF.SUSEBOX:1

One of my servers starts a vncserver for me at boot, with this line in /etc/rc.local

Code:

su - myusername -c "cd /home/myusername/ && vncserver :1 -geometry 1024x768 -depth 24" &
That means I can connect to it with vncviewer anytime I like.
vnc is neat, and surprisingly easy to set up!
Give it a go!
Edit Here's a simple tutorial /howto for you:
http://faq.gotomyvnc.com/cgi-bin/fom?_recurse=1&file=65
/Edit


All times are GMT -5. The time now is 04:01 AM.