-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$PATH set in .bashrc not helping on Debian system #26
Comments
Try to install bubblewrap as I have said previously, JuNest is higly depending on it |
I did that ! First thing I tried, it is currently installed. And I rebooted the system for good measure. 'echo $PATH' is good, but gimp won't start, however, if I set $PATH correctly in .profile gimp will start even without bubblewrap. I just tested removing the $PATH setting from .profile and gimp starts. It's the fact that the Debian default .profile sets the $PATH with .local/bin first that's the problem |
No way... so should I patch also ~/.profile to solve this? |
I'm wondering if there's a setting I need for bubblewrap? Would it be so bad to just comment out those lines in .profile and let the user know that? |
I think I should add this
and change the previous function like this
|
This must be the new function
what do you think about? |
For some reason it's not editing .profile at all I'm not familiar enough with sed to figure out why |
Because I forgot to remove the "!"
sorry! |
Or to be more specific:
|
To made people aware about this change, I've converted all this into a function (so it is easier to surf the script):
|
It works. Here is my $PATH .local/bin is repeated 3 times at the end, because it's set in .profile and then in .bashrc, and .bashrc gets sourced twice, (maybe once in the tty at login and again when I open my terminal) It's not a problem, but the old code for what's added to .bashrc avoids repeating the .local/bin at the end. I would think to keep the old code as well would be better. Another thing, it probably won't work until the user logs out and .profile gets sourced, maybe add 'source .profile'? |
so I must keep that line
to made the Is it ok now? |
I will test Good now AND gimp runs without logging out, however I had to close the terminal in order that .bashrc gets sourced. Maybe add 'source $HOME/.bashrc' to the function? Because otherwise when a user runs appman for the first time and installs gimp and tries to run gimp (without closing the terminal and opening again) it won't run. I tried. |
Honestly, this is a change that I would have liked to avoid, I don't want to make AppMan criticizable as happened with SystemD in the past.
It's a risk I'd rather take, just because of what I just said. EDIT: also because this is an issue that affects only those with a minimal Debian installation, normally using a complete DE all this does not happens, so I have changed this function for a few of you. Anyway... is the launcher (the .desktop file) working? |
Yes everything works .desktop and terminal. It works without closing the terminal as well, even though echo $PATH doesn't change until the terminal is closed, so there's no reason to add 'source .bashrc' I believe this is totally solved. Thank you |
Some systems, including minimal Debian installations, have set the output of $PATH in the ~/.profile file to make "$HOME/.local/bin" appear as the first selection, thus depriving it of priority over other other $PATH, i.e.: `/home/$USER/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games` With this function, the line in the ~/.profile file will be corrected by changing `PATH="$HOME/.local/bin:$PATH"` in `PATH="$PATH:$HOME/.local/bin"` and in addition to the ~/.bashrc modification (see previous commit), the output of `echo $PATH` will be this: `/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/$USER/.local/bin` See #26
Some systems, including minimal Debian installations, have set the output of $PATH in the ~/.profile file to make "$HOME/.local/bin" appear as the first selection, thus depriving it of priority over other other $PATH, i.e.: `/home/$USER/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games` With this function, the line in the ~/.profile file will be corrected by changing `PATH="$HOME/.local/bin:$PATH"` in `PATH="$PATH:$HOME/.local/bin"` and in addition to the ~/.bashrc modification (see previous commit), the output of `echo $PATH` will be this: `/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/$USER/.local/bin` See ivan-hc/AppMan#26
Merry christmas |
Changed the "_patch_bashrc_and_profile" function to only modify the ~/.profile file if the output of `echo $PATH` places $HOME/.local/bin first in the $PATH list. Only systems that need it will be affected by this patch, while all systems will only have two lines added to the bottom of the ~/.bashrc file. See the previous commits listed at ivan-hc/AppMan#25 and ivan-hc/AppMan#26
Changed the "_patch_bashrc_and_profile" function to only modify the ~/.profile file if the output of `echo $PATH` places $HOME/.local/bin first in the $PATH list. Only systems that need it will be affected by this patch, while all systems will only have two lines added to the bottom of the ~/.bashrc file. See the previous commits listed at #25 and #26
I'm so sorry I didn't test properly.
Although echo $PATH in the terminal gives correct result, unless the $PATH is set correctly in .profile gimp will still not run, at least on my system.
I edited .profile for myself, so I'm fine, I just wanted to let you know that the issue could still be present on Debian systems even after the fix. Perhaps because $PATH set in .bashrc is only recognized by bash on the host system and the Archimage still sees the user-wide $PATH set by .profile.
Once again I apologize. I should have tried to run gimp, all I did was check the $PATH...
The text was updated successfully, but these errors were encountered: