Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shuttle doesn't open Iterm2 new tab or window #266

Open
mohsinzaheer25 opened this issue Nov 14, 2019 · 6 comments
Open

Shuttle doesn't open Iterm2 new tab or window #266

mohsinzaheer25 opened this issue Nov 14, 2019 · 6 comments

Comments

@mohsinzaheer25
Copy link

I have configured shuttle with default setting and its not opening new tab or window. I have Iterm2 stable release 3.3.6 and shuttle 1.2.9 version. When I set to "inTerminal": "current" it works. Not sure what wrong i did.

{
  "_comments": [
    "Valid terminals include: 'Terminal.app' or 'iTerm'",
    "In the editor value change 'default' to 'nano', 'vi', or another terminal based editor.",
    "Hosts will also be read from your ~/.ssh/config or /etc/ssh_config file, if available",
    "For more information on how to configure, please see http://fitztrev.github.io/shuttle/"
  ],
  "editor": "default",
  "launch_at_login": false,
  "terminal": "iTerm",
  "iTerm_version": "stable",
  "default_theme": "Homebrew",
  "open_in": "new",
  "show_ssh_config_hosts": false,
  "ssh_config_ignore_hosts": [],
  "ssh_config_ignore_keywords": [],
  "hosts": [
    {
      "cmd": "date -j",
      "name": "Terminal",
      "inTerminal": "tab"
    },
    {
      "Spouses Servers": [
        {
          "cmd": "echo '—->WARNING! Running commands<-- Are you sure? y/n'; read sure; if [ $sure == y ]; then echo running command && ps aux | grep [a]pple; else echo save to history and show... && history -s 'ps aux | grep [a]pple' && osascript -e 'tell application \"System Events\" to keystroke \"p\" using {control down}'; fi",
          "inTerminal": "current",
          "name": "Logs - Opens in the current active terminal window"
        },
        {
          "Jane’s Servers": [
            {
              "cmd": "ssh [email protected]",
              "inTerminal": "tab",
              "name": "SSH blog - Opens in Tab of active window",
              "theme": "basic",
              "title": "title of tab"
            },
            {
              "cmd": "ssh [email protected]",
              "inTerminal": "new",
              "name": "SSH Shop - Opens in New Window",
              "theme": "basic",
              "title": "title of new window"
            }
          ]
        }
      ]
    }
  ]
}
@TimothyBramlett
Copy link

So, strangely I solved my issue by making sure my profile was named "Default" in iterm2. This was the only difference between the one mac where it was working and not working. Not sure why the profile name makes a difference as I don't see it in the shuttle.json settings file or anything.

@georgesnow
Copy link

@TimothyBramlett what did you have set as your default profile in iTerm2 when it was not working? (in iTerm2 Preferences=>Profiles and the profile with a star next to the name is the Default)

@TimothyBramlett
Copy link

When it was not working I had named the profile "Tim" and that was the only profile in iTerm.

@mohsinzaheer25
Copy link
Author

What variable I need to change in shuttle configuration?

@micahmount
Copy link

I was having this same issue, and could remedy with the same change from "tab" to "current" for the "inTerminal" variable in Shuttle as @mohsinzaheer25 (thanks for kicking things off here!).

But I like using the "tab" feature as I'll often have multiple hosts open, so I decided to play around with iTerm.

I found that if I switched iTerm's "Window restoration policy" from its default "Use System Window Restoration Setting" to "Only Restore Hotkey Window" (see screenshot below), then the "tab" setting in Shuttle works fine.

This leads me to believe the issue has more to do with the way that the OS is handling the shell, rather than anything to do with Shuttle.

Obviously it would be nice if the default settings work out of the box with no special config required... maybe someone can suggest a system config edit that would resolve this?

image

@szakha92
Copy link

I managed to fix it by following way (Dark is my ITerm2 profile name):

  "terminal": "iTerm.app",
  "iTerm_version": "stable",
  "default_theme": "Dark",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants