<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    thanks Brian,<br>
    yes, I have about 4 of those running - unprivileged :) And I've had
    a go with TigerVNC (which supports 3d capabilities currently lacking
    in X2Go). <br>
    I can run current versions of KDE and Unity on Xephyr, which I
    currently cannot with X2Go<br>
    <br>
    But for this use case, I want desktop integration from an
    unprivileged container. I have achieved it with LXC on Ubuntu
    16.04... but was hoping to be able to use LXD. It feels like I'm so
    close ... just missing something, probably quite trivial once you
    know how ... I wish i knew how<br>
    <br>
    Currently I have the following containers<br>
    - Mythtv Backend (unprivileged, but with special user mappings which
    mean it can write to host devices when they're mounted in)<br>
    - Proxy with Openvpn and Dante<br>
    - Development - X2Go with Mate<br>
    - Browsing, semi secure, X2Go with Mate<br>
    - Desktop integrated browsing - Unsecure with Mate, on either Xephyr
    or Host desktop BUT running as lxc-start ie. legacy formate<br>
    - Various other experimental containers, including one with KDE,
    X2Go, Xephyr and TigerVNC<br>
    <br>
    Somewhat surprisingly current KDE is quite useful with X2Go as long
    as you autostart some applications, particularly dolphin and konsole
    ... then others can be started. You just won't have the panels etc.
    I haven't spent too much time with it because it's not close enough
    to what I want to achieve.<br>
    <br>
    thanks again<br>
      Rob<br>
    <br>
    <div class="moz-cite-prefix">On 22/07/16 05:53, brian mullan wrote:<br>
    </div>
    <blockquote
cite="mid:CAFX-c4tGUN_O22e-oK3zzwCGY3ba_cLEc4jv-KyXtX27b6Yz=w@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>Rob<br>
              <br>
            </div>
            If you want to run single apps from the container like with
            microsofts remoteapp then a really simple way to accomplish
            it is with x2go & the <a moz-do-not-send="true"
href="http://wiki.x2go.org/doku.php/wiki:advanced:published-applications">x2go
              published applications</a> capabilty.<br>
            <br>
          </div>
          I just configured a new LXD container.   Its simple to
          setup/configure and sound, printing, shared folders all work<br>
          <br>
        </div>
        <b><font size="4">Step #1</font></b><br>
        <br>
        Create a privileged container & configure it to autostart:<br>
        <br>
        <div>
          <div style="margin-left:40px"># Launch an Ubuntu xenial 16.04
            64 bit containers and name it cn1.  We are launching CN1 as
            a<br>
            # PRIVILEGED container:<br>
            <br>
            lxc launch images:ubuntu/xenial/amd64 cn1 -c
            security.privileged=true<br>
            <br>
            # set LXC container CN1 to autostart when the Host is
            rebooted<br>
            <br>
            lxc config set cn1 boot.autostart 1<br>
          </div>
          <br>
        </div>
        <div><b><font size="4">Step #2</font></b><br>
          <br>
        </div>
        <div>$ lxc exec cn1 bash<br>
          <br>
        </div>
        <div># you will be logged into the CN1 container as root so just
          execute the following to install<br>
        </div>
        <div># Ubuntu-Mate Desktop<br>
          <br>
          Note: you can put all of the following in a bash script..<br>
          <br>
          # Install a desktop in it (I use Ubuntu-Mate:<br>
          <br>
        </div>
        <div>echo "deb <a moz-do-not-send="true"
            href="http://archive.canonical.com/ubuntu">http://archive.canonical.com/ubuntu</a>
          xenial partner" | tee -a /etc/apt/sources.list<br>
          echo "deb-src <a moz-do-not-send="true"
            href="http://archive.canonical.com/ubuntu">http://archive.canonical.com/ubuntu</a>
          xenial partner" | tee -a /etc/apt/sources.list<br>
          echo "deb <a moz-do-not-send="true"
            href="http://us.archive.ubuntu.com/ubuntu/">http://us.archive.ubuntu.com/ubuntu/</a>
          xenial-backports main restricted universe multiverse" | tee -a
          /etc/apt/sources.list<br>
          echo "deb-src <a moz-do-not-send="true"
            href="http://us.archive.ubuntu.com/ubuntu/">http://us.archive.ubuntu.com/ubuntu/</a>
          xenial-backports main restricted universe multiverse" | tee -a
          /etc/apt/sources.list<br>
          <br>
        </div>
        <div># update & upgrade container<br>
        </div>
        <div>apt-get update<br>
          apt-get upgrade -y<br>
          <br>
          # install apt<br>
          apt-get install apt -y<br>
          <br>
          # From here on we can use apt to update Everything<br>
          apt dist-upgrade -y<br>
          <br>
          #Install miscellaneous<br>
          <br>
          apt install pulseaudio pulseaudio-utils alsa-base alsa-utils
          linux-sound-base gstreamer1.0-pulseaudio gstreamer1.0-alsa
          libpulse-dev -y<br>
          <br>
          # Install UBUNTU-MATE desktop environment as default for all
          users including ones added in the # future<br>
          <br>
          add-apt-repository ppa:ubuntu-mate-dev/xenial-mate -y<br>
        </div>
        <div>add-apt-repository ppa:x2go/stable<br>
        </div>
        <div><br>
          apt update<br>
          <br>
          apt install lightdm ubuntu-mate-core ubuntu-mate-desktop ufw
          ubuntu-restricted-extras ubuntu-restricted-addons -y<br>
          <br>
          echo "Desktop Install Done"<br>
          <br>
          # Configure the Xsession file default desktop environment
          change ALL future User additions to default xsession to be
          UBUNTU-MATE<br>
          <br>
          update-alternatives --set x-session-manager
          /usr/bin/mate-session <br>
          <br>
          # and some gui based useful tools that aren't included in the
          minimal-xubuntu-desktop<br>
          <br>
          apt install gdebi synaptic gedit wget git terminator
          network-manager -y<br>
          <br>
        </div>
        <div>apt install x2goserver x2goserver-xsession<br>
          <br>
        </div>
        <div>adduser yourID and password in the container and any others
          you want to add as users.<br>
        </div>
        <div><br>
        </div>
        <div># reboot<br>
          <br>
        </div>
        <div><b><font size="4">Step #3</font></b><br>
          <br>
        </div>
        <div>On the host all you have to do is install the x2go client <br>
        </div>
        <div><br>
          <div>add-apt-repository ppa:x2go/stable<br>
          </div>
          <br>
          apt update<br>
          <br>
        </div>
        <div>apt install x2goclient<br>
          <br>
        </div>
        <div><b><font size="4">Step #4</font></b><br>
          <br>
        </div>
        <div>launch the x2goclient & follow the directions on the
          x2go published applications page (use the IP of your
          container)<br>
          <br>
        </div>
        <div>In the x2goclient when you create the Published Application
          "profile" click on the connection tab and slide it all the way
          to the right so x2go doesn't waste cpu doing any compression.<br>
          <br>
        </div>
        <div>Save that new Published Application Profile and it will
          move to the right side of the x2goclient menu.<br>
          <br>
        </div>
        <div>Click on it & answer yes to the ssh question on adding
          the new server.<br>
           <br>
        </div>
        <div>Look on your top menu bar and you will notice 2 new icons
          shown,  Click on the one that has the little Seal icon on it
          (thats HOCA they mascot for x2go) and you will see<br>
        </div>
        <div>a pull down menu item called Published Applicaitons.<br>
          <br>
        </div>
        <div>Click on any one of those and they will startup in the
          container but be displayed on your Host Desktop,<br>
          <br>
        </div>
        <div>x2go has clients for Linux, Mac and Windows as well as a
          python client.   All are open source.<br>
          <br>
        </div>
        <div>Brian<br>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>