![]() |
Running remote X11 applications Howto
4 Attachment(s)
If you have a desktop linux machine, you may be interested in running programs on that machine so they are displayed on the handheld. One way of doing this is to run vnc. The other way is using a traditional X11 connection. The latter has the benefit that you can easily run only a single application rather than getting the entire desktop displayed on the handheld. It is also the more "classic" way of doing this.
For most of you this may be pretty obvious and you can stop reading at this point. For the others, please read on. The Howto became quite long. Don't let this scare you away. I believe in some points I was a little too verbose. It is really all just unix textbook stuff. You may want to scroll down to "Conclusions" to see what you can expect. I tested this stuff on my n810 handheld and a debian desktop machine. Step 1: Install ssh Make sure you have ssh installed on both machines (desktop and handheld). Ssh consists of a daemon and a client program. For our purposes it is sufficient to have the daemon on the desktop machine and only the client on the handheld, but I strongly recommend to have daemons on both machines, so you can log in to your handheld from the desktop. This simplifies many tasks (including this one) quite a lot, because you can use the desktop keyboard to control your handheld. Here is what I have installed: On the desktop (running debian): Code:
ii ssh 1:5.1p1-5 Code:
ii openssh 1:5.1p1-6.maem After the installations the ssh daemons should be running on both machines. Verify this: On the desktop: Code:
beaureve:~# ps -efa | grep sshd Code:
Nokia-N810-43-7:~# ps -efa | grep sshd On the desktop: Code:
beaureve:~# ifconfig eth0 | grep "inet addr" Code:
Nokia-N810-43-7:~# ifconfig wlan0 | grep "inet addr" Then edit /etc/hosts on both machines and add entries like this: On the desktop: Code:
192.168.1.101 n810 Code:
192.168.1.100 beaureve At this point you should be able to log in to your handheld from the desktop and vice versa. Code:
/home/martin >ssh root@n810 You may get complaints about two unsupported options in /etc/ssh/ssh_config. If you comment out the two lines in that file, then ssh will no longer complain. The next thing you want to do, it allowing ssh connections without having to answer the password prompt. A good howto can be found here. Here are the fundamentals On the handheld: You need to take the following steps as user "user" and not as root. When you start a terminal on the handheld you will be "user", but when you log in as root via ssh you are initially "root" and you need to "su - user". If you are uncertain who you are, run "id". Since we can already ssh to the handheld, we want to do everything from our desktop using a decent keyboard. Code:
/home/martin >ssh root@n810 Code:
user@n810:~> ssh-keygen -t rsa At this point you should be able to forward commands from your handheld (as "user") to your desktop without having to answer a password: On the handheld: Code:
~ $ ssh martin@beaureve date Step 2: forward X11 So far we can only run remote console commands. But we really want to run X11 (graphical) applications remotely. For this to work you may have to enable X11 forwarding. On the desktop: Make sure your /etc/ssh/sshd_config file contains the following lines Code:
X11Forwarding yes Code:
beaureve:~# /etc/init.d/ssh restart On the handheld: Again make sure you are "user" and not "root". Code:
Nokia-N810-43-7:/etc/ssh# su - user Code:
~ $ ssh -X martin@beaureve -f xterm Attachment 8036 Step 3: Use personal menu Install the personal menu package on the handheld (available on meamo.org). Then go to Control panel/Panels and replace one of the three existing panels with personal menu (I sacrificed "Contacts"). Next configure personal menu itself. There will be an entry in the Control panel under "Personalisation" called "Personal Menu". In the "Command to execute" field you can enter commands like one we used to invoke the xterm on the remote machine. Then you give the whole thing a name and chose an icon. Attachment 8038 You can do this for a couple of applications, and in the end your personal menu may look like this: Attachment 8037 Finally here is a screenshot showing Amarok being displayed on the handheld. Attachment 8035 Conclusion: pros and cons Those applications start and run pretty fast. They use the power of the desktop computer and only need the handheld for displaying things. They are still not as fast as when run natively on the desktop, because there they can make use of good graphics hardware. The epiphany web browser is amazingly snappy as long as you don't run flash movies. In general any kind of animation will cause high CPU usage or worse. You better disable the visualization in Amarok. The programs do not respond to the fullscreen button. However some applications have a builtin "fullscreen" option which is selectable via a menu entry. The epiphany web browser runs in fullscreen just fine. The onscreen keyboard will not pop up, when you need to enter texts. For n810 users, this means you have to use the hardware keyboard. Some applications heavily rely on right (or middle) mouse clicks. I have not found a way to fake right mouse clicks. This makes file managers pretty difficult to operate and you cannot use mouse gestures in epiphany. When running Amarok, sound is still played by the desktop's sound card (which is what I want). The sound will not arrive at the handheld's speakers. What you get is a remote control for Amarok. You can do similar things with VLC. Here you have to use VLC's web interface because you don't want the graphics forwarded to your handheld. This way you will get a remote control for VLC. Hope some find this useful. |
Re: Running remote X11 applications Howto
Except the missing pictures you have done a great job. I do it little different but tunneling X through ssh is great.
I did it easy and installed a no-ip deamon on my desktop to set a dynamic ip-address. I do not have a router and this way i do not need to configuering ip-addresses. |
Re: Running remote X11 applications Howto
Gee, should have read faq_vb3_posting before. Hope the pictured are there now.
|
All times are GMT. The time now is 16:25. |
vBulletin® Version 3.8.8