Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Different PATH variable for user on urxvt and tty0

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
fotte
Posts: 3
Joined: 2018-12-19 17:02

Different PATH variable for user on urxvt and tty0

#1 Post by fotte »

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

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Different PATH variable for user on urxvt and tty0

#2 Post by bw123 »

searched for ldconfig?
resigned by AI ChatGPT

fotte
Posts: 3
Joined: 2018-12-19 17:02

Re: Different PATH variable for user on urxvt and tty0

#3 Post by fotte »

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 ;)

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Different PATH variable for user on urxvt and tty0

#4 Post by bw123 »

http://forums.debian.net/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.
resigned by AI ChatGPT

fotte
Posts: 3
Joined: 2018-12-19 17:02

Re: Different PATH variable for user on urxvt and tty0

#5 Post by fotte »

@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 (>_<)

CwF
Global Moderator
Global Moderator
Posts: 2636
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: Different PATH variable for user on urxvt and tty0

#6 Post by CwF »

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.

Post Reply