4

I have 3 monitors, one big and two small.

When I start cssh, the xterm windows cover all 3 monitors. That would be fine, if the xterm windows did not overlap the monitor boundaries. But unfortunately, what I get is basically xterm window where one half is on monitor 1 and the other half on monitor 2.

I would like to restrict cssh to only use one monitor.

I am using openbox window manager, and I tried adding the following to my xml config:

<application title="CSSH: *">
  <focus>yes</focus>
  <decor>yes</decor>
  <position>
    <monitor>2</monitor>
  </position>
</application>

Using the xml config, I can change details such as <decor>, but <monitor>2</monitor> has no effect.

Is there a way to tell cssh to only use monitor 2 ?

400 the Cat
  • 819
  • 4
  • 37
  • 85

3 Answers3

2

not sure about how/if this fits together with the XML file, but you should be able to use a .csshrc file in your home directory with a mix of some configuration options to accomplish what you need. From the cssh(1) man page I found at this site:

screen_reserve_top = 0
screen_reserve_bottom = 60
screen_reserve_left = 0
screen_reserve_right = 0
Number of pixels from the screen side to reserve when calculating screen geometry for tiling. 
Setting this to something like 50 will help keep cssh from positioning windows over your window 
manager's menu bar if it draws one at that side of the screen.

so, if you set "screen_reserve_right" to the combined width of your left two monitors, the terminals should be limited to your right-most monitor. If you use "screen_reserve_left" and "screen_reserve_right" you should be able to relegate it to your center monitor, and "screen_reserve_left" should allow you to relegate it to your left-most monitor. Apologies if you've been through that already, but figured it may be worth a shot.

Fubar
  • 791
  • 3
  • 10
2

There are a few things to check. Some are listed here.

Does your window-manager support multi-screen.

They all work on multi-screen, but not all support multi-screen features, such as maximise to just the current screen. (I could not find out if Openbox has this support).

Some programs will insist on setting their own location, and geometry.

X11 has several levels of insistence that an application can use. The window-manager can choose to honour at any level (all, some, none). Some window-managers are configurable, some are configurable per app (because most apps suggest good values, but some don't).

An example

I use KDE Plasma. I have it configured the way I like. It works for most apps. I then have set overrides for the few apps that need it:

  • I have different title-bar colours for some apps.
  • Ignore requested geometry for another (I suspect this may be of use).
  • Open on desktop x for another. Open on screen y for another.
  • Minimum size override for web-browser (so I can make it smaller, and test websites on small screen easily).
  • Focus stealing prevention, on another obnoxious app that keeps grabbing keyboard focus.
  • etc.
ctrl-alt-delor
  • 27,473
  • 9
  • 58
  • 102
1

I don't have 3 monitor of different sizes but 2 identical monitors and I can reproduce the problem when I request to open so many windows that they do not fit on a single monitor, for example 4:

cssh $(whoami)@localhost $(whoami)@localhost $(whoami)@localhost $(whoami)@localhost

I played around with Openbox and Fluxbox which I think should behave fairly similarly and I figured out that in both cases all cssh xterm child windows are placed on a monitor requested in the window manager's config only when in-app tiling is disabled with -g:

cssh $(whoami)@localhost $(whoami)@localhost $(whoami)@localhost $(whoami)@localhost -g

-g is described in man cssh:

   --tile, -g
       Toggle window tiling (overriding the config file).

You can permanently disable tiling in ~/.clusterssh/config:

window_tiling=no

If window_tiling is enabled, which is the default option, you can see all xterm windows showing up on a requested monitor for a little while but they are very quickly re-arranged and spread across monitors. This is what window_tiling is supposed to do, I think, but it doesn't work correctly enough to take care of monitor boundaries.

Arkadiusz Drabczyk
  • 25,049
  • 5
  • 53
  • 68