brockgr / csshx

Automatically exported from code.google.com/p/csshx
433 stars 75 forks source link

Terminal Windows Open Briefly #70

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run csshX with a login to 4 different hosts
2. A handful of terminal windows open and then immediately close

What is the expected output? What do you see instead?
I would expect 5 terminals to open. One as a master, and the others for the 
hosts I'm sshing to. Instead, the terminals open briefly, then immediately 
close.

What version of csshX (do a "csshX -v") are you using? On what operating
system version (do a "sw_vers")?
csshX: 0.74
Mac OS X: 10.9.5

Please provide any additional information below.

Original issue reported on code.google.com by wbautist...@gmail.com on 15 Jan 2015 at 7:40

netpoetica commented 9 years ago

I have seen this problem on Mac OSX, I believe that for me, it had something to do with an invalid command. Once I specified the -l option and gave my username directly, and, used a valid host file or specified the IP addresses directly, this issue went away (Mac OSX Mavericks).

csshx -l myusername --hosts ./prod-list.conf
// or
csshx --login myusername 127.0.0.1 127.0.0.2 127.0.0.3

System Info: Mac OSX 10.9.5 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64

angrycub commented 9 years ago

Something that made this more troubleshootable was to change the Terminal Preferences to not autoclose the windows. You can do this by:

  1. Go to the Terminal menu.
  2. Select Preferences.
  3. Click on the Profiles icon in the toolbar.
  4. Select your default profile from the selector in the left-hand column.
  5. Click the Shell button in the Segmented Control at the top of the right-hand column.
  6. Change the value of of When the shell exits: to "Don't close the window"

Next time you run, you should have some more meaningful errors in the remaining windows.

To undo this, just set the When the shell exits: value back to your original. Mine is "Close if the shell exited cleanly"

Might allow for a more thorough issue report.

Hope this helps, -cv

netpoetica commented 9 years ago

@angrycub Thanks for mentioning this. I did make this change and, reran the command just to see if it might help and output any specific debug information.

Unfortunately, the behavior is still the same. I have a laptop and two monitors, one plugged in via Thunderbolt, one plugged in via DisplayPort. If I move my terminal window to one of my external monitors and run a command like:

csshx -l myusername --hosts ./production.conf

The red master terminal will pop up on my laptop (wat?) and the other windows simply do not appear anywhere - there are somehow trapped between screens but they are not visible. If I unplug one of my monitors (thunderbolt or displayport - tried with both) and then plug it back in, the terminal windows will pop right into place on the monitor they should have been on to begin with, but they will be the size they would have been if they were on my laptop (wat?).

This behavior is common across all of the macs in my organization where ppl are attempting to use csshx.

At the moment, I am making csshx work by always running it from my laptop screen with --screen 1 which is not ideal, because then my terminal windows are much smaller than they have to be, but at least it is useable then :)

Cheers

angrycub commented 9 years ago

I was able to reproduce your problem on my setup, and I was able to get the behavior I believe you are looking for if I do the following:

  1. Go to System Preferences
  2. Click the Mission Control icon
  3. Uncheck the Displays have separate Spaces checkbox.
  4. Logout and Log back in.

The caveat is that when the display is all one Space, an application in Full Screen mode will take over all of your displays. But, if you don't use Full Screen, this might not be a big deal for you. Another possibility is to make your Primary Display your external monitor when plugged in. You can do this by:

  1. Go into System Preferences»Displays.
  2. Click on Arrangement.
  3. Drag the little white menubar from the laptop display icon (little blue box) to the monitor you would like to be primary. screen shot 2015-09-01 at 5 13 30 pm

At least then you can have it put the terminal windows on the screen you prefer to use. I'd be curious to know how this goes for you; let me know. Hope this gets you sorted!
-cv