Bug 380349

Summary: Some remote (sftp) files are opened via temp-file instead of remote URL although command is "kwrite %u"
Product: [Applications] dolphin Reporter: H.H. <cyberbeat>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: nate, raul_kde_bugzilla
Priority: NOR    
Version: 17.04.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description H.H. 2017-05-30 08:25:34 UTC
I am not sure, if dolphin is the right product to report against (perhaps kio/kdelibs)?

To reproduce:
1) Open a remote directory like sftp://... in dolphin.

2) Create a file with an extension, which has currently no link to a program (in my case it was a ".less" textfile.

3) In context menu for that file edit the properties, and create a new extension and link a command "kwrite %u" for it.

After that, kwrite is used, but the %u is ignored (it is opened via a temp file as if the command was "kwrite %f").

This is very uncomfortable, because changes are not uploaded immediatly. So I have to open files everytime with "open with.." and enter "kwrite %u".
Comment 1 Christoph Feck 2017-06-07 16:55:10 UTC
The KWrite .desktop file does not state which URL protocols the KWrite application supports. Could you check if adding this line helps?

X-KDE-Protocols=ftp,http,https,sftp,smb
Comment 2 H.H. 2017-06-07 17:27:44 UTC
It does not help.

I have some debug output for

a) open the file with my saved settings (using the default open action to open the less file always with kwrite)

...
log_kio_sftp: QUrl("sftp://.../test.less")
log_kio_sftp: username= "..." , host= "..." , port= 22
log_kio_sftp: checking cache: info.username = "..." , info.url = "sftp://..."
log_kio_sftp: Creating the SSH session and setting options
log_kio_sftp: Trying to connect to the SSH server
log_kio_sftp: Getting the SSH server hash
log_kio_sftp: Checking if the SSH server is known
log_kio_sftp: Trying to authenticate with the server
log_kio_sftp: Trying to authenticate with public key
log_kio_sftp: Trying to authenticate with password
log_kio_sftp: Trying to request the sftp session
log_kio_sftp: Trying to initialize the sftp session
log_kio_sftp: connected ? true username: old= "..." new= "..."
Copying QUrl("sftp://.../test.less")  to QUrl("file:///.../.cache/kioexec/krun/11504_0/test.less")
log_kio_sftp: QUrl("sftp://.../test.less")  ->  QUrl("file:///.../.cache/kioexec/krun/11504_0/test.less")  , permissions =  "-1" , overwrite =  QFlags() , resume =  QFlags()                                                  
log_kio_sftp: QUrl("sftp://.../test.less") -> "/.../.cache/kioexec/krun/11504_0/test.less" , permissions= -1                                                                                                                   
log_kio_sftp: QUrl("sftp://.../test.less")  
log_kio_sftp: connected ? true username: old= "..." new= "..."                                                             
log_kio_sftp: enqueueChunks                                                                                                  
log_kio_sftp: enqueueChunks done "1"
log_kio_sftp: enqueueChunks
log_kio_sftp: enqueueChunks done "1"
All files downloaded, will call slotRunApp shortly
EXEC  "/usr/bin/kwrite /.../.cache/kioexec/krun/11504_0/test.less"
EXEC done
sleeping...
...

b) open the file with "open with.." and entering "kwrite %u" manually

...
log_kio_sftp: QUrl("sftp://...test.less")  ->  QUrl("file:///tmp/katepartJ11697.less")  , permissions =  "384" , overwrite =  QFlags(0x4) , resume =  QFlags()
log_kio_sftp: QUrl("sftp://.../test.less") -> "/tmp/katepartJ11697.less" , permissions= 384
log_kio_sftp: QUrl("sftp://.../test.less")
log_kio_sftp: username= "..." , host= "..." , port= 22
log_kio_sftp: checking cache: info.username = "..." , info.url = "sftp://..."
log_kio_sftp: Creating the SSH session and setting options
log_kio_sftp: Trying to connect to the SSH server
log_kio_sftp: Getting the SSH server hash
log_kio_sftp: Checking if the SSH server is known
log_kio_sftp: Trying to authenticate with the server
log_kio_sftp: Trying to authenticate with public key
log_kio_sftp: Trying to authenticate with password
log_kio_sftp: Trying to request the sftp session
log_kio_sftp: Trying to initialize the sftp session
log_kio_sftp: Trying to initialize the sftp session
log_kio_sftp: connected ? true username: old= "..." new= "..."
log_kio_sftp: enqueueChunks
log_kio_sftp: enqueueChunks done "1"
log_kio_sftp: enqueueChunks
log_kio_sftp: enqueueChunks done "1"
log_kio_sftp: 
log_kio_sftp: *** kio_sftp Done

...


Can you reproduce the error? I can reproduce it on 2 different systems (both opensuse)
Comment 3 Raul Kde Bugzilla 2017-09-06 14:48:57 UTC
This bug has being around for a long time.
Since kde 4 if I am not mistaken.
Comment 4 Nate Graham 2017-09-07 03:39:20 UTC
*** Bug 384437 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2018-11-05 21:44:18 UTC
Fixed in Frameworks 5.51 with the fix for 397742.

*** This bug has been marked as a duplicate of bug 397742 ***