6

I would like cssh to use terminator terminal emulator, instead of the default xterm. In ~/.clusterssh/config I have changed the following line:

#terminal=/usr/bin/xterm
terminal=/usr/bin/terminator

But when I start cssh I get following error:

Opening to: server1 server2
Usage: terminator [options]

terminator: error: no such option: -g
Usage: terminator [options]

terminator: error: no such option: -g
Cannot open pipe for reading when talking to server1 : Interrupted system call

Apparently, cssh is passing some parameters to xterm, which terminator does not recognize.

How can I fix this problem ?

  • 1
    You can find out what parameters are being passed by changing your terminal to echo and starting cssh from a command line in a terminal; the parameters will then be printed out in that same terminal. – Curt J. Sampson Jun 1 '17 at 10:57
3

I suspect that you may not get this to work as I doubt that Terminator will accept synthetic events and I don't think that multiple terminal per window model is compatible, but If you want to try the best source is the README.Debian.gz from the debian package. I have included the relevant portion below, but It would probably be much simpler to just use Terminator's grouping option

Super+g: Group all terminals so that any input sent to one of them, goes to all of them. (from the man page)


TERMINAL EMULATORS

Clusterssh no longer allows the use of just any Debian terminal emulator that provides x-terminal-emulator, since a number of them don't support the XSendEvents resource. By default, clusterssh will invoke xterm. To change this, create or modify your config file to contain the line:

    terminal = /path/to/my/favorite/terminal-emulator

Note that this terminal emulator must accept the "-xrm" command line switch to set XTerm.VT100.allowSendEvents:true (or something that does the same thing). If your terminal emulator provides equivalent functionality with a different switch, or provides it implicitly, you can set this with the parameter "terminal_allow_send_events" in the config file.

If you are having trouble getting clusterssh to work with uxterm, you should either delete the "terminal_allow_send_events" option from your config file, or update the value to:

  UXTerm.VT100.allowSendEvents:true

or simply:

  *.VT100.allowSendEvents:true

Older versions of clusterssh would create the .csshrc file with the class set to "XTerm" which prevents the uxterm from receiving events.

The terminal emulator must also accept:

    -e <command>
    -font <font>
     System-wide configure changes can be made by editing /etc/csshrc.

Debian terminal emulator packages tested and known NOT to work with clusterssh:


(please send updates either directly to the maintainer or via the bug tracking system)

gnome-terminal konsole kterm xvt xfce4-terminal mlterm

Debian terminal emulator packages tested and believed to work:


xterm rxvt rxvt-beta aterm (only with "terminal_allow_send_events =" in ~/.clusterssh/config) wterm (only with "terminal_allow_send_events =" in ~/.clusterssh/config) pterm (although it requires input focus before any output is displayed) eterm (although it doesn't use the -font switch)

Note that xterm-wrappers like lxterm and uxterm that immediately background themselves will NOT work.

If you use a script to spawn your terminals, make sure that it takes takes $* as an argument, and that it doesn't background itself.

2
+125

It seems that terminator does not accept csshs (default or hard-wired) parameters. Instead of trying to change these, how about creating a wrapper for the terminator startup:

cat > /usr/bin/start_terminator.sh
#!/bin/bash
# debug info: dump parameters
echo "start_terminator.sh called with paremeters: ${@}" > /tmp/start_terminator.sh.cmdline
# now start terminator avoiding invalid parameters given by cssh
exec /usr/bin/terminator
^D

(^D is Ctrl+D to end the keyboard input and cat command), then

chmod 755 /usr/bin/start_terminator.sh

and replace the terminal=/usr/bin/terminator by terminal=/usr/bin/start_terminator.sh in your ~/.clusterssh/config. If terminator does not start after this change then please look at our debug output at /tmp/start_terminator.sh.cmdline to see whether some of the parameters need to be passed to /usr/bin/terminator when execing it.

0

According to the manual for cssh it has this to say:

--tile,-g|--no-tile,-G Enable|Disable window tiling (overriding the config file)

With that said, I would propose disabling the window tiling option then review the manual for terminator which has this to say regarding window tiling:

--geometry=GEOMETRY Specifies the preferred size and position of Terminator's window; see x(7).

It seems that some general configuration options are going to be needed to switch terminals for cssh.

  • Thanks, but what concrete parameters do I need to change in ~/.clusterssh/config? Using option -G on the commandline, i.e. cssh -G server1 server2 produces the same error. The option -G does not make any difference. – Martin Vegter May 31 '15 at 17:25
  • I should have been more specific; cssh needs to pass --geometry to terminator or disable the feature entirely. – jas- May 31 '15 at 18:29
  • so basically, your advice is, I should read the manual to figure out the answer to my question. – Martin Vegter Jun 1 '15 at 20:52
  • Nope, just that the cssh tool seems to be equipped with configurable options that should address the problem you're experiencing and you didn't make any mention of them in your original question. – jas- Jun 2 '15 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.