Gestern konnte ich in Thunar plötzlich keine eigenen Skripte ausführen, per Kontextmenü → Öffnen mit… Und zwar solche die Unterskripte aufrufen. Alle dies Skripte stehen in ~/.local/bin
. Mit Öffnen mit… Datei test:
#!/bin/bash
echo -e "$PATH" | zenity --text-info --width=920 --height=1080 --font "mono"
bekomme ich diesen PATH
/usr/local/bin:/usr/bin:/var/lib/snapd/snap/bin
Im Terminal ist der vollständige PATH
noch da:
$ echo $PATH
/home/micha2/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin
Wie bekomme ich ~/.local/bin
wieder in den Suchpfad von thunar → Kontextmenü → Öffnen mit…?
English:
On Manjaro the path is generated by the drop-in file in /etc/profiles.d/home-local-bin.sh
Verify the file exist - then recheck your init scripts to locate possible changes to your PATH variable
Deutch:
Auf Manjaro wird der Pfad durch die Drop-in-Datei in /etc/profiles.d/home-local-bin.sh generiert
Überprüfen Sie, ob die Datei vorhanden ist. Überprüfen Sie anschließend Ihre Init-Skripte erneut, um mögliche Änderungen an Ihrer PATH-Variablen zu finden
You can answer me in english.
The file /etc/profile.d/home-local-bin.sh
exists:
case ":${PATH}:" in
*:"$HOME/.local/bin":*) ;;
*) export PATH="$HOME/.local/bin:$PATH" ;;
esac
Where can i find all init scripts?
Is this file /etc/profile.d/home-local-bin.sh
called every time, i use thunar → Kontextmenü → Öffnen mit… ?
Different shells uses different init scripts.
zsh uses files starting with .zsh
bash uses files starting with .bash
The path may be set or altered by any script - to fit the needs of the script.
What you see in thunar may be the result of thunar being called from another script which alters the path.
I dont know, which shell “thunar → Context menu → Open with… ?” uses?; or which scripts are called before execution of “thunar → Context menu → Open with… ?”.
I don’t think that thunar is called from a script. And if it does, from which script?
Soll ich jetzt auch auf English? Wie auch immer. Ich hab in .bash_profile
einfach export PATH=$HOME/.local/bin/:$PATH
hinzugefügt und es zeigt den korrekten Pfad an. Habe dein Beispiel-Skript genommen, funktioniert.
Soll ich jetzt auch auf English?
Deutsch ist OK, wenn sich niemand anderes beschwert.
Nach einem Neustart habe ich unter “thunar → Kontextmenü → Öffnen mit… ?” wieder den Pfad ~/.local/bin/
.
In meiner ~/.bash_profile
steht aber nur
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
und in ~/.bashrc
steht auch kein .local/bin
.
Offensichtlich wird PATH=$HOME/.local/bin/:$PATH
an einer anderen Stelle gesetzt.
Und ist das normal, dass bei längerem Nicht_neu_starten der PATH kaputt gehen kann?
Es wird wohl noch einige Zeit dauern bis ich in diesen Sachen fit bin …
Und vielen Dank für eure Unterstützung 