[opensuse] kwrite: how to easily save txt file to remote server using dolphon/fish
Hi, for small changes I used to open the directory on my webserver with dolphin/fish, then open the file with kwrite, add the changes, save, done. But now "save file" or ctrl-s does nothing, except removing the * (signal that file was changed) from the window title, although it actually wasn't saved. Only when I close kwrite it asks me if I want to upload the changes. I never had this strange behavior on 13.2. Is that one of the new "backwards-features" of leap/kde5 and can one generally not easily use local kwrite for remote files anymore? Just as it lost it's ability of spell checking? Or can I change a setting somewhere so that kwrite behaves normal again? Thanks for hints! Daniel <rant> (Sorry for the annoyed tone. But since I installed this leap thing I more and more get the impression that some key developers must be paid by microsoft or apple to annoy people away from linux. So many things that worked for years simply do not exist anymore. Is linux already part of the past?) </rant> -- Daniel Bauer photographer Basel Barcelona http://www.daniel-bauer.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 23/08/2016 à 17:25, Daniel Bauer a écrit :
Hi,
for small changes I used to open the directory on my webserver with dolphin/fish, then open the file with kwrite, add the changes, save, done.
But now "save file" or ctrl-s does nothing, except removing the * (signal that file was changed) from the window title, although it actually wasn't saved.
I juste tested, and kwrite works as expected (Leap 42.1 on both sides) jdd -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/23/2016 11:25 AM, Daniel Bauer wrote:
Or can I change a setting somewhere so that kwrite behaves normal again?
Well there is the 'settings' you might look at to see what's there. There might be something relevant, who knows?
Thanks for hints!
Either as a strategy or as a comparison, what happens if instead of kwrite, and I presume you're dealing with plain text, you try using VIM, or in its graphical form, 'gvim' == /usr/bin/gvim Just curious to see if the problem is with the editor or the way you are accessing the file. I'm not clear from your description if you are editing the file in the file system "behind" the web server or going "through" the web server to access it. I can read what you've written either way. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton Aylward wrote:
On 08/23/2016 11:25 AM, Daniel Bauer wrote:
Or can I change a setting somewhere so that kwrite behaves normal again?
Well there is the 'settings' you might look at to see what's there. There might be something relevant, who knows?
Thanks for hints!
Either as a strategy or as a comparison, what happens if instead of kwrite, and I presume you're dealing with plain text, you try using VIM, or in its graphical form, 'gvim' == /usr/bin/gvim
Just curious to see if the problem is with the editor or the way you are accessing the file. I'm not clear from your description if you are editing the file in the file system "behind" the web server or going "through" the web server to access it. I can read what you've written either way.
To me, Daniel's clearly accessing the webserver using fish:// from dolphin. If he was editing directly on the webserver, the issue would not exist. -- Per Jessen, Zürich (26.2°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/23/2016 12:07 PM, Per Jessen wrote:
To me, Daniel's clearly accessing the webserver using fish:// from dolphin. If he was editing directly on the webserver, the issue would not exist.
To me, you are being ambiguous. "Editing directly on the webSERVER" That could mean the program or the machine. Accessing the file directly, be it from the same machine just like a regular file on a file ssytem or a NFS mount is one thing. As far as I can make out, FISH means that the file is TRANSFERRED, that is a copy is made and downloaded to the client machine. it is edited, as a copy, on the client machine. Now you may say that even on a regular file system the editor works with a copy, which is written back on file close, and that's true. The assumption that Daniel is making is that there is a temporary copy transferred (aka downloaded, which web servers are wont to do), a temporary copy of the temporary copy is edited, the temporary copy of the temporary copy is written to the temporary copy and finally the temporary copy is coped back by the FISH protocol and the web server accepts it. A number of things about this occur to me. a) I'm not sure that FISH copies back. Does it? b) I can't see a regular simply accepting an upload in a eciprocal fashion to the download. c) Shouldn't he be using some WebDAV type of thing to support the upload. I mention (c) because I DO maintain files in a similar manner with my openCloud server. Either way, I'd like to see the server logs surrounding the transaction. I'm sure they can be isolated. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton Aylward wrote:
On 08/23/2016 12:07 PM, Per Jessen wrote:
To me, Daniel's clearly accessing the webserver using fish:// from dolphin. If he was editing directly on the webserver, the issue would not exist.
To me, you are being ambiguous. "Editing directly on the webSERVER"
That could mean the program or the machine.
Anton, I think you're being deliberately obtuse.
The assumption that Daniel is making is that there is a temporary copy transferred (aka downloaded, which web servers are wont to do), a temporary copy of the temporary copy is edited, the temporary copy of the temporary copy is written to the temporary copy and finally the temporary copy is coped back by the FISH protocol and the web server accepts it.
That is how it works, yes.
A number of things about this occur to me.
a) I'm not sure that FISH copies back. Does it?
Yes. I admit to never using it like that, but the way Daniel described how it used to work, yes. The whole idea of fish:// is to make that remote file access as transparent as possible.
c) Shouldn't he be using some WebDAV type of thing to support the upload.
If WebDAV is available, he could, but he doesn't have to. fish:// is perfectly fine for accessing over ssh when that's available. -- Per Jessen, Zürich (25.6°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am 23.08.2016 um 17:54 schrieb Anton Aylward:
On 08/23/2016 11:25 AM, Daniel Bauer wrote:
Or can I change a setting somewhere so that kwrite behaves normal again?
Well there is the 'settings' you might look at to see what's there. There might be something relevant, who knows?
Thanks for hints!
Either as a strategy or as a comparison, what happens if instead of kwrite, and I presume you're dealing with plain text, you try using VIM, or in its graphical form, 'gvim' == /usr/bin/gvim
Just curious to see if the problem is with the editor or the way you are accessing the file. I'm not clear from your description if you are editing the file in the file system "behind" the web server or going "through" the web server to access it. I can read what you've written either way.
I just installed gvim. The same happens, but due to your and other answers I tried around several possibilities to open the file, and: it's strange. I do the following: - on my local laptop I open dolphin and in the address bar type: fish://username@address_of_my_webserver/directory/directory/ - the directory contents are shown - I right click on the file (because it is a html file that I want to open in the editor and not in a browser) and choose "open with" No comes the magic: if I just tipe "kwrite" (or gvim) in the field of the open-with-dialog as I always did, the file gets opened with the respective editor, but in the window title a number is set before the file name (e.g. sample.html gets 6361_0_sample.html). Obviously instead of the file itself, a copy was created (well, that’s what I think now...) In this case, the file does NOT get saved on the server, only when closing the window I am asked if I want to "upload" it, and when I y say yes, after asking if I want to overwrite, it gets saved on the server. BUT if I go down the tree of "known applications" in the open-with-dialog, click on "Dienstprogramme" (tools?) to open the subtree, scroll down that list and then click on kwrite... it opens the file without number-prefix, and saving saves the file... The same applies when I search and click gvim from the list instead of typing it's name n the field... Also it behaves normal when I left click on a file who's type is asigned to kwrite on my system (as .txt, .css etc.). For obvious reasons I don't want to assign kwrite as standard app for html and thus must go thru the "open with" dialog. So there is a new difference added between simply typing the programs name or searching it in the list and then click it from there. Can I get rid of this difference somehow? Daniel -- Daniel Bauer photographer Basel Barcelona http://www.daniel-bauer.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/23/2016 12:31 PM, Daniel Bauer wrote:
Am 23.08.2016 um 17:54 schrieb Anton Aylward:
On 08/23/2016 11:25 AM, Daniel Bauer wrote:
[snip]
I do the following: - on my local laptop I open dolphin and in the address bar type: fish://username@address_of_my_webserver/directory/directory/ - the directory contents are shown - I right click on the file (because it is a html file that I want to open in the editor and not in a browser) and choose "open with"
No comes the magic:
if I just tipe "kwrite" (or gvim) in the field of the open-with-dialog as I always did, the file gets opened with the respective editor, but in the window title a number is set before the file name (e.g. sample.html gets 6361_0_sample.html). Obviously instead of the file itself, a copy was created (well, that’s what I think now...)
Of course. See my other post. FISH is file transfer protocol. You have transferred using SSH - or SFTP or SCP perhaps, take a look at the relevant man pages[1] - a copy of that file to your local machine. You then edit that copy. Oh, right, you don't edit that copy, the editor makes a temporary copy of that downloaded file, and when you close the editor or do a save, it writes to that downloaded copy. You then need the reciprocal FISH 'magic' (SSH, SFTP or SCP) to put the edited copy onto the web server
In this case, the file does NOT get saved on the server, only when closing the window I am asked if I want to "upload" it, and when I y say yes, after asking if I want to overwrite, it gets saved on the server.
And ....? You don't say if that amounts to success. If it does, then what's the problem?
BUT
if I go down the tree of "known applications" in the open-with-dialog, click on "Dienstprogramme" (tools?) to open the subtree, scroll down that list and then click on kwrite... it opens the file without number-prefix, and saving saves the file...
I'm sorry. you mow have me confused. Where are you doing this? Is this an alternative to the FISH download? Is this an alternative to using kwrite or gvim?
The same applies when I search and click gvim from the list instead of typing it's name n the field...
Confused again. What field?
Also it behaves normal when I left click on a file who's type is asigned to kwrite on my system (as .txt, .css etc.).
I presume here you're talking about using dolphin to 'open' a file locally. I ask this because I use Konqeror for everything, not Dolphin, and so have to do mental mapping. For me, left click opens using the configured default for that file type. I presume that's what you mean here.
For obvious reasons I don't want to assign kwrite as standard app for html and thus must go thru the "open with" dialog.
OK, I have right-click on a "text" file in Konq and get a menu with an 'open with" and list of possible, preconfigured and alterable, tools. I don't have a field to type things in. Momment while I try Dolphin. No, I still don't see a field to tye, just the same menu as with Konq.
So there is a new difference added between simply typing the programs name or searching it in the list and then click it from there.
So I can't answer that from experience/testing, but I shouldn't think so. [1] And at https://en.wikipedia.org/wiki/Files_transferred_over_shell_protocol -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 23/08/2016 à 19:36, Anton Aylward a écrit :
FISH is file transfer protocol. You have transferred using SSH - or SFTP or SCP perhaps, take a look at the relevant man pages[1] - a copy of that file to your local machine. yes
You then edit that copy.
Oh, right, you don't edit that copy,
yes, you do (with kwrite). When you do a save, kwrite notify you that the file is uploaded to the original online one Some time ago, this didn't worked with gvim, but I didn't test it for a while jdd -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am 23.08.2016 um 19:36 schrieb Anton Aylward:
On 08/23/2016 12:31 PM, Daniel Bauer wrote:
Am 23.08.2016 um 17:54 schrieb Anton Aylward:
On 08/23/2016 11:25 AM, Daniel Bauer wrote:
[snip]
BUT
if I go down the tree of "known applications" in the open-with-dialog, click on "Dienstprogramme" (tools?) to open the subtree, scroll down that list and then click on kwrite... it opens the file without number-prefix, and saving saves the file...
I'm sorry. you mow have me confused. Where are you doing this? Is this an alternative to the FISH download? Is this an alternative to using kwrite or gvim?
The same applies when I search and click gvim from the list instead of typing it's name n the field...
Confused again. What field?
Ok, I have dolphin open, in it's address line I have the fish://adress..., the files of the server directory are listed, I right click on one and I get this menu: http://www.daniel-bauer.com/test/1menu.jpg I click "Öffnen mit..." (open with) and get this dialog: http://www.daniel-bauer.com/test/2menu.jpg If I write "kwrite" in the filed above and hit enter, I get that copy with an added number and ctrl-s does /not/ save the file to the server. But when I click on KWrite in the list of "Dienstprogramme" I get the normal file, and whenever I crtl-s the file gets saved on the server. That's the normal behavior I always had (up to 13.2) with just typing kwrite... (I enlarged the dialog for the screenshot, usually the list is smaller and the sublist "Dienstprogramme" is closed. So I have to click to open the sublist, then scroll down, then click on kwrite. Just typing it is way faster...) ( with local files the menu is different, then it shows the assigned programs and the above dialog would only appear after clicking on "Weitere..." (more) http://www.daniel-bauer.com/test/3menu.jpg ) -- Daniel Bauer photographer Basel Barcelona http://www.daniel-bauer.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-08-24 12:56, Daniel Bauer wrote:
Ok, I have dolphin open, in it's address line I have the fish://adress..., the files of the server directory are listed, I right click on one and I get this menu:
http://www.daniel-bauer.com/test/1menu.jpg
I click "Öffnen mit..." (open with) and get this dialog:
http://www.daniel-bauer.com/test/2menu.jpg
If I write "kwrite" in the filed above and hit enter, I get that copy with an added number and ctrl-s does /not/ save the file to the server.
It makes sense. With a number added it is a temporary or work copy, not the actual file, so it doesn't save directly. Only on end. Why it does add the number, I do not know. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On 2016-08-23 18:31, Daniel Bauer wrote:
No comes the magic:
if I just tipe "kwrite" (or gvim) in the field of the open-with-dialog as I always did, the file gets opened with the respective editor, but in the window title a number is set before the file name (e.g. sample.html gets 6361_0_sample.html). Obviously instead of the file itself, a copy was created (well, that’s what I think now...)
In this case, the file does NOT get saved on the server, only when closing the window I am asked if I want to "upload" it, and when I y say yes, after asking if I want to overwrite, it gets saved on the server.
Methinks that the user (uid) is not the same locally and remotely. Ie, that there is a user-change somewhere. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Le 23/08/2016 à 23:57, Carlos E. R. a écrit :
Methinks that the user (uid) is not the same locally and remotely. Ie, that there is a user-change somewhere.
I don't use same user... jdd -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-08-24 00:50, jdd wrote:
Le 23/08/2016 à 23:57, Carlos E. R. a écrit :
Methinks that the user (uid) is not the same locally and remotely. Ie, that there is a user-change somewhere.
I don't use same user...
Perhaps the remote user doesn't own the file that is being edited. Or the directory. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Am 24.08.2016 um 01:01 schrieb Carlos E. R.:
On 2016-08-24 00:50, jdd wrote:
Le 23/08/2016 à 23:57, Carlos E. R. a écrit :
Methinks that the user (uid) is not the same locally and remotely. Ie, that there is a user-change somewhere.
I don't use same user...
Perhaps the remote user doesn't own the file that is being edited. Or the directory.
Of course the local user and the remote user are not the same. But I log in via fish as the user on the server, so I should have the file as the "server-user". However, all the circumstances are the same whether in the open-with-dialog I type "kwrite" or I click on kwrite in the list of available programs in that dialog. But when I do it the click-way it works as I like it, and when I write it, it does not. This in the very same dolphin/fish session. What is the difference between writing kwrite and clicking kwrite? This is what I do not understand... -- Daniel Bauer photographer Basel Barcelona http://www.daniel-bauer.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-08-24 12:36, Daniel Bauer wrote:
Am 24.08.2016 um 01:01 schrieb Carlos E. R.:
On 2016-08-24 00:50, jdd wrote:
Le 23/08/2016 à 23:57, Carlos E. R. a écrit :
Methinks that the user (uid) is not the same locally and remotely. Ie, that there is a user-change somewhere.
I don't use same user...
Perhaps the remote user doesn't own the file that is being edited. Or the directory.
Of course the local user and the remote user are not the same. But I log in via fish as the user on the server, so I should have the file as the "server-user".
What I mean is that I have seen similar things related to permission issues. I don't use kwrite in this mode, so I can't be precise. Yes, of course the local user does not matter. Maybe the permissions of the file you are editing do not match with the user used for fish? -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Am 24.08.2016 um 13:14 schrieb Carlos E. R.:
On 2016-08-24 12:36, Daniel Bauer wrote:
Am 24.08.2016 um 01:01 schrieb Carlos E. R.:
On 2016-08-24 00:50, jdd wrote:
Le 23/08/2016 à 23:57, Carlos E. R. a écrit :
Methinks that the user (uid) is not the same locally and remotely. Ie, that there is a user-change somewhere.
I don't use same user...
Perhaps the remote user doesn't own the file that is being edited. Or the directory.
Of course the local user and the remote user are not the same. But I log in via fish as the user on the server, so I should have the file as the "server-user".
What I mean is that I have seen similar things related to permission issues. I don't use kwrite in this mode, so I can't be precise.
Yes, of course the local user does not matter. Maybe the permissions of the file you are editing do not match with the user used for fish?
But why is there a difference whether I open the file typing "kwrite" or clicking on kwrite? It's the same session, the same dolphin window, the same fish connection, the same open-with dialog. The only difference is that I write the programs name or I click on it. I just don't get it... -- Daniel Bauer photographer Basel Barcelona http://www.daniel-bauer.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-08-24 13:45, Daniel Bauer wrote:
But why is there a difference whether I open the file typing "kwrite" or clicking on kwrite? It's the same session, the same dolphin window, the same fish connection, the same open-with dialog. The only difference is that I write the programs name or I click on it. I just don't get it...
Me neither. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On 24.08.2016 07:45, Daniel Bauer wrote:
But why is there a difference whether I open the file typing "kwrite" or clicking on kwrite? It's the same session, the same dolphin window, the same fish connection, the same open-with dialog. The only difference is that I write the programs name or I click on it. I just don't get it...
I guess that when you click on the "kwrite" entry from the list of configured applications, then actually a *.desktop KDE shortcut will be executed (in the only test system I have at hand at the moment this would be /usr/share/applications/org.kde.kwrite.desktop). If you just type "kwrite", then it's probably "only" a command execution like from the command line (including the file path as an argument). Could it be that the KDE shortcut sets special command line parameters for kwrite and/or KDE specific context information which make the difference in this case? This is for someone else to answer, though... HTH, Andreas -- Cahn's Axiom: When all else fails, read the instructions. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am 24.08.2016 um 17:01 schrieb Andreas Mahel:
On 24.08.2016 07:45, Daniel Bauer wrote:
But why is there a difference whether I open the file typing "kwrite" or clicking on kwrite? It's the same session, the same dolphin window, the same fish connection, the same open-with dialog. The only difference is that I write the programs name or I click on it. I just don't get it...
I guess that when you click on the "kwrite" entry from the list of configured applications, then actually a *.desktop KDE shortcut will be executed (in the only test system I have at hand at the moment this would be /usr/share/applications/org.kde.kwrite.desktop). If you just type "kwrite", then it's probably "only" a command execution like from the command line (including the file path as an argument).
Could it be that the KDE shortcut sets special command line parameters for kwrite and/or KDE specific context information which make the difference in this case? This is for someone else to answer, though...
HTH, Andreas
Ha! Thanks Andreas. I checked the desktop entry for kwrite and the execute command is "kwrite %U". So I typed that instead of simply "kwrite" and - oh miracle - it works! I googled for %U but couldn't understand the explanations i found. Anyway. I still wonder why this was not necessary on 13.2 while now obviously I must type %U. (It's no problem now that I know it, I just wonder why it wasn't necessary before, or better said, why it is necessary now). -- Daniel Bauer photographer Basel Barcelona http://www.daniel-bauer.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-08-24 17:40, Daniel Bauer wrote:
Ha! Thanks Andreas. I checked the desktop entry for kwrite and the execute command is "kwrite %U".
So I typed that instead of simply "kwrite" and - oh miracle - it works!
I googled for %U but couldn't understand the explanations i found. Anyway. I still wonder why this was not necessary on 13.2 while now obviously I must type %U. (It's no problem now that I know it, I just wonder why it wasn't necessary before, or better said, why it is necessary now).
"%U" is replaced with "something". It's a placeholder for the full file name, probably, described wherever desktop files are described. man desktop-file-validate For information about the Desktop Entry specification, see http://freedesktop.org/wiki/Specifications/desktop-entry-spec. And sure enough, there is a table: Code Description %u A single URL. Local files may either be passed as file: URLs or as file path. %U A list of URLs. Each URL is passed as a separate argument to the executable program. Local files may either be passed as file: URLs or as file path. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
participants (6)
-
Andreas Mahel
-
Anton Aylward
-
Carlos E. R.
-
Daniel Bauer
-
jdd
-
Per Jessen