Remote Window Managers

April 29th, 2008 by LJ Staff in

Your rating: None Average: 5 (2 votes)

Lots of times it's extremely frustrating or time consuming to run an xterm on a remote host just to fork your programs from that remote machine. Why not just run your window manager there even though you're not on its console? The window manager is just another X application, after all, isn't it?

Fire off your local X server

xinit /usr/bin/xterm -- :1 &

yields a vanilla X session with merely an xterm running - no window manager. Now you need to add permissions to this window session for the remote host. You can tunnel the connection through SSH if your network is insecure but there's a distinct performance hit. If your network is secure, you can just "xhost +remotehost" and spray directly to your X server:

Tunneled SSH:

ssh -fY remotehost /usr/bin/wmaker

or spray directly:

xhost +remotehost
ssh -f remotehost /usr/bin/wmaker -display localmachine:1

The first option, if your remote SSH server supports it, will use a locally defined DISPLAY that then gets tunneled to your local side over SSH. The second option allows remotehost to send X data directly to your local display, then runs WindowMaker there but displaying it locally. Now all your desktop actions are done on the remote machine, not locally.

Our special thanks to Bill from Washington state for this tech tip.
__________________________

__________________________


Special Magazine Offer -- Free Gift with Subscription
Receive a free digital copy of Linux Journal's System Administration Special Edition as well as instant online access to current and past issues. CLICK HERE for offer

Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
janpla's picture

"Extremely frustrating"?

On May 16th, 2008 janpla (not verified) says:

It seems like a lot of work - are you guys running Windows on desktop machines?

This is what I do - I find it works a charm; but then I run Linux on my desktop:

Open a local xterm or similar. Log on to the remote machine with 'ssh -X user@remote'. The '-X' means that X programs on the remote machine are displayed on your local desktop. No need for 'export DISPLAY' or 'xhost +'. You have to set up the configuration files on you local as well as remote machine, though (they are in /etc/ssh).

JM's picture

Couldn't make it run.

On May 6th, 2008 JM (not verified) says:

Its a pity that it does not work for me because I am needing desperately such a kind of feature for my system. I Installed wmaker in the remote host, but it didn't work. It says:

/usr/bin/wmaker fatal error: could not open display "CompUBUNTU:1"

where "compUBUNTU" is the name of my local machine which, by the way, runs a UBUNTU Hardy distro, while the remote host is running Fedora 8. It shouldn't be a network issue because the two computers are connected to the same LAN with no particular filters or firewalls between them.

Any suggestion?

Will this tech tip still work with a window manager that doesn't have a "-display" option, such as xmonad?

__________________________

Sometimes the delete key serves best.

jonadair's picture

Used to do this

On April 29th, 2008 jonadair (not verified) says:

I used to do this, holy moley, 18 years ago. We had a lab full of Mac II's running Apple's A/UX. The machines struggled to run much besides the X server. Since I was already running most everything else remotely, one day I fired up TWM remotely and it worked reasonably well. So I hacked up my .xinitc so that when I started X on one of the A/UX boxes, it ran TWM and everything else from our 10 processor Sequent box.

Post new comment

Please note that comments may not appear immediately, so there is no need to repost your comment.
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <pre> <ul> <ol> <li> <dl> <dt> <dd> <i> <b>
  • Lines and paragraphs break automatically.

More information about formatting options

Newsletter

Each week Linux Journal editors will tell you what's hot in the world of Linux. You will receive late breaking news, technical tips and tricks, and links to in-depth stories featured on www.linuxjournal.com.
Sign up for our Email Newsletter

Tech Tip Videos

From the Magazine

December 2009, #188

If last month's Infrastrucuture issue was too "big" for you then try on this month's Embedded issue. Find out how to use Player for programming mobile robots, build a humidity controller for your root cellar, find out how to reduce the boot time of your embedded system, and if you're new to embedded systems find out the basics that go into one. You can also read about the Beagle Board, the Mesh Potato and a spate of other interestingly named items. And along with our regular columns don't miss our new monthly column: Economy Size Geek.







Read this issue