Running launchctl from tmux

Kendall Shaw kendall.shaw at workday.com
Wed Apr 19 20:58:33 UTC 2017


On 4/19/17, 1:53 AM, "Rainer Müller" <raimue at macports.org> 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




More information about the macports-users mailing list