Want to quickly see the raw data of files in Konqueror or KDevelop? This is possible with the KPart coming with Okteta since KDE 4.1:
Preparations
Open “System Settings”, then select “File Associations” (Found under “Advanced”). Select the file type (e.g. “audio/x-wav”) you want to see the raw data of, choose the tab “Embedding”.
Within “Services Preference Order” press button “Add”, select “Embedded Binary Viewer (oktetapart)” [0] from the list, press “OK”:
If there are already other services listed in the services list make sure the oktetapart is the first entry by selecting it and pressing “Move Up” as often as needed. Press “Apply” and close the System Settings:
[0] Binary Viewer is a misnomer, changed to Hex Viewer for KDE 4.4
Usage
Now start Konqueror and click with your right mouse button on a wav file. In the context menu select “Preview in Embedded Binary Viewer” and you should see the raw data of that file:
In KDevelop you do as you do with text files, just select a wav file and it will be shown as hex view:
Beware: This viewer is only read-only. And while using the Okteta core libs it currently does not come with any of the tools included in Okteta. This hopefully will change for KDE 4.4, but don’t hold your breath (better sit down and help with coding 🙂 ).
Undo
If you want to undo this change for the file type, go to the settings as described above, select “Embedded Binary Viewer (oktetapart)” in the list under “Services Preference Order” and press “Remove”.
Update:
Since its version 4.1 KDevelop has built-in support for viewing and editing of files as byte arrays (of course using the Okteta libraries). To open a file as byte array, use the context menu on a file in the “Filesystem”, “Projects” or “Documents” toolview (by click with the right mouse button) and chose “Open as Byte Array”. So for KDevelop using the Okteta KPart is no longer needed.
[…] under: KDE — by frinring @ 6:26 pm While there already is an Okteta KPart, which can be embedded e.g. into Konqueror, but also KDevelop, it is only used Read-Only. More, the KPart system does not […]
[…] days ago I wrote a mini-tutorial how to use the Okteta KPart in Konqueror/KDevelop. With the mind turned to the Okteta KPart I after that have taken on a long waiting task and […]