In case you don’t feel like reading yet another rant, this is the gist of it:
1) Run your container and expose port
5901 to your host
docker run -p 5901:5901 -t -i ubuntu
2) set up VNC server in the container and run it
sudo apt-get install vnc4server
vnc4server -geometry 1400x1000
3) export $DISPLAY environment variable
export DISPLAY=<change this to the right DISPLAY name from vnc server output, see screenshot below>
4) run your GUI app
5) connect to the VNC server (
127.0.0.1:5901) from your host OS using one of the freely available VNC clients.
I used TightVNC and it sure was tight.
That’s it. Now if you feel like reading, I can explain my use case. Read on.
Continue reading “Running GUI apps in Docker containers using VNC”
All of my linux servers are connected over OpenVPN and now came the turn for my new FreeBSD droplet to join them.
Ran into one small issue. Upon installing and configuring OpenVPN I was getting this error:
Sun Jul 12 17:59:49 2015 us=222242 Cannot allocate TUN/TAP dev dynamically
Sun Jul 12 17:59:49 2015 us=222330 Exiting due to fatal error
Since I am using tun and not tap, tried manually loading
[fx@badger ~]$ sudo kldload if_tun
kldload: can't load if_tun: module already loaded or in kernel
But that just showed that this is not the problem.
tun interface manually and no probs:
[fx@badger ~]$ sudo ifconfig tun0 create
[fx@badger ~]$ sudo ifconfig tun0
tun0: flags=8010<POINTOPOINT,MULTICAST> metric 0 mtu 1500
That pointed me to my
openvpn.conf config and sure enough I had specified my VPN device as “VPN”:
Ths works great in Linux but apparently not in FreeBSD. Changed that to
tun0 and problem resolved. Yay.
So just for the record, working OpenVPN installation steps:
sudo pkg install openvpn
Enable OpenVPN starting at boot by adding this to
Configure it, the default config file is
/usr/local/etc/openvpn/openvpn.conf and looks like you have to create
/usr/local/etc/openvpn directory manually.
remote openvpn.server.somewhere.com 1194
# certs that you got from vpn server
# don't forget to make sure this is rotated
It has been couple of years at least (more like three) and I am thinking about blogging again.
Why? Well, why not.
So let’s see if this becomes yet another failed attempt or not.
This time I’m using Jekyll as the blog engine.
Easy to set up and I relly like the idea of static content. Otherwise with the various dynamic options it would be yet another thing that needs maintaining and security patching.