Bookmarks Widget for Plasma now part of kdeplasma-addons

The Bookmarks Widget for Plasma is now part of the kdeplasma-addons module, so it should be included in the KDE SC 4.5 (coming in summer 2010). It a pretty simple widget for now (thus version 0.1) which offers you quick access to your (Konqueror) bookmarks, using the plain-old-style menu-with-submenu, as can be seen here (yes, KDE is not a project, but a community, too lazy to update the example data):

You can also set another bookmarks submenu as base folder. Or start the bookmarks editor from the context menu.

More plasmoid UI alternatives, like a Kickoff-style menu navigation, yet to come.
Also hoping for a soonish movement of the bookmark system to Akonadi and Nepomuk, so integration of other bookmarks systems (delicious, Firefox, Chrome, whatever) is done at the right level. It won’t be done by this widget (code). Anybody interested to join this work?

Advertisements

Tutorial: Create your own Okteta structure definitions

The best new feature in the soon to be released version 0.4 of Okteta, the KDE hex editor, coming with the KDE SC 4.4, is surely the Structures tool (see also the “All new Okteta features for KDE SC 4.4 in a picture”). Because this tool is just a few months old, his author Alex concentrated on the code and not on the documentation, so the Okteta docs in the 4.4 branch have been missing any note of it. But Burkhard Lück, one of the heros of KDE documentation, pushed Alex and me to update the documentation in trunk at least with some quickly written text, so he might be able to backport it to 4.4, with success. If all works out, the updated doc will be part of the 4.4.1 release. So spend Burkhard a big $favourite_drink if this makes you happy 🙂

(Update: The updated manual is now part of the releases starting with 4.4.1 and also online available.)

Until then, find following the excerpt regarding the creation of structure definition. It is lazily copy-pasted from the meinproc4 generated html, hopefully doesn’t break too much of webpages embedding this. Please give this tool and the docs a try (e.g. if testing the RC1, where Okteta is part of kdeutils), feedback is very much welcome:


General

The Structures tool enables analysing and editing of byte arrays
based on user-creatable structure definitions, which can be built from
arrays, unions, primitive types and enum values.

It has an own settings dialog, which can be reached by using the
Settings button. There are various options that can be
configured, like the style (decimal, hexadecimal or binary) in which the
values are displayed. Moreover it is possible to choose which structure
definitions get loaded and which structures are shown in the view.

Structures are defined in Okteta Structure Definition files (based
on XML, with the file extension .osd).
Additionally a .desktop file contains
metadata about that structure description file, such as author, homepage
and license.

Currently there is no built-in support for creating, editing or
installing structure definitions, so this must be done manually as
described in the next sections.

Continue reading

All new Okteta features for KDE SC 4.4 in a picture

Bringing the largest disappointment first: this will be yet another release of Okteta, the KDE Hex Editor, in which it still cannot handle very large files (still loads files completely into memory). And another, minor one: bookmarks aren’t saved, either.
Sad, I know…

Now after you hopefully have coped with this and started to consider your participation in the development of Okteta 🙂 let’s have the meanwhile traditional look (like done for 4.2 and 4.3) at what Okteta gained for the upcoming release:

For those who happen to have read the last blog entries there should not be any big surprise, though, the different additions have been covered now and then:

  • Splitted views, so the same byte array can be looked at with different ranges and settings
  • Data generators: are used both to create new byte arrays or to insert into existing ones (available: Pattern, Random, Sequence)
  • “Select range” tool allows to directly enter the range of the selected bytes
  • Embedded dialogs for “Select Range” and “Go to Offset” (not yet for Search/Replace)
  • Drag’n’drop of data onto free space of the mainwindow creates new byte array with the data as content (still loads the files for URLs, and just takes the first option if multiple mimetypes are available)
  • Values in the Decoding table can now be edited and are synched back to the byte array (not with UTF-8, handling of possibly changing byte count not done in time)
  • Last, but best: the new Structures tool (from Alex Richardson)!

Not visible in the picture:

  • “Export/Copy As…” has received another format: Base64
  • Search/Replace tools also take UTF-8 input (but only case-sensitive for now)

More in-depth blog entry about the Structure tool is scheduled for next week, please stay patient if you are interested in this.

Redrawn from this release:
Other than written before here and here the headers of the Okteta libs and the Designer plugin are not yet installed in this release. So if you are looking to use the libs you would have to take a full copy of the sources for now. But for the 4.5 release of the KDE SC this should be finally happening, will soon again switch on the installation of both in trunk.

Estimating filename encodings with Okteta

Today I had to make a backup of a user’s complete home directory on a remote system. Options might have been scp or similar, but I opted for the KDE way: Opening a Konqueror with sftp://user@host/ and a Konqueror with a local directory. Set “Show hidden files” to true, selected all directories and files in the home directory (don’t ask me why I didn’t just select the home directory itself, perhaps I wanted to see what I was copying), then drag’n’dropped all into the local directory.

Fine so far: the sftp kio-slave started to collect all dirs and files (more than expected, I had missed some copies of big Java libraries, bah), did so for a while, until it complained about some file names with unknown chars in it (�). Turned out there had been a system update which changed the official encoding of the file names to UTF-8, without touching existing names. Which hurts if you use non-ASCII characters, like you do if your language has e.g. umlaute. And then there were several file transfers from different operating systems which used even other encodings (remember, with unixoid(?) systems the filenames inside the filesystem are just handled as strings of bytes, and it’s up to the programs/libs to do the de-/encoding, based on environment variables).

Now there is a great feature with Konqueror (or the sftp kio-slave?) that you can set the encoding to apply for the names in the remote filesystem (menu “Extras”->”Set remote encoding”). But this only works, if there is exactly one and not several encodings which have been used for the file names, like in this case.

Remote commandline access and convmv from Björn Jacke to the rescue. First guess for the old names was ISO 8859-1, which solved most, but not all. As I am not too experienced which encoding with which strange name has been used on what system, for the rest I tried two or three which sounded familiar, but was not successfull. As it was quite a little bit of work to change the encoding all the time in the -to parameter of the commandline, I… no, did not write a foreach loop with a pause (Bash syntax is not in my sleeves), but just had the bytes of the filenames in question written in a file, with
ls --literal >listing
And bytes in a file, yes, can be looked at with Okteta 🙂
Right clicked on the file “listing” in the Konqueror view of files accessed with sftp, “opened with” Okteta, put the mouse cursor over the char encoding combobox in the status bar, then passed through the encodings with the wheel, until the char in question showed the expected letter. Gave that encoding as parameter to convmv, repeated the same with another name in yet another encoding, finally convmv reported no other name not encodable with UTF-8, puh. Not a usecase I had in mind for Okteta, so far 😉

Now repeated the initial drag’n’dropping and had all files backup’ed. Including original timestamp, but ownership updated to my local account. Like I would have liked it. That part was also a pleasure, Konqueror, Dolphin-KPart and sftp kio-slave authors, thanks 🙂

Update: Just curious. What would have been the real admin’s approach to this problem?

Happy 2010, with and without Okteta!

Hope you also have had a good jump into the Year of the Linux Deskt^W Mobile… or… whatever, may it be enjoyful!

More smoke and noise than lights from fireworks there was to see on midnight, even though the place to watch (Marienbrücke in Dresden) was chosen with thoughts on wind direction and view, oh well. Still it was impressive, with reflections on the water of the river and the silhouette of the historic buildings. Like every year, hopefully it never gets boring. Well, that part might also be ensured, seeing how other people handle their fireworks… 😉 There was quite a number of ambulances having their standby position on the bridge, too, and soon after midnight they started to go one after the other…

Waking up today the world was once more turned into an innocent clean white, with no wind and the city silence of a holiday, like for a fresh start 🙂

A nice start into a New Year it is also if the first thing you read is a happy report about stuff you produced the last year, here Zecke’s blog about his success in Reverse engineering with Okteta.
Now, he and all others interested in this might even be more pleased with the new version 0.4 of Okteta coming with KDE SC 4.4. There the values in the Decoding table can now be also edited (besides the UTF-8 value, due to non-constant numbers of bytes, hopefully solved in the version after). And the bytes used by the type are now highlighted.
And better: There is a new tool named Structures, done by Alex Richardson, which enables you to decode and edit whole structures. It has been in development only since a few months, so while basically working it has some glitches, but we follow the release-often-and-early mantra, to get your feedback for guidance. See the screenshot for an inspection of a PNG file header:

More on this new tool, like creating and installing your own structure description, hopefully soon in another blog. Now on for a relaxing New Year’s day 🙂