Ubuntu lucid liest kein Profil für neues XTerm

952
bitbucket

Ich habe abc.sh zu /etc/profile.d hinzugefügt. Wenn ich ein neues XTerm starte, werden die Umgebungsvariablen in abc.sh nicht im neuen XTerm gesetzt. Dies funktioniert gut, wenn ich ein vorhandenes XTerm einsetze.

1

2 Antworten auf die Frage

2
Steve

Ich glaube, dass xterm standardmäßig keine Login-Shell ausführt. Verwenden Sie "xterm -ls", wenn Sie Ihre Profilskripte lesen möchten

Aus der xterm-Manpage

 -ls This option indicates that the shell that is started in the xterm  window will be a login shell (i.e., the first character of argv[0]  will be a dash, indicating to the shell that it should read the  user's .login or .profile). 

Von der bash-Manpage

 When invoked as an interactive login shell, or a non-interactive shell with the --login option, it first attempts to read and execute commands from /etc/profile and ~/.profile, in that order. 
0
Daniel Beck

Check /etc/profile- es ist das Skript, das geladen werden soll /etc/profile.d/*.sh. Es ist möglich, dass diese nur in bestimmten Situationen geladen werden, z. B. bei Nicht-Login-Shells.