Bug 380349 - Some remote (sftp) files are opened via temp-file instead of remote URL although command is "kwrite %u"
Summary: Some remote (sftp) files are opened via temp-file instead of remote URL altho...
Status: RESOLVED DUPLICATE of bug 397742
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 17.04.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 384437 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-30 08:25 UTC by H.H.
Modified: 2018-11-05 21:44 UTC (History)
2 users (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 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 ***