Clipboard copy

As a follow up to the previous article on setup of VNC server and client, I believe that it would be very easy to copy and paste between the client and the server windows. Hence I found this link that can help you setup exactly that.

FreeBSD, VNC, Gnome, et. al.

Some of us use Windows as our work environment, while some of us use GNU/Linux. And yet, some of us use FreeBSD. Now assuming you are to ssh to your remote Linux or Unix server with your account and work, the most popular option is to use Putty. However the major disadvantage of an SSH session is that they are non-persistent. Hence once you restart your PC or there is a change in the network, your Putty session has to be restarted, which means you get a fresh shell/terminal and you might be lost as to where you stopped the last time.

Now fret not, since there is a better way. The option is to use VNC or NoMachine or similar tools. What these do is that there is a server running on your remote session (Linux/BSD) in this case and there is a client/viewer application on the machine on which you work on. The client-server application work such that the server transmits graphical information (i.e. each pixel of your remote session) to the client which is displayed to the user. Cool right! It is something similar to Microsoft Remote Desktop, though I have no idea if they work in the same way!

Now normally your FreeBSD machine or VM would just have console access without any GUI. So the first step is to enable Gnome (or KDE) on your FreeBSD VM. Connect to your VM using Putty, and compile XOrg first.

cd /usr/ports/x11/xorg
make install

Once this is completed, repeat the same for


under the x11 folder.

Similarly if you find any other apps missing on your FreeBSD, just google for the ported source code and compile and install the same.

Ex. vim can be found at /usr/ports/editors/vim

In case you come across a situation where the installation requires any file and its not able to find it through any of its online sources, you will need to copy the file to folder directed, which is usually


You can download the necessary file on you working PC,

is a popular portal to download the missing files, though there are plenty of others.

Use WinSCP to copy the file to your FreeBSD VM. Download and install WinSCP on your working PC, specify the IP address of you VM in WinSCP for an SCP session, and provide your credentials. Once WinSCP starts, you can just copy paste files to your remote VM/machine using your mouse!


Then head over to your home directory on your remote machine, and edit the file


and add the below lines

/usr/local/bin/gnome-session &

Restart your remote machine/VM and proceed to start the VNC server with the following command.

vncserver -geometry <width>x<height>

You will be provided a URL which you can copy and paste in your local PC’s VNC viewer. You will be prompted to set a password on your first login (which you will need for every login) and viola, you have a GUI based remote VM/machine based on FreeBSD.

FreeBSD usually defaults to C Shell, hence make any changes to the shell config in the file




may need to be edited to enable few things at the system startup.