Thin Client software for your Raspberry Pi with Wlan support.

RPiTC

The guys from the RPiTC project have released a new Raspberry Pi optimized image. The image is much quicker and supports WLAN out-of-the-box.

You can download the image from my dropbox. Extract the image from the RAR file with e.g. 7-ZIP and save it on a local drive of your PC. Write the image to an SD card as described in one of my previous posts with Win32Diskimager.

Start your Raspberry Pi with the prepared SD Card and with monitor, mouse and keyboard attached.

The Desktop shows the various pre-installed Thin Client applications like RDP, VMWare, Citrix, X2Go, xFreeRDP, Ice Weasel with ICA etc. I use Ice Weasel with ICA mostly.

You will have to connect either a LAN cable or setup a WiFi connection for a USB dongle.

WiFi is supported out-of-the-box for my Edimax WLAN Hi-Speed USB 2.0 EW-7811Un Nano.

WLAN configuration is done like this:

Right-click on the desktop and select LX-Terminal from the application menu. A Window with the command prompt will open. To get the WiFi working only one config file needs to be created and another needs to be modified.

STEP 1)

At the command promt type:

nano /etc/wpa.conf

The nano editor will open, make the contents look like this:

network={
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
ssid=”YOUR-SSID
psk=”WPA-PASSWORD
}

press ctrl-x and y to save

STEP 2)

At the command promt type:

nano /etc/network/interfaces

The nano editor will open, make the contents look like this:

auto lo
iface lo inet loopback
# auto eth0
# iface eth0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa.conf

press ctrl-x and y to save

reboot & you are good to go!

How to use your Raspberry Pi as Airprint Server.

Today, I was reading a PDF on my iPad and wanted to print a page from the PDF document on my printer, but Apple only supports printing to Airprint printers. So, no luck with my Samsung SCX-4824FN, or…..

With some google-ing I found a way to turn the Raspberry-Pi into an Airprint server. The Airprint server connects to your non-Airprint printer via USB or network-connection and gives your Apple device (iPhone or iPad) access to it. It works marvelous!

I used the instructions from this website.

In summary:
(click here  or here you want to skip the work and just download the SD-Card image, you will need a PPD for your printer as well (see text below) )

1) Use a fresh wheezy image

2) connect to the raspberry pi via SSH
standard credentials are user: pi password: raspberry

3) switch to admin: sudo su

4) update, upgrade & install packages

sudo aptitude update
sudo aptitude upgrade
sudo aptitude install avahi-daemon
sudo aptitude install avahi-discover
sudo aptitude install libnss-mdns
sudo aptitude install cups
sudo aptitude install cups-pdf

sudo aptitude install python-cups

5) start services
sudo usermod -aG lpadmin pi
sudo /etc/init.d/cups start
sudo /etc/init.d/avahi-daemon start

6) Now edit the CUPS configuration file

sudo nano /etc/cups/cupsd.conf

You’ll need to set-up the listeningport. Comment out the line that reads “Listen localhost:631″. Add in “Port 631″. It should look like this:

#Listen localhost:631
Port 631

CUPS must be configured to work with any hostname, so it functions with AirPrint. The ServerAlias * directive needs to be added before the first occurence of <Location />. It should look like this:

# CUPS to work with any hostname
ServerAlias *

The config file must also be edited for enabling local access to the server by adding “Allow @Local” This must be done in the following three areas of the config file:

# Restrict access to the server…
# Restrict access to the admin pages…
# Restrict access to configuration files…

then save the config file (ctrl-x and Y)

7) restart the service
sudo /etc/init.d/cups restart

8) CUPS configuration

PPD
before you start this step, make sure that you have the PPD (Postscript Printer Description) for your printer. I had trouble at first finding the PPD for my Samsung printer but it appeared to be included in the UnifiedLinuxDriver package which can be downloaded from the Samsung website. I only needed to unzip the UnifiedLinuxDriver_1.00.tar.gz and browse to the PPD directory. The PPD can stay on your windows / linux machine as it will be uploaded via the CUPS web interface later on.

Navigate the the CUPS configuration page by typing the IP address from your Raspberry Pi in your browser + the CUPS port number (so it’ll be an address like 192.168.xxx.xxx:631). A security exception message may pop up but that’s ok. Continue onwards!

Plug your printer into one of the USB ports of the Raspberry Pi or use a network printer on the same network of the Raspberry Pi. Click “add printer” (At this stage, you might be asked for the username (Pi) and password (Raspberry) of the Raspberry Pi.) in the CUPS web interface and it should appear in the list of available printers. You’ll have to fill in details for the printer, such as name and location. You can enter whatever you want in here but the important part is ensuring you tick the “share this printer” box. Following this, you’ll have to select the appropriate printer driver from a (large) list that appears or use a PPD. Enter print and paper settings too. You’re now ready to click on maintenance > print test page. If everything has gone to plan, the test page will print successfully.

Now, click on the Admin tab and view the server settings which are towards the right-hand side of the screen. Tick the box that says “share printers connected to this system”.

9) Setup Avahi service

cd ../../opt
sudo mkdir airprint

cd airprint
sudo wget -O airprint-generate.py –no-check-certificate https://raw.github.com/tjfontaine/airprint-generate/master/airprint-generate.py

sudo chmod 755 airprint-generate.py
sudo ./airprint-generate.py -d /etc/avahi/services

10) create Airprint files

cd /usr/share/cups/mime

sudo nano airprint.types

#
# “$Id: $”
#
# AirPrint type
image/urf urf string(0,UNIRAST)
#
# End of “$Id: $”.
#

ctrl-x and Y to save

sudo nano airprint.convs

#
# “$Id: $”
#
# AirPrint
# Updated list with minimal set 25 Sept
image/urf application/pdf 100 pdftoraster
#
# End of “$Id: $”.
#

ctrl-x and Y to save

sudo service cups restart

11) And finally the last commands

cd
cd ../../opt/airprint
sudo wget https://raw.github.com/tjfontaine/airprint-generate/master/airprint-generate.py
sudo ./airprint-generate.py -d /etc/avahi/services
sudo reboot

And for everybody that wants to save time, you can download an image for a 2GB SD Card from my public dropbox  look for the following file 20130502 Wheezy with Airprint 2GB.zip in \images\Airprint\. Alternatively you can download it from google drive.

It is probably best to install the image onto a 4GB (or larger) SD-Card. Be sure to run sudo raspi-config the first time in order to expand the file system, to make full use of the available space.

Raspi-Config

Enjoy!

Many thx to Lynsay’s Little World

NEW Airpi images for 2GB SD Cards

I’ve just published new images for the AirPi with iOS6 support, that fit on a 2GB SD card.
For everyone that wants to save the time, you can download the image directly from my public dropbox.
Both images are based on Rasbian Wheezy and configured withthe following default settings:
– SSH enabled
– User = pi
– Password = raspberry
– locale = en_US.UTF8
– timezone = Europe.Berlin
– broadcast name = AirPi
The file names are:
20130416 Wheezy AirPi with WLAN (works via onboard 3.5mm sound jack)
20130416 Wheezy AirPi with WLAN and USB sound
Write the image to a 2GB SD card using Win32DiskImager.
In case that you prefer to use the USB sound it might be wise to use a USB extension cable for the wifi dongle, in order to place it at a distance from the USB sound dongle. In my setup I experienced quite some interference when the WLAN dongle was close the USB Sound dongle.
 
How to set the WLAN
Both images work with both LAN or WLAN
connect to the Raspeberry Pi via SSH or connect keyboard & monitor directly to the Raspberry Pi
WLAN configuration can be set using the following command:
sudo nano /etc/network/interfaces
look for the lines with
wpa-ssid “YOUR SSID”
wpa-psk “YOUR PASSWORD”
and replace YOUR SSID with the SSID of your network and replace YOUR PASSWORD with the password of your network.
ctrl-x and Y to save changes
sudo reboot
ready!
If there is no WLAN connection the Raspberry Pi will use the LAN connection if available.
How to set the broadcast name of the Airpi
The broadcast name of the Raspberry AirPi can easily by changed, at the command prompt type:
sudo nano /etc/init.d/shairport 
look for the following line
DAEMON_ARGS=”-w $PIDFILE -a AirPi”
and change AirPi in what ever you like.
ctrl-x and Y to save changes
sudo reboot
ready!
I have tested the setup with the Edimax EW-7811Un, the Logilink UA0053 USB soundcard and a generic C-Media USB soundcardUSB Sound

How to setup a VNC server on a Raspberry Pi for remote access.

Today I figured out how to setup a VNC server using tightvncserverPenguin tutor explains it very well on his website.

This is how I did it. Start off with a clean Raspbian Wheezy install. Make sure to use sudo aptitude update and sudo aptitude upgrade to get to the latest version.

Install the Tight VNC Server on the Rpi with the following command

 

aptitude install tightvncserver

 

You can start the tightvnc server with the following command

 

/usr/bin/tightvncserver:1 -geometry 1280×720 -depth 24

 

The first time you run the tightvnc server, you will have to set a password e.g. “raspberry”. You don’t need a view only password. In case you want to change the password a later moment, use the following command:

Vncpasswd

 

If you want to run tightvncserver at startup you have to do the following:

 

Create an init file

 

sudo nano /etc/init.d/tightvncserver

 

Make the content of the file look like this, user = “pi” desktop resolution is set to “1280×720” both can be changed:

 

# Set the USER variable VNC server

export USER=’pi’

 

eval cd ~$USER

 

case “$1” in

start)

su $USER -c ‘/usr/bin/tightvncserver :1 -geometry 1280×720 -depth 24’

echo “Starting TightVNC server for $USER ”

;;

stop)

pkill Xtightvnc

echo “Tightvncserver stopped”

;;

*)

echo “Usage: /etc/init.d/tightvncserver {start|stop}”

exit 1

;;

esac

exit 0

 

ctrl-x and Y to save

 

To complete execute the following commands:

 

sudo chown root:root /etc/init.d/tightvncserver

sudo chmod 755 /etc/init.d/tightvncserver

sudo update-rc.d tightvncserver defaults

 

The tightvncserver can be started and stopped with the following commands:

 

sudo /etc/init.d/tightvncserver start

sudo /etc/init.d/tightvncserver stop

 

In order to access the Raspberry Pi via VNC, you will need a VNC viewer.

That’s it!

How to setup a USB wlan connection on a Raspberry Pi – alternative method

Last week I received a new Raspberry PI model B with 512MB ram. I tried to enable WLAN using my own instructions for the Edimax WLAN Hi-Speed USB 2.0 EW-7811Un Nano and it didn’t work!?!? Huh?

Some how I got the following error message:

wpa_supplicant: /sbin/wpa_supplicant daemon failed to start

but after some google-ing I found a solution for the problem. In many posts on the web, it is suggested that the problem relates to a “lack of power” issue on the RPi USB. I found out that it is really a configuration issue. Here is how I solved it:

The setup assumes working from a clean Rasbian Wheezy image and applying the latest updates.

Configure the network adapter interface

sudo nano /etc/network/interfaces

you have to make the content of /etc/network/interfaces look like this:

auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp

wpa-ssid “YOUR NETWORK SSID HERE”
wpa-psk “YOUR NETWORK PASWORD HERE”

ctrl-x and Y to save the changes

Now just restart your network connections

sudo /etc/init.d/networking restart

or alternatively reboot

sudo reboot

That is it! You don’t have to use the  “/etc/wpa_supplicant/wpa_supplicant.conf” with this setup.

new RPi with Edimax EW-7811Un

Using my Raspberry Pi as a Citrix Client

A few weeks ago I came accross The Raspberry Pi Thin Client project (RPiTC). You can find its website here: http://rpitc.blogspot.nl/

I like to use the IceWeasel Citrix Client that it has onboard. Which works very well! In case you are a user of VMWare, Windows Remote Desktop etc, it also provides ready support for that.

Out of the box, the image works via the onboard Ethernet connection. But I wanted to use the RPiTC via a Wifi connection (Edimax ew-7811un). The RPi can be powered from the USB of my TV screen. I have the HDMI cable, USB WLAN and USB wireless HTPC keyboard connected to the RPI to make the setup complete and ready for work.

This is how I got it to work.

1) connect via SSH

2) logon using the following standard credentials

user: root

password: raspberry

you have to install the following tools:

aptitude install wireless-tools

apt-get install wpasupplicant
configure the wlan settings
nano /etc/wpa.conf
the file should look like this:
network={
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
ssid=”YOUR-SSID”
psk=”WPA-PASSWORD”
}
ctrl-x and Y
Configure your network interfaces
nano /etc/network/interfaces
the file should look like this:
auto lo
iface lo inet loopback
# auto eth0
# iface eth0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa.conf
ctrl-x and Y
reboot
For anyone that just wants an SD-card image, the original and the one with wlan support can be found in my public dropbox. (Files are currently being uploaded)
If you use the WLAN image you will have to edit the WLAN settings.

1) connect via SSH

2) logon using the following standard credentials

user: root

password: raspberry

configure the wlan settings
nano /etc/wpa.conf
by changing the following lines
ssid=”YOUR-SSID”
psk=”WPA-PASSWORD”
ctrl-x and Y
reboot
PS: note that the original image RPiTC06022013.IMG fits on a 1GB card (the unpacked image is 1000MB). The RPiTC06022013-WLAN.IMG was made on my 4GB SD card (I didn’t have any smaller SD-cards), therefor this image is much bigger, despite the fact that the software doesn’t need all that space.
Enjoy!

Download your AirPi SD Card image here

*** update – the files have been updated and fit on a 2GB SD cards now ***

The new files can be found in my public Dropbox in the \Images\Airpi directory.

https://www.dropbox.com/sh/cjrcfw49sfc7h8b/SQSjpp8DJG

————————————————————————————————————————————–
I’ve just published a second image for the AirPi. Last month I published an image to get your AirPi working on your Raspberry Pi with a Logilink UA0053 USB soundcard. Now I’ve added on request an image that works with the onboard 3,5mm. For everyone that wants to save the time, you can download the image for a 4GB SD card directly from my public dropbox.Both images are based on Rasbian Wheezy and configured with:
– SSH enabled
– User = pi
– Password = raspberry
– locale = en_US.UTF8
– timezone = Europe.BerlinIt has auto login for user pi enabled
It’s broadcast name is AirPi
Pick the image of your choice. The 2013-03-19-wheezy-airpi image uses the onboard audio jack. The 2013-02-19-wheezy-airpi-UA0053 image is configured to use the USB audio Logilink UA0053 soundcard http://www.logilink.eu/showproduct/UA0053.htm
Write the image to an 4GB SD card with Win32DiskImager.Plug it into the raspberry and hook the raspberry up to your network (and Logilink UA0053 soundcard) and soundsystem. It’ll work like a charm on iOS 6.Enjoy!The files can be found in my public Dropbox.https://www.dropbox.com/sh/cjrcfw49sfc7h8b/SQSjpp8DJG

The broadcast name of the Raspberry AirPi can easily by changed, at the command prompt type:nano /etc/init.d/shairportlook for the following lineDAEMON_ARGS=”-w $PIDFILE -a AirPi”and change AirPi in what ever you like.

ctrl-x and Y to save changes

sudo reboot

ready!

How to change the WLAN settings
WLAN configuration can be set using the following command:
sudo nano /etc/network/interfaces
look for the lines with
wpa-ssid “YOUR SSID”
wpa-psk “YOUR PASSWORD”
and replace YOUR SSID with the SSID of your network and replace YOUR PASSWORD with the password of your network.
ctrl-x and Y to save changes
sudo reboot
ready!
If there is no WLAN connection the Raspberry Pi will use the LAN connection if available.