Ubuntu Virtual Desktop in a Docker Container (with RDP Access)


Recommended Posts

Well, I got to learn something new today!  It appears you do NOT need the X server installed on the host in order to render virtual desktops with remote graphics access (RDP/VNC) through Docker.  I found a container that someone made with the right packages in it to support this and used Squid's Docker Search plugin to add it to my templates with ease inside the webGui.  Here's a quick demonstration:

 

 

How do I try this?

NOTE:  The login for this virtual desktop's RDP connection is ubuntu and the password is PASSWD (case-sensitive).

 

Known Issues

  • The container we found on the registry for this isn't setup properly to store appdata in a volume mapping, but we plan on officially hosting our own variant in the future
  • No audio yet through the RDP session either
  • Works fine for getting access to application interfaces that aren't presented through a webGui yet (e.g. Crashplan, Virt Manager)

 

Anyway, I just wanted to share this discovery right away as I thought this was just not going to work for us, but using a virtual frame buffer and RDP, we have success.  Should be able to also do this with VNC, but RDP definitely seems to be a bit better as a protocol.

Link to comment
  • Replies 118
  • Created
  • Last Reply

Top Posters In This Topic

This looks great, thanks jonp,  If I'm correct in my assumptions, then this should enable me to run a Calibre gui session. 

 

Adding a volume mapping should be straightforward n'est pas?

 

More brilliant work, amazing what Unraid can accomplish nowadays!  So so so glad I returned from my WHS 2011 experiment!

 

 

Link to comment

This looks great, thanks jonp,  If I'm correct in my assumptions, then this should enable me to run a Calibre gui session. 

 

Adding a volume mapping should be straightforward n'est pas?

 

More brilliant work, amazing what Unraid can accomplish nowadays!  So so so glad I returned from my WHS 2011 experiment!

 

Yes, volume mappings work fine.  I'd actually like to see Crashplan converted to this method so that instead of using some hackery to connect and manage it, you could use the Crashplan gui inside the container.

 

A word of caution around this container is that it's not really setup right to support "docker stop".  Once you "stop" it, it won't let you connect again when you start it up because it tries to re-run scripts.  I'll need to modify the Dockerfile for this later and create a variant to do it right, but if anyone else wants to take the reigns on that initiative, I'd sure appreciate it!

Link to comment

So, stop it, then edit and re-save it? Would that work?

 

I think you'd have to "kill" it instead of stop it right now (command line).  I just delete the container and re-add it, but that means it's non-persistent.

 

Give it time and this thing will be way better.  This was just a basic proof of concept.

Link to comment

Thinking out loud and don't know if this is possbile, but if this is gonna be leveraged for installing/administering webui-less apps, is there a way to set a global install path and user (nobody) and then have no need for the actual desktop to save anything etc..

 

Just as long as the install folders and config folders are stored locally.

Link to comment

Thinking out loud and don't know if this is possbile, but if this is gonna be leveraged for installing/administering webui-less apps, is there a way to set a global install path and user (nobody) and then have no need for the actual desktop to save anything etc..

 

Just as long as the install folders and config folders are stored locally.

Yes. I'd like to use novnc or an equivalent and change the context menu when clicking a container icon in the webgui to say "access" and have it link to either a webgui (if available) or a VNC session to the container where the app itself could be set to auto launch.

Link to comment

I actually find rdp to be a better protocol than VNC for remote desktop access. Seems to draw the screen faster and be more responsive. To put things in perspective, my monitor I recorded on in that video was 4k resolution. The rdp session was 4k as well.

Link to comment

I actually find rdp to be a better protocol than VNC for remote desktop access. Seems to draw the screen faster and be more responsive. To put things in perspective, my monitor I recorded on in that video was 4k resolution. The rdp session was 4k as well.

 

I have been less than impressed with VNC too. I have been impressed enough with RDP to setup my development systems with it and move all of my development off my local machine.

Link to comment

This looks great, thanks jonp,  If I'm correct in my assumptions, then this should enable me to run a Calibre gui session. 

 

Adding a volume mapping should be straightforward n'est pas?

 

More brilliant work, amazing what Unraid can accomplish nowadays!  So so so glad I returned from my WHS 2011 experiment!

 

Yes, volume mappings work fine.  I'd actually like to see Crashplan converted to this method so that instead of using some hackery to connect and manage it, you could use the Crashplan gui inside the container.

 

A word of caution around this container is that it's not really setup right to support "docker stop".  Once you "stop" it, it won't let you connect again when you start it up because it tries to re-run scripts.  I'll need to modify the Dockerfile for this later and create a variant to do it right, but if anyone else wants to take the reigns on that initiative, I'd sure appreciate it!

 

Let me know when you finish this; I would love to add it to Crashplan.

Link to comment

I've had a little play around with some stuff I googled and this isn't ideal but it's a step in the right direction.

 

by editing

 

/etc/xrdp/xrdp.ini

 

from a terminal inside the container and adding this to the bottom.

 

[xrdp8]
name=reconnect-Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=ask

 

Then I can reconnect to an existing session, by changing from sesman-Xvnc to the reconnect-Xvnc in the xrdp login window, and here is where it's less than ideal, you have to enter the port that the original session is running on........

It won't let you choose a port of your own if there's no session running already.

I'll play some more later.

Link to comment

Nice work!  Hoping to have some more time after this week to work on this with Eric a bit further.  The audio not coming through isn't really a huge issue for us, but it'd be nice to solve later down the road.  The #1 interest is for apps like Crashplan that do not have a web-based UI (or Calibre I guess would be the other).

Link to comment

Nice work!  Hoping to have some more time after this week to work on this with Eric a bit further.  The audio not coming through isn't really a huge issue for us, but it'd be nice to solve later down the road.  The #1 interest is for apps like Crashplan that do not have a web-based UI (or Calibre I guess would be the other).

 

I was thinking handbrake......

 

This doesn't solve any issue with stopping the container though. you still lose your sessions etc......

 

but you can reconnect to a session all the while the container is live.

 

i've had another idea though, if i find where you can limit the sessions to something sensible like 3 or 4, change that ini file to have reconnect-sess1 etc.... with the port settings different for all of them, it always seems to start off assigning ports from 5910 onwards.

 

One other thing, if you have VM's running in KVM it won't let you choose 5900 for the container, you can change the host port of course, but it's not obvious.

 

probably have to put that in description if any containers get made from this.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.