Skip to content

Instantly share code, notes, and snippets.

@dev-rfc
Created May 27, 2022 22:35
Show Gist options
  • Save dev-rfc/6be9e01da4426353eca3d84ca30b10c3 to your computer and use it in GitHub Desktop.
Save dev-rfc/6be9e01da4426353eca3d84ca30b10c3 to your computer and use it in GitHub Desktop.
Yet another ISO Mount/Unmount Dolphin Service
; Yet another ISO Mount/Unmount Dolphin Service
;
; Installation
; Copy this file to ~/.local/share/kservices5/ServiceMenus/ and restart Dolphin
;
; https://github.com/dev-rfc
[Desktop Entry]
Type=Service
Icon=media-optical-symbolic
MimeType=application/x-cd-image;application/x-raw-disk-image;model/x.stl-binary
Actions=mount;unmount;
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
X-KDE-Priority=TopLevel
X-KDE-Submenu=ISO Image
X-KDE-Submenu[pt_BR]=Imagem ISO
Encoding=UTF-8
[Desktop Action mount]
Name=Mount ISO
Name[pt_BR]=Montar ISO
Icon=media-optical-symbolic
Exec=pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY sh -c 'mkdir -p /media/iso && mount -r -o loop "%f" /media/iso'; dolphin /media/iso
[Desktop Action unmount]
Name=Unmount ISO
Name[pt_BR]=Desmontar ISO
Icon=media-eject
Exec=pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY sh -c 'umount /media/iso/'
@dev-rfc
Copy link
Author

dev-rfc commented May 27, 2022

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment