tmux integration/ideas

Tom Metro
2012-12-11
2012-12-14
  • Tom Metro

    Tom Metro - 2012-12-11

    I just ran across tmux:
    http://tmux.sourceforge.net/

    A BSD reengineered implementation of 'screen'. Described as "A clean, easily extended, BSD-licensed codebase, under active development."

    A while back I had suggested the idea of having some sort of integration between Roxterm and screen (should be somewhere in the issue traker). I don't recall what exactly I was suggesting. The main challenge to integration is that 'screen' is usually ran on the remote host - not the machine running Roxterm.

    Though there still might be opportunities...I think screen had some mechanism for out-of-band communication that was intended to work between a localhost running screen and a remote machine also running screen. In this scenario, Roxterm would take the place of the local instance.

    tmux may have similar mechanisms. Or more simply, a Roxterm plugin (if such a thing existed) could add menus to create a new tmux session and perform other tmux-specific operations. What would be ideal would be something that could detect the presence of a suspended tmux session, once connected to a remote host, and automatically reconnect to it. But that's a tall order.

    I think a better first step in the integration direction would be adding GUI functionality to manage ssh. Either a simple, light-weight wrapper around the command line openssh client, or more ambitiously, direct integration of the openssh library. (There's more detail on this in another issue tracker ticket.)

    In other tmux matters, I see one of its big claims to fame is the ability to divide up a terminal window into sub-windows (see screen shot):
    http://tmux.sourceforge.net/tmux3.png

    I'm not sure I'd use that in Roxterm if it had that ability, but I could see some people considering it a useful feature if you could size and arrange tabs within the main window, just like a classic Microsoft Windows Multiple Document Interface (MDI) application.

    While I'd probably make use of the occasional split screen when I have a need to rapidly bounce back and forth between two terminals, the reduced sized windows can be limiting if you want to run an editor or other ncurses app that needs lots of screen space.

    I think I'd be more interested in some mechanism that lets me create a dashboard to see in one glance what is going on in multiple windows. And then have the ability to quickly expand or switch to a specific window to work with it.

     
    • Tony Houghton

      Tony Houghton - 2012-12-11

      I had an idea about screen integration. Instead of integrating with screen, roxterm could replace it. I think this would just about be possible with vte/gtk. Roxterm would provide a sort of server, letting you detach and attach a terminal from and to a pty without disturbing the running process. For remote connections it could just open a window on the client's X server. The trouble is I don't want to spend much time on roxterm at the moment because I'm busy with another project. You may have noticed there haven't been any updates lately, although I will spend a few days fixing some minor bugs and adding simple features once Debian goes back to normal after Wheezy is released.

       
    • Tony Houghton

      Tony Houghton - 2012-12-11

      I'm not sure I'd use that in Roxterm if it had that ability, but I could see some people considering it a useful feature if you could size and arrange tabs within the main window, just like a classic Microsoft Windows Multiple Document Interface (MDI) application.

      My first instinct is to shudder, remembering the terrible time I've had trying to make terminals and tab labels behave themselves size-wise already!

      While I'd probably make use of the occasional split screen when I have a need to rapidly bounce back and forth between two terminals, the reduced sized windows can be limiting if you want to run an editor or other ncurses app that needs lots of screen space.

      Yes, I think most people would have enough monitor space to run at least 2 terminal windows side by side, and it's quite easy to drag tabs in and out of roxterm.

      I think I'd be more interested in some mechanism that lets me create a dashboard to see in one glance what is going on in multiple windows. And then have the ability to quickly expand or switch to a specific window to work with it.

      That sounds a bit like what gnome-shell and some of compiz' plugins can do, which I really like. It would be great if there was an API to do that for one application at a time. Maybe roxterm could have a control to instantly separate all tabs into one per window. But ideally you'd want that to be reversible, which throws up one or two headaches.

      I presume you know you can get a list of tab titles for a window at the bottom of the Tabs submenu?

       
      • Tom Metro

        Tom Metro - 2012-12-14

        Roxterm would provide a sort of server, letting you detach and attach a terminal from and to a pty without disturbing the running process. For remote connections it could just open a window on the client's X server.

        One major down side to doing anything that doesn't build on 'screen' is that 'screen' is nearly ubiquitous, so your alternate solution would require installing software on every remote machine you want to work with.

        But that may be a worth while price, if it lets you distil the remote component down to a tiny chunk of code.

        I wonder if it might almost be possible to leverage the job management built-in to modern shells to emuate the most significant features of screen (ability to detach; persistance even when the parent terminates; not sure how you'd reattach).

        Another approach would be to have Roxterm open multiple connections to the remote machine, and manage the collection similar to how screen does. You'd still need a bit of shell trickery to no-hup the login shell, and figure out how to reattach to it. It would require ssh integration to be effective, and you lose out on scrollback persistance if your client crashes/reboots.

        My first instinct is to shudder, remembering the terrible time I've had trying to make terminals and tab labels behave themselves size-wise already!

        That's understandable.

        2 terminal windows side by side

        Which is what I do now, but it is a bit cumbersome. Also, when switching to Roxterm via a dockbar, you've now got to choose among 2 possible windows. Not a bit deal, but it imposes some UI overhead that slows down interactions a bit.

        The vast majority of the time I don't have a need for two windows. I just use one window with a bunch of tabs opened via script automation.

        That sounds a bit like what gnome-shell and some of compiz' plugins can do...

        I've used a Compiz window switcher that used live previews of the windows, but that's not ideal, as it shows everything on the window, zoomed out. And all windows.

        An overview that is generated automatically would possibly be useful, but I was thinking more of a manualy built dashboard, where the user hand picks the tabs and seectively decides how much of each to show, whether to crop or zoom, etc.

        Seems unlikely that such a thing could be pulled off using APIs from the desktop environment. I'd expect it to be in-app functionality.

        ...you know you can get a list of tab titles for a window at the bottom of the Tabs submenu?

        Yes...what's the relevance?

        I'm not running so many tabs that I can't see the tab selectors all on my screen at once. I can find them and switch among them easily.

        The suggestion above was about exposing the content within the tabs in some central "dashboard" display so you could monitor the activity on multiple remote servers in one window.

         
        Last edit: Tom Metro 2013-03-13

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks