Bug 500614 - Dolphin encounters infinite folder loop when embedded terminal is on
Summary: Dolphin encounters infinite folder loop when embedded terminal is on
Status: RESOLVED DOWNSTREAM
Alias: None
Product: dolphin
Classification: Applications
Component: general (other bugs)
Version First Reported In: 24.12.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-23 10:17 UTC by HittyGubby
Modified: 2025-03-04 19:55 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description HittyGubby 2025-02-23 10:17:22 UTC
STEPS TO REPRODUCE
1. Turn on embedded terminal in dolphin (F4)
2. Create a desktop shortcut to an arbitrary folder (using plasma as DE)
3. Enter any subfolder inside
4. Close the dolphin window
5. Open desktop shortcut again
6. Encounters infinite cd loop between the folder and its subfolder

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Plasmashell 6.2.5 on ArchLinux Kernel 6.12
Comment 1 Akseli Lahtinen 2025-02-24 14:37:08 UTC
I'm unable to reproduce this, so I have few questions

- Do you create the shortcut by dragging a folder to desktop, or some other way? 
- Is it a link or widget or desktop file?
- Is the subfolder inside the arbitary folder another link?
- Do you use different shell, like fish or bash?

Even better if you can make a video where you reproduce the bug, it would be super helpful so I can follow your exact steps.

Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.12.15-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 6600
Comment 2 HittyGubby 2025-02-24 16:07:36 UTC
(In reply to Akseli Lahtinen from comment #1)

This seems to be only occurring on zsh, since it worked perfectly fine when I changed my default shell to bash or fish

And here's the video me trying to reproduce this on a manjaro host with zsh (for convenience I'll just upload this on youtube):

https://youtu.be/VWiACdAmle4
Comment 3 Akseli Lahtinen 2025-02-25 09:10:58 UTC
Thanks! I will test it out with zsh as well.
Comment 4 Akseli Lahtinen 2025-03-03 12:36:32 UTC
I followed your video using zsh and could not get it to happen. Do you have some plugin in zsh that might try to change the folder? I have just plain zsh without any modifications installed. Also, can you share your zsh version just for the record?

zsh 5.9 (x86_64-redhat-linux-gnu)
Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.13.5-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 16 GiB of RAM (15.5 GiB usable)
Graphics Processor: AMD Radeon RX 6600
Comment 5 HittyGubby 2025-03-03 13:53:52 UTC
Uh, I don't know zsh supported plugins... I'm not on ohmyzsh either.
zsh version: zsh 5.9 (x86_64-pc-linux-gnu) - From pacman Official Repo
Here is my .zshrc: 

# Use powerline
USE_POWERLINE="true"
# Has weird character width
# Example:
#    is not a diamond
HAS_WIDECHARS="false"
# Source manjaro-zsh-configuration
eval $(thefuck --alias)
if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then
  source /usr/share/zsh/manjaro-zsh-config
fi
# Use manjaro zsh prompt
if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then
  source /usr/share/zsh/manjaro-zsh-prompt
fi
___MY_VMOPTIONS_SHELL_FILE="${HOME}/.jetbrains.vmoptions.sh"; if [ -f "${___MY_VMOPTIONS_SHELL_FILE}" ]; then . "${___MY_VMOPTIONS_SHELL_FILE}"; fi
Comment 6 TraceyC 2025-03-03 18:22:29 UTC
I tested on Dolphin built with git-master, the user account has zsh set as the login shell

First, I notice a related bug in the video at 40 seconds that I'm able to replicate, with zsh or bash:
- After double clicking the symlink on the Desktop, the terminal shows these directory changes (the left side is the cwd, the right is the command, as seen in the prompt):

~/Desktop/test  >  cd /
/   >  cd /home/hitgub/Desktop/test
~/Desktop/test  >  cd /home/hitgub/test
~/test  >  cd /home/hitgub/Desktop/test
~/Desktop/test >

The directory I expect to wind up in is ~/test, since that's what I created the link to. It does show the contents of the target folder correctly.
Also, notice the back and forth.

Second, I tested the loop bug with zsh -  I was not able to reproduce this
Note: In the video, when the user double clicks the "sub" folder, the terminal shows the wrong path, still, as ~/Desktop/test/sub rather than ~/test/sub
At the end of the video, a new tab is opened and the terminal path is looping between ~/Desktop/test and $/Desktop/test/sub - this I am not able to reproduce. However, there is a bug here as well
- The new tab shows the folder "test" but the terminal pane shows a different directory ~/Desktop/test/sub
Comment 7 TraceyC 2025-03-03 18:25:23 UTC
(In reply to HittyGubby from comment #5)
> Uh, I don't know zsh supported plugins... I'm not on ohmyzsh either.
> zsh version: zsh 5.9 (x86_64-pc-linux-gnu) - From pacman Official Repo
> Here is my .zshrc: 

Can we ask you create a new user, with zsh as the shell, with no customization to .zshrc at all?
Then try reproducing the bug with that user, and let us know if it still happens. 
Thanks.
Comment 8 HittyGubby 2025-03-04 04:41:26 UTC
(In reply to TraceyC from comment #7)

> Can we ask you create a new user, with zsh as the shell, with no
> customization to .zshrc at all?
> Then try reproducing the bug with that user, and let us know if it still
> happens. 
> Thanks.

Sure! I created a new tmpusr user with entirely no customization, on manjaro host (which has zsh as default shell)
Here's the new demo video: https://youtu.be/jiDlRfT298M
Comment 9 HittyGubby 2025-03-04 04:46:31 UTC
(In reply to TraceyC from comment #6)
> The directory I expect to wind up in is ~/test, since that's what I created
> the link to. It does show the contents of the target folder correctly.
> Also, notice the back and forth.
Yes, as you can see in the second demo, it will go to another folder and go back (but only once instead of looping), even if I didn't enter the subfolder inside.
Comment 10 TraceyC 2025-03-04 19:55:19 UTC
Notes from the video:
- The bug is reproducible with a new user with the default Manjaro zsh configuration 
-  By default zsh loads
/usr/share/zsh/manjaro-zsh-config
/usr/share/zsh/manjaro-zsh-prompt
After looking at the source code, their config script sets a lot of things up including various plugins

Tested this on a fresh Manjaro KDE install, with default settings, after installing updates
$SHELL is /bin/bash
$0 is /bin/zsh

I was able to reproduce the bug. 
This looks to be caused by the way Manjaro configures zsh. I recommend contacting the Arch maintainers to investigate further via their Forum.
https://manjaro.org/help

Thanks!