help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make GUI applications inherit PATH


From: Greg Wooledge
Subject: Re: How to make GUI applications inherit PATH
Date: Tue, 9 Mar 2021 15:54:34 -0500

On Tue, Mar 09, 2021 at 08:04:32PM +0000, Suvayu Ali wrote:
> On Tue, Mar 9, 2021 at 1:56 PM Fernando Basso
> <fernandobasso.br@gmail.com> wrote:
> >
> > I am creating a launcher in Xfce4 to run `gvim -f'. When I click the
> > launcher, gvim opens and complains it cannot find nodejs, which I
> > install through nvm (node version manager), which is added to `PATH' in
> > `~/.bashrc'.
> 
> Any variable that you want to be available throughout your desktop,
> including GUI applications, you should set in your ~/.bash_profile.

The situation is, unfortunately, much more complicated than that.  It's
actually beyond the scope of help-bash.

If you login on a unix console, and run 'startx' to invoke an X session
with a traditional window manager, then sure, what you just said is
correct.

If you login with gdm3 and start a Wayland session that runs GNOME, then
it's not.

And there are a whole bunch of variants in between.

Now, the good news is the OP is running xfce, and not GNOME.  That's one
branch of the horror tree that we can prune.

The OP's operating system may provide some mechanism for populating
environment variables throughout the entire xfce session.  Unfortunately
we don't know what that operating system is, so we can't look for their
specific hacks.  Some of them use ~/.xprofile and some use ~/.xsessionrc
and so on.

It's unlikely, however, that ~/.bash_profile will be the correct file for
an X session started by a display manager.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]