Hello, I have a small Linux box (cubieboard2) on my desk, connected to an HDMI monitor. It has some version of Lubuntu/Linaro, and it's use has been mostly limited to playing movies, while I work on my windows xp laptop.
A couple of days ago I decided to learn LaTex, and installed it in my Linux box. The idea was to work on LaTex, or anything else for that matter, remotely from my windows pc, while the linux box was also playing a movie on its attached screen.
I tried x11vnc, but I could only get it to display, on the local pc screen, the same image that was being displayed on the monitor attached to the Linux box.
Made a breakthrough today, switching to TightVnc. For a newbe this turned out to be the way to go, extremely simple (still took hours, but it finally worked). It turns out that the TightVnc server will create a separate display from the one that is currently running on the attached monitor.
Caution, the following is from someone new to Linux.
On the remote Linux machine
Code:
sudo apt-get install tightvncserver
Since you will be creating a new display, make sure its number doesn't conflict with the current display. In a terminal window type
In this case my current display is '0'. Now you can run the vncserver giving it a different number (*):
Code:
$ vncserver :1
Starting applications specified in /home/walter/.vnc/xstartup
Log file is /home/walter/.vnc/cubieboard2:1.log
The first time you run this command it will ask you for a password. In my case I received an error that it could not access my password file. If I remember right, the file it's referring to is ~/.vnc/passwd . In my case, it had been created with ownership root:root . Changing this to <your username>:<your username> should fix it.
Note the log file it creates: <computername>:1.log . In here you will find any errors that might have happened during startup. It also tells you which port number it will be listening to, which should be 5901 (5900 + display#). You will need this port number information when you connect from the remote machine, as well as the network address and password (selected above).
To find out your Linux machines network address you can use this command:
My address was listed under 'eth0'->inet addr:xxx.xxx.xxx.xxx
(*) It's not really necessary to tell vncserver the display number you want to use. It will select one for you that is available. However, if you are going to kill it after you are done, it's probably safer to know for sure which display you are killing.
On the local Windows machine
Install TightVnc viewer. When you start it up, you will need to enter the Linux box's address, and the port to connect to:
xxx.xxx.xxx.xxx::5901
Hit 'connect' and it should then ask you for the password.
Now, if you have the same luck as me, it won't be quite that simple. You are viewing the remote's display #1, not the movie playing on the remote's screen, however your window is a large gray box, with nothing in it except an over-sized cursor. Ok, it's a step forward.
Back on the remote Linux machine
In your home directory, under .vnc, there is a vncserver start-up configuration file called xstartup. Adding this line to it, at the bottom, made everything work (as far as I can tell):
Code:
exec ck-launch-session lxsession -s Lubuntu -e LXDE
I then commented out one line at a time, rechecking if everything was working, and ended up with the above as the only line in the file. This also got rid of a few errors, reported in the log file
.vnc/cubieboard2:1.log
That's about it, almost. When you close the vnc viewer, on your windows machine,
the server on the linux machine keeps running. To stop it, type this command:
(or whatever display number was used to start it).
Some discoveries
It turns out that vncserver is only a script for starting the real program: Xvnc.
You can view the script if you type:
Code:
~$ cat /usr/bin/vncserver
Further work to do
In the reference from 'penguintutor', there is a section 'Adding Tightvnc to the startup'. From here I hope to get the information on how to automatically have vncserver kill itself when the remote window is closed. I'd prefer that it not be running all the time.
Links
http://www.penguintutor.com/linux/tightvnc
The Windows client viewer. Note this seems to also install the server on your Windows machine, which you don't need:
http://www.tightvnc.com/download.php
http://www.tightvnc.com/Xvnc.1.php
The following is just rambling and not very relevant
====================================================
It's amazing what a little linux board can do. It only has 1Gig ram! I added a 500gb hard drive, but still. It plays movies, while serving a completely different monitor output, and you are working on a document on it at the same time. All without a glitch.
I'm also wondering if this isn't a great way to get a group of people to transition from Windows to Linux. I have no way of trying this, but if it's possible to create as many working vncservers as you want on a Linux machine, each person in a group could connect to their own account, have their own remote desktop, and be able to practice using Linux software without ever leaving their Windows environment. They could incrementally start moving their files to the Linux server, experiment with new programs that could substitute for what they are currently using, and slowly transition to Linux, instead of all at once.
That is about what I am doing, although I feel a bit bad about it. XP has been great. Except for the last year or so, while it was supported, the security updates were crippling it. They had to be uninstalled, leaving the computer vulnerable.