Bug 486582 - Konsole start new sessions from previous folder ignores symlinks
Summary: Konsole start new sessions from previous folder ignores symlinks
Status: REPORTED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 24.02.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-04 16:07 UTC by Ty Smith
Modified: 2024-05-06 16:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ty Smith 2024-05-04 16:07:56 UTC
SUMMARY

I'm using an Atomic Distro (Kinoite 40) that symlinks /home to /var/home

STEPS TO REPRODUCE
1.  Enable "Start in same directory as current session" for session to test
2. run `cd ~`
3. run `pwd` and verify location is /home/USER
3. Click new tab

OBSERVED RESULT
New session is in /var/home/USER, also tab title in /var/home/USER

EXPECTED RESULT
New session should be in /var/USER, which tab titles should be ~


SOFTWARE/OS VERSIONS
Linux Distro: Fedora Kinoite 40
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0 
Qt Version: 6.7.0
Comment 1 Timothée Ravier 2024-05-05 12:40:54 UTC
This looks a lot like https://pagure.io/fedora-kde/SIG/issue/159 and is not a bug in Konsole.

Is this only for the home folder or any other symlinks?
Comment 2 Ty Smith 2024-05-05 15:42:52 UTC
tested this with another symlink (limited to root folders to test in becaues of atomic distro)


sudo mkdir /var/test
ln -s /var/test /home/USER/test
cd /home/USER/test
title currently shows ~/test
click new tab
title, prompt, and pwd show /var/test


Also verified that $HOME is set to /home/USER
Comment 3 Timothée Ravier 2024-05-06 15:21:14 UTC
Home directories are in `/var/home/foo` on Fedora Kinoite.

Can you try editing the `/etc/passwd` entry for your user and setting its home dir to `/var/home/foo`?
Comment 4 Ty Smith 2024-05-06 16:06:14 UTC
"Home directories are in `/var/home/foo` on Fedora Kinoite."

This is true, but it also symlinks to /home/foo automatically since most things expect that. It even defaults to setting users home to the symlink in /etc/passwd.  

"Can you try editing the `/etc/passwd` entry for your user and setting its home dir to `/var/home/foo`?"
I did try this with a user that home it set to /var/*, saw no difference in the behavior of the Konsole issue reported.

When you select "start in current directory" in profiles, it goes to to source folder, not to the symlink the user was in when they initated the flow. Have tested outside of home altogether. ie, /var/test -> /etc/test