X-Applications over SSH in Android [closed]
Asked Answered
P

2

28

I would like to ask about running X-applications via SSH as follows.

I have Linux Desktop running SL6.3 with Gnome 2x. On Android tablet running CM9,I have Connectbot and X-Server for Android. I can logged into Linux box with Connectbot via SSH successfully.

I set up the options for X-forwarding in /etc/ssh/sshd_config on Linuxbox.(X11Forwarding yes).

Now when I use the -X option, ssh -X username@hostname:port , Connectbot repeatly asking password even I supplied a correct one,and says- 'Authentication method 'password' failed.

How could I successfully run X-applications over SSH in the tablet ? The environment is home wireless network.

Pottery answered 10/10, 2012 at 2:27 Comment(1)
Thanks Paul,I shall try VNC. I still would like to know how can I acheived since now native X-server for Android is available,so I would just run single X-Application,rather than full VNC desktop,like SystemMonitor,for example. Is it still possible to get such configuration? play.google.com/store/apps/…Pottery
S
20

I know this thread is old... but, I wanted to make sure I clarified something misleading in paulsm4's answer...

X is backwards... You do not connect to an X server. You run the server on your local machine (what he is calling the client is actually the server). When you connect to a remote Nix box that has the X libs installed, and you add the -X switch to your SSH command, ssh will forward X requests back to you. The program running on the other side (Gnome, Chrome, PyCharm, etc) will be your X Client, and it will be upstreamed back to your desktop that contains the X Server. Here it is as a sequence Diagram:

User                                         Remote
-----------------------------------------------------------------------
User Inits SSH -X Session -----------------> SSH Server Auth User
                                                      |
                                                      V
SSH Session is established <---------------- SSH User is Authenticated
             |
             V
User Initiates App on server --------------> App Starts Running
                                                      |
                                                      V
                                             App Writes output to X Server
                                                      |
                                                      V
Xorg receives write commands <-------------- SSH Tunnels that back to User
             |
             V
Writing occurs on desktop
-----------------------------------------------------------------------

Most of the time, the X Server and X Client are the same (as happens on your local Desktop). Therefore, once the client writes to X, the local X server writes to the screen. The display process is actually done on the user's computer, where-ever it is, your computer becomes the server. Crazy ain't it?

Spinule answered 26/2, 2015 at 23:51 Comment(2)
I noticed that this meme about things being “the wrong way around” has misled people for decades. It is not the wrong way around. X is a display server. So the thing that does the rendering (the display) is obviously the server. Even if it is on your ssh client. And even if you connect to a server to run programs there, they are still clients to the display server. There’s nothing misleading or confusing about this. There’s just two servers. The display server and the “server” server. Which happen to be each other’s clients for each other’s uses.Sis
You most definitely connect to the X server. X doesn't connect to anything by itself. The X server runs on the machine that you are looking at (the local machine); it does the drawing.Catchword
B
8

You could install on your android box the following X11Server

https://github.com/nwrkbiz/android-xserver

and follow few next steps:

  1. start android-xserver
  2. start ssh client like ConnectBot (remote machine shoud have ForwardX11 yes)
  3. Run xclock, xterm ... any other X11 utilities

Be aware because the android-xserver, X11 implementation it is not a complete one.

Burgonet answered 13/10, 2012 at 19:59 Comment(2)
Thank you @myset also for taking time to answering,yes I will have to contempt with until it could run arbitrary applications like vim or chrome. :-)Pottery
Check the guide at: bbs.linuxdistrocommunity.com/discussion/1188/… - This explains a bit better.Havstad

© 2022 - 2024 — McMap. All rights reserved.