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


Groups > linux.debian.user > #213029

Re: Bash isn't reading ~/.profile file when login from GNOME

From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups linux.debian.user
Subject Re: Bash isn't reading ~/.profile file when login from GNOME
Date 2019-08-20 16:40 +0200
Message-ID <yxdsJ-3Iv-1@gated-at.bofh.it> (permalink)
References <yxdj3-3Fh-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Aug 20, 2019 at 02:27:40PM +0000, Vipul wrote:
> Hi there,
> 
> From few days, I'm trying find answer of a question "which program does
> read ~/.profile if I login from graphical user interface (for ex: GNOME)?".

https://wiki.debian.org/Xsession
https://wiki.debian.org/EnvironmentVariables

These are, of course, incomplete.

The short answer is: if you login through a Display Manager (a graphical
login program), NOTHING reads ~/.profile.  Ever.

So, let's try to guess what the actual goal is here.

If your goal is to set an environment variable in every program in your X
session, and you're not using GNOME, then you can put an export command
in ~/.xsessionrc and it should work great.

If you are using GNOME, please find out how to do it, and then tell us,
because as far as I've been able to determine, GNOME makes this completely
impossible.

Normal window managers run programs as children of themselves, using the
standard Unix fork-and-exec model.  The window manager is executed with
various environment variables, umask, resource limits, and so on, and
its children inherit these.  So, the standard Unix login configuration
stuff all works.  You edit a magic dot file, you login, the dot file is
read by a shell, the shell executes your window manager, the WM inherits
your desired environment, and everything launched from the WM also
inherits this environment.  Easy peasy.

But with GNOME, applications are launched by sending a message to dbus,
and then dbus spawns things as *its* children.  They are not children of
the WM.  They do not inherit the environment from the WM.  They inherit
the environment from dbus.

And there is no known way to configure the environment of dbus in a way
that is useful to end users.

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


Thread

Bash isn't reading ~/.profile file when login from GNOME Vipul <finn02@disroot.org> - 2019-08-20 16:30 +0200
  Re: Bash isn't reading ~/.profile file when login from GNOME Greg Wooledge <wooledg@eeg.ccf.org> - 2019-08-20 16:40 +0200
    Re: Bash isn't reading ~/.profile file when login from GNOME Reco <recoverym4n@enotuniq.net> - 2019-08-20 16:50 +0200
    Re: Bash isn't reading ~/.profile file when login from GNOME Andrei POPESCU <andreimpopescu@gmail.com> - 2019-08-20 22:30 +0200
      Re: Bash isn't reading ~/.profile file when login from GNOME Greg Wooledge <wooledg@eeg.ccf.org> - 2019-08-20 22:50 +0200
        Re: Bash isn't reading ~/.profile file when login from GNOME Andrei POPESCU <andreimpopescu@gmail.com> - 2019-08-22 23:10 +0200
          Re: Bash isn't reading ~/.profile file when login from GNOME Greg Wooledge <wooledg@eeg.ccf.org> - 2019-08-22 23:20 +0200
            Re: Bash isn't reading ~/.profile file when login from GNOME Andrei POPESCU <andreimpopescu@gmail.com> - 2019-08-23 15:00 +0200
      Re: Bash isn't reading ~/.profile file when login from GNOME Vipul <finn02@disroot.org> - 2019-08-21 05:10 +0200
    Re: Bash isn't reading ~/.profile file when login from GNOME Vipul <finn02@disroot.org> - 2019-08-21 04:50 +0200
      Re: Bash isn't reading ~/.profile file when login from GNOME Greg Wooledge <wooledg@eeg.ccf.org> - 2019-08-21 15:20 +0200
        Re: Bash isn't reading ~/.profile file when login from GNOME Greg Wooledge <wooledg@eeg.ccf.org> - 2019-08-21 16:50 +0200
          Re: Bash isn't reading ~/.profile file when login from GNOME Greg Wooledge <wooledg@eeg.ccf.org> - 2019-08-21 17:10 +0200
        Re: Bash isn't reading ~/.profile file when login from GNOME Vipul <finn02@disroot.org> - 2019-08-22 21:10 +0200
          Re: Bash isn't reading ~/.profile file when login from GNOME Greg Wooledge <wooledg@eeg.ccf.org> - 2019-08-22 21:30 +0200

csiph-web