<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Peter's Blog - Nodes for vnc</title>
    <link>http://www.petersblog.org/</link>
    <description>Nodes containing the tag vnc</description>
    <item>
      <title>Where are my Menus?</title>
      <link>http://www.petersblog.org/node/view/1607</link>
      <description>&lt;p&gt;
My home server currently has no monitor attached (new video card today?) and it would be useful to have access to a gui, mainly for the benefit of &lt;a href="/tag/mythtv"&gt;mythtv&lt;/a&gt; where not everything can be done from the command line. 
&lt;/p&gt;
&lt;p&gt;
I suddenly realised there is an easy way to get a remote desktop, good old &lt;a href="/tag/vnc"&gt;vnc&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
So I installed the tightvncserver package and started it with 
&lt;/p&gt;
&lt;pre class="lazy"&gt;vncserver
&lt;/pre&gt;
&lt;p&gt;
and sure enough I had a remote desktop but a very stark one with nothing but a terminal window, none of the gnome desktop panels (i.e. the gnome equivalent of the 'start' menu, taskbars etc). 
&lt;/p&gt;
&lt;p&gt;
Some research determined that these could be added thusly: 
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;
edit ~/.vnc/xstartup 
&lt;/li&gt;
&lt;li&gt;
add this at the bottom: 
&lt;pre class="lazy"&gt;gnome-panel &lt;span class="Keyword"&gt;2&amp;gt;&lt;/span&gt; /dev/null &lt;span class="Keyword"&gt;&amp;amp;&lt;/span&gt;
&lt;/pre&gt;
&lt;/li&gt;&lt;/ul&gt;

&lt;p&gt;
The background is still stark (grey, no wallpaper etc) but that is ok for a vnc connection. The important thing is that the menus are there. 
&lt;/p&gt;
&lt;p&gt;
I'm editing this via firefox on the remote desktop using vnc over an ssh tunnel. I'm trying to think of ways to get more links in the chain. 
&lt;/p&gt;&lt;p&gt;Related Posts: &lt;a href="/tag/ubuntu"&gt;ubuntu&lt;/a&gt; &lt;a href="/tag/vnc"&gt;vnc&lt;/a&gt;&lt;/p&gt;</description>
      <guid>http://www.petersblog.org/node/view/1607</guid>
      <category domain="http://www.technorati.com/tag">ubuntu</category>
      <category domain="http://www.technorati.com/tag">vnc</category>
    </item>
    <item>
      <title>Death of a Partition</title>
      <link>http://www.petersblog.org/node/view/1514</link>
      <description>&lt;p&gt;
Somebody at work was fiddling with the fuse box and took out all the servers in the IT room. I rebooted them all but our main file server wouldn't boot, the hard disk partition was fried. 
&lt;/p&gt;
&lt;p&gt;
I used a knoppix CD (excellent tool for any pc that won't boot from its hard disk) to delete the corrupt partition and then reinstalled Windows 2k server on it. Experience has taught me that there is little point in trying to repair windows installations. Fortunately this file server is set up with two disks, one for the OS and another for the data. This is a nice arrangement as if either disk dies, that's approximately half the work required to get the thing back up. I only had to reinstall Windows. 
&lt;/p&gt;
&lt;p&gt;
Things were back online by lunchtime, the only problem being that one of the computers in the building was unable to access the new shared file system: mine! Vista strikes again (this is one reason why I am using Vista, to iron out these sillies). It wouldn't connect to the file share without prompting for user name and password and it wouldn't accept any that I gave (apart from those for a local account on the PC, it wouldn't accept domain account details). 
&lt;/p&gt;
&lt;p&gt;
I decided the problem may be that in my haste to get the files online and people working, I omitting to install the latest service packs on the server. I ran the setup for service pack 4 and then remotely rebooted the server from home early this morning while nobody was using it. I connected to it using an &lt;a href="/tag/ssh"&gt;ssh&lt;/a&gt; tunnel and ultra&lt;a href="/tag/vnc"&gt;vnc&lt;/a&gt;. For reference, the ssh tunnel command was: 
&lt;/p&gt;
&lt;pre class="lazy"&gt;ssh -L 5900:192.168.0.54:5900 me@work.com
&lt;/pre&gt;
&lt;p&gt;
This is saying, 'connect port 5900 on the pc 192.168.0.54 on the remote network to port 5900 on my local pc'. I connected to a linux server and used this as a relay to connect to the file server. I was able to open ultravnc at 127.0.0.1:5900 and see the windows desktop of the file server. Secure, magical, free. Yes, I could do all this with VPN's, Windows Remote Desktop, Terminal Services or whatever but ssh/vnc is much easier to set up and is immune to random weird Active Directory problems. 
&lt;/p&gt;
&lt;p&gt;
I opened 'Computer Management' and 'Shared Folders' and 'Open Files' which gives a nice list of who is using the file server. One user had 'desktop.ini' opened, nothing important so ZAP. 
&lt;/p&gt;
&lt;p&gt;
Anyway, the service pack did the trick and when I got to work Vista connected instantly. 
&lt;/p&gt;
&lt;p&gt;
Lessons learnt: 
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;
Know where the Windows Install disks are 
&lt;/li&gt;
&lt;li&gt;
Have the licence numbers printed and hung on the wall (not in a file on the server that just died, in an Access 2003 database, in a room full of servers with no copies of Access). 
&lt;/li&gt;
&lt;li&gt;
Buy a UPS, although it runs the risk that nothing ever fails and everyone thinks administration is easy. With the right tools it is, but don't let the world know. 
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Related Posts: &lt;a href="/tag/knoppix"&gt;knoppix&lt;/a&gt; &lt;a href="/tag/linux"&gt;linux&lt;/a&gt; &lt;a href="/tag/ssh"&gt;ssh&lt;/a&gt; &lt;a href="/tag/vnc"&gt;vnc&lt;/a&gt; &lt;a href="/tag/windows"&gt;windows&lt;/a&gt; &lt;a href="/tag/yesstillusingwindows2k"&gt;yesstillusingwindows2k&lt;/a&gt;&lt;/p&gt;</description>
      <guid>http://www.petersblog.org/node/view/1514</guid>
      <category domain="http://www.technorati.com/tag">knoppix</category>
      <category domain="http://www.technorati.com/tag">linux</category>
      <category domain="http://www.technorati.com/tag">ssh</category>
      <category domain="http://www.technorati.com/tag">vnc</category>
      <category domain="http://www.technorati.com/tag">windows</category>
      <category domain="http://www.technorati.com/tag">yesstillusingwindows2k</category>
    </item>
    <item>
      <title>Slow VNC Server</title>
      <link>http://www.petersblog.org/node/view/990</link>
      <description>&lt;p&gt;
I've come across this before and it came up again today and I don't think I've blogged it. Sometimes &lt;a href="/tag/vnc"&gt;vnc&lt;/a&gt; on a windows server can be particularly lethargic to the extent that it becomes painful to use. The solution I have found is to disable video hardware acceleration on the server end (Control Panel/Display/Settings/Advanced/Troubleshooting). 
&lt;/p&gt;&lt;p&gt;Related Posts: &lt;a href="/tag/vnc"&gt;vnc&lt;/a&gt; &lt;a href="/tag/windows"&gt;windows&lt;/a&gt;&lt;/p&gt;</description>
      <guid>http://www.petersblog.org/node/view/990</guid>
      <category domain="http://www.technorati.com/tag">vnc</category>
      <category domain="http://www.technorati.com/tag">windows</category>
    </item>
    <item>
      <title>VNC vs SSH</title>
      <link>http://www.petersblog.org/node/view/892</link>
      <description>&lt;p&gt;
I found one advantage of using ssh (e.g. &lt;a href="tags/putty"&gt;putty&lt;/a&gt;) over &lt;a href="tags/vnc"&gt;vnc&lt;/a&gt;: no error bells. I was using a terminal under vnc and the bells were driving me mad. I disabled them in vim with: 
&lt;/p&gt;
&lt;div class="verbatim-block"&gt;&lt;pre&gt;:set visualbell t_vb=
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;
but still got them on the bash command line. Tried various things from google to disable them at the linux end but nothing worked. Tried disabling the sounds in vnc (Control Panel/Sounds, VNC = None) but not joy. 
&lt;/p&gt;
&lt;p&gt;
Don't especially want to unplug the speaker so I went with the flow and used ssh. 
&lt;/p&gt;
&lt;p&gt;
Sudden thought: maybe I WAS going mad? 
&lt;/p&gt;&lt;p&gt;Related Posts: &lt;a href="/tag/putty"&gt;putty&lt;/a&gt; &lt;a href="/tag/ssh"&gt;ssh&lt;/a&gt; &lt;a href="/tag/ubuntu"&gt;ubuntu&lt;/a&gt; &lt;a href="/tag/vnc"&gt;vnc&lt;/a&gt;&lt;/p&gt;</description>
      <guid>http://www.petersblog.org/node/view/892</guid>
      <category domain="http://www.technorati.com/tag">putty</category>
      <category domain="http://www.technorati.com/tag">ssh</category>
      <category domain="http://www.technorati.com/tag">ubuntu</category>
      <category domain="http://www.technorati.com/tag">vnc</category>
    </item>
    <item>
      <title>vnc</title>
      <link>http://www.petersblog.org/node/view/879</link>
      <description>&lt;p&gt;
vnc allows you to remotely control Windows or Linux systems (and many others). A server program runs on the remote system being controlled and a viewer program shows the remote desktop. With a good fast network connection between them this can be almost as good as sitting at the remote pc: it is possible to play tetris over the link. I use &lt;a href="http://ultravnc.sourceforge.net/"&gt;ultravnc&lt;/a&gt; on Windows and &lt;a href="http://www.realvnc.com/"&gt;realVNC&lt;/a&gt; under &lt;a href="tags/ubuntu"&gt;ubuntu&lt;/a&gt;. 
&lt;/p&gt;&lt;p&gt;Related Posts: &lt;a href="/tag/vnc"&gt;vnc&lt;/a&gt;&lt;/p&gt;</description>
      <guid>http://www.petersblog.org/node/view/879</guid>
      <category domain="http://www.technorati.com/tag">vnc</category>
    </item>
    <item>
      <title>Funny keys in VNC</title>
      <link>http://www.petersblog.org/node/view/878</link>
      <description>&lt;p&gt;
After saying how wonderful &lt;a href="tags/vnc"&gt;vnc&lt;/a&gt; was &lt;a href="/node/877"&gt;yesterday&lt;/a&gt; I came across a real weird problem today. Yesterday I was booting vncserver as root using: 
&lt;/p&gt;
&lt;div class="verbatim-block"&gt;&lt;pre&gt;sudo vncserver :1
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;
as when I ran it as me I got: 
&lt;/p&gt;
&lt;div class="verbatim-block"&gt;&lt;pre&gt;pcw@intranet:~$ vncserver :1
cat: /home/pcw/.vnc/passwd: Permission denied
xauth:  error in locking authority file /home/pcw/.Xauthority
xauth:  error in locking authority file /home/pcw/.Xauthority
sh: /home/pcw/.vnc/intranet:1.log: Permission denied
sh: /home/pcw/.vnc/intranet:1.pid: Permission denied

New 'X' desktop is intranet:1

Starting applications specified in /etc/X11/Xsession
Log file is /home/pcw/.vnc/intranet:1.log

sh: /home/pcw/.vnc/intranet:1.log: Permission denied
pcw@intranet:~$
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;
which is not good. Running as root had the problem that it was effectively a root login session, all processes were owned by root etc and I would rather run as me. Looking at file permissions the problem turned out to be because all those files were read-only for root so by deleting them I could run vncserver as myself. 
&lt;/p&gt;
&lt;p&gt;
But. 
&lt;/p&gt;
&lt;p&gt;
I connected with VNC and tried running the Synaptic package manager and it refused my password. What? I tried opening a terminal to run dselect and whatever I typed in came out as garbage. for example, the 's' key gave me a 'b'. Quitting out and running the vnc server again as root gave me no problems. 
&lt;/p&gt;
&lt;p&gt;
Eventually I found the reason. Under the Gnome preferences, root has the keyboard layout set to vanilla US but my own account had it set to UK which is what I asked &lt;a href="tags/ubuntu"&gt;ubuntu&lt;/a&gt; for when I installed it. Resetting the layout to it's default changed it to US and restarting gave me a functional keyboard: with UK settings including &#163; characters. Very odd. 
&lt;/p&gt;&lt;p&gt;Related Posts: &lt;a href="/tag/linux"&gt;linux&lt;/a&gt; &lt;a href="/tag/ubuntu"&gt;ubuntu&lt;/a&gt; &lt;a href="/tag/vnc"&gt;vnc&lt;/a&gt;&lt;/p&gt;</description>
      <guid>http://www.petersblog.org/node/view/878</guid>
      <category domain="http://www.technorati.com/tag">linux</category>
      <category domain="http://www.technorati.com/tag">ubuntu</category>
      <category domain="http://www.technorati.com/tag">vnc</category>
    </item>
    <item>
      <title>Yet Another Ubuntu Server</title>
      <link>http://www.petersblog.org/node/view/877</link>
      <description>&lt;p&gt;
Got my hands on a new server box for work. It was an anonymous beige box but it turned out to have an AMD Duron 1G with 256M ram. Compared to the Pentium MMX 233 with 96M I was using it flies. The old box took about 4 seconds to bring up a &lt;a href="tags/drupal"&gt;drupal&lt;/a&gt; page, the new box takes about a second. My desktop pc at work is a pentium 2 450M with 256M ram: just about bearable running Windows XP. 
&lt;/p&gt;
&lt;p&gt;
I tried cloning the disk from my old server but the new server would not boot so I just did a clean &lt;a href="tags/ubuntu"&gt;ubuntu&lt;/a&gt; hoary install. Since it was a decent box I did a desktop install rather than a headless server. I copied over the drupal installation of the intranet easily enough: moving drupal is really easy, dump the database, copy /var/www, load the database, that's about it. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="tags/vnc"&gt;VNC&lt;/a&gt; server running on the new server is just brilliant. It really is good enough to wean me off ssh. Even running the client here at home on my laptop through an &lt;a href="tags/ssh"&gt;ssh&lt;/a&gt; tunnel it is fast enough to play tetris on. 
&lt;/p&gt;&lt;p&gt;Related Posts: &lt;a href="/tag/drupal"&gt;drupal&lt;/a&gt; &lt;a href="/tag/linux"&gt;linux&lt;/a&gt; &lt;a href="/tag/ubuntu"&gt;ubuntu&lt;/a&gt; &lt;a href="/tag/vnc"&gt;vnc&lt;/a&gt;&lt;/p&gt;</description>
      <guid>http://www.petersblog.org/node/view/877</guid>
      <category domain="http://www.technorati.com/tag">drupal</category>
      <category domain="http://www.technorati.com/tag">linux</category>
      <category domain="http://www.technorati.com/tag">ubuntu</category>
      <category domain="http://www.technorati.com/tag">vnc</category>
    </item>
    <item>
      <title>Using ssh to connect to a proxy server or vnc server via ssh tunnelling</title>
      <link>http://www.petersblog.org/node/view/707</link>
      <description>&lt;p&gt;
This is the ssh command line to connect to a &lt;a href="http://www.squid-cache.org/"&gt;squid&lt;/a&gt; proxy server via ssh: 
&lt;/p&gt;
&lt;div class="verbatim-block"&gt;&lt;pre&gt;ssh -L 3128:127.0.0.1:3128 user@remoteaddress
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;
using &lt;a href="http://www.cygwin.org/"&gt;cygwin&lt;/a&gt; open-ssh. 
&lt;/p&gt;
&lt;p&gt;
What is this doing? Well ssh starts running on the local pc and creates a socket on port 3128 (this is given by the first 3128 on the command line). Firefox is then configured to use localhost:3128 as the http proxy. ssh then takes connections to that port and forwards them to the ssh server running remotely. It will go through any firewalls in between provided that port 22 (the ssh port) is open. It encrypts whatever is going through it. The ssh server connects to port 3128 on the remote pc which is the squid server port. The squid server acts as a nice caching proxy server and fetches whatever web pages you are looking for. 
&lt;/p&gt;
&lt;p&gt;
This works with &lt;a href="http://www.ubuntu.org"&gt;Ubuntu&lt;/a&gt; after installing the standard open-ssh package and the squid proxy. 
&lt;/p&gt;
&lt;p&gt;
It must work or you wouldn't be reading this. 
&lt;/p&gt;
&lt;p&gt;
Even more cool: using VNC over SSH. This allows gives you a remote desk top &lt;img alt="cool" src="/images/smileys/cool.png" /&gt; 
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;
install tightvnc package on remote server 
&lt;/li&gt;
&lt;li&gt;
on local pc run the command: 
&lt;div class="verbatim-block"&gt;&lt;pre&gt;ssh -L 5900:127.0.0.1:5901 user@remoteaddress
&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
on server, run the command 
&lt;div class="verbatim-block"&gt;&lt;pre&gt;vncserver :1
&lt;/pre&gt;&lt;/div&gt;
The first time you do this you will be asked for the login password. 
&lt;/li&gt;
&lt;li&gt;
On local pc, run a vnc viewer such as &lt;a href="http://ultravnc.sourceforge.net/"&gt;ultravnc&lt;/a&gt;. Connect to 127.0.0.1:0 and enter the password 
&lt;/li&gt;&lt;/ul&gt;

&lt;p&gt;
This gives you remote access to the server desktop. Easy really and better, in my humble opinion, that using remote X, especially with a local PC running cygwin as X on that is a &lt;a href="/node/661"&gt;bit buggy&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
Note: for me, vncserver :1 worked as X was already running on the box. The 5901 in the ssh command caters for display 1 being on a port number 1 higher than the default of 5900. 
&lt;/p&gt;&lt;p&gt;Related Posts: &lt;a href="/tag/cygwin"&gt;cygwin&lt;/a&gt; &lt;a href="/tag/firefox"&gt;firefox&lt;/a&gt; &lt;a href="/tag/squid"&gt;squid&lt;/a&gt; &lt;a href="/tag/ssh"&gt;ssh&lt;/a&gt; &lt;a href="/tag/ubuntu"&gt;ubuntu&lt;/a&gt; &lt;a href="/tag/vnc"&gt;vnc&lt;/a&gt;&lt;/p&gt;</description>
      <guid>http://www.petersblog.org/node/view/707</guid>
      <category domain="http://www.technorati.com/tag">cygwin</category>
      <category domain="http://www.technorati.com/tag">firefox</category>
      <category domain="http://www.technorati.com/tag">squid</category>
      <category domain="http://www.technorati.com/tag">ssh</category>
      <category domain="http://www.technorati.com/tag">ubuntu</category>
      <category domain="http://www.technorati.com/tag">vnc</category>
    </item>
    <item>
      <title>Did it.</title>
      <link>http://www.petersblog.org/node/view/285</link>
      <description>&lt;p&gt;
&lt;p&gt;Did it.&lt;/p&gt; &lt;ul class="simple"&gt; &lt;li&gt;&lt;p class="first"&gt;Logged into server using ssh&lt;/p&gt; &lt;/li&gt; &lt;li&gt;&lt;p class="first"&gt;executed python script to wake home pc&lt;/p&gt; &lt;/li&gt; &lt;li&gt;&lt;p class="first"&gt;connected to router through forwarded port to open a port&lt;/p&gt; &lt;/li&gt; &lt;li&gt;&lt;p class="first"&gt;connected to pc with VNC&lt;/p&gt; &lt;/li&gt; &lt;/ul&gt; &lt;p&gt;It worked but it was too slow to be any good. Similar to typing there is a second or so delay from doing something to getting feedback.&lt;/p&gt; 
&lt;/p&gt;&lt;p&gt;Related Posts: &lt;a href="/tag/python"&gt;python&lt;/a&gt; &lt;a href="/tag/ssh"&gt;ssh&lt;/a&gt; &lt;a href="/tag/vnc"&gt;vnc&lt;/a&gt;&lt;/p&gt;</description>
      <guid>http://www.petersblog.org/node/view/285</guid>
      <category domain="http://www.technorati.com/tag">python</category>
      <category domain="http://www.technorati.com/tag">ssh</category>
      <category domain="http://www.technorati.com/tag">vnc</category>
    </item>
    <item>
      <title>Tried ssh from work with no joy.</title>
      <link>http://www.petersblog.org/node/view/227</link>
      <description>&lt;p&gt;
&lt;p&gt;Tried ssh from work with no joy. At home router port was disabled so no wonder.&lt;/p&gt; &lt;p&gt;Set it all up at home and got VNC to tunnel through it. I'll try again tomorrow.&lt;/p&gt; 
&lt;/p&gt;&lt;p&gt;Related Posts: &lt;a href="/tag/ssh"&gt;ssh&lt;/a&gt; &lt;a href="/tag/vnc"&gt;vnc&lt;/a&gt;&lt;/p&gt;</description>
      <guid>http://www.petersblog.org/node/view/227</guid>
      <category domain="http://www.technorati.com/tag">ssh</category>
      <category domain="http://www.technorati.com/tag">vnc</category>
    </item>
  </channel>
</rss>
