Monday, July 18, 2016

Running X Apps on Ubuntu Devices

Running X Apps on Ubuntu Devices You can install, launch, and use traditional debian-packaged X apps on Ubuntu devices. This may be unexpected given that Ubuntu devices do not seem to support user-installed debian packages, nor do they run the X Display Server. But it does work, courtesy of Mir/XMir and Libertine.

So here’s a bit of background to get started.

But first, please note that at this time, display and use of X apps on an external monitor is only available on the Pro5/M10 and on future devices. (BQ 4.5/E5 and Meizu MX4 do not support this feature.)

Hello Mir (Goodbye X)

Traditionally, and still on the Ubuntu Classic desktop with Unity 7, Ubuntu runs an X Display Server. Apps are debian packaged. And, they are written for X:

Due in part to X’s inherent security shortcomings, the Mir display server is now used on Ubuntu Devices under Unity 8 (although not yet by default on the desktop). XMir bridges traditional X apps to Mir. That is, apps written for X can run fine in a Mir/XMir environment:

Packages and the root file system

Ubuntu Classic has a root file system (rootfs) that is populated through installation of a carefully curated set of debian packages. At run time, users can install debian packages to add apps or modify their system.

This approach raises security concerns because debian packages execute installation scripts with root level privileges and because debian packages can alter what the rootfs provides by modifying or replacing core system components.

Ubuntu devices are designed for security and reliability. Ubuntu devices have a read-only rootfs that is small and tight, providing just what is needed and simplifying system updates. The rootfs is not modifiable by the user. Indeed it is mounted as a read-only partition. Users install apps through click packages that do not modify the rootfs.

Given all of this: how do users install debian packaged apps that use X on Ubuntu Devices? The answer is LIbertine with XMir.

Hello Libertine

Libertine is a system to manage app containers. It is specifically designed to support the many traditional X apps that are debian packaged. Each container is a separate Ubuntu rootfs populated through debian package installations. (Currently these containers are chroots: later, LXD contains will be supported. Also, currently the containers must be of the same Ubuntu series as the device: Vivid.)

So, you can install or create a libertine container, install debian packaged X apps into it, and launch them using the XApps scope. The apps access to the user’s key directories: Documents, Downloads, Music, Pictures, and Videos. So data files created and saved by an app in one container are available to apps in any other container, and indeed outside of the containers.

Let’s take a quick look at the XApps scope.

XApps Scope

This scope simply lists the containers and, for each container, it displays its apps. Here’s a look at a device with two containers. This system has two containers (Puritine and My Container). And each has a few apps:

  • Tap an app to launch it.
  • long press an app to hide it.
  • If you have any hidden apps, see them from the search icon (magnifying glass) and tap Hidden X Apps. Long press a hidden app to unhide it.
  • Note that a container with no apps does not display in the scope.
So how does one create and delete containers, and add or remove apps from them?

Libertine Container Manager

libertine-container-manager is a command line tool you use on the device to create and manage containers. This includes installing debian packaged apps into them. (These containers are created in the phablet user’s home directory and are not a part of the read-only rootfs.)

Note: libertine-container-manager currently cannot be run in the Terminal App. Instead please connect to your device from an Ubuntu system using phablet-shell.
Listing Containers
phablet@ubuntu-phablet:~$ libertine-container-manager list

The “puritine” container is pre-installed on many devices through the com.ubuntu.puritine click package (“Desktop Applications”):

phablet@ubuntu-phablet:~$ click list | grep puritine
com.ubuntu.puritine 0.11

The second container (“my-container”) was created on the device with libertine-container-manager.

Note: It is possible to pre-install customized containers through bespoke channels.
Creating a Libertine Container
You can create a new container on a device. The container needs a unique ID and (optionally) a name.

Note: The container must be the same Ubuntu series as the device, currently: vivid.

phablet@ubuntu-phablet:~$ libertine-container-manager create --id my-container --name "My Container" --distro vivid --type chroot

I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
I: Valid Release signature (key id 790BC7277767219C42C86F933B4FE6ACC0B21F32)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
Listing Apps in a Container
It’s easy to list the apps in a container. You just use the container’s id, as follows:

Note: We add the optional --json argument here and show only lines with “name” for display convenience.

phablet@ubuntu-phablet:~$ libertine-container-manager list-apps --id my-container --json | grep "\"name\""
"name": "Panel Manager",
"name": "Python (v3.4)",
"name": "Python (v2.7)",
"name": "gedit",
"name": "Help",
"name": "Notification Daemon",
"name": "Terminal",
Also note that all apps that install a .desktop file are listed by this command, although many of them are not displayed in the XApps scope since they are not appropriate.
Installing an app in a container
To install a debian package in a container, you just use install-package with the container id and the debian binary package name, as follows:

phablet@ubuntu-phablet:~$ libertine-container-manager install-package --id my-container --package terminator

The package and all of its dependencies are installed in the container. After this, assuming the package installs a .desktop file, it displays in the XApps scope and is launchable with a tap as expected.
Installing an app from a specific Launchpad PPA
By default, available debian packages are installed from the standard Ubuntu archive the chroot’s apt configuration points to. You can add a launchpad PPA, as follows:

phablet@ubuntu-phablet:~$ libertine-container-manager configure --id my-container --archive ppa:USER/PPA-NAME

(Currently, private PPAs are scheduled for an upcoming release.)

After this, you can install packages into the container as usual, including from the PPA.
Removing apps from a container
Remove a debian package from a container with:

phablet@ubuntu-phablet:~$ libertine-container-manager remove-package --id my-container --package PACKAGE_NAME
Libertine-container-manager help
Use the --help for top level help.

You can see details on each subcommand, for example remove-package, as follows:

phablet@ubuntu-phablet:~$ libertine-container-manager remove-package --help
usage: libertine-container-manager remove-package [-h] -p PACKAGE [-i ID] [-r]

optional arguments:
-h, --help show this help message and exit
-p PACKAGE, --package PACKAGE
Name of package to remove. Required. -i ID, --id ID Container identifier. Default container is used if
-r, --readline Readline mode. Use text-based frontend during debconf
Updating a container
Want the debian packages in a container updated? Easy:

phablet@ubuntu-phablet:~/.cache/libertine-container/my-container$ libertine-container-manager update --id my-container
Executing a Command in a Container
phablet@ubuntu-phablet:~/.cache/libertine-container/my-container$ libertine-container-manager exec --command "apt-get update" --id my-container
Atteint vivid InRelease
Atteint vivid InRelease
Atteint vivid-updates InRelease
Atteint vivid/main armhf Packages
Atteint vivid/main Translation-en
Atteint vivid/main armhf Packages [...]

Note: Running the apt-get update command in a container may be useful to update the container’s knowledge of newly available packages without installing/updating them all. You can then see whether a package is available, with:

phablet@ubuntu-phablet:~/.cache/libertine-container/my-container$ libertine-container-manager exec --command "apt-cache policy firefox" --id my-container
Installé : (aucun)
Candidat : 44.0+build3-0ubuntu0.15.04.1
Table de version :
44.0+build3-0ubuntu0.15.04.1 0
500 vivid-updates/main armhf Packages
37.0+build2-0ubuntu1 0
500 vivid/main armhf Packages

More about the Libertine Containers

As noted, the container is a directory containing an Ubuntu rootfs. Container directories are here:

phablet@ubuntu-phablet:~/.cache/libertine-container$ pwd
phablet@ubuntu-phablet:~/.cache/libertine-container$ ls
my-container puritine
phablet@ubuntu-phablet:~/.cache/libertine-container$ cd my-container/
phablet@ubuntu-phablet:~/.cache/libertine-container/my-container$ ls

You can get a bash shell into the container as follows:

phablet@ubuntu-phablet:~/.cache/libertine-container/my-container$ libertine-container-manager exec --command "/bin/bash" --id my-container
groups: cannot find name for group ID 1001


  1. This is really great. The ability to install Xapps was feature that I have been waiting ever since I bought my M10. Thank you for all the hard work.

  2. Are there any plans to support X-apps already in a container in the Unity8 store in the future, so that average joe can enjoy them as well? If so how long to expect till this feature arrives? Thnaks for any insight you can give.

    1. Hi Sid, This may happen but one issue is the size of the container. It's typically ~600MB+ so installing it from the store is a bit awkward. Also, if you use such a pre-made container and modify it, your modifications might be overwritten on next update from the store. So there are a couple issues still to sort.

  3. any time a gui for manage this feature?

    1. Hi Jacopo: I have heard around that an app is in the works but I don't have anything definitive.

  4. This comment has been removed by the author.

  5. They're planning direct store integration eventually.

  6. They're planning direct store integration eventually.


  7. Is it possible to run an X app on the BQ tablet without an external monitor and keyboard? All the news stories say that desktop apps are only enabled by attaching an external monitor and keyboard.

    1. Yes it is possible, but since some of the buttons are small it might be a bit tricky to hit them correctly.

  8. I can't make it work, I don't even see my container. When I run the container list I it shows it and I can find my installed packages (leafpad, vlc and Rhythmbox), but nothing is displayed. I restarted the system, just in case. Any suggestions?


    1. You need to ensure you have the "Desktop Apps" scope installed from the store to have applications surfaced on the system.

    2. I have the M10, luckily it is already installed. And it is visible and works perfect.

  9. Ok, I am one step further. When I use the filemanager to open a file, I can choose vlc for avi and mp4 and Rhythmbox and vlc for mp3, but instead of opening the file it returns back to the filemanager. But when I want to open a txt-file, I neither can choose gedit nor leafpad.

  10. I can run vlc just fine on my M10, but when I start musescore or audacity my device starts rebooting spontaneously. Is this a known issue ?

  11. I get the error:-

    dpkg: dependency problems prevent configuration of matchbox-keyboard:
    matchbox-keyboard depends on libfakekey0 (>=0.1); however:
    Package libfakekey0:armhf is not configured yet.

    I'm not sure if this is an issue with OTA-13, or what I should do about it... but I'm worried that there didn't seem to be any cleanup, so can someone advise what I'm doing wrong, and/or if I need to manually clean up some folders to avoid filling up my device?

  12. I am huge fan of Libertine myself, but I would like to let you know that there is also a way for running x11 apps on the phone without it, also via Xmir. I wrote an article about it:

  13. I, personally think that Libertine is a "game changer" for "Linux" in terms of "selling a laptop or tower" to the "new to computers" or "considering leaving Windows or Mac". When the sales person says, "tap / click here" and twenty apps appear to install then the sale is made.....IF ...and only IF.... the system is AS... failsafe as can be possible. and updates in the background and unobtrusively. The only thing would be to add.... when the computer is turned on, that somehow the "system" "figures out if everything is ok. If not it somehow, sends a message and says: "I'm going to sleep now for a few minutes, all of your documents etc. are safe and I will see you in a few minutes." It does it, comes back up and....Windows is history.

  14. Hi on the xapps is it possible in the container to add new ppas so that you can add other packages then whats in vivid?
    Hide Apps

  15. Nice to Read, Cresol is the best Mobile Application Development Company who serve best quality Android & iOS applications. People may not always have access to a computer but always have their smartphone.

  16. Hi - Thanks for the HowTo!

    I've got the Libertine container working, and verified it by downloading Terminator!

    But I'm struggling to get the apps I'd like: e.g. Remarkable, Symphytum & MuseScore. Do I have to do something other than --package PACKAGE_NAME?

    Any light you can shed would be much appreciated.

  17. This Very Nice and attractive Article…
    Thank you For Sharing This Information…
    And also give to me important knowledge.
    Desktop Application Development India
    iPhone App Development Company

  18. winrate yang sangat tinggi dengan hadiah yang banyak sekali. Salah satunya adalah kartu jackpot yang turut membuat judi kartu memiliki dukungan untuk tingkat kemenangan Anda
    bandar ceme terpercaya
    paito warna terlengkap
    bocoran sgp

  19. Nice Post thanks for the information, good information & very helpful for others,Thanks for Fantasctic blog and its to much informatic which i never think ..Keep writing and grwoing your self

    duplicate rc in delhi online
    duplicate rc in ghaziabad
    duplicate rc in online
    duplicate rc in greater noida
    duplicate rc in mumbai
    duplicate rc in bangalore
    duplicate rc in faridabad
    duplicate rc in gurgaon
    duplicate rc in noida
    death certificate online

  20. iPads
    Thanks for Fantasctic blog and its to much informatic which i never think ..Keep writing and grwoing your self
    I am new here. I like your post very much. It is very usefull post for me.Are you looking for cell phone repair services? We fix iPhones

  21. Are you looking web Designing or Software Company in Gwalior with 100% satisfaction? Marksteintech Solution is the best IT Company

  22. Idnplay
    IDN Poker88 | Situs Poker Deposit Pulsa | Agen Poker Terpercaya
    Agen Resmi Poker Idnplay Terpercaya dan resmi Lesensi ayok join sekarang juga untuk mendapatkan promo2 terbaik dari situs agen poker online sekarang juga !!

  23. Idnplay
    IDN Poker88 | Situs Poker Deposit Pulsa | Agen Poker Terpercaya
    Agen Resmi Poker Idnplay Terpercaya dan resmi Lesensi ayok join sekarang juga untuk mendapatkan promo2 terbaik dari situs agen poker online sekarang juga !!

  24. Jadi, PayPal ini merupakan salah satu sistem ataupun mekanisme pembayaran yang nantinya bisa dilakukan dengan secara on the web. Nah, kunjungi pulsa dengan paypal pada intinya PayPal tersebut adalah sebuah perusahaan yang memang menawarkan jasa transfer ataupun penerimaan uang melalui surat elektronik.

  25. Studi menunjukkan penyebab kebiasaan mahal dan membuat ketagihan berikut ini: terlalu banyak berjudi; menipu diri sendiri bahwa dia tidak kecanduan judi; atau karena kondisi seseorang yang disebabkan oleh keputusasaan, keputusasaan dan penyesalan 98toto



    Website paling ternama dan paling terpercaya di Asia ^^
    Sistem pelayanan 24 Jam Non-Stop bersama dengan CS Berpengalaman respon tercepat :)
    Memiliki 8 Jenis game yang sangat digemari oleh seluruh peminat poker / domino99

    - Adu Q
    - Bandar Q
    - Poker Luck
    - Pai Qiu
    - Texas Hold'em
    - Omaha Poker
    - Domino99
    - Slot Game

    Permainan Judi online yang menggunakan uang asli dan mendapatkan uang asli ^^
    * Minimal Deposit : 10.000
    * Minimal Withdraw : 20.000
    * Deposit dan Withdraw 24 jam Non stop ( Kecuali Bank offline / gangguan )
    * Bonus REFFERAL 20 % Seumur hidup tanpa syarat
    * Bonus Cashback 0.5 % Dibagikan Setiap Hari Senin
    * Proses Deposit & Withdraw PALING CEPAT
    * Sistem keamanan Terbaru & Terjamin
    * Poker Online Terpercaya
    * Live chat yang Responsive
    * Support lebih banyak bank LOKAL

    #agenonline, #agenjudionline, #judionline, #agentaruhanjudionline, #situstaruhanjudi,#situspoker, #judipoker, #pokeronline, #pokerdomino, #agentaruhanpoker, #agentaruhanonline, #agenjuditerpercaya, #agenjudipoker, #agenpoker, #bursataruhan, #taruhanpoker, #taruhanonline, #taruhanjudipoker, #Agen Judi BandarQ, #Bandar Judi AduQQ, #Bandar Taruhan Poker, #Situs Taruhan Poker, #Daftar Poker Online, #Bandar Judi BandarQ, #Bandar #Situs Taruhan Poker, #Agen Poker Terbaik, #Bandar Poker Domino,# Judi Online Indonesia, #Agen Slot, #Slot Machine, #Situs Slot Online, #Agen Domino99, #Agen Judi Online

  27. This is truly informative and extremely helpful. Thank you for sharing. If you have time, visit our website too 에볼루션 카지노 사이트

  28. CrownQQ Agen DominoQQ BandarQ dan Domino99 Online Terbesar

    Yuk Buruan ikutan bermain di website CrownQQ

    Sekarang CROWNQQ Memiliki Game terbaru Dan Ternama loh...

    9 permainan :
    => Poker
    => Bandar Poker
    => Domino99
    => BandarQ
    => AduQ
    => Sakong
    => Capsa Susun
    => Bandar 66
    => Perang Baccarat (NEW GAME)

    => Bonus Refferal 20%
    => Bonus Turn Over 0,5%
    => Minimal Depo 20.000
    => Minimal WD 20.000
    => 100% Member Asli
    => Pelayanan DP & WD 24 jam
    => Livechat Kami 24 Jam Online
    => Bisa Dimainkan Di Hp Android
    => Di Layani Dengan 5 Bank Terbaik
    => 1 User ID 9 Permainan Menarik

    Ayo gabung sekarang juga hanya dengan
    mengklick daftar crownqq

    Link Resmi CrownQQ:

    Info CrownQQ
    Berita dan Info Dunia

    Info Lebih lanjut Kunjungi
    WHATSAPP : +6287771354805
    TELEGRAM : +855882357563

    Hai Teman - Teman Smuanya, Yang Hobi Bermain Judi Online
    Anda Merasa Capek, DEPOSIT Teruss..Tapi Tidak Pernah Withdraw ?
    Nikmati Seluruh Game Berkualitas & Raih Kemenangan Anda Di SAHABAT KARTU!!
    Game Yang di Hadirkan SAHABAT KARTU Yaitu :
    * Poker Online
    * BandarQ
    * Domino99
    * Bandar Sakong
    * Sakong
    * BANDAR66
    * AduQ
    * Sakong
    * Perang Baccarat
    - Minimal DP & WD Cuma Rp. 20.000
    - BONUS CASHBACK 0.5% ( Setiap Hari Senin )
    - REFERRAL 15% ( Seumur Hidup )
    * Livechat : SAHABAT KARTU
    * LINE : Cs_sahabatkartu
    * Whatsapp : +85581734028

    Sahabatkartu: Situs Poker Online, DominoQQ, Domino99, BandarQ Terpercaya

  30. SAHABAT DOMINO Situs QQ Online, Agen Domino99 dan BandarQ Online Terbesar Di Asia
    sahabatdomino Memiliki Permainan Yang Mudah Dimainkan & 100% Mudah Menang Lohh..
    Cukup Dengan 1 USER ID Anda Bisa Bermain 9 GAME Berkualitas :
    * Poker
    * Domino99
    * AduQ
    * Capsa Susun
    * Sakong
    * Bandar Poker
    * Perang Baccarat
    Juga menerima deposit via PULSA TSEL dan XL dengan rate 0.85 ya bossku :)

    < Contact Us >
    Info Lebih Lanjut Hubungi :
    W.A : +855972468846
    Line : Cs_sahabatdomino

    Sahabatdomino : Situs QQ Online, Agen Domino99 dan BandarQ Online Terbesar Di Asia

  31. You might wanna check this website for more useful information....

  32. if you have free time please visit us site. 카지노사이트 카지노사이트

  33. I am planning to start blogging and I really love your content. Your work has really peak my interest. I am going to bookmark your website and keep checking for new update. Please check our site too. 카지노사이트

  34. Wow, incredible blog format! How lengthy have you ever
    been blogging for? you made blogging glance easy. The
    overall look of your site is fantastic.
    Please visit our website :)
    카지노사이트 카지노사이트

  35. Amazing blog! This is really helpful and informative. Please come and visit our website. Thank you! Have a nice day ahead.

    카지노사이트 카지노사이트

  36.‌ ‌카지노사이트

    thank you for info. hello and hi welcome to my website visit our site

  37. What a very informative site! I like how keen the details are. Keep it up. Anyway, Try checking out our website for some content.
    카지노사이트 카지노사이트

  38. I really enjoying reading this, such a nice blog. Keep it up!
    And hey guys, I want to share our website. This is promising and worth reading.
    i hope you visit our website

  39. This is an interesting blog. Keep inspiring! Might as well visit our website if you have some time. Thanks!

    카지노사이트 카지노사이트

  40. Magnificent article from you, my friend. I’ve understand your stuff previous to and you are just extremely fantastic.
    Please do visit our website too.
    카지노사이트 카지노사이트

  41. This blog helps me a lot.Please make time to read, this may help you.
    Click the link below....

  42. I really enjoying reading this, such a nice blog. Keep it up!
    And hey guys, I want to share our website. This is promising and worth reading.
    i hope you visit our website

  43. Good article! We will be linking to this particularly great post on our site.
    Keep up the great writing.
    Please visit our website:
    카지노사이트 카지노사이트

  44. GREAT JOB!!! This blog presents a very valuable information. Keep up the good work! Visit our website too. Thanks!

    안전놀이터 안전놀이터

  45. Great articles and great layout. Your blog post deserves all of the positive feedback it’s been getting. Visit our website too.
    바카라사이트 바카라사이트

  46. Your blogs are always interesting and motivating. We have especially enjoyed the nature of your works. Thank you for your effort to share this with us. Please kindly do visit this site below too.
    카지노사이트 카지노사이트

  47. AWESOME !!! This blog presents a very valuable information. Keep up the good work! Visit our website too. Thanks!

    안전놀이터 안전놀이터

  48. 시간을내어 토론 해 주셔서 감사합니다. 그 사랑을 강하게 느끼고이 주제에 대해 더 많이 읽었습니다. 지식을 얻는 것과 같이 가능하다면 추가 정보로 블로그를 업데이트 하시겠습니까? 나에게 매우 유용합니다 먹튀검증

  49. Amazing!!! This blog presents a very valuable information. Keep up the good work! Visit our website too. Thankyou!
    카지노사이트 카지노사이트

  50. I have express a few of the articles on your website now, and I really like your style of blogging. I added it to my favorite’s blog site list and will be checking back soon… 먹튀

  51. Really i appreciate the effort you made to share the knowledge. The topic here i found was really effective to the topic which i was researching for a long time 파워볼게임

  52. Thank you for some other informative web site. I truly appreciate this post. I¡¦ve been looking all over for this!
    카지노사이트 카지노사이트

  53. Very informative post! There is a lot of information here that can help any business get started with a successful social networking campaign 메이저사이트