# Remote login / VNC / TightVNC / Anything

## rush_ad

hey people

i wanted to setup some kind of remote login on my computer so that i can access my computer from outside. i have windows remote login enabled but now that i am back to gentoo, i really need to use this feature.

sometimes i goto class and then i remember tha i forgot to email myself my homework/paper/etc and that just screwes up a night worth of work.

so if someone can please explain me how i can setup, any kind, remote networking it would be really great.

just so that you know, i will be behind university firewall and i am not any good with networking or computer stuff. but i can follow directions very well.

please post some guide lines to setup remote login. i searched the gentoo forums but i didnt find any howto. i saw posts with problems but none with a setup guide.

thanks a lot for helping.

Edit: just to make sure, i need to login with graphics availabe wherever i login. it would suck if i end up using command line because i dont know how to use it. and would i be able to login from a computer with windows 2k or xp?

----------

## solomonHk

vnc is nice as you dont need a viewer application to remote in.   You can simply use a web browser to point to the linux box IP + port 580X where X is the screen set by the vnc server as a port, and viola,  you have a web based remote desktop.    The documentation is really simple, and with emerging,  there isnt too much you have to do other than edit your configs if you want a desktop manager, etc, etc.   I say give it a try.

http://www.realvnc.com/gettingstarted.html

----------

## rush_ad

thanks, i will try it out as soon as i get back to my dorm

----------

## rush_ad

if you have set it up, can would you please tell me how you did it. because the online docs are too hard for me to udnerstand.

edit: the docs are based on xfree and i am running xorg.

----------

## solomonHk

I followed the same settings for xfree, and I too, am on xorg.

But,  alll you need to do is emerge vnc.   Then its a matter of setting the VNC password via vncpassword,   Then edit your .vnc/xstartup script.  Once that is done,... just vncserver -gemetry 1024x768 or what ever resolution you want, and you are good to go.  You should really only need the man page for vncserver at http://www.realvnc.com/products/free/4.1/man/vncserver.html.    Like I said,  it says xfree  but the same configs work on xorg.

The only additional help I can give you is my xstartup script located in my /home/user/.vnc/ folder

```

!/bin/sh

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

xsetroot -solid grey

xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

gnome-session --sm-disable

gnome-session

```

That will let you use vnc with gnome.

----------

## rush_ad

so when you log on from remote computer you actually see your gnome desktop?

----------

## battra

IMHO, I prefer tightvnc over realvnc:

```

# emerge tightvnc

```

The setup on the serverside should be pretty much the same.

Also, vnc traffic isn't encrypted.  So, you might want to tunnel through ssh.  That way, you don't have to keep the extra VNC port open on your linux box.

Here's a guide for that:

http://www.benjamin.weiss.name/putty-tunnel.html

----------

## rush_ad

is there any VNC or any other with graphical settings? i really suck with command line. i am only good at following directions

----------

## wolfden

anyone find that vnc is slow and it spikes the X Server way up?

----------

## solomonHk

 *wolfden wrote:*   

> anyone find that vnc is slow and it spikes the X Server way up?

 

I get slow response through real vnc,  and whoever mention tightvnc is correct.  It is better.  To answer another question,  both real and tight vnc do give you a gui display of your desktop.  When it was said tunnel via ssh,... you are simply accessing the server via an ssh session.  You can see setting for that in apps like putty,  it doesnt actually mean you are using command line.

----------

## ugus

 *rush_ad wrote:*   

> is there any VNC or any other with graphical settings? i really suck with command line. i am only good at following directions

 

use kde remote desktop connection

----------

## wolfden

 *ugus wrote:*   

>  *rush_ad wrote:*   is there any VNC or any other with graphical settings? i really suck with command line. i am only good at following directions 
> 
> use kde remote desktop connection

 

does that allow for incoming connections tho?  thought that was for connecting out

----------

## rush_ad

ugus wrote

 *Quote:*   

> use kde remote desktop connection

 

i thought kde remote was only for linux. most machines are not linux, they have windows. and i need to access my linux machine from windows. so i need suggestions and directions.

----------

## djpenguin

 *rush_ad wrote:*   

> ugus wrote
> 
>  *Quote:*   use kde remote desktop connection 
> 
> i thought kde remote was only for linux. most machines are not linux, they have windows. and i need to access my linux machine from windows. so i need suggestions and directions.

 

You've already been told the software package that you need for this application.

I'm sorry you're afraid of the command line, but honestly, you shouldn't be running gentoo if you are.  Jump in and learn...no one is going to hold your hand.

Xorg is just a branch of XFree, so the commands and configuration will be very similar.

----------

## rush_ad

thanks, i am trying to learn here but that wasnt the question. as far as i know, kde remote only works for linux-linux which doesnt really help because computers in my college labs are winodws based. so need something that can access my linux from windows and from my knowledge, kde remote is not the one.

----------

## ugus

 *rush_ad wrote:*   

> ugus wrote
> 
>  *Quote:*   use kde remote desktop connection 
> 
> i thought kde remote was only for linux. most machines are not linux

 

no, not only for linux.

*Linux Client -> Windows Remote:

you only need  vnc server installed on your windows pc. You can then connect your win.pc via kde remote desktop connection.

*Windows Client -> Linux Remote:

At the Linux side, you can use kde desktop sharing for configuration.

you can then use your vnc client to connect your linux pc, which you configured with kde desktop sharing

----------

## rush_ad

i've installed tightvnc, now how should i go about setting it up?

----------

## rush_ad

cant get tightvnc to work. help please.

----------

## devsk

one more option you have is NX. its order of magnitude faster than VNC(real or tight) and its doesn't kill the CPU on the remote machine. free server is available for linux ('search freenx' in portage) and free clients are available at nomachine.com for almost all OSs.

----------

## langthang

Change the xstartup to match your desktop manager. I use KDE

```
$ cat ~/.vnc/xstartup

unset SESSION_MANAGER

/etc/X11/Sessions/kde-3.3.2

$ vncserver -geometry <WIDTH>x<HEIGHT> :1
```

you should tunnel your vnc through ssh. setup ssh to except connection with PubkeyAuthentication only. If your client machine is MS windows, download puuty and putty keygen, read thier for howto generate private key with puttykeygen. Run putty, set your hostname, SSH --> Auth --> Browse to your private key (on a removable media, don't keep it on untrust machine). SSH --> Tunnels --> Port forwarding; add "source port": 5901, "Destination": localhost:5901. If you want to save the setting, click on Sessions, enter a name in Saved Sessions, then save.

Open a ssh connect to your home. run `netstat -anp tcp on the Windows machine you should see a line:

```
  TCP    127.0.0.1:5901         0.0.0.0:0              LISTENING
```

download a tightvnc viewer. run it. in the connection details popup dialog, enter vnc server: localhost:1 then click OK to connect.

HTH

----------

## rr

Thanks langthang! I was struggling with the same problem as the OP. (Now I just have to struggle with whatever you said  :Smile: 

----------

## rush_ad

it was a good reply. but i am still stuck with no luck.

----------

