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.

Revisions

  1. dev-rfc created this gist May 27, 2022.
    30 changes: 30 additions & 0 deletions yaimuds.desktop
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    ; 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/'