X + VNC + SSH + Keyboard Shortcuts = Dueling Network WMs? 22
"Here's my partial solution:
- I run blackbox (google cache) with bbkeys (google cache) on my local box (debian+xfree86-4). This gives me workspaces. I programmed ctrl-alt-1 through ctrl-alt-9 to give me workspaces 1-9.
- In each workspace I run Tridia's version of vncviewer to connect to a different remote box (debian, suse, aix). (Actually, one is to the local box for consistency and my mobility)
- I run the same window manager on each of the remote systems. I tried using blackbox with bbkeys there too but with -config to define different keys but there seems to be some conflict. I settled on flwm for the remote boxes: its minimal decorations and low memory impact seems to give good response over 256Kbps - T1 grade lines + ssh. It also supports keyboard-oriented operation (ctrl-F1 thru ctrl-F12) to get to different workspaces. (Tho Ctrl-F8 pos up the vncviewer's pop-up menu.)
Downsides: (1) flwm seems to support switching windows within a workspace fairly well, but since focus follows mouse, any little bump of the mouse changes the focus back. (2) copy and paste don't work very well (first you gotta copy, then you gotta use the popup thingy to transfer remote to local, then you go to the other one and use its popup thingy to transfer local to remote, then you paste, and then it doesn't work half the time and you have no idea which step wasn't done just so or there's some limitation.) (3) each vncviewer is in a window so it is subject to being minimized or defocused or resized. tried the vncviewer's fullscreen mode but it seemed to block changing workspaces under the local bbkeys control.
Is there a better way?"
here is what I do... (Score:1)
And assuming you have the remote Xserver set up correctly it will open a new XDM (or WDM in my case) session on the remote server. Now I know that this is not inherently secure so you will need to wrap this with ssh, but you should still be able to use Ctrl-FXX to switch to any of the Desktops you have running. Since I use WindowMaker I set Ctrl-Meta-Right Arrow to cycle through the desktops. The left Arrow takes me the reverse direction.
Now all of this is done on a local network so I do not know how heavy the bandwidth will impact on this solution. However the vtXX part of the syntax for the X server handles the machine switching so you are free to use whatever WindowManager you want. The really sweet part is that when you switch to a different machine's desktop, your other instances of the Xserver you are running will sleep after a few seconds, thus reducing the load on the machine you are using and the remote servers also. I also use Debian so this should work for you.
Good Luck,
Matt
Not what you're asking.... (Score:4)
...but why are you running remote desktops on all of your systems anyway? I beat down my users who feel they absolutely HAVE to run a remote desktop instead of just running remote windows. The performance hit on the remote machines is noticable - expecially when I kill all dtremote sessions on some of my Solaris boxes at work.
X transcends the desktop. Set yourself up a workspace dedicated to a machine or group of machines. Configure buttons to launch things on certain OS's, and only put them on certain desktops. Any user who tells me that he needs to run in a virtual desktop finds shortly after I disable his remote desktop that he does his work just fine without the remote desktop and just remote X windows.
This space for rent. Call 1-800-STEAK4U
Re:Not what you're asking.... (Score:1)
Re:Not what you're asking.... (Score:1)
Run multiple X servers on virtual terminals (Score:2)
From an X terminal on your current X desktop, type 'X
Then type 'X
you'll probably need to fire up a local xterm on each of these servers to type 'xhost +remotebox', so that your remote machines have permission to connect, but then you can telnet into your remote box, type 'export DISPLAY=yourbox:1 or whatever, and then fire up whatever dektop environment you like.
Then all the desktops for all your machines can be a Ctrl-Alt-F* away.
There is most likely a better way to set this up, but since my Voodoo 3 has major problems doing this, i use a single X server with multiple workspaces, ssh into each of my boxen and use the X-forwarding features to have them display windows on my desktop - i.e. i don't have a separate 'desktop environment' for each machine.
Another option is starting multiple VNC Servers on your local machine, and local VNC Viewers as well. This may get around your copy/paste issue.
Then, on your remote boxes, set DISPLAY= localbox:X, where X is the number of your VNC server, and run your desktop environment startup script i.e. 'gnome-session &' form a telnet/ssh shell to the remote machine.
Hope that helps. Others may be able to suggest more streamlined ways of doing this stuff, but this is what works for me
-Pete
Re:Not what you're asking.... (Score:2)
Having to type commands for every opened window would be fairly cumbersome.
Re:Not what you're asking.... (Score:1)
It depends on which window manager you use, of course. I use fvwm2. Here's a little snippet from my ~/.fvwm2rc file:
AddToMenu xemacs
+ "Catbus %mini-bball.xpm%" Exec xon catbus xemacs &
+ "Woozle %mini-bball.xpm%" Exec xon woozle xemacs &
xon is command or script which rsh's to the machine and lauches the application. You can replace everything after the "Exec" with a differnent command to make it use ssh. You have to set up your authorized_keys to allow you ssh into the machines without typing your password, or else do some more interesting scripting to make a window pop up and ask you for it.
It's worth setting it up right even if it takes a couple of hours fiddling with scripts and manpages.
Re:Not what you're asking.... (Score:2)
VNC patch for this (Score:2)
The main VNC page, contrib. section, has a few weird additions to the viewer and servers.
Need some more info... (Score:2)
If these machines are servers, you really shouldn't be running X at all. X wastes tons of cpu, and most of the newer window managers blow even more.
If these machines are being used as individual desktops and there is alot of them, you may want to consider purchasing a management solution like Tivoli.
Tivoli allows you to remote control, perform remote software installation, and take inventory of installed hardware and software. The downside is that Linux support is so-so until the end of the year, and the package is very expensive and requires dedicated staff.
Re:Why not just use LBX, DXPC or X11-over-SSH? (Score:2)
He seems to understand how to export X displays
Re:Need some more info... (Score:2)
I'm working with about 120k nodes... I tend to think big.
Re:Not what you're asking.... (Score:1)
Re:Not what you're asking.... (Score:2)
Re:Need some more info... (Score:1)
Re:Not what you're asking.... (Score:1)
Re:Why not just use LBX, DXPC or X11-over-SSH? (Score:1)
Re:Need some more info... (Score:1)
Re:Need some more info... (Score:1)
Re:Not what you're asking.... (Score:1)
'ssh -X grace xmms' is what i use to run xmms on the workstation tucked away in the corner, wired into my home stereo.
it's just like running any other remote command from the ssh command-line.
read the man page. it's big and scary, but damn is it worth it. ssh is killer at this stuff (port redirection, or, how i poked a big ole hole through the firewall)
Re:Why not just use LBX, DXPC or X11-over-SSH? (Score:2)
VNC is great for a lot of things: for instance, if you want to connect and control a presently running session (a la WinVNC or VNC through x0rfbserver), or if you want to, say, control an X desktop from a Mac or Windows machine that doesn't have (and you can't install) an X server. It all depends what you want to do, I suppose.
BRx.
Why not just use LBX, DXPC or X11-over-SSH? (Score:4)
The neat part is, of course, that your local window manager & decorations will be used -- so there's no reason to be minimalist with eye candy as is the case with VNC: window management & drawing, etc. is all done locally. It further solves your problem with copy & paste because the remote X apps will be treated just like local ones.
Lastly, if you find the performance sluggish, there are several ways you can decrease the bandwidth neccessary to make network X possible. Beyond SSH tunnelling (which is a good idea anyways :)), the two that spring to my mind are LBX and DXPC. LBX (Low Bandwidth X) is probably the simplest to configure & use -- it's included with XFree86 (4.x at least.)
On the remote machine, simply type:
lbxproxy -display local_machine:display :1
now, set your DISPLAY variable to :1 on the remote machine. that's that. X will now use LBX compression -- there's noting to configure locally as the local X server will automatically decompress the stream for you.
DXPC (Differential X Protocol Compressor) is a little more complicated as it requires a proxy on both sides. Search Google for setting up DXPC -- there's plenty of HOWTOs & FAQs on the subject out there.
All in all, using X for this purpose will integrate better with your local desktop as well as make the integration between your remate apps & your local ones seemless.
BRx.