Slashdot Mirror


X + VNC + SSH + Keyboard Shortcuts = Dueling Network WMs?

nil0lab asks: "I want to use keystrokes to switch between various systems and go from workspace to workspace within each system with another set of keystrokes." By using a combination of VNC, SSH and the right window manager, nil0lab wants to be able to look at any desktop on his network. Sounds cool, and I bet there are a lot of us who could put a trick like this to use. nil0lab has a partial solution, however there are still issues that need to be solved, and this is where he needs your help.

"Here's my partial solution:

  1. 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.
  2. 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)
  3. 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?"

2 of 22 comments (clear)

  1. Not what you're asking.... by TBone · · 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

    --

    This space for rent. Call 1-800-STEAK4U

  2. Why not just use LBX, DXPC or X11-over-SSH? by bacchusrx · · Score: 4
    Since the machines to which you're connecting are running X clients, you might as well use X. X is a network transparent windowing system, after all, this is what it was designed to do... a rudimentary way to get started would be to SSH to the remote machine, setenv DISPLAY your_local_ip:display and run xterm.

    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.

    --
    Life after capitalism? The participatory economics project