LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A simple way to check MD5sum
#1
1. Open the Thunar file manager
2. Click on Edit and then on Configure custom actions
3. Add A new custom action by clicking on a '+' button
4. Enter this in the text boxes:
Name: Check MD5
Description: Computes MD5 checksum for the selected file.
Command:
Code:
zenity --info --title="Check MD5 for %n" --text="$(md5sum %f)"
Icon: You can skip this or choose your the icon of your choice. I've setup a calculator icon.
5. Click on Appearance Conditions tab
6. In the File pattern enter:
Code:
*.iso;*.ISO;*.img;*.IMG
7. Check all boxes except Directories and confirm by clicking on OK
If you have an .iso or .img file on the Desktop you will have to log out and back in to be able to use this.
Now you can right-click on .iso or .img file and Check MD5.
Reply
#2
Another beauty, I might even add this to the next Linux Lite Smile
Reply
#3
Code:
$ apt-cache policy zenity
zenity:
  Installed: 3.8.0-1ubuntu1
  Candidate: 3.8.0-1ubuntu1
  Version table:
*** 3.8.0-1ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages
        100 /var/lib/dpkg/status

Looks like I will do this since zenity comes with the install already.

Nice How to. Thanks. Edit: Done and Done. You might want to edit "Description: Cumputes MD5 checksum for the selected file." to Description: Computes MD5 checksum for the selected file.

Code:
~$ ls
Comics   Documents  Icons   Isos   Pictures  Screeny  Templates  Wallpapers
Desktop  Downloads  Images  Music  Public    Scripts  Videos

PS. I appreciate work like this because I have myself done work like this.

http://antix.freeforums.org/antix-11-eee...t3104.html

So when I say thanks. It comes from a compadre.
LL 3.6,2.8
Dell XT2 > Touchscreen Laptop
Dell 755 > Desktop
Acer 150 > Desktop
I am who I am. Your approval is not needed.
Reply
#4
(08-20-2014, 01:07 AM)Valtam link Wrote: Another beauty, I might even add this to the next Linux Lite Smile
Thanks Valtam. I wasn't sure should I post this as a tutorial or a suggestion. It would be great to see that in the next LL.  Smile
(08-20-2014, 02:30 AM)rokytnji link Wrote: Nice How to. Thanks. Edit: Done and Done. You might want to edit "Description: Cumputes MD5 checksum for the selected file." to Description: Computes MD5 checksum for the selected file.
I mistyped that one, thank you. Smile
(08-20-2014, 02:30 AM)rokytnji link Wrote: PS. I appreciate work like this because I have myself done work like this.

http://antix.freeforums.org/antix-11-eee...t3104.html

So when I say thanks. It comes from a compadre.

Thanks compadre. Smile
Reply
#5
I've improved this.
save this script to /usr/scripts
name it md5
Code:
#!/bin/bash

md5_file="$1"

# Start MD5sum of a selected file
md5sum $md5_file | tee >(cut -d ' ' -f1 > /tmp/sum) |zenity --progress --title="MD5sum" --text="Calculating md5sum for:\n${md5_file##*/}" --pulsate --auto-close

# If Cancel is clicked then remove temporary file and exit
if [ "${PIPESTATUS[2]}" -ne "0" ]; then
rm /tmp/sum
exit 0
fi

# Display calculated md5sum
sum=`cat /tmp/sum`
zenity --info --title="MD5sum" --text="MD5sum : $sum\nFile :          ${md5_file##*/}"
rm /tmp/sum

Name: Check MD5
Description: Computes MD5 checksum for the selected file.
Command:
Code:
/usr/scripts/md5 %f
--------------------------------------------------------------
File pattern:
Code:
*.iso;*.ISO;*.img;*.IMG
Check all boxes except Directories
Reply
#6
Hey Bro. Trying it out. I am missing a step for sure. I get check md5 on right click but nothing happens.
You know. Problem between keyboard and user. As usual.

Code:
harry@biker1:~$ cat /usr/scripts/md5

md5_file="$1"

# Start MD5sum of a selected file
md5sum $md5_file | tee >(cut -d ' ' -f1 > /tmp/sum) |zenity --progress --title="MD5sum" --text="Calculating md5sum for:\n${md5_file##*/}" --pulsate --auto-close

# If Cancel is clicked then remove temporary file and exit
if [ "${PIPESTATUS[2]}" -ne "0" ]; then
rm /tmp/sum
exit 0
fi

# Display calculated md5sum
sum=`cat /tmp/sum`
zenity --info --title="MD5sum" --text="MD5sum : $sum\nFile :          ${md5_file##*/}"
rm /tmp/sum
harry@biker1:~$

[Image: af3205356842561.jpg] [Image: 75e0a9356842576.jpg] [Image: c296c4356842592.jpg]

While in "gksu thunar" /( root thunar file manager). I made the md5 sum text file executable via right click. I also logged in and out a few times.
But no joy bro. I can md5sum through terminal just fine as always. Just playing with your stuff to test out.
Maybe a permissions issue?
LL 3.6,2.8
Dell XT2 > Touchscreen Laptop
Dell 755 > Desktop
Acer 150 > Desktop
I am who I am. Your approval is not needed.
Reply
#7
Hi rokytnji, you must make the script executable
I missed to mention that step. Smile
Oh I see. Smile
You made the owner root
switch it to harry
Code:
sudo chown -R harry /usr/scripts/md5
Reply
#8
Ok. Did That. Though I wonder if maybe it should be

Code:
sudo chown -R harry:harry /usr/scripts/md5

Because she still won't open . Let me check something. I do not feel like rebooting yet. I might be screwing up because of 2 Linux-Lite 2.0 installs on 2 different laptops.

Code:
~$ apt-cache policy zenity
zenity:
  Installed: 3.8.0-1ubuntu1
  Candidate: 3.8.0-1ubuntu1
  Version table:
*** 3.8.0-1ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages
        100 /var/lib/dpkg/status

No. That aint it. Here is relevant info

Code:
harry@biker1:~$ ls -l /usr/scripts/md5
-rwxrwxr-x 1 harry root 479 Oct 10 09:16 /usr/scripts/md5

and for double check before I posted. I did
Code:
harry@biker1:~$ sudo chmod +x /usr/scripts/md5
[sudo] password for harry:
harry@biker1:~$

and logged in and out again to be double sure also.
But nothing opens on my md5 right click thunar custom action on ~/isos/puppy/what ever iso I right click on.
Maybe I am in a bad spot of the universe? :o

Edit: Just in the off chance

Code:
sudo chmod a+x /usr/scripts/md5

plus a reboot gave no positive results either. At least one cannot say I aint trying.  Big Grin
LL 3.6,2.8
Dell XT2 > Touchscreen Laptop
Dell 755 > Desktop
Acer 150 > Desktop
I am who I am. Your approval is not needed.
Reply
#9
It's woking here Smile
https://www.youtube.com/watch?v=m9oTyvhE...e=youtu.be
I made this other script, but it's not for thunar custom action.
This script opens a dialog and then you choose a file.
Code:
#!/bin/bash

# Set the default directory for the file selection dialog
cd $HOME/Downloads

# Select a file
md5_file=(`zenity --title="MD5sum" --file-selection --file-filter="*.iso *.ISO *.img *.IMG"`)

# If Cancel is clicked then exit
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
exit 0
fi

# Start MD5sum of a selected file
md5sum $md5_file | tee >(cut -d ' ' -f1 > /tmp/sum) |zenity --progress --title="MD5sum" --text="Calculating md5sum for:\n${md5_file##*/}" --pulsate --auto-close

# If Cancel is clicked then remove temporary file and exit
if [ "${PIPESTATUS[2]}" -ne "0" ]; then
rm /tmp/sum
exit 0
fi

# Display calculated md5sum
sum=`cat /tmp/sum`
zenity --info --title="MD5sum" --text="MD5sum : $sum\nFile :          ${md5_file##*/}"
# If you want to make  an md5sum file, uncheck the next line
# echo $sum > "$md5_file".md5sum
rm /tmp/sum
Reply
#10
Cool. I am compiling urbanlightscape-1.3.3 at the moment.

Then try checkinstall instead of makeinstall like you mentioned before in the vlc thread.
I don't know where I screwed up using your instructions but I know the problem is with me.
No biggy as I md5sum check through terminal anyways.
As you see from my previous posts.
I am a loosy goosy, not afeared, linux user.
I am always experimenting. customising myself.

For anyone reading this. Tintii does about the same thing as urban lightscape does and it is in Linux-Lite synaptic package manager.

Code:
harry@biker1:~$ apt-cache policy tintii
tintii:
  Installed: 2.8.2-1
  Candidate: 2.8.2-1
  Version table:
*** 2.8.2-1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe i386 Packages
        100 /var/lib/dpkg/status

I am just doing the urban lightscape for practice and grins.

Edit: At least checkinstall worked out for me. My description was short and sweet . Photo editor like in photoshop. I did not create a installed doc. file though since it said generic and this .deb is only for me/myself/and I.

Code:
harry@biker1:~/Downloads/urbanlightscape-1.3.3$ ls
aclocal.m4     configure.ac     install-sh   src
autogen.sh     COPYING          Makefile     urbanlightscape
autotools      depcomp          Makefile.am  urbanlightscape_1.3.3-1_i386.deb
config.log     description-pak  Makefile.in
config.status  help             missing
configure      images           README
harry@biker1:~/Downloads/urbanlightscape-1.3.3$ apt-cache policy urbanlightscape
urbanlightscape:
  Installed: 1.3.3-1
  Candidate: 1.3.3-1
  Version table:
*** 1.3.3-1 0
        100 /var/lib/dpkg/status

[Image: 778258357204111.jpg]
LL 3.6,2.8
Dell XT2 > Touchscreen Laptop
Dell 755 > Desktop
Acer 150 > Desktop
I am who I am. Your approval is not needed.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)