windoze X server
summary
Want to run X apps on a slackware client displayed on your windoze desktop seamlessly with other windows apps?
This document describes one method to achieve that goal. While much is written on this topic, I found the information confusing, so asked for help in a.o.l.slackware group on how to setup such a system. This is what resulted from those discussions. The X clients are run headless at runlevel 3, most info out there assumes X clients are running XDM type login, this was not what I wanted.
boxen
- magpie
- windoze X server (KVM: keyboard, video, mouse)
- peetoo
- slackware X client (runs X applications)
- sempro
- slackware X client (ditto)
sshd daemon
Listens for connections from the windoze box to slackware boxen, each slack box offering X11 clients needs configuring to allow X11 forwarding.
configuration
You'll need to modify /etc/ssh/sshd_config on the slackware boxen to allow X11 forwarding, check you have these three lines:
X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes
PuTTY
The ubiquitous ssh terminal client for windoze boxen talking to linux or unix boxen, I've been using PuTTY for many years over dialup Internet links as well as localnet control of headless linux boxen.
I use the same username / password on all boxen. Also running a passphrase setup with pageant for passwordless login to localnet slackware boxen.
configuration
I'm going to assume you have a working PuTTY setup, there's plenty resources out there on setting up PuTTY as an SSH terminal client.
Xll forwarding
On the PuTTY Confiuration's Connection >> SSH >> X11 screen, check the Enable Xll forwarding box. Leave the X display location blank, the default MIT-Magic-Cookie-1 selected.
Xming
Xlaunch
I cannot figure out the Xlaunch option, so I shall ignore it.
Xmingrc
This file is used to add right-click menu items to the Xming tray icon's right-click menu.
# Xming Server Resource File
TRAYICON ",101"
menu magpie {
"oclock" exec "f:\bin\xapps\oclock -display %display%"
"xeyes" exec "f:\bin\xapps\xeyes -display %display%"
}
menu peetoo {
"xeyes" exec "f:\bin\PuTTY\plink -l grant -load peetoo /usr/X11R6/bin/xeyes"
}
menu sempro {
"firefox" exec "f:\bin\PuTTY\plink -l grant -load sempro /usr/bin/firefox"
"pan" exec "f:\bin\PuTTY\plink -l grant -load sempro /usr/bin/pan"
"vmware" exec "f:\bin\PuTTY\plink -l grant -load sempro /usr/local/bin/vmware"
"xeyes" exec "f:\bin\PuTTY\plink -l grant -load sempro /usr/X11R6/bin/xeyes"
separator
"kcalc" exec "f:\bin\PuTTY\plink -l grant -load sempro /opt/kde/bin/kcalc"
}
menu access {
"from peetoo" exec "f:\bin\xapps\x_peetoo.bat"
"from sempro" exec "f:\bin\xapps\x_sempro.bat"
}
menu main {
"magpie" menu magpie // localhost
"peetoo" menu peetoo
"sempro" menu sempro
separator
"allow access" menu access
"show status" execd "f:\bin\xapps\xhost.bat"
separator
"reload Xmingrc" reload
separator
}
RootMenu main
SilentExit
DEBUG "Done parsing the configuration file..."
support files
- xhost.bat
- displays status of xhost authorised sessions
@echo off f:\bin\xapps\xhost pause
- x_peetoo.bat
- authorise connections to magpie from peetoo
@echo=off set DISPLAY=localhost:0 f:\bin\xapps\xhost + peetoo
- x_sempro.bat
- authorise connections to magpie from sempro
@echo=off set DISPLAY=localhost:0 f:\bin\xapps\xhost + sempro
- alias xtmagpie
- connect to magpie and start an xterm
# .bashrc # alias xtmagpie='DISPLAY=magpie:0 xterm &'
operation
start from client
Requires prior authorisation by using the Xming menu, for example to allow sempro access to magpie's display, right-click Xming menu >> allow access >> from sempro. On a PuTTY terminal to sempro, run DISPLAY=magpie:0 xterm & to open an xterm attached to the server's display. Start X applications from this xterm for a faster unencrypted link.
start from server
Start X applications from the Xming menu, in the example menu above, you can see options for the local magpie box as well as two remote slackware client boxen. Also, X applications started on the PuTTY terminal will be forwarded to the server's display via ssh.
credits
software
- PuTTY: Simon Tathan
- http://www.chiark.greenend.org.uk/~sgtatham/putty/
- Xming: Colin Harrison
- http://www.straightrunning.com/
configuration
Though I spent much time putting this together, the project is the result of contributions from members of the a.o.l.slackware news group, in particular:
- Lew Pitcher
- Suggested the Xming + PuTTY approach, Lew has also written this topic up for Linux Gazette, over here.
- Henrik Carlqvist
- Pushed for best performance of the PuTTY to X server data link, I've yet to benchmark his approach vs the 'normal' approach other than the observation there's not much difference with glxgears, but an obvious difference with some X apps. Henrik's page: Upgrading a VCR.
- Michael Pierce
- Explained the use of Xmingrc, and gave hints of what to try to solve particular problems. Michaels's home page.
- a.o.l.s members
- Whose suggestions didn't make it into this document, thank you too, for responses reviewed but not applicable to this project.