Running Fldigi Flmsg and Flwrap on the Raspberry Pi 2

VNC

I enabled VNC in case, for example, I had my Pi on a trip and didn’t have a monitor. Sometimes it’s just useful to use the graphical desktop.

It is NOT advisable to enable on an insecure network.

The VNC client I use is the standard one for Windows, TightVNC.

I used the tutorial from Adafruit on Remote Control with VNC. Autocutsel enables copy & pasting from the VNC window, very handy.

fldigi-pi-06_vnc-01_apt-get_update

Connect via SSH to the Pi.

Update the repository archives by entering

sudo apt-get -y update

For a description of this command see the Updating Wheezy Raspbian section.

fldigi-pi-06_vnc-02_apt-get_install_tightvncserver

Once complete, install the VNC server package by entering

sudo apt-get -y install tightvncserver autocutsel

fldigi-pi-06_vnc-03_autostart_prep

When the installation is complete, start the VNC server to setup access passwords.

vncserver :1

You will be required to enter a password for VNC. This can be different from the password for the “pi” user and are limited to 8 characters.

Answer no to the read-only password.

Next will be the setup to have the VNC server start when the Pi boots. Enter the following commands

cd /home/pi/.config/

mkdir -v /home/pi/.config/autostart/

cd /home/pi/.config/autostart/

vim tightvnc.desktop

fldigi-pi-06_vnc-04_autostart_file

Put VIM in to insert mode by pressing “i” and you will see

-- INSERT --

at the bottom of the window. Paste the following

[Desktop Entry]
Type=Application
Name=TightVNC
Exec=vncserver :1
StartupNotify=false

Press the Escape key to take VIM out of insert mode.

Then have VIM save (write) and quit by typing

:wq

Press Enter.

fldigi-pi-06_vnc-05_xstartup

This will enable the copy & paste feature over a VNC connection. Enter the following commands

cd /home/pi/.vnc/

vim xstartup

fldigi-pi-06_vnc-06_xstartup_file

Press the “i” key to enter insert mode. Place the green cursor at the end of this line

xsetroot -solid grey

by using the arrow keys and End key.

Press Enter to add a new line. Paste

autocutsel -fork

Press the Escape key to take VIM out of insert mode.

Then save (write) and quit by

:wq

Press Enter.

VNC will now automatically start when the Raspberry Pi is booted.

fldigi-pi-06_vnc-07_reboot

sudo reboot

Connecting via VNC

fldigi-pi-06_vnc-08_tightvnc_connection

Start the TightVNC Viewer on a PC.

For Remote Host, enter the IP address found earlier and display. In this case: 192.168.1.232:1

Click Connect.

fldigi-pi-06_vnc-09_tightvnc_authentication

Enter the VNC password setup earlier.

Click OK.

fldigi-pi-06_vnc-10_tightvnc_desktop

You should see the Raspberry Pi desktop.

VNC is working!

Other bits

Linux has the concept of displays and screens. The syntax is

[host]:[display][.screen]

Each host (usually localhost) can have multiple displays. Each display can have multiple screens. 0 usually is the display on the physical device that has a monitor attached.

Other displays can be started using the VNC service. VNC is started on display “:1” but could have multiple displays for multiple users. Example

vncserver :1; vncserver :2; vncserver :3

would start a total of 3 VNC sessions users could connect to over the network. Each display is separate. Users who connected to the same display number would see the same screen.

GDBus.Error

fldigi-pi-06_vnc-11_tightvnc_desktop_error

So, I’ve seen this error in a number of versions of Wheezy Raspbian using VNC. I figure it’s some bug or configuration setting. I ignore it by clicking OK.