Tag Archives: vnc

Raspbian, Raspberry-PI, installation, overclocking && vnc

Raspberry-PI

During last hackathon in Ganymede I created a working instance of monitoring system which included Nagios, Jira, Ganglia and hardware like Raspberry-PI and Arduino (those ARMs are used just for end-user purposes like dashboards and alert lights).

For now I’d like to make a quick write up of preparing Raspbian to work on R-PI. Those are easy things, but it’s good to have them in a note.

  1. Installing Raspberry-PI from Linux box (firstly download Raspbian img from http://www.raspberrypi.org/downloads)
    • Format Your SD card in FAT32:
    • Copy img file to SD using dd:
  2. Overclocking (gives us a good boost needed for displaying complicated dashboards – You can read about overclocking here: http://www.raspberrypi.org/archives/tag/overclocking):
    • Mount SD card somewhere in the linux box and edit the config.txt file from this Raspbian boot-partition so it looks like:
  3.  VNC installation on display 0: (so You can VNC into the main display / desktop):
    • VNC installation:
    • Now the init script (save it as /etc/init.d/vnc):
    • And just make it start during the boot process:
  4. Prevent screen from turning off:
    • Edit /etc/kbd/config so it contains following entries:

      and restart kbd: /etc/init.d/kbd restart
    • Edit vim /etc/lightdm/lightdm.conf so it contains following entry in the section [SeatDefaults]:

That’s all for now. I’ll try to make a blog-post about that hackathon project as I’ve been receiving questions about it. It’s possible, that I’ll try to make a talk about it during the next OWASP meeting here at our Kraków / Poland chapter.

Installing KVM guest OS via VNC over SSH tunnel

Verry merry and christmas is over. And I’ve bought myself a brand new server for this occasion :D So this is it – enough of doing-nothing or not-doing-anything and I had to start migrating services from the old box. And as old machine is just bare-metal env, where users kill each other for memory, than I decided – no more. KVM, cgroups and hell with ya guys – You won’t ever know about each other! And all this for the same price (as the old box has 2 years and I paid the same price for the new one, where I’ve got 8x more RAM, 2x more storage and some quad-core…).

Ok enough of this talking. So I’ve got clean CentOS 6.3 installation with basic KVM environment and SELinux set to Permissive mode (You could leave it in Enforcing, having to “chcon –reference /var/lib/libvirt/images /your/vm/repodir” – but i see no point in using SELinux in host OS – this would eat to much resources, and is at all not needed – what you have to do on host OS for security is using very strict rules.

So… Centos, KVM, Permissive and We’re ready to engage. For lazy guys I suggest using Virtual Manger (virt-manager) where You can click through the whole guest configuration process (for making this work You should turn off iptables for a while or open some virt-manager TCP ports). But as virt-manager is for lame, then we write on the terminal:

And installation is running. Now We’d like to connect to it – so VNC FTW! But…

VNC daemon is safely listening only on localhost, so We have to try some different way. We could make this daemon to listen also on WAN interface, but this would be to lame and risky. So we create SSH tunnel:

And just after that We can safely connect our VNC client (like Tiger-VNC) to our installation process using host 127.0.0.1:65322 :)

Of course after successfull installation I suggest creating clone of our brand-new VPS just to save some time for future installations – use virt-clone command to do this.

And that’s all for now – next time I’ll write how to configure guest OS to make it possible to use virsh console command to connect to it via serial console.