Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #178203

Re: The same environment variables everywhere

From Teemu Likonen <tlikonen@iki.fi>
Newsgroups linux.debian.user
Subject Re: The same environment variables everywhere
Date 2017-02-27 14:30 +0100
Message-ID <tftxg-68T-5@gated-at.bofh.it> (permalink)
References <tf67E-6Iq-1@gated-at.bofh.it> <tfd97-2SY-9@gated-at.bofh.it> <tflzI-iZ-1@gated-at.bofh.it> <tfoxz-2Ks-5@gated-at.bofh.it> <tfoHg-2QD-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

tomas@tuxteam.de [2017-02-27 09:12:28+01] wrote:

> On Mon, Feb 27, 2017 at 09:07:19AM +0100, deloptes wrote:
>> So I do distinguish between settings for X session and for not X
>> session - at least two places for the variables. Further more there
>> are global and user specific ... etc
>
> Yes, all of those! But I don't see how that's an answer to the OP's
> legitimate question: how to keep things that belong together in one
> place, instead of repeating it in every bit of config?

Yes. I know ~/.profile, ~/.xsession, systemd units' "Environment=...",
"systemctl --user import-enviroment" and various other things. I can
manage. I'm just asking for other ideas on how to handle things
mentioned in my original post.

Well, here's the idea of my current setup (not exact copy):

~/.profile:

    # Set the usual environment:
    export PATH=...
    export EDITOR=...
    systemctl --user import-enviroment

~/.xsession:

    . ~/.profile
    # Start various systemd services:
    systemctl --user start graphical-session.target
    /usr/bin/i3
    systemctl --user stop graphical-session.target

~/.config/systemd/user/emacs.service:

    [Unit]
    Description=The Emacs Operating System

    [Service]
    Type=forking
    ExecStart=/usr/bin/emacs --daemon
    SuccessExitStatus=15
    Restart=on-failure
    TimeoutStartSec=0
    TimeoutStopSec=0

    [Install]
    WantedBy=graphical-session.target

-- 
/// Teemu Likonen   - .-..   <https://keybase.io/tlikonen> //
// PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

The same environment variables everywhere Teemu Likonen <tlikonen@iki.fi> - 2017-02-26 13:30 +0100
  Re: The same environment variables everywhere Matthias Bodenbinder <matthias@bodenbinder.de> - 2017-02-26 21:00 +0100
    Re: The same environment variables everywhere Stefan Monnier <monnier@iro.umontreal.ca> - 2017-02-27 06:00 +0100
      Re: The same environment variables everywhere deloptes <deloptes@gmail.com> - 2017-02-27 09:10 +0100
        Re: The same environment variables everywhere <tomas@tuxteam.de> - 2017-02-27 09:20 +0100
          Re: The same environment variables everywhere GiaThnYgeia <GiaThnYgeia@openmailbox.org> - 2017-02-27 12:40 +0100
            Re: The same environment variables everywhere Elimar Riesebieter <riesebie@lxtec.de> - 2017-02-27 13:40 +0100
          Re: The same environment variables everywhere Teemu Likonen <tlikonen@iki.fi> - 2017-02-27 14:30 +0100
            Re: The same environment variables everywhere David Wright <deblis@lionunicorn.co.uk> - 2017-02-27 18:10 +0100
              Re: The same environment variables everywhere Teemu Likonen <tlikonen@iki.fi> - 2017-02-27 19:00 +0100
                Re: The same environment variables everywhere Nicolas George <george@nsup.org> - 2017-02-27 19:20 +0100
                systemd service environment Teemu Likonen <tlikonen@iki.fi> - 2017-02-27 19:50 +0100
          Re: The same environment variables everywhere deloptes <deloptes@gmail.com> - 2017-02-27 19:30 +0100
  Re: The same environment variables everywhere Greg Wooledge <wooledg@eeg.ccf.org> - 2017-02-27 14:20 +0100

csiph-web