Different PATH variable for user on urxvt and tty0

Help with issues regarding installation of Debian

Different PATH variable for user on urxvt and tty0

Postby fotte » 2018-12-19 17:20

Hi There.

I am not totally new to debian but i am having newbie issues at the moment, so there is a rather long story. Let me begin with the short version:
[short-ish version]
On xfce, inside an instance of urxvt -> tmux -> zsh:
Code: Select all
> su
*********
> echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/f/bin
> whoami
root


on tty0:
Code: Select all
login: root
password: ******
> echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin
> whoami
root


As you can see the PATH variable has different contents. This is an issue becaus apt needs ldconfig, which is located in /sbin and that is not part of my PATH.

I checked my zshrc, and tmux config (and i don't have a urxvt config at the moment), but I do not set the PATH anywhere.

[long version]
I installed Debian through the current netinstall (stable), instead of upgrading to testing from a clean install I installed tmux, zsh, urxvt and changed my default shell to zsh (via chsh -s). After that i upgraded to testing by changing my sources list (according to https://wiki.debian.org/DebianTesting, How to upgrade to Debian (next-stable) Testing). And by running apt-get update, apt-get upgrade and apt-get dist-upgrade. The dist-upgrade failed and there has been a reboot inbetween the apt-commands. The failure indicates that ldconfig, aswell as start-stop-deamon is missing. After reading some stuff I found out that my PATH variable does not contain /sbin anymore, which seems weird to me. I dont set the PATH variable myself.

[Question]
Any ideas where the path variable could be set and where i might correct this issue?

I sifted through the results on the forum already but could not find this issues anywhere. If this has been discussed before just point me in the direction please ;)

Kind regards,
Flo
fotte
 
Posts: 3
Joined: 2018-12-19 17:02

Re: Different PATH variable for user on urxvt and tty0

Postby bw123 » 2018-12-19 17:28

searched for ldconfig?
User avatar
bw123
 
Posts: 3679
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Different PATH variable for user on urxvt and tty0

Postby fotte » 2018-12-19 17:36

Yep. It's located in /sbin, which is missing from my PATH variable, but i cannot figure out how that variable has changed - or by which mechanism or script it has changed...

[edit]: I am not looking for a temporary solution ( mine is export PATH=/sbin:$PATH...) I am searching for the perpetrator who changes my path ;)
fotte
 
Posts: 3
Joined: 2018-12-19 17:02

Re: Different PATH variable for user on urxvt and tty0

Postby bw123 » 2018-12-19 17:37

search.php?keywords=ldconfig

it's an su issue, IIRC there will be a change in the way it preserves path in versions after stretch. There are a couple different ways to fix it. 'su -' seems to be the easiest/recommended way for now.
Last edited by bw123 on 2018-12-19 17:39, edited 1 time in total.
User avatar
bw123
 
Posts: 3679
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Different PATH variable for user on urxvt and tty0

Postby fotte » 2018-12-19 17:39

@bw123 Thanks! turns out i was looking using the wrong search terms und i though you meant if I have searched for ldconfig in my system... my mistake (>_<)
fotte
 
Posts: 3
Joined: 2018-12-19 17:02

Re: Different PATH variable for user on urxvt and tty0

Postby CwF » 2018-12-23 19:13

I went through something similar a few weeks ago, and the spoiler is I didn't identify the path error, but it fixed itself. I took a a ~9.3 install, originally 8.5, to 'buster' and it's about 80% there now since I've done it in stages to avoid creating issues. About round 2-3 I paused to get polkit right and purge gksu, and in a gui root terminal I noticed what you see, I ignored it and kept going. A few rounds later after a few reboots it had corrected itself. Generally, I'm saying don't do a full upgrade in one step - and it's not a question of if it can or can't -simply reliability of action. Upgrade blocks of functionality, those 'blocks' are your call, but they will bring in the upgrades they need, give clues to issues, etc, in a more manageable way.
CwF
 
Posts: 194
Joined: 2018-06-20 15:16


Return to Installation

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable