You are not logged in.
I set in my .bashrc file:
export GOPATH=${HOME}/GoProjects
export PATH=${PATH}:${HOME}/GoProjects/bin
It works in my console but not working in Gnome 3 GUI app.
For example, https://aur.archlinux.org/packages/visual-studio-code/ reports that a variable GOPATH is not set.
Offline
Yeah the .bashrc is only parsed for interactive shells, you want /etc/profile(.d/*.sh) or /etc/environment or similar https://wiki.archlinux.org/index.php/En … s#Globally or .bash_profile if it is to be used only by your user
Offline
Yeah the .bashrc is only parsed for interactive shells, you want /etc/profile(.d/*.sh) or /etc/environment or similar https://wiki.archlinux.org/index.php/En … s#Globally or .bash_profile if it is to be used only by your user
Thanks, I read this guide.
But, if I declare a variable in the ~/.bash_profile, it does not work in console or the GUI.
I want to set these variables only for the user.
Offline
You can set GOPATH in /etc/profile.
After that all works in Atom + go-plus
Offline
You can set GOPATH in /etc/profile.
After that all works in Atom + go-plus
Thanks, but, this will work for all users.
GOPATH is specific to each user variable.
Last edited by nexcode (2016-07-20 07:51:53)
Offline
Try create ~/.gnomerc and set GOPATH there
Last edited by corner578 (2016-07-20 08:45:25)
Offline
$ less /etc/gdm/Xsession
[...]
# First read /etc/profile and .profile
test -f /etc/profile && . /etc/profile
test -f "$HOME/.profile" && . "$HOME/.profile"
# Second read /etc/xprofile and .xprofile for X specific setup
test -f /etc/xprofile && . /etc/xprofile
test -f "$HOME/.xprofile" && . "$HOME/.xprofile"
[...]
Offline
Manipulating your $PATH is best done in ~/.profile (or the bash-specific alternative ~/.bash_profile) if only because it should only take effect once (not multiple times for multiple subshells).
Also, a common tactic for unifying your shell initialization is to source ~/.bashrc from ~/.bash_profile
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
$ less /etc/gdm/Xsession
[...]
# First read /etc/profile and .profile
test -f /etc/profile && . /etc/profile
test -f "$HOME/.profile" && . "$HOME/.profile"
# Second read /etc/xprofile and .xprofile for X specific setup
test -f /etc/xprofile && . /etc/xprofile
test -f "$HOME/.xprofile" && . "$HOME/.xprofile"
[...]
Thank you.
I created a ~/.profile and declare variables there. It works in console and the GUI.
Offline