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

mas and tmux #16

Closed
trudheim opened this issue Mar 25, 2016 · 3 comments
Closed

mas and tmux #16

trudheim opened this issue Mar 25, 2016 · 3 comments

Comments

@trudheim
Copy link

This isn't a bugreport as much as a "hey, look what I found".

If I ssh in to a remote mac (as an admin-enabled user), I can install and run mas, signin and list applications. If I on the other hand start a tmux session and try running mas there, I get errors like this:

$ mas list
Illegal instruction: 4
$ mas account
Not signed in
$ mas signin user@domain.com "<password>"
==> Signing in to Apple ID: user@domain.com
The operation couldn’t be completed. (MASErrorDomain error 6.)
$ 

Outside of tmux, things work fine. I've not been able to work out what differs between the regular ssh environment and the tmux one, but something happens with tmux that prevents mas from working properly.

@trudheim
Copy link
Author

OSX 10.11.4, mas 1.1.3, latest XCode etc.

@argon
Copy link
Contributor

argon commented Apr 14, 2016

This is probably a permissions issue with tmux spawning the process with the wrong permissions for the necessary XPC. I'm pretty sure it needs to be run within some kind of graphical environment. I'll investigate this more when I can.

@argon
Copy link
Contributor

argon commented Apr 16, 2016

This is a user namespace issue. It is similar to the issues with using pbcopy and pbpaste inside tmux.

The workaround for now is to brew install reattach-to-user-namespace then run mas with that utility.

$ tmux
$ reattach-to-user-namespace mas install

I'm going to keep this issue around because I'd like to investigate this further but the workaround above should solve the problem.

@argon argon closed this as completed in af87d63 Jun 15, 2016
jsatk added a commit to jsatk/dotfiles that referenced this issue Sep 15, 2016
jsatk added a commit to jsatk/dotfiles that referenced this issue Oct 18, 2016
jsatk added a commit to jsatk/dotfiles that referenced this issue Oct 22, 2018
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

2 participants