• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Remote X server through SSH

Search This thread

BukaKing

Member
Mar 11, 2011
46
17
So I figured out how to get a remote X server working through ssh. So far I have only ran xeyes, xclock and gedit. I am going to try other heavier x applications to see what works :)

To do this you need to install openssh via these instructions:
https://wiki.ubuntu.com/Touch/ReleaseNotes#Accessing_the_device_over_SSH

once you can ssh into your phone, you then want to install xauth, x11-apps, and gedit
sudo apt-get install xauth x11-apps gedit

Then when finished installing you want to 'logout' of your ssh and log back in with -Y:
ssh -Y [email protected]_of_device

This will now forward x11 connections to your desktop. If you see an error about X11 forwarding after entering your password, add -v to ssh and it will give you more details about why it failed.

Now you should be able to run xeyes and xclock to test it, and use gedit to edit text files. Note that gedit seemed rathe slow to start, it may be because of wifi.
 

BukaKing

Member
Mar 11, 2011
46
17
I tried some additional X applications and these ones work:
gimp
inkscape
nautilus
xterm
libreoffice
geany
meld
gnome-terminal (need to edit profile color settings to not use system theme)
glxgears (works better modified to use glFinish before glXSwapBuffers)
electrum (had to edit it because it thought it was android)
eclipse (takes a while to initialize, don't ctl-c!)

These installs but do not work
blender (installs but segfaults)
eog (installs but relocation error libframe.so.6)

These do not install:
qtcreator (qt dependencies)
tortoisehg (qt dependencies)
vlc (qt dependencies)
lastfm (qt dependecies)
minitube (qt and other dependencies)
musique (qt and other dependencies)
wings3d (erlang-wx dependency)

It seems anything that uses qt doesn't install, I'm guessing there are conflicts with the newer version and the older versions.
 
Last edited:
  • Like
Reactions: MikeCriggs

BukaKing

Member
Mar 11, 2011
46
17
These X applications are being displayed on the Ubuntu desktop that I am using to ssh into the phone.

I am also able to do this in Windows 7 using putty for ssh and vcxsrv as an X server:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
http://sourceforge.net/projects/vcxsrv/
and then in a putty ssh session:
export DISPLAY=windows_ip_address:0.0
then all x applications route to your windows desktop

You don't need to have an X server on the phone to run them, you only need the x libraries and in the case of `ssh -Y` you also need xauth.
 
  • Like
Reactions: MikeCriggs

BukaKing

Member
Mar 11, 2011
46
17
I figured out how to get qt4 applications to install and run, although for some reason they run considerably slow, which could also be that it is going over wifi.

I had to add a repository, which I did through synaptic.
sudo apt-get install synaptic
sudo synaptic

and then in synaptic select Settings > Repositories
Add a new repository.

URI: http://ppa.launchpad.net/canonical-qt5-edgers/qt5-proper/ubuntu/
Distribution: quantal
Section(s): main

exit synaptic and update
sudo apt-get update

Then you can start installing qt4 applications
sudo apt-get install qtcreator

I tried to build the gallery-app but it didn't find a kit.

It would be awesome some day to build apps on the device itself, or at least plug it into any computer with an x server (Linux, Mac, or Windows) and develop that way.
 
  • Like
Reactions: MikeCriggs

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    So I figured out how to get a remote X server working through ssh. So far I have only ran xeyes, xclock and gedit. I am going to try other heavier x applications to see what works :)

    To do this you need to install openssh via these instructions:
    https://wiki.ubuntu.com/Touch/ReleaseNotes#Accessing_the_device_over_SSH

    once you can ssh into your phone, you then want to install xauth, x11-apps, and gedit
    sudo apt-get install xauth x11-apps gedit

    Then when finished installing you want to 'logout' of your ssh and log back in with -Y:
    ssh -Y [email protected]_of_device

    This will now forward x11 connections to your desktop. If you see an error about X11 forwarding after entering your password, add -v to ssh and it will give you more details about why it failed.

    Now you should be able to run xeyes and xclock to test it, and use gedit to edit text files. Note that gedit seemed rathe slow to start, it may be because of wifi.
    1
    I tried some additional X applications and these ones work:
    gimp
    inkscape
    nautilus
    xterm
    libreoffice
    geany
    meld
    gnome-terminal (need to edit profile color settings to not use system theme)
    glxgears (works better modified to use glFinish before glXSwapBuffers)
    electrum (had to edit it because it thought it was android)
    eclipse (takes a while to initialize, don't ctl-c!)

    These installs but do not work
    blender (installs but segfaults)
    eog (installs but relocation error libframe.so.6)

    These do not install:
    qtcreator (qt dependencies)
    tortoisehg (qt dependencies)
    vlc (qt dependencies)
    lastfm (qt dependecies)
    minitube (qt and other dependencies)
    musique (qt and other dependencies)
    wings3d (erlang-wx dependency)

    It seems anything that uses qt doesn't install, I'm guessing there are conflicts with the newer version and the older versions.
    1
    These X applications are being displayed on the Ubuntu desktop that I am using to ssh into the phone.

    I am also able to do this in Windows 7 using putty for ssh and vcxsrv as an X server:
    http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
    http://sourceforge.net/projects/vcxsrv/
    and then in a putty ssh session:
    export DISPLAY=windows_ip_address:0.0
    then all x applications route to your windows desktop

    You don't need to have an X server on the phone to run them, you only need the x libraries and in the case of `ssh -Y` you also need xauth.
    1
    I figured out how to get qt4 applications to install and run, although for some reason they run considerably slow, which could also be that it is going over wifi.

    I had to add a repository, which I did through synaptic.
    sudo apt-get install synaptic
    sudo synaptic

    and then in synaptic select Settings > Repositories
    Add a new repository.

    URI: http://ppa.launchpad.net/canonical-qt5-edgers/qt5-proper/ubuntu/
    Distribution: quantal
    Section(s): main

    exit synaptic and update
    sudo apt-get update

    Then you can start installing qt4 applications
    sudo apt-get install qtcreator

    I tried to build the gallery-app but it didn't find a kit.

    It would be awesome some day to build apps on the device itself, or at least plug it into any computer with an x server (Linux, Mac, or Windows) and develop that way.