[Updated: JUN 15] Easier XMir Setup (Now with Libertine!)

Search This thread

yaabaa1986

Senior Member
Oct 16, 2011
120
13
0
Dear shadowEO,
I'm a ubuntu/Linux noob.
I read the treats out of intrest and I really want to give this (x-mir, libertine) a try on my mx4.
Would you be offended if I ask a "noob proof how to"?
(still strugling with the terminal. I already was proud of myself for changing the background via terminal)
 

ShadowEO

Senior Member
Mar 15, 2012
490
133
63
28
Columbus, Ohio
Dear shadowEO,
I'm a ubuntu/Linux noob.
I read the treats out of intrest and I really want to give this (x-mir, libertine) a try on my mx4.
Would you be offended if I ask a "noob proof how to"?
(still strugling with the terminal. I already was proud of myself for changing the background via terminal)

YaaBaa1986, Ask and ye shall receive. I'm a very accommodating person, so asking for help does not offend me one bit. However you may find these to be a bit hard to use on the MX4 without an external display.

Unfortunately, it seems in the latest version of Libertine, the app is once again broken when it comes to making a container and installing applications, so you will need to use Terminal for it.

But a nice noob proof howto (provided your system image is writable):
1) Open terminal and sudo su.
2) When you see the # in your prompt, you're executing as root, this is good for this stage. If your system image is not writable yet, type
Code:
touch /userdata/.writable_image
and reboot. When the system starts back up, continue from a root prompt (Step 1)
3) In terminal as root, type apt-get update && apt-get install libertine python3-libertine-chroot and press enter. It will install some packages to your system image. Once the package is complete, type exit to go back to an unprivileged prompt (prompt will be suffixed with $, this is the prompt for your user account and is needed for the next steps, libertine does not run under root or sudo)

4) Now it's time to create your container, so at your normal terminal prompt, type the following (you can change it if you'd like, this is an example)
Code:
libertine-container-manager -i vivid -n Applications -t chroot
, It will begin running debootstrap to create your libertine container, let it run. If this does not work, you will need an ubuntu laptop to use phablet-shell or adb shell, but phablet shell is preferred, for this step (Libertine seems to hate running under the Unity 8 terminal application due to AppArmor's confinement).

5) After your container has been created and installed and you are back at your prompt, you can begin to load applications into it. To do so, use the following command
Code:
libertine-container-manager install-package -i vivid -p <package name>
NOTE: If you changed the container ID ( -i vivid ) in the creation step, you will need to substitute it here as well. The -p parameter is only good for ONE package at a time (dependencies don't count, but you can't do something like "libreoffice default-jre", you need to install libreoffice and default-jre separately)

6) If you need to remove a package, you can use the following command:
Code:
libertine-container-manager remove-package -i vivid -p <package name>

Got your container all ready to go with your apps installed? But how do you start them? Easy. Go back to the Apps Scope and open the Ubuntu Store, search for Libertine Scope and install it, then swipe up from the home screen and you'll see a new "XApps" scope, this contains your applications.

Noob-easy DPI hack:
So the screen looks UBER small to you? That's fine, it does for most of us, open your terminal and follow the below:

1) In terminal, type or paste the following (you can paste by long-holding on the screen):
Code:
nano /home/phablet/.local/share/libertine-container/user-data/vivid/.Xdefaults

This will provide you with an empty editor ready for things to be entered. Type the following (NOTE, this is personal preference, tweak it till you're happy and follow the notes below for getting it looking better):
Code:
Xft.dpi: 175

To make your applications look better instead of the default Raleigh theme, use the commands above to install the lxappearance package and follow these instructions to add the NoobsLab Themes PPA:

1) From a normal prompt, type
Code:
libertine-container-manager configure -a ppa:noobslab/themes
Once done, type
Code:
libertine-container-manager update

2) To search through themes available for installation type
Code:
libertine-container-manager search-cache -s noobslab -i vivid
which is functionally the same as apt search noobslab. The use the l-c-m install-package command above to install the themes you find.

3) Once done, go to the XApps scope and open LXAppearance and you'll see your themes there. If you have any applications open already, you will need to close them and reopen to get them to pick up the new settings.

Note: If you install libreoffice, I would suggest changing the Default font in LXAppearance to Liberation Sans 13pt.

For On-Screen Keyboard, install the packages maliit-inputcontext-gtk2 and maliit-inputcontext-gtk3. Next time you open a GTK+ application you should see the system keyboard in the X applications.

Whew, I hope that helps :D If it does I'll move this over to the OP and replace the horrible instructions I wrote up in a hurry yesterday.

By the way, how did you get the wallpaper to change via Terminal? I've been trying with gsettings so I could make a wallpaper sync system between my PC and the tablet, but when I use gsettings, it just doesn't change.
 
Last edited:
  • Like
Reactions: yaabaa1986

ShadowEO

Senior Member
Mar 15, 2012
490
133
63
28
Columbus, Ohio
Great your helping, I'm trying to get shell acces from my Ubuntu pc (my old piece of ****) it didn't see my phone (installed the tools, didn't saw the USB connection) I'm gona try it tomorrow on a different pc

Sent from my E6653 using XDA-Developers mobile app
If you are having problems getting it to show up under ADB, it's likely because you need to turn on Developer Mode in Settings -> About. Once on, ADB will see the device when its unlocked.
 

doniks

Senior Member
Jul 15, 2014
70
11
28
Bumping this thread as I've edited the OP with the official instructions for running Legacy X Applications on Ubuntu Touch. As well as information about getting the system maliit-based OSK showing in X Applications (It's not that great though, you still may have better luck with matchbox-keyboard/on-board, but not sure how you'd even start those in Libertine.)
Niiice writeup ShadowEO. Thanks!
I'm using the following ~/.local/share/applications/keyboard.desktop to add the matchbox keyboard to a running X application:

Code:
[Desktop Entry]
Name=Libertine KB
Type=Application
Terminal=false
X-Ubuntu-Touch=true
Icon=input-dialpad
Exec=/home/phablet/bin/libertinewrapper matchbox-keyboard

With the script being simply
Code:
$ cat bin/libertinewrapper
#!/bin/bash
export DISPLAY=:0
libertine-container-manager exec -c "$*"


---------- Post added at 10:29 AM ---------- Previous post was at 10:11 AM ----------

Notes
You can also manage your container via the terminal with libertine-container-manager. To get a root shell without installing mate terminal (You can't get a root shell via this method (installing a term), Proot acts like fakeroot all over your container's rootfs), you can use the following:
- l-c-m exec -c bash (This command does not mount any user directories (/home/phablet will not exist) and is best used for making changes to the container's rootfs)
or if you only need a user shell:
- DISPLAY= libertine-launch <containerid (default is vivid)> bash (This mounts user directories, but is no different than if you installed something like mate-terminal and ran it. The reason we are passing an empty DISPLAY variable is because libertine-launch will refuse to start if DISPLAY isn't set, even it if doesn't exist.)

The terminal access and the bind mounts do really confuse me in the libertine setup. As you say lcm exec -c bash gives you a root shell into the chroot. I'm pretty sure I have messed up my first chroot container though simply by using apt install in this shell, so I'm not sure this is a stable, supported access into the chroot.

What is mate terminal? Do you know what libertine is based on? proot? chroot? Schroot? Fakeroot. Could you elaborate a bit more what is mounted where and how one can find out?

What I would prefer most is if I could get a user shell as phablet into the chroot and then be able to do sudo. But maybe I have some wrong expectations about chroots. Afterall, what exactly is the difference btw "root" and another user if the whole root filesystem has been created with user rights?!

Anyway, the only stable shell as user, is what I get by installing xterm into the container, the start the xterm, then add the matchbox keyboard. A veeery roundabout way for shell access :(

---------- Post added at 10:49 AM ---------- Previous post was at 10:29 AM ----------

doniks said:
What I would prefer most is if I could get a user shell as phablet into the chroot and then be able to do sudo. But maybe I have some wrong expectations about chroots. Afterall, what exactly is the difference btw "root" and another user if the whole root filesystem has been created with user rights?!

Anyway, the only stable shell as user, is what I get by installing xterm into the container, the start the xterm, then add the matchbox keyboard. A veeery roundabout way for shell access :(

Oh, I'm stupid. You had posted it right there. And I had quoted it, haha :)

Code:
DISPLAY= libertine-launch vivid bash
puts you into a user shell!

---------- Post added at 11:02 AM ---------- Previous post was at 10:49 AM ----------

I'm trying to get shell acces from my Ubuntu pc (my old piece of ****) it didn't see my phone (installed the tools, didn't saw the USB connection)
Do these two tipps help: Fixing adb_usb.ini and unlocking?
http://askubuntu.com/questions/613333/adb-shell-on-bq-aquaris-fails-with-error-closed
 

ShadowEO

Senior Member
Mar 15, 2012
490
133
63
28
Columbus, Ohio
Niiice writeup ShadowEO. Thanks!
I'm using the following ~/.local/share/applications/keyboard.desktop to add the matchbox keyboard to a running X application:



With the script being simply


---------- Post added at 10:29 AM ---------- Previous post was at 10:11 AM ----------



The terminal access and the bind mounts do really confuse me in the libertine setup. As you say lcm exec -c bash gives you a root shell into the chroot. I'm pretty sure I have messed up my first chroot container though simply by using apt install in this shell, so I'm not sure this is a stable, supported access into the chroot.

What is mate terminal? Do you know what libertine is based on? proot? chroot? Schroot? Fakeroot. Could you elaborate a bit more what is mounted where and how one can find out?

What I would prefer most is if I could get a user shell as phablet into the chroot and then be able to do sudo. But maybe I have some wrong expectations about chroots. Afterall, what exactly is the difference btw "root" and another user if the whole root filesystem has been created with user rights?!

Anyway, the only stable shell as user, is what I get by installing xterm into the container, the start the xterm, then add the matchbox keyboard. A veeery roundabout way for shell access :(

---------- Post added at 10:49 AM ---------- Previous post was at 10:29 AM ----------



Oh, I'm stupid. You had posted it right there. And I had quoted it, haha :)


puts you into a user shell!

---------- Post added at 11:02 AM ---------- Previous post was at 10:49 AM ----------


Do these two tipps help: Fixing adb_usb.ini and unlocking?
http://askubuntu.com/questions/613333/adb-shell-on-bq-aquaris-fails-with-error-closed

To answer your questions, Libertine uses proot as it's backend (and God am I hating it, trying to run WINE under QEMU with a modified kernel to support binfmt inside of Libertine causes WINE to crash with an illegal instruction due to proot only really emulating binfmt while in a root shell.

As for what's mounted where, I believe they only mount /proc, /dev and a couple other system mounts while in root mode. In normal mode (libertine-launch), it mounts .local/share/libertine-container/user-data/containerid into /home and then bind mounts your XDG spec directories (Documents, Music, Pictures, Videos, etc) into that mounted home directory. To my knowledge nothing else is shared within the container.

As for mate-terminal, it's similar to gnome-terminal except it's built using GTK2 since GTK3 apps are still an issue in Libertine. You could easily use XTerm instead. As for the keyboard, that's a great idea, I should try that with onboard to get around the system keyboard's issues until it official drops in OTA-12.

And lastly, there doesn't seem to BE a difference except that proot simulates the user namespace, so it does apply the container's uid/gids (for instance, running apt through libertine-launch will work, but dpkg will fail without root and many system files inside the container will not have write permissions), it's also worth noting that sudo doesn't seem to work under proot at all due to how proot does its chroot implementation.

Oh I noticed I forgot to address the stability of shells, it is true that Libertine does not seem to expect us to access the shell in this way, however it does run apt via the root shell inside the container. So it seems to be an issue running a normal shell as compared to an application.

For those of you that use aliases, here are some good ones for you:

Code:
alias lcm=libertine-container-manager
alias lcm-ip=libertine-container-manager install-package -p 
alias lcm-rp=libertine-container-manager remove-package -p
alias lcm-search=libertine-container-manager search-cache -s
alias lcm-exec=libertine-container-manager exec -c
alias lcm-add-repository=libertine-container-manager configure -a
 
Last edited:
  • Like
Reactions: doniks

ShadowEO

Senior Member
Mar 15, 2012
490
133
63
28
Columbus, Ohio
Wanted to let everyone know, on rc-proposed, the Libertine application (which serves as the package manager) is fixed. I just tested installing an application and it went though without failing.
 

ShadowEO

Senior Member
Mar 15, 2012
490
133
63
28
Columbus, Ohio
Also I think the keyboard is working out of the box now. I have apt upgrade, but no ppa's and the keyboard works for me!

It does, that landed a few weeks back, I had just forgotten to say something. :) Still can't wait for multiple window support or multiple app instance support in XMir, that would make this almost feature complete for me :)
 

dekkerj1

New member
Jul 24, 2016
2
0
0
libertine-container-manager update

To make your applications look better instead of the default Raleigh theme, use the commands above to install the lxappearance package and follow these instructions to add the NoobsLab Themes PPA:

1) From a normal prompt, type
Code:
libertine-container-manager configure -a ppa:noobslab/themes
Once done, type
Code:
libertine-container-manager update

2) To search through themes available for installation type
Code:
libertine-container-manager search-cache -s noobslab -i vivid
which is functionally the same as apt search noobslab. The use the l-c-m install-package command above to install the themes you find.

3) Once done, go to the XApps scope and open LXAppearance and you'll see your themes there. If you have any applications open already, you will need to close them and reopen to get them to pick up the new settings.

Hello,
I'm on the latest rc-proposed with my BQ Aquarius M10.
channel: ubuntu-touch/rc-proposed/bq-aquaris-pd.en
last update: 2016-07-31 11:24:02
version version: 155

I'm logged in on the tablet via ssh from my Mint laptop

libertine-container-manager update gives the following errors in Dutch:
[email protected]:~$ libertine-container-manager update
E: Kon het vergrendelingsbestand /var/lib/apt/lists/lock niet openen - open (13: Permission denied)
E: Kan de map /var/lib/apt/lists/ niet vergrendelen (= can't lock)
E: Kon het vergrendelingsbestand /var/lib/dpkg/lock niet openen - open (13: Permission denied)
E: Kan de beheersmap (/var/lib/dpkg/) niet vergrendelen. Heeft u beheerdersrechten? (=admin rights)
E: Kon het vergrendelingsbestand /var/lib/dpkg/lock niet openen - open (13: Permission denied)
E: Kan de beheersmap (/var/lib/dpkg/) niet vergrendelen. Heeft u beheerdersrechten?
Refreshing the container's dynamic linker run-time bindings...
/sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied

Do you have any suggestions?
 

ShadowEO

Senior Member
Mar 15, 2012
490
133
63
28
Columbus, Ohio
Hello,
I'm on the latest rc-proposed with my BQ Aquarius M10.
channel: ubuntu-touch/rc-proposed/bq-aquaris-pd.en
last update: 2016-07-31 11:24:02
version version: 155

I'm logged in on the tablet via ssh from my Mint laptop

libertine-container-manager update gives the following errors in Dutch:
[email protected]:~$ libertine-container-manager update
E: Kon het vergrendelingsbestand /var/lib/apt/lists/lock niet openen - open (13: Permission denied)
E: Kan de map /var/lib/apt/lists/ niet vergrendelen (= can't lock)
E: Kon het vergrendelingsbestand /var/lib/dpkg/lock niet openen - open (13: Permission denied)
E: Kan de beheersmap (/var/lib/dpkg/) niet vergrendelen. Heeft u beheerdersrechten? (=admin rights)
E: Kon het vergrendelingsbestand /var/lib/dpkg/lock niet openen - open (13: Permission denied)
E: Kan de beheersmap (/var/lib/dpkg/) niet vergrendelen. Heeft u beheerdersrechten?
Refreshing the container's dynamic linker run-time bindings...
/sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied

Do you have any suggestions?

The M10 comes with a pre-installed read-only container that lives in system-land. If you want to modify the Puritine container, you will need a writable system image. I recommend instead using the libertine-container-manager commands in the previous post to create a new container and use that for your installation. You can define which container to preform said commands through the
Code:
-i <container name>
argument
 

doniks

Senior Member
Jul 15, 2014
70
11
28
Libertine uses proot as it's backend
[...]
there doesn't seem to BE a difference except that proot simulates the user namespace, so it does apply the container's uid/gids (for instance, running apt through libertine-launch will work, but dpkg will fail without root and many system files inside the container will not have write permissions), it's also worth noting that sudo doesn't seem to work under proot at all due to how proot does its chroot implementation.

Oh I noticed I forgot to address the stability of shells, it is true that Libertine does not seem to expect us to access the shell in this way, however it does run apt via the root shell inside the container. So it seems to be an issue running a normal shell as compared to an application.

FWIW, I poked a bit into the python code in libertine-container-manager, ending up at /usr/lib/python3/dist-packages/libertine/ChrootContainer.py
Code:
def run_in_container(self, command_string):
        cmd_args = shlex.split(command_string)
        command_prefix = "fakechroot fakeroot chroot " + self.root_path
        args = shlex.split(command_prefix + ' ' + command_string)
        cmd = subprocess.Popen(args)
        return cmd.wait()

So, I guess, to run a command in the same fashion as lcm, you would do
Code:
fakechroot fakeroot chroot /home/phablet/.cache/CONTAINERID/vivid/rootfs/ COMMAND
for example
Code:
fakechroot fakeroot chroot /home/phablet/.cache/libertine-container/vivid/rootfs/ apt-get install bash-completion command-not-found psutils x11-apps

Whereas, running libertine-launch CONTAINTERID bash and then looking through ps auxf, it seems that this boils down to
Code:
/usr/bin/python3 /usr/bin/libertine-session-bridge /run/user/32011/libertine/host_dbus_session-gbayd4u9 /run/user/32011/libertine/host_maliit_session-mmu9pcnp
/usr/bin/proot -R /home/phablet/.cache/libertine-container/vivid/rootfs -b /usr/lib/locale -b /var/lib/extrausers -b /home/phablet/.local/share/libertine-container/user-data/vivid:/home/phablet -b /home/phablet/Documents:/home/phablet/Documents -b /home/phablet/Music:/home/phablet/Music -b /home/phablet/Pictures:/home/phablet/Pictures -b /home/phablet/Videos:/home/phablet/Videos -b /home/phablet/Downloads:/home/phablet/Downloads -b /home/phablet/.config/dconf bash
The latter may help with allowing access to further directories from inside the container.
 
  • Like
Reactions: ShadowEO

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    EDIT: I bring you the new OFFICIAL way of installing X11 applications, I've been neglecting this thread way too much and need to give it some love.

    The old instructions (OLD METHOD) are no longer needed as of April on the rc and rc-proposed channels, this should work on all channels however (tested up to latest devel-proposed image)

    NOTE: You still need a writable image for the first parts of this, after you install the tools, it can go back to read-only.

    1) Open Terminal
    2) Install the following packages: libertine libertine-tools python3-libertine-chroot
    3) Open the Ubuntu Store and install the scope: libertine-scope
    4) Open the Libertine application that's now available in your launcher and follow instructions, it will set up a Ubuntu Vivid chroot in your home directory, install the components needed, and drop you at the package management screen. From here, you can update and add PPAs to the container via the Settings Icon -> Manage Container, Install packages via the plus icon, etc.
    5) Favorite the Libertine XApps scope by swiping up on the home screen and hitting the star, then open the scope and you'll see any applications you installed there.

    If you cannot install your container via the Libertine application (I know that it didn't have support for chroot until recently, not sure if that version has landed yet), you can install your container via the teminal, so open your terminal but DO NOT sudo su. All Libertine-container-manager commands MUST be done as phablet.

    To create a container (this line will likely change when Xenial drops as Libertine will be switching to LXC on Xenial):
    Code:
    libertine-container-manager --create -i <container id> -n <friendly name (this shows up in the Libertine app)> -t chroot
    Using this command, the system will build the new libertine container, wait until it's finished and then you can continue by using the installed Libertine application.

    Onscreen Keyboard in Libertine Applications
    THIS CAN FINALLY BE DONE! The only con to it, is that it is mostly unusable in applications that open dialog boxes along the bottom of the screen, the XMir window does not scroll up like native applications do to give a better viewing window. (I have been told that this will change in OTA-12 when the keyboard support drops for Libertine/Puritine apps)

    To install on-screen keyboard:
    Open Libertine and add ppa:brandontschaefer/maliit to your container. Then hit update in Manage Containers. Once done, install the following, maliit-inputcontext-gtk2, maliit-inputcontext-gtk3, maliit-framework. After that, setup is complete in your container, now we need to do some extra work outside the container to make it pass the GTK_IM_MODULE variable we need over to Libertine. To do this, add this line to your .bashrc or if you have a writable image, you can add this to the systemwide profile (not sure if this will be replaced on OTA though):

    Code:
    export GTK_IM_MODULE=maliitphablet
    Restart the tablet OS, Open an application such as Libreoffice Writer and BEHOLD!

    Notes
    You can also manage your container via the terminal with libertine-container-manager. To get a root shell without installing mate terminal (You can't get a root shell via this method (installing a term), Proot acts like fakeroot all over your container's rootfs), you can use the following:
    - l-c-m exec -c bash (This command does not mount any user directories (/home/phablet will not exist) and is best used for making changes to the container's rootfs)
    or if you only need a user shell:
    - DISPLAY= libertine-launch <containerid (default is vivid)> bash (This mounts user directories, but is no different than if you installed something like mate-terminal and ran it. The reason we are passing an empty DISPLAY variable is because libertine-launch will refuse to start if DISPLAY isn't set, even it if doesn't exist.)
    - DPI Hacks: To change the DPI of applications in Libertine, you need a new way to make the .Xdefaults file as only the XDG User directories get mounted inside the libertine container, not your entire Home. To do this, install your favorite editor inside of the libertine container (I find nano to be the easiest for new users), and open Terminal, then follow these instructions:
    1) Open your editor to ~/.local/share/libertine-container/user-data/[my container id, default = vivid]/.Xdefaults and fill it with the following:
    Code:
    Xft.dpi: 175
    or what your preferred DPI is. On the Nexus 7 flo the comfortable DPI is 175 with an application font size of 14 (I use Liberation Sans which comes from Libreoffice).
    - You can make your applications look great still, you don't have to be stuck with the default Raleigh GTK style. Download and install LXAppearance in your container and add ppa:noobslab/themes then start installing themes. Enjoy! The Ubuntu Touch Themes are wonderful and FlatPlat works well with the system UI as well.

    Some cons to this:
    - It requires at least 3GBs available in your internal storage (wherever your home folder resides) to store a full, non-touch Ubuntu Vivid container.

    Pros:
    - It survives OTAs, the only thing able to break this would be a change to XMir, PRoot, or Libertine. Which is landing in the images shortly by default so there's not much of a chance to break this.
    - Nothing you do will break your UTouch system. Unlike the old method, this only installs the items needed to run the container, which are to become standard inside the images very soon.


    OLD METHOD
    --------------------
    EDIT: I have not tested this in stable, rc, rc-proposed yet. Only the dev-proposed channel.

    So there is some questioning I see going on about how to run things like Firefox efficiently and well. So I figured I'd write up a little something for it.

    First you'll want to set your DPI in ~/.Xdefaults, as I have a Nexus 7, mine looks similar to this:
    Xft.dpi: 240

    Note that you may need to do some additional tweaking.
    Now that you have Xdefaults made, install the ubuntu-pocket-desktop and matchbox-window-manager packages (along with the program you wish to use, for this tutorial, I'll use libreoffice).

    Create a file in /bin called wm-wrapper.sh (or whatever you choose here, just remember the name), fill it with:
    Code:
    #!/bin/bash
    matchbox-window-manager -use_titlebar no -use_dialog_mode const-horiz &
    exec [email protected]
    and save it, then chmod a+x it.

    EDIT: For this next part, I recommend copying the .desktop to ~/.local/share/applications to avoid them being overwritten on package updates.
    Now, navigate to /usr/share/applications/ and open the .desktop file for the application you are wanting to run. Add the following lines under [Desktop]:
    Code:
    X-Ubuntu-Touch=true
    X-Ubuntu-XMir-Enable=true

    Change the Exec line so that your wrapper (in my case wm-wrapper.sh) is in front of the executable, such that the line becomes (or similar):
    Code:
    Exec=/bin/wm-wrapper.sh libreoffice %U

    Save it, then search for your application in the Unity Scopes. Open it up and you should see your application running as an XMir app easy. For future applications, you will simply need to do the changes to it's .desktop file.

    EDIT: A helpful redditor gave me this tip to enable sending touch events over to Xmir. Setting the GTK_TEST_TOUCHSCREEN environment variable to 1 will apparently remove hover events and the like (events that are not normally sent with a touch screen, but with a mouse). I have not had time to take a look at this yet however so YMMV.
    1
    You would need to run touchegg in the wrapper. Sadly wth keyboard, the only applications that will get the system keyboard are QT based applications. GTK+ and other applications will require onboard to be installed. I messed around with trying to install maliit-context-gtk2 to get the system keyboard to show in all apps, but that broke the keyboard completely.

    Remember XMir is better used with a physical keyboard since it doesn't trigger the Ubuntu keyboard for everything.

    You can also make the system img bigger if using MultiROM: you simply run e2fsck -fp /path/to/Ubuntu.IMG and resize2fs <target size> /path/to/Ubuntu.IMG.
    1
    Bumping this thread as I've edited the OP with the official instructions for running Legacy X Applications on Ubuntu Touch. As well as information about getting the system maliit-based OSK showing in X Applications (It's not that great though, you still may have better luck with matchbox-keyboard/on-board, but not sure how you'd even start those in Libertine.)
    1
    Dear shadowEO,
    I'm a ubuntu/Linux noob.
    I read the treats out of intrest and I really want to give this (x-mir, libertine) a try on my mx4.
    Would you be offended if I ask a "noob proof how to"?
    (still strugling with the terminal. I already was proud of myself for changing the background via terminal)

    YaaBaa1986, Ask and ye shall receive. I'm a very accommodating person, so asking for help does not offend me one bit. However you may find these to be a bit hard to use on the MX4 without an external display.

    Unfortunately, it seems in the latest version of Libertine, the app is once again broken when it comes to making a container and installing applications, so you will need to use Terminal for it.

    But a nice noob proof howto (provided your system image is writable):
    1) Open terminal and sudo su.
    2) When you see the # in your prompt, you're executing as root, this is good for this stage. If your system image is not writable yet, type
    Code:
    touch /userdata/.writable_image
    and reboot. When the system starts back up, continue from a root prompt (Step 1)
    3) In terminal as root, type apt-get update && apt-get install libertine python3-libertine-chroot and press enter. It will install some packages to your system image. Once the package is complete, type exit to go back to an unprivileged prompt (prompt will be suffixed with $, this is the prompt for your user account and is needed for the next steps, libertine does not run under root or sudo)

    4) Now it's time to create your container, so at your normal terminal prompt, type the following (you can change it if you'd like, this is an example)
    Code:
    libertine-container-manager -i vivid -n Applications -t chroot
    , It will begin running debootstrap to create your libertine container, let it run. If this does not work, you will need an ubuntu laptop to use phablet-shell or adb shell, but phablet shell is preferred, for this step (Libertine seems to hate running under the Unity 8 terminal application due to AppArmor's confinement).

    5) After your container has been created and installed and you are back at your prompt, you can begin to load applications into it. To do so, use the following command
    Code:
    libertine-container-manager install-package -i vivid -p <package name>
    NOTE: If you changed the container ID ( -i vivid ) in the creation step, you will need to substitute it here as well. The -p parameter is only good for ONE package at a time (dependencies don't count, but you can't do something like "libreoffice default-jre", you need to install libreoffice and default-jre separately)

    6) If you need to remove a package, you can use the following command:
    Code:
    libertine-container-manager remove-package -i vivid -p <package name>

    Got your container all ready to go with your apps installed? But how do you start them? Easy. Go back to the Apps Scope and open the Ubuntu Store, search for Libertine Scope and install it, then swipe up from the home screen and you'll see a new "XApps" scope, this contains your applications.

    Noob-easy DPI hack:
    So the screen looks UBER small to you? That's fine, it does for most of us, open your terminal and follow the below:

    1) In terminal, type or paste the following (you can paste by long-holding on the screen):
    Code:
    nano /home/phablet/.local/share/libertine-container/user-data/vivid/.Xdefaults

    This will provide you with an empty editor ready for things to be entered. Type the following (NOTE, this is personal preference, tweak it till you're happy and follow the notes below for getting it looking better):
    Code:
    Xft.dpi: 175

    To make your applications look better instead of the default Raleigh theme, use the commands above to install the lxappearance package and follow these instructions to add the NoobsLab Themes PPA:

    1) From a normal prompt, type
    Code:
    libertine-container-manager configure -a ppa:noobslab/themes
    Once done, type
    Code:
    libertine-container-manager update

    2) To search through themes available for installation type
    Code:
    libertine-container-manager search-cache -s noobslab -i vivid
    which is functionally the same as apt search noobslab. The use the l-c-m install-package command above to install the themes you find.

    3) Once done, go to the XApps scope and open LXAppearance and you'll see your themes there. If you have any applications open already, you will need to close them and reopen to get them to pick up the new settings.

    Note: If you install libreoffice, I would suggest changing the Default font in LXAppearance to Liberation Sans 13pt.

    For On-Screen Keyboard, install the packages maliit-inputcontext-gtk2 and maliit-inputcontext-gtk3. Next time you open a GTK+ application you should see the system keyboard in the X applications.

    Whew, I hope that helps :D If it does I'll move this over to the OP and replace the horrible instructions I wrote up in a hurry yesterday.

    By the way, how did you get the wallpaper to change via Terminal? I've been trying with gsettings so I could make a wallpaper sync system between my PC and the tablet, but when I use gsettings, it just doesn't change.
    1
    Niiice writeup ShadowEO. Thanks!
    I'm using the following ~/.local/share/applications/keyboard.desktop to add the matchbox keyboard to a running X application:



    With the script being simply


    ---------- Post added at 10:29 AM ---------- Previous post was at 10:11 AM ----------



    The terminal access and the bind mounts do really confuse me in the libertine setup. As you say lcm exec -c bash gives you a root shell into the chroot. I'm pretty sure I have messed up my first chroot container though simply by using apt install in this shell, so I'm not sure this is a stable, supported access into the chroot.

    What is mate terminal? Do you know what libertine is based on? proot? chroot? Schroot? Fakeroot. Could you elaborate a bit more what is mounted where and how one can find out?

    What I would prefer most is if I could get a user shell as phablet into the chroot and then be able to do sudo. But maybe I have some wrong expectations about chroots. Afterall, what exactly is the difference btw "root" and another user if the whole root filesystem has been created with user rights?!

    Anyway, the only stable shell as user, is what I get by installing xterm into the container, the start the xterm, then add the matchbox keyboard. A veeery roundabout way for shell access :(

    ---------- Post added at 10:49 AM ---------- Previous post was at 10:29 AM ----------



    Oh, I'm stupid. You had posted it right there. And I had quoted it, haha :)


    puts you into a user shell!

    ---------- Post added at 11:02 AM ---------- Previous post was at 10:49 AM ----------


    Do these two tipps help: Fixing adb_usb.ini and unlocking?
    http://askubuntu.com/questions/613333/adb-shell-on-bq-aquaris-fails-with-error-closed

    To answer your questions, Libertine uses proot as it's backend (and God am I hating it, trying to run WINE under QEMU with a modified kernel to support binfmt inside of Libertine causes WINE to crash with an illegal instruction due to proot only really emulating binfmt while in a root shell.

    As for what's mounted where, I believe they only mount /proc, /dev and a couple other system mounts while in root mode. In normal mode (libertine-launch), it mounts .local/share/libertine-container/user-data/containerid into /home and then bind mounts your XDG spec directories (Documents, Music, Pictures, Videos, etc) into that mounted home directory. To my knowledge nothing else is shared within the container.

    As for mate-terminal, it's similar to gnome-terminal except it's built using GTK2 since GTK3 apps are still an issue in Libertine. You could easily use XTerm instead. As for the keyboard, that's a great idea, I should try that with onboard to get around the system keyboard's issues until it official drops in OTA-12.

    And lastly, there doesn't seem to BE a difference except that proot simulates the user namespace, so it does apply the container's uid/gids (for instance, running apt through libertine-launch will work, but dpkg will fail without root and many system files inside the container will not have write permissions), it's also worth noting that sudo doesn't seem to work under proot at all due to how proot does its chroot implementation.

    Oh I noticed I forgot to address the stability of shells, it is true that Libertine does not seem to expect us to access the shell in this way, however it does run apt via the root shell inside the container. So it seems to be an issue running a normal shell as compared to an application.

    For those of you that use aliases, here are some good ones for you:

    Code:
    alias lcm=libertine-container-manager
    alias lcm-ip=libertine-container-manager install-package -p 
    alias lcm-rp=libertine-container-manager remove-package -p
    alias lcm-search=libertine-container-manager search-cache -s
    alias lcm-exec=libertine-container-manager exec -c
    alias lcm-add-repository=libertine-container-manager configure -a
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone