Quantcast

Running launchctl from tmux

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Running launchctl from tmux

Kendall Shaw-2

This is sort of on topic because I installed tmux via macports…

 

I can do this to set environment variable as as non-root user:

 

launchctl setenv BLAH blah

 

But, within tmux I get:

 

Not privileged to set domain environment.

 

I find posts on the internets suggesting running tmux with sudo, but then I am running as root which is not what I want to do.

 

Do you know what sort of permission I need to grant what to be able to use launchctl as myself within tmux?

 

Kendall

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Running launchctl from tmux

Rainer Müller-4
On 2017-04-19 01:41, Kendall Shaw wrote:

> This is sort of on topic because I installed tmux via macports…
>
>  
>
> I can do this to set environment variable as as non-root user:
>
>  
>
> launchctl setenv BLAH blah
>
>  
>
> But, within tmux I get:
>
>  
>
> Not privileged to set domain environment.

I would assume this is due to tmux running in its own bootstrap
namespace, similar to the problem of not being able to access the
pasteboard services from within tmux.

A good explanation can be found here:
https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard

Rainer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Running launchctl from tmux

Kendall Shaw-2
On 4/19/17, 1:53 AM, "Rainer Müller" <[hidden email]> wrote:

    On 2017-04-19 01:41, Kendall Shaw wrote:
    > This is sort of on topic because I installed tmux via macports…
    >
    >  
    >
    > I can do this to set environment variable as as non-root user:
    >
    >  
    >
    > launchctl setenv BLAH blah
    >
    >  
    >
    > But, within tmux I get:
    >
    >  
    >
    > Not privileged to set domain environment.
   
    I would assume this is due to tmux running in its own bootstrap
    namespace, similar to the problem of not being able to access the
    pasteboard services from within tmux.
   
    A good explanation can be found here:
    https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ChrisJohnsen_tmux-2DMacOSX-2Dpasteboard&d=DwIDaQ&c=DS6PUFBBr_KiLo7Sjt3ljp5jaW5k2i9ijVXllEdOozc&r=JgwnBEpN1c-DDmq-Up2QMq9rrGyfWK0KtSpT7dxRglA&m=jAfznQR-LlcUbQJdHjgaIYSASFmIen5ziiNL_AFryBg&s=i2i3xnwz_rjgs5fM9DKpKYZVIc-mU82DRQLCDOnY_Yo&e= 
   
    Rainer
   
Thank you. Installing tmux-pasteboard and configuring tmux to use reattach-to-user-namespace allows me to use launchctl setenv within tmux. And I’ve added the Deprecated Daemonomicon to my reading list.

Something like tmux-reattach-to-user-namespace might be a better package name, it seems to me.

Kendall


Loading...