Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Wrong PATH in GNOME Terminal

  1. #11
    Join Date
    Sep 2012
    Posts
    5,363

    Default Re: Wrong PATH in GNOME Terminal

    Quote Originally Posted by palswim View Post
    the environment sets the PATH variable correctly on first login, but I only encounter the incorrect PATH values after logging out and logging in again.
    I was able to reproduce it exactly once. All subsequent attempts resulted in PATH from /etc/profile. The other PATH is default that GDM is using during user logon. Neither using Wayland nor X11, neither on Leap nor on TW.

    So you need to start with describing your environment in as much details as possible. What display manager you are using, are you using auto-logon or not, are you using Wayland, X11 or GNOME-classic session, what is your login shell, how many times you need to log out and log in before it happens, does it happen with every user (including new one) or not, are there any other sessions when you observe it etc etc. IOW if you want someone to fix it, you need to find how to reliably reproduce it on another system.

  2. #12

    Default Re: Wrong PATH in GNOME Terminal

    Quote Originally Posted by arvidjaar View Post
    The other PATH is default that GDM is using during user logon.
    It turns out that my first GNOME session had a process that wouldn't terminate properly on logoff, keeping the session in a perpetual terminating state.
    Code:
    > loginctl # To list sessions and retrieve Session ID (number)
    > loginctl show-session [#] | grep -F -e 'Active=' -e 'State='
    Active=no
    State=terminating
    > ps -u [UID] # Find which processes are still running
    I don't exactly know why this resulted in setting the Environment Variables for any new GNOME session with the same user to the values for GDM, but causing the process to terminate allowed setting the Environment Variables to the values I would expect for any new GNOME session for that user.

  3. #13
    Join Date
    Sep 2012
    Posts
    5,363

    Default Re: Wrong PATH in GNOME Terminal

    Quote Originally Posted by palswim View Post
    Code:
    > loginctl # To list sessions and retrieve Session ID (number)
    > loginctl show-session [#] | grep -F -e 'Active=' -e 'State='
    Active=no
    State=terminating
    > ps -u [UID] # Find which processes are still running
    Any reason you stripped out all information that allows someone to troubleshoot and possibly reproduce this issue?

  4. #14
    Join Date
    Sep 2012
    Posts
    5,363

    Default Re: Wrong PATH in GNOME Terminal

    Quote Originally Posted by palswim View Post
    It turns out that my first GNOME session had a process that wouldn't terminate properly on logoff, keeping the session in a perpetual terminating state.
    More precisely - the problem happens when systemd user instance is not terminated together with GNOME session. There are pretty legitimate use cases (concurrent remote session, linger enabled) beyond rogue process. First session leaves PROFILEREAD environment variable set so any subsequent processing of /etc/profile skips fragments guarded by this variable. One of them sets PATH.

    I know why it happens (at least using GDM/GNOME, you never bothered to provide any details about your environment). Open bug report on openSUSE bugzilla and give link here, I'll add detailed explanation. I do not expect any easy quick fix though.

    As a workaround, simply set PATH you need in ~/.profile. Using different display manager like lightdm may work too.

  5. #15
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,822

    Cool Re: Wrong PATH in GNOME Terminal

    Quote Originally Posted by palswim View Post
    It turns out that my first GNOME session had a process that wouldn't terminate properly on logoff, keeping the session in a perpetual terminating state.
    Please check “/etc/systemd/logind.conf”.
    • Add user entries to “KillOnlyUsers=”.


    Yes, there's a systemd issue here where, not all user processes are killed automatically by the system on logout …
    • Because, there was a reluctance to do this by default “for everyone” «including the user “root” – which would lead to a dead system … » – the “logind.conf” parameter is “KillUserProcesses=no” – default of “no” …

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •