Bug 351266

Summary: Krusader don't accept passwords for ftp and sftp urls from command line
Product: [Applications] krusader Reporter: Murz <MurzNN>
Component: generalAssignee: Krusader Bugs Distribution List <krusader-bugs-null>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: davide, krusader-bugs-null
Priority: NOR    
Version First Reported In: 2.4.0-beta3 "Single Step"   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Murz 2015-08-13 19:51:54 UTC
I need to open direct links to ftp and sftp urls via Krusader.

If I manually enter url like ftp://mylogin:mypassword@example.com or sftp://mylogin:mypassword@example.com in Krusader GUI panel - all works well - it opens remote folder without asking passwords.

But when I try to open same url via command line, cli command like:
$ krusader ftp://mylogin:mypassword@example.com

- Krusader didn't see password in url and ask me for password via popup message, with empty password field.

Is this a bug and can be fixed or this feature is disabled for security reasons?

Reproducible: Always
Comment 1 Murz 2015-08-13 20:02:19 UTC
If I try to start Dolphin file manager with same cli arguments - all works well, it opens url without asking password.
Comment 2 Murz 2015-08-25 10:48:18 UTC
Here is script, that do workaround for this problem, you can place it into /usr/local/bin/krusader_launch_tab.sh
-----------------------------------
#!/bin/bash -e

TIMEOUT=60

pid="$(pgrep -u "$(id -u)" '^krusader$' | head -n 1)"

if [ -z "$pid" ]; then
    krusader &
    pid="$(pgrep -u "$(id -u)" '^krusader$' | head -n 1)"
fi

polling_start="$(date +%s)"

# org.krusader.Instance.isRunning strangely activates the window. I couldn't find
# a dbus call that is supposed to do that.
while ! (qdbus org.krusader /Instances/krusader org.krusader.Instance.isRunning > /dev/null 2> /dev/null); do
    sleep 0.1
    if [ "$(date +%s)" -gt "$(( $polling_start + $TIMEOUT ))" ]; then
        exit
    fi
done

left_active="$(qdbus org.krusader /Instances/krusader org.krusader.Instance.isLeftActive)"

if [ "$left_active" == 'true' ]; then
    manager="left_manager"
else
    manager="right_manager"
fi

qdbus org.krusader /Instances/krusader/$manager org.krusader.PanelManager.newTab "$1" > /dev/null
-----------------------------------
Comment 3 Davide Gianforte 2021-08-24 06:33:04 UTC
This version of Krusader is unmantained, please update to 2.7.2 and reopen the bug if the issue is still present.