Here’s how to remotely log into a Linux machine desktop session from a windows machine. With x11vnc you can log into a running desktop machine session connected to a physical screen. I am assuming a Debian or Ubuntu-based host machine with a running X environment.
- Download and install x11vnc.
sudo apt-get install x11vnc
- Now let’s create a password.
The password is written to:
(Note: The vnc connection is unencrypted and therefore should only be used within trusted network. See the x11vnc documentation for secure connection via SSH tunneling)
- Once you have created your password, start the server with
x11vnc -usepw -forever -viewonly
- You can now connect to your machine via a VNC client and are promted for the password by doing so. For Windows, I recommend ultravnc viewer.
In this tutorial, I’ll show you how to start a browser after booting on the raspberry pi.
- Disable login
In case you want the browser to start without having to log in, apply the following steps:
sudo vi /etc/inittab
Comment this line …
1:2345:respawn:/sbin/getty 115200 tty
… like this.
#1:2345:respawn:/sbin/getty 115200 tty1
Add the following line:
1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1
Save and exit vi with :wq.
- Start X server after boot
Edit this file:
sudo vi /etc/rc.local
And add the following line before the line ‘exit 0’.
su -l pi -c startx
Save and quit vi.
- Autostarting bash script
Let’s create a bash script that should be executed after startup. Here we shall place the command to execute the browser. Of course, you can extend this script as you like.
Now add the following code to start the browser midori in fullscreen mode pointing at the adress www.bbc.co.uk.
midori -e Fullscreen -a www.bbc.co.uk &
Make your bash script executable.
sudo chmod +x /home/pi/start.sh
Add the script execution to your LXDE autostart file.
sudo vi /etc/xdg/lxsession/LXDE/autostart
Add the line
That’s it! You’re good to go. Try rebooting.
- Optional steps
You may notice your screen going black or a screensaver starting which might not be what you want for your application. Luckily, you can change this in a few easy steps.
Install the package x11-xserver-utils.
sudo apt-get install x11-xserver-utils
Now edit the autostart file again. Uncomment the screensaver and add a few lines. Your file should look something like this.
@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@xset s off
@xset s noblank
Your screen should stay on permanently.
If you would like to hide the mouse, install the tool unclutter and add the following line to the top of the start.sh:
unclutter -idle 5 &
In this post I shall explain how to install Cloudera’s Hadoop distribution CDH4 to a virtual machine running Ubuntu 12.04 LTS from scratch. The second part can be used to install Hadoop natively to you Ubuntu 12.04 installation. However, this tutorial was written with a development or experimental environment in mind.
- A Computer with at least 4GB of RAM (8GB+ recommended), as the virtualization of Hadoop consumes a lot of memory.
- 64 bit processor with activated Hardware virtualisation in BIOS (If you don’t have a 64 bit processor, you won’t be able to use Ubuntu with CDH 4 and have to choose another OS)
Virtual machine installation:
- Download the .iso-file for Ubuntu 12.04 LTS 64 bit from www.ubuntu.com.
- Next, download Virtualbox for your host operation system, e.g. Windows 7. The host operating system is the system running Virtualbox, whereas the virtual operating system is called guest system.
You will find the binaries for your specific operating system with further installation instructions at https://www.virtualbox.org/wiki/Downloads.
- After installation, open Virtualbox and create a new virtual machine. Call it Ubuntu Hadoop or any other name and select Linux, Ubuntu 64bit as operating system.
- In the next step, you will have to create a new virtual hard disk. I’d recommend a minimum of 20GB in VDI format with dynamic allocation. Dynamic allocation means that the file on your host disc won’t be a fixed size but will grow with the hard disc of the guest system. However, it will be limited to a fixed size, i.e. 20GB. Initially this will be slower than a fixed size disc, while consuming less space on the host system.
- Once you have created the virtual machine, start your virtual machine by double clicking on the name. You can now choose the downloaded Ubuntu .iso-file as start disk.
- This will open the Ubuntu installer. Follow the on screen instructions to install Ubuntu to the virtual machine. Visit the Ubuntu Homepage for further help with the installation.
Prerequesites to installing CDH4
- Install open ssh server package.
sudo apt-get install openssh-server
- Set a password for root. WARNING: This is only set for this virtual machine. In production environments, this could present a security risk.
- Edit /etc/hosts in a editor with root privileges. Uncomment the second line. It should look something like this.
127.0.0.1 antony-VirtualBox localhost
# The following lines are desirable for IPv6 capable hosts
#::1 ip6-localhost ip6-loopback
Installing Cloudera Hadoop Distribution (CDH4)
- Go to www.cloudera.com and locate Products – CDH. Click ‘Download and Install CDH 4’. On the next page, click ‘Download and Install CDH 4 automatically’. On the following page, under Cloudera Manager 4.1.1, click ‘download‘. Save the .bin-file to disk.
- Make the installer executable and run it as root.
chmod u+x ./cloudera-manager-installer.bin
- Accept the licenses and follow the on-screen instructions. It is important to be patient! The installer may seem to have crashed at times, however, it simply takes its time to install. At the end of the installation a browser should open.
- Log in with the credentials ‘admin’, ‘admin’.
- You can now add hosts to your cluster by clicking ‘Hosts’ and then add hosts. Enter localhost or 127.0.0.1 as IP. In the process you can choose whether to install YARN or MRv1. Be sure to select the latter.
- After the installation and configuration of your cluster, you can access your running services under ‘services’.
- You have successfully installed a one-node cluster on the virtual Ubuntu machine.
If you want to compare your hard disk speeds in Ubuntu 11.10, you can do this in three easy steps:
- Start the programme ‘Disk Utility’.
- Select the desired hard disk you want to test and hit ‘benchmark’.
- Compare the results. Here I’m comparing an old conventional hard disk drive to my new SSD drive. As expected, you notice a huge difference in speed.