Development/Tutorials/Debugging/Debugging IOSlaves/Debugging kio fish: Difference between revisions

From KDE TechBase
(Replaced content with link to Community WIki.)
 
(18 intermediate revisions by one other user not shown)
Line 1: Line 1:
This page is a starting point for debugging kio_fish. Please also read [[Development/Tutorials/Debugging/Debugging_IOSlaves|how to debug IO slaves generically]].
Moved to the [https://community.kde.org/Guidelines_and_HOWTOs/Debugging/Debugging_IOSlaves/Debugging_kio_fish Community wiki].
 
= Bugs =
Interesting bugs to get into the topic
* [http://bugs.kde.org/show_bug.cgi?id=147948 copying via fish stalls]
* [http://bugs.kde.org/show_bug.cgi?id=145123 fish protocol dies unexpectedly]
 
= Overview =
When you point your konqueror to fish://''user''@''target'', [http://websvn.kde.org/trunk/KDE/kdebase/runtime/kioslave/fish/fish.cpp?view=log the fish kioslave] opens a process that calls the executable ssh. If a password is needed, this question is passed on to you (search for "password" in fish.cpp). Then a [http://websvn.kde.org/trunk/KDE/kdebase/runtime/kioslave/fish/fish.pl?view=log perl script] is copied over to the target host and executed there. On the target host, the file is named .fishsrv.pl. This perl script is compiled into your binary kio_fish.o. If you want to change it sustainably, you will have to change fish.pl in your source dir and then compile and install the directory [http://websvn.kde.org/trunk/KDE/kdebase/runtime/kioslave/fish/ kioslave/fish].
 
The perl script, running on the target computer, is (t)here to execute fish commands like LIST, STAT, WRITE and APPEND. They are sent from fish.cpp running on the source computer.
 
= Manually testing fish =
To test fish manually, call ~/.fishsrv.pl. The fish server will ask you in friendly words (it says ### 100) to transmit its own code, followed by a line __END__. Transmit it. Then the fish server is ready to talk with you (it says ### 200). You can have a conversation like this:
### 200
#VER
VER 0.0.3 copy lscount lslinks lsmime exec stat
### 200
 
So here is how you can have a sensible communication with a fish server:
echo __END__>endfile.txt; cat .fishsrv.pl - | perl .fishsrv.pl

Latest revision as of 11:50, 28 April 2019

Moved to the Community wiki.