Ubuntu – How to run any X11-app on ubuntu-touch

ubuntu-touchxorg

Ubuntu touch preview does not use X11 for graphics. The repository for armhf contains virtually all apps available in desktop Ubuntu, but they cannot be run directly on the tablet (Nexus 10 in my case).

Is there a way to run those using a virtual X-server, perhaps passing through local VNC to be displayed? I have ssh access to the device, so I can run commands normally.

Best Answer

You can also run it on the phone via XMir. You need to create a custom launcher for your X11 application, let's say it is called my_x11_app, and the desktop file is ~/.local/share/applications/my_x11_app.desktop, looking like this: down vote favorite

 [Desktop Entry] 
 Name=My X11 App
 X-Ubuntu-Touch=true 
 X-Ubuntu-XMir-Enable=true 
 Exec=/path_to_my_app/my_x11_app
 Icon=/path_to_my_app/my_x11_app.png
 Terminal=false 
 Type=Application

if you cannot see the app icon on the phone among other apps, just use the search feature, it will rescan launchers and after that the icon will be there.

Additionally, if you need an on-screen keyboard support in the x11 app there are 2 conditions you need to fulfill:

  1. you need to install maliit-inputcontext-gtk3 and maliit-inputcontext-gtk2 packages into your ubuntu phone
  2. you may need to set environment variables in your app, at least export GTK_IM_MODULE=maliitphablet

I wrote an article about this on my blog: http://kriscode.blogspot.tw/2016/09/x-applications-on-ubuntu-phone.html

Alternatively you can install Libertine and use your x11 app with it.

Related Question