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

Doesn't work from emacs started in ssh session on OSX #6

Open
colonelpanic8 opened this issue Dec 15, 2014 · 0 comments
Open

Doesn't work from emacs started in ssh session on OSX #6

colonelpanic8 opened this issue Dec 15, 2014 · 0 comments

Comments

@colonelpanic8
Copy link

This is because ssh sessions aren't in the same bootstrap namespace as the current GUI login, which makes it impossible to communicate with Spotify.

I was able to get helm-spotify to work using these functions to start emacs:

function as_user {
    local user="$1"
    local user_pid=$(ps -axj | awk "/^$user / {print \$2;exit}")
    local command="sudo /bin/launchctl bsexec $user_pid sudo -u '$user' $2"
    eval $command
}

function as_current_user {
    as_user "$(whoami)" "$*"
}

If you used these commands when making the apple scrip t calls from within helm-spotify, this issue could be fixed. It's not clear to me that this is enough of an issue that it is worth fixing in helm-spotify, but I thought I'd post here just in case anyone else is having this problem or you would like me to submit a fix.

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

1 participant