Connecting Ubuntu to Ubuntu through VNC. Remote Desktop

2

2

The scenario is as follows - I will be moving across the country and my desktop will stay here powered and online, while I move with a laptop. I need a way to connect to the desktop for file streaming(music and movies) as well as using the virtual machines. I have thought about SSH and VNC.

I need something failsafe. That's priority one. I won't be around to fix it if it breaks. I can set the computer to come on in the BIOS at a certain time if the power went out. But if I can get in remotely the whole setup is useless.

SSH only provides terminal use, correct? So if I chose that route I would be able to access the computer via command line and play music and movies with mplayer and such, correct? But I would not be able to run the virtual machines? Because there will be no GUI, right?

I have been playing with Vinagre and Vino through the host and guest of a virtual machine and I cannot get it to connect. Is there a better application? x11vnc? I have forwarded port 5900 on the router and have upnp enabled. Got a better remote desktop suggestion?

I would like to run this setup headless.(no monitor) I also would like to run it without a gpu if that is possible to make it more energy efficient.

Both computers are 64 bits and will be running Ubuntu 10.10 and soon 11.04.

Are these crappy ideas to begin with? Should I go another route to get my files and access the virtual machines?

winchendonsprings

Posted 2011-04-20T02:05:20.963

Reputation: 1 848

I belive you can use ssh to perform remote access.

is team viewer out of the question? I love team viewer and it works great on Ubuntu – mjrider – 2011-04-20T02:30:22.200

Answers

2

Complicated Direct Solution

Well, you'll need to set up a couple things. In order to get access to your machine remotely, you'll need to set up a way to get to it. Assuming you don't have a public static IP, the best route would be to register with a dynamic dns service. I've used both DynDns and FreeDNS and they both seem to work well. I prefer FreeDNS because it has more features, but DynDNS has proved to be easier for me.

That will give you SSH access and access to VNC. I haven't set up a vanilla VNC server before, but I'm sure it's pretty easy (I like things to be more complicated =D). I'm not sure if you can get audio to stream, so you should probably figure that out first.

What I do know is that this setup will be super laggy. For example, you'll need a steady 128 kbps internet connection just to serve 128 kbps audio (duh), and that's not even mentioning the VNC overhead, which is quite a bit. You're definitely going to have issues with it, especially if you try to stream video with sound.

If you're into programming, you could set up a server to stream over HTTP whatever you need. You can use the HTML5 audio and video tags in a web-page and with some clever programming, you could have something streaming.

This is not as easy as just copying some stuff. My friend has been working on a program to do something similar to what you want to do. His application just streams audio over the browser, and he's been having enough trouble with that.

Easier Method

Why don't you just copy what you need? If you think you'll forget something, just use scp to copy stuff from your server to your laptop. Here's a command that will generally work:

scp USERNAME@server.com:~/path/to/file /path/to/copy/location

This can be run from anywhere as long as the server.com is dynamically pointed to your computer at home.

USERNAME is, obviously, the username on the server to copy stuff from. After the : is the path to the file. I included a ~, which just means start in the user's home directory. After that is the path on your laptop you want to copy stuff to. If you like, you can add a -r to copy recursively.

beatgammit

Posted 2011-04-20T02:05:20.963

Reputation: 1 387

@tjameson Thanks a lot. You know, I was thinking there might be healthy connection issues. Also I was thinking vnc might be a bit too heavyweight on both ends. Maybe I will just set it up as a server and not try to stream or run vm's remotely. I've never used scp but I have used rsync and I'm pretty sure there is a ssh or secure option for it. Why scp instead of rsync? – winchendonsprings – 2011-04-20T02:45:04.457

Yes, copying the files is the best idea. Using something like VNC, the video and audio are actually playing at the remote computer, and the video is being copied to your local computer. So the audio won't work, even though the video does. – Beel – 2011-04-20T02:49:43.200

@user77048 - Rsync is better, you're right. I just like scp. I guess I'm stuck in my ways, and I'm pretty good at not re-copying stuff... – beatgammit – 2011-04-20T02:52:20.313

@Beel Cool, Yeah I don't have a problem copying some files, or even streaming them through ssh and playing them in the terminal. But, I would like to get at the VMs. – winchendonsprings – 2011-04-20T02:54:09.953

@user77048 Just set up the VMs as sub-domains. You may need to start them up ahead of time, and I suppose that a super-laggy VNC session might be bearable to do that. – beatgammit – 2011-04-20T02:55:29.047

@tjameson Do I definitely need a static IP for ssh? I have used dyndns once before a long time ago. Is openssh the best bet for setting up an ssh server here? I have so many questions. – winchendonsprings – 2011-04-20T03:33:48.217

Dyndns will give you the benefits of a static IP without having to get one. All ssh servers are the same, so no biggie there. If your VMs are Windows, you'll need something else, like Cygwin or something because Windows does not support SSH by default. – beatgammit – 2011-04-20T04:30:50.063