Registered Member
|
A context menu (right-click menu) entry called "checksum" say with options for md5, sha1, sha256 etc would be useful to quickly verify file integrity. If not a new menu entry, then perhaps in the "properties" view of a file there should be a new tab called "checksums" which can be calculated on demand...
Last edited by bcooksley on Sat Apr 04, 2009 9:10 pm, edited 1 time in total.
"Thou shalt not follow the null pointer for at its end madness and chaos lie."
|
Registered Member
|
Any suggestions to add such a context menu myself? I'm running KDE 4.3 RC2 and would like to add right-click menus for files in dolphin to invoke checksum tools and display in a dialog... (unless something is already out there...)
edit: oops, sorry for posting a question in a brainstorm post Found the following link in the mean time, will look at it: http://techbase.kde.org/Development/Tut ... vice_Menus (didnt know it was called "service menu" so wasnt sure what to search for until now)
"Thou shalt not follow the null pointer for at its end madness and chaos lie."
|
Registered Member
|
And a quickie solution! Place the following code as a .desktop file in a "ServiceMenus" subdirectory in either of the paths shown by:
checksum.desktop file:
"Thou shalt not follow the null pointer for at its end madness and chaos lie."
|
Registered Member
|
Improvements to the checksum tool to add 2 new features: Actually try to verify the file integrity by searching for stored checksum files and also display a progress dialog (throbber) while the checksum is being verified so you know something is happening
Copy the following code as root/sudo into a script file, say checkhash.sh, into /usr/bin after making it executable.
Change the checksum.desktop file mentioned in earlier post to have the following code instead:
This is to showcase my lame shell scripting skillz, I'm sure this can be cleaned up some more and bugs found and fixed. Right now, based on convention, it will try to generate the checksum and compare it with any checksums stored in files with SHA256SUMS or MD5SUMS etc in the name. Usually when you download an ISO or something the same web location has the SHA1SUMS file which you normally download to the same local folder. Works well for me after some quick testing, hope it works for you...
"Thou shalt not follow the null pointer for at its end madness and chaos lie."
|
Registered Member
|
"Thou shalt not follow the null pointer for at its end madness and chaos lie."
|
Registered Member
|
We definitely need more Indians on this forum
andre_orwell,
|
Registered Member
|
heh.
but: bug bug bug, i think it cant handle spaces in the paths
"Thou shalt not follow the null pointer for at its end madness and chaos lie."
|
Registered Member
|
more corrected is:
(i add "" to work with file names, which contain " "(space))
Last edited by alex789 on Tue Jul 28, 2009 11:37 am, edited 1 time in total.
|
Registered Member
|
I think this line needs to be corrected, but I will check it maybe during the weekend:
"Thou shalt not follow the null pointer for at its end madness and chaos lie."
|
Registered Member
|
@alex: oh i see, you fixed this line to add the double-quotes, thanks! i will try it to see if it works:
edit: also needed to do the same (add double quotes) for the 2 lines using grep and the filepath line:
i think its working better now, thanks!
"Thou shalt not follow the null pointer for at its end madness and chaos lie."
|
Registered Member
|
Very cool. I'm going to nitpick on the use of quotes around %U in the .desktop file though. They are not necessary and indeed prohibited:
According to http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html : "Field codes must not be used inside a quoted argument, the result of field code expansion inside a quoted argument is undefined. The %F and %U field codes may only be used as an argument on their own." |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot]