Hi all,
I try to add a service menu for KDE which runs one of the simple scripts I made:
mountiso.sh
Code:
#!/usr/bin/env bash
mkdir "$HOME"/ISO/
mkdir "$HOME"/ISO/"$1"
sudo mount -o loop -t iso9660 "$1" "$HOME"/ISO/"$1"/
and
unmountiso.sh
Code:
#/usr/bin/env bash
sudo umount "$1"
rmdir "$HOME"/ISO/"$1"/
I made the following service menu:
mountISO.desktop
Code:
[Desktop Entry]
ServiceTypes=application/x-iso
Actions=MountISO;UnmountISO
X-KDE-Submenu=Mount image
[Desktop Action MountISO]
Name=Mount image
Icon=background
Exec=/home/simkin/Documents/scripts/mountiso.sh %u
[Desktop Action UnmountISO]
Name=Unmount image
Icon=background
Exec=/home/simkin/Documents/scripts/unmountiso.sh %u
When I select an ISO image the submenu is displayed under "actions" and I can choose to mount or unmount the image.
However the only part which is working is that the $HOME/ISO directory is made.
The image itself is not mounted and the directory with the filename ($1) is also not made.
I am very new into scripting and working with service menu`s.
So I am hoping someone is abel to point me in the right direction
Many thanks in advance!