Announcement

Collapse
No announcement yet.

Service Menus with Dolphin

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Re: Service Menus with Dolphin

    Two click wallpaper change
    This was working with the Kubuntu 9.04 / KDE 4.2.4, Kubuntu 9.10 (a6) / KDE 4.3.1

    This is linking to the > Topic: How to change desktop background from dolphin and/or gwenview in kde4?


    > change wallpaper & weather wallpaper
    by JaKi » Thu Aug 27, 2009 3:53 pm

    By now I change my wallpaper through a servicemenu. I have set the wallpaper in that dialog to use ~/background.jpg. And via the picture's servicemenu I copy another file to background.jpg. That works fine except for one exception: the new wallaper only appears after either a relogin or in current session when I open the wallpaper dialog and confirm it without changing anything. So I'd love to call that dialog from the servicemenu.


    by JaKi » Sat Sep 05, 2009 9:33 pm

    I installed the "next wallpaper" widget and it works fine even when the desktop is not in slideshow mode! I now set the wallpaper via my servicemenu (copy the chosen picture to background.jpg) and just have to click on the next wallpaper widget in the panel to let the new wallpaper smoothly blend in (I now use a subdirectory in which background.jpg is the only picture). Nice!

    Making a .desktop file to the ~/.kde/share/kde4/services/ServiceMenus:

    wallpaper.desktop
    Code:
    [Desktop Entry]
    Type=Service
    ServiceTypes=KonqPopupMenu/Plugin
    MimeType=image/*;
    Actions=;SetWallpaper;
    X-KDE-Priority=TopLevel
    X-KDE-Submenu=Image
    
    [Desktop Action SetWallpaper]
    Name=Set Wallpaper
    Icon=folder-image
    Exec=convert "%f" ~/Wallpaper/MyWallpaper.jpg
    Update:
    I'm using the ImageMagic to scale&crop the image:
    Code:
    Exec=convert "%f" -resize 1680x1050^ -gravity center -extent 1680x1050 ~/Wallpaper/MyWallpaper.png

    Making a directory: Wallpaper in the home directory (/home/rog/Wallpaper).

    Click #1
    With the Dolphin > Right clicking the imagefile > Set Wallpaper



    Click #2
    Clicking the plasma-widget-nextwallpaper to show the new wallpaper.

    The wallpaper is changing.


    The "convert is part of the imagemagick. Package: imagemagick.

    man convert:
    NAME

    convert - convert between image formats as well as resize an image, blur, crop, despeckle, dither,
    draw on, flip, join, re-sample, and much more.

    SYNOPSIS
    convert input-file [options] output-file
    The plasma-widget-nextwallpaper is > KDE-Look / Next wallpaper:
    Simple applet that changes the current wallpaper (when in slideshow mode) on command
    It is in the repositories.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

    Comment


      #17
      Re: Service Menus with Dolphin

      I am trying to figure out how to make a service menu that will copy files from one split to the other.
      Any ideas?

      Comment


        #18
        Re: Service Menus with Dolphin

        Click, drag, and drop isn't sufficient
        Using Kubuntu Linux since March 23, 2007
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #19
          Re: Service Menus with Dolphin

          I am trying to figure out how to make a service menu that will copy files from one split to the other.
          Any ideas?
          Yes , you need to get the other "panel" path but there is the problem .

          I looked the qdbus /1/ calls but i didn't find useful for the Dolphin splitted view.


          The Dolphin is a good (light one panel) file manager (> Dolphin philosophy). There is the "copy/move to" (Settings > Configure Dolphin > General > Context Menu > Show "copy To" and "Move To" commands)

          I would use the Krusader /2/ or other twin panel file managers if there is need to move lot of files between panels.


          /1/ (Q)D-Bus
          > D-Bus wiki
          > D-Bus Specification

          /2/ Package: Krusader (http://www.krusader.org/)
          twin-panel (commander-style) file manager

          Krusader is a simple, easy, powerful, twin-panel (commander-style) file
          manager, similar to Midnight Commander (C) or Total Commander (C).

          It provides all the file management features you could possibly want.

          Plus: extensive archive handling, mounted filesystem support, FTP,
          advanced search module, viewer/editor, directory synchronisation,
          file content comparisons, powerful batch renaming and much more.

          It supports archive formats: ace, arj, bzip2, deb, iso, lha, rar, rpm, tar,
          zip and 7-zip.

          It handles KIOSlaves such as smb:// or fish://.

          Almost completely customizable, Krusader is very user friendly, fast and looks
          great on your desktop.
          Before you edit, BACKUP !

          Why there are dead links ?
          1. Thread: Please explain how to access old kubuntu forum posts
          2. Thread: Lost Information

          Comment


            #20
            Re: Service Menus with Dolphin

            Originally posted by Snowhog
            Click, drag, and drop isn't sufficient
            That's what I am doing now.
            But if I could create a service menu to copy from one panel to the other, I could do it without using the mouse, which would be easier.

            Comment


              #21
              Re: Service Menus with Dolphin

              Package naming

              Service menu packages are now (Lucid) : kde-service-menu-<application>


              > Bug #66508: ISO mount from context menu
              >> ISO mounting by default
              >>> [ubuntu/lucid] kde-service-menu-fuseiso 0.1-0ubuntu1 (Accepted)
              Before you edit, BACKUP !

              Why there are dead links ?
              1. Thread: Please explain how to access old kubuntu forum posts
              2. Thread: Lost Information

              Comment


                #22
                Re: Service Menus with Dolphin

                Personal Repository

                Earlier : http://www.kubuntuforums.net/showthr...cal-Repository


                Packages needed:
                • kdesudo
                • konsole
                • dpkg-dev
                • kdebase-bin (kdialog)



                Making a desktop file (add_debbies.desktop)
                Code:
                [Desktop Entry]
                Type=Service
                ServiceTypes=KonqPopupMenu/Plugin
                MimeType=application/x-deb;
                Actions=Add_Debbies;_SEPARATOR_;DebbieSettings;
                Encoding=UTF-8
                X-KDE-Submenu=Personal Repository
                
                [Desktop Action Add_Debbies]
                Type=Application
                Name=Add Debbies
                Icon=application-x-deb
                Exec=debbies-install %f
                 
                [Desktop Action DebbieSettings]
                Type=Application
                Name=Choose Package Manager
                Icon=configure
                Exec=debbies-configure
                and two script files:

                (debbies-configure)
                Code:
                #! /bin/bash
                
                SETTINGS=/home/$USER/.config/kde-service-menu/debbies-install-settings
                
                PACKAGE_MANAGER=`kdialog --title "Input dialog" --inputbox "What package manager would you like to use ?"`
                
                if [ -z "$PACKAGE_MANAGER" ]; then
                  exit
                fi
                
                mkdir -p /home/$USER/.config/kde-service-menu/
                echo "PACKAGE_MANAGER="\"$PACKAGE_MANAGER\" > $SETTINGS
                and (debbies-install):
                Code:
                #! /bin/bash
                
                DIRECTORY="$(dirname "$1")"
                DEBBIE=" deb file:$DIRECTORY ./"
                PERSONAL_REPO=" /etc/apt/sources.list.d/$USER-personal-repository.list"
                SETTINGS=/home/$USER/.config/kde-service-menu/debbies-install-settings
                
                
                kdialog --passivepopup "Writing Packages.gz list"
                cd $DIRECTORY
                dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
                
                # add personal repo to /etc/apt/sources.list.d/
                kdesudo bash -c "echo $DEBBIE > $PERSONAL_REPO"
                
                kdesudo bash -c "konsole -e apt-get update"
                
                # ask package manager
                if [ ! -e "$SETTINGS" ]; then
                  debbies-configure
                fi
                
                # wait package database update to finish
                while  ps -e | grep apt-get > /dev/null ; do
                 sleep 1
                done
                
                . $SETTINGS
                
                kdesudo bash -c "$PACKAGE_MANAGER"

                As a .deb package > PPA for Rog131 >> Package name contains: personal-repository

                About Repositories and PPAs> FAQ: Repositories >> Using the PPA repositories


                Right clicking a .deb package...



                More > Personal Repository - kde servicemenu


                Links:

                > Repositories Personal
                > Creating (Konqueror) Service Menus
                > Shell Scripting with KDE Dialogs
                > Root Sudo
                > Redirect output with sudo
                Last edited by Rog131; Mar 26, 2012, 04:52 AM.
                Before you edit, BACKUP !

                Why there are dead links ?
                1. Thread: Please explain how to access old kubuntu forum posts
                2. Thread: Lost Information

                Comment


                  #23
                  Re: Service Menus with Dolphin

                  i have created a service menu and uploaded it to kde-look.org , it appears under the GHNS menu but it does not install (its a tar.gz package) how can i 'fix' my service menu so it works correctly with GHNS ?
                  btw the service menu is found here.
                  Mark Your Solved Issues [SOLVED]
                  (top of thread: thread tools)

                  Comment


                    #24
                    Re: Service Menus with Dolphin

                    ...under the GHNS menu...
                    GHNS ? probably not > Garden House Nursery School


                    Do mean the "Get Hot New Stuff" and the > Service Menu Manager ?

                    Last comment at the moment:
                    Other problem: some menu file installed from "get new services menu", isn't installed correctly. Example: "Compress and Attach" servicemenus. What is the correct structure of the archive recognized by your program?
                    Or do you mean something else ?
                    Before you edit, BACKUP !

                    Why there are dead links ?
                    1. Thread: Please explain how to access old kubuntu forum posts
                    2. Thread: Lost Information

                    Comment


                      #25
                      Re: Service Menus with Dolphin

                      Originally posted by Rog131
                      Do mean the "Get Hot New Stuff" and the > Service Menu Manager ?
                      yes this is the correct thing. if you dl the archive its 2 .desktop files a shell script to copy them to the proper folder, and a small read me , the service menu manager should only have to exrtract and place the .desktop in the proper folder (same as my sh script does.) is there a guide somewhere to making get hot new stuff tar ball that will extract properly.
                      Mark Your Solved Issues [SOLVED]
                      (top of thread: thread tools)

                      Comment


                        #26
                        Re: Service Menus with Dolphin

                        Oops Dolphin > Settings > Configure Dolphin > Services > Download New Services > GHNS.


                        Hmm - With the Lucid, KDE 4.4.

                        Trying the Download New Services:

                        [img width=400 height=241]http://img337.imageshack.us/img337/2540/failedg.png[/img]
                        Installation failed.
                        Konsole is telling a bit more:
                        dolphin(2667)/knewstuff (api): Command failed
                        Kubuntu forums > Topic: Dolphin send file to Editor

                        With the Maverick, KDE 4.5, same error.


                        #1 Examining a bit - the Download New Services will- with an archive

                        - Download the archive to the ~ /.kde/share/apps/servicemenu-download/
                        - Unpack the archive to the ~ /.kde/share/apps/servicemenu-download/
                        - Make a marking to the ~/.kde/share/apps/knewstuff3/servicemenu.knsregistry
                        - Make the ~/.kde/share/kde4/services/ServiceMenus/ (if it doesn't exist)
                        - The KDE is giving up -> error message.

                        #2 Examining a bit - the Download New Services will- with a desktop file (2video4mobile)

                        - Download the desktop file to the ~ /.kde/share/apps/servicemenu-download/
                        - Make a marking to the ~/.kde/share/apps/knewstuff3/servicemenu.knsregistry
                        - Make the ~/.kde/share/kde4/services/ServiceMenus/ (if it doesn't exist)
                        - Copy the 105149-2video4mobile.desktop to the ~/.kde/share/kde4/services/ServiceMenus/




                        Hmm -


                        --------------- Update ---------------
                        (With the Kubuntu 11.04 alpha-1, KDE 4.6.0)


                        > Bug #706900 - Missing ruby
                        > Bug #667704 - Ruby script can't find installation script

                        --------------- Update ---------------
                        Before you edit, BACKUP !

                        Why there are dead links ?
                        1. Thread: Please explain how to access old kubuntu forum posts
                        2. Thread: Lost Information

                        Comment


                          #27
                          Re: Service Menus with Dolphin

                          Plymouth background and logo images context menu

                          Standard Warning

                          This service menu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


                          Plymouth links > Plymouth III


                          The kde-service-menu-set-plymouth-image needs:


                          Writing a desktop ( > Topic: GtoK: .desktop files) file:
                          Code:
                          [Desktop Entry]
                          Type=Service
                          ServiceTypes=KonqPopupMenu/Plugin
                          MimeType=image/*;
                          Actions=SetPlymouthBackground;SetPlymouthLogo;_SEPARATOR_;TurnOnBlanco;
                          Encoding=UTF-8
                          X-KDE-Submenu=Customize Plymouth
                          
                          [Desktop Action SetPlymouthBackground]
                          Type=Application
                          Name=Set Plymouth Background
                          Icon=fill-color
                          Exec=set-plymout-background "%f"
                          
                          [Desktop Action SetPlymouthLogo]
                          Type=Application
                          Name=Set Plymouth Logo
                          Icon=format-text-color
                          Exec=kdesudo bash -c "convert '%f' /lib/plymouth/themes/blanco/my_logo.png"
                          
                          [Desktop Action TurnOnBlanco]
                          Type=Application
                          Name=Turn On Plymouth Theme Blanco
                          Icon=mail-mark-notjunk
                          Exec=konsole --hold -e sudo bash -c " update-alternatives --config default.plymouth"
                          and a script file (set-plymout-background):
                          Code:
                          #! /bin/bash
                          
                          TARGET="$1"
                          SCREENDIMENSION=` xdpyinfo | grep dimensions | awk -F" " '{ print $2}' `
                          
                          kdesudo bash -c "convert '$TARGET' -resize $SCREENDIMENSION^ -gravity center -extent 
                          $SCREENDIMENSION /lib/plymouth/themes/blanco/my_wallpaper.png"
                          Now it is possible to change the plymouth background and logo images with a right click.




                          An example package > Personal Package Archives for Ubuntu >> PPA for Rog131 >>> Package name contains: plymouth


                          Propellerhead section
                          i.e won't work without modification - it needs your kdm/ksplash themes information.

                          Common Splash From Start To Finish - with a right click
                          (Earlier > Topic: Common Splash From Start To Finish



                          Adding few lines to set the grub, plymouth-theme-blanco, KDM, KSplash and
                          KDE wallpaper/backgrounds. Script file (set-start-to-finish)

                          Code:
                          #! /bin/bash
                          
                          TARGET="$1"
                          SCREENDIMENSION=` xdpyinfo | grep dimensions | awk -F" " '{ print $2}' `
                          
                          USETHISWALLPAPER="/lib/plymouth/themes/blanco/my_wallpaper.png"
                          GRUBWALLPAPER="/usr/share/desktop-base/grub_background.sh"
                          COLORNORMAL="black/black"
                          COLORHIGHLIGHT="green/black"
                          KDMBACKGROUND="/usr/share/kde4/apps/kdm/themes/Rog131/MyWallpaper.png"
                          KSPLASH="/home/rog131/.kde/share/apps/ksplash/Themes/Rog131/1680x1050/MyWallpaper.png"
                          KDEWALLPAPER="/home/rog131/Wallpaper/Next/MyWallpaper.png"
                          
                          # Plymouth
                          kdesudo bash -c "convert '$TARGET' -resize $SCREENDIMENSION^ -gravity center -extent $SCREENDIMENSION $USETHISWALLPAPER"
                          
                          # GRUB
                          kdesudo bash -c "mkdir -p /usr/share/desktop-base/ "
                          kdesudo bash -c "echo WALLPAPER='\042'$USETHISWALLPAPER'\042' > $GRUBWALLPAPER"
                          kdesudo bash -c "echo COLOR_NORMAL='\042'$COLORNORMAL'\042' >> $GRUBWALLPAPER"
                          kdesudo bash -c "echo COLOR_HIGHLIGHT='\042'$COLORHIGHLIGHT'\042' >> $GRUBWALLPAPER"
                          konsole -e sudo update-grub
                          
                          # KDM Splash
                          kdesudo bash -c " kde-cp $USETHISWALLPAPER $KDMBACKGROUND"
                          
                          # KDE Splash
                          kde-cp $USETHISWALLPAPER $KSPLASH
                          
                          # KDE Wallpaper
                          kde-cp $USETHISWALLPAPER $KDEWALLPAPER

                          Now it is possible to set the "Common Splash From Start To Finish" with a right click.




                          More:

                          > Topic: Customizing Kubuntu
                          > Topic: Capturing the images of the ksplash & kdm & ksplash again
                          > Creating Konqueror (KDE) Service Menus
                          > ImageMagick
                          > Two click wallpaper change
                          Last edited by Rog131; Jan 25, 2012, 05:00 AM.
                          Before you edit, BACKUP !

                          Why there are dead links ?
                          1. Thread: Please explain how to access old kubuntu forum posts
                          2. Thread: Lost Information

                          Comment


                            #28
                            Re: Service Menus with Dolphin

                            Removing selected video thumbnails

                            Background > Thumbnail standard etc


                            A desktop file (video-thumb-remover.desktop):
                            Code:
                            [Desktop Entry]
                            Type=Service
                            ServiceTypes=KonqPopupMenu/Plugin
                            MimeType=video/*;application/vnd.rn-realmedia;
                            Actions=RemoveVideoThumb;
                            Encoding=UTF-8
                            X-KDE-Submenu=Video Thumbnail Remover
                            
                            [Desktop Action RemoveVideoThumb]
                            Name=Remove selected thumbnails
                            Icon=edit-delete
                            Exec=video-thumb-remover.pl "%U"
                            and a Perl script (video-thumb-remover.pl):
                            Code:
                            #!/usr/bin/perl -w
                            
                            use URI::Escape;
                            use Digest::MD5 qw(md5_hex);
                            
                            $ARGV[0] =~ s' /' //'g;
                            @FILENAMES = split(' /', $ARGV[0]);
                            
                            foreach $NAME (@FILENAMES) {
                            
                              $FULLNAME = "file://" . $NAME;
                            
                              $ESCAPED = uri_escape("$FULLNAME", "^A-Za-z0-9\-\._~/:()'");
                              $THUMB = md5_hex("$ESCAPED");
                            
                              $THUMBNAME = $THUMB . ".png";
                            
                              unlink("$ENV{ HOME }/.thumbnails/large/$THUMBNAME");
                              unlink("$ENV{ HOME }/.thumbnails/normal/$THUMBNAME");
                            
                            }
                            for ($I=1;$I<9;$I++) { system ("qdbus org.kde.dolphin /dolphin/Dolphin_$I activateAction reload 2>/dev/null"); }
                            Testing, before:




                            Clicking Configure Dolphin > General > Previews and choosing another thumbnailer.

                            Picking selected video clips. Action > Video Thumnail Remover > Remove selected thumbnails.


                            A bit better.



                            Links:
                            > Creating KDE Service Menus
                            > Desktop Entry Specification
                            > URI::Escape - Escape and unescape unsafe characters
                            > Digest::MD5 - Perl interface to the MD5 Algorithm
                            Last edited by Rog131; Jan 25, 2012, 05:01 AM.
                            Before you edit, BACKUP !

                            Why there are dead links ?
                            1. Thread: Please explain how to access old kubuntu forum posts
                            2. Thread: Lost Information

                            Comment


                              #29
                              Re: Service Menus with Dolphin

                              ... few more lines


                              Adding few more lines to the Video Thumb Remover => Video Thumb Fixer.




                              A tool to edit the Thumbnail Attributes (png images)

                              Package: sng, man sng:
                              NAME
                              sng - compiler/decompiler for Scriptable Network Graphics

                              SYNOPSIS
                              sng [-ivV] [file...]

                              DESCRIPTION
                              The sng program translates between PNG (Portable Network Graphics) format and SNG (Scriptable Network Graphics) format. SNG is a printable and editable minilanguage for describing PNG files. With sng, it is easy to view and edit exotic PNG chunks not supported by graphics editors; also, since SNG is easy to generate from scripts, sng may be useful at the end of a pipeline that programmatically generates PNG images...

                              A tool to edit thumbnails with the perl

                              Package: perlmagick
                              Description: Perl interface to the ImageMagick graphics routines
                              PerlMagick is an objected-oriented Perl interface to ImageMagick.
                              Use the module to read, manipulate, or write an image or image sequence from
                              within a Perl script. This makes it very suitable for Web CGI scripts.
                              Homepage: http://www.imagemagick.org/
                              > ImageMagick - PerlMagick API


                              A commandline tool to make multiple thumbnails from a video file

                              Package: ffmpegthumbnailer, man ffmpegthumbnailer:
                              NAME
                              ffmpegthumbnailer - fast and lightweight video thumbnailer

                              SYNOPSIS
                              ffmpegthumbnailer [options]

                              DESCRIPTION
                              Ffmpegthumbnailer is a lightweight video thumbnailer that can be used by file managers to create thumbnails for your video files. The thumbnailer uses ffmpeg to decode frames from the video files, so supported videoformats depend on the configuration flags of ffmpeg.

                              A tool to preview thumbnails and pick one

                              Description: an application to show ffmpegthumbnailer images
                              PictureFlow is a Qt widget to display images with animated transition effect,
                              much like Apple's Cover Flow (used among others in iTunes, Finder, iPhone, and iPod).
                              PictureFlow uses a portable and optimized software renderer and runs smoothly
                              on smartphones and other mobile devices.

                              http://code.google.com/p/pictureflow/

                              The thumbflow is a modified pictureflow. Thumbflow is part of the
                              kde-service-menu-video-thumb-fixer.

                              Cli: thumbflow <backgroundcolor> <image dicectory>



                              It is possible to use the VLC and the SMPlayer to take snapshots from the video files and make thumbnails from the snapshots.




                              It is also possible to pick any image file to thumbnail. If the image is local then there is a KDialog file picker. From the net the image is first downloaded.



                              > Perl HowTo: download a file from the internet


                              An example from the Gnome side

                              > imdb-thumbnailer (a bash script):
                              This is a video thumbnailer that searches imdb for covers based on the file names. It works for movies in the specified paths (recursively). For the rest of the cases or if no cover is found the default thumbnailer is used.


                              Links:

                              > FAQ: Repositories
                              >> Using the PPA repositories
                              >>> PPA for Rog131 >>>> kde-service-menu-video-thumb-fixer
                              Attached Files
                              Last edited by Rog131; Jan 25, 2012, 05:02 AM.
                              Before you edit, BACKUP !

                              Why there are dead links ?
                              1. Thread: Please explain how to access old kubuntu forum posts
                              2. Thread: Lost Information

                              Comment


                                #30
                                Re: Service Menus with Dolphin

                                Remove without shift+delete

                                This is my version of Rog131's script.

                                It works with folder (the -r option was missing). It also asks the user for confirmation before deleting the file\folder, it checks if the operation was completed successfully and if it fails to remove the file\folder it will report back to the user with the description of the error returned by rm.

                                WARNING: as regards folder, it will delete the entire folder tree

                                This is useful to delete a file\folder tree bigger than the trash-bin free space (dolphin will report an error without the possibility to remove the file permanently), or if you are sure you don't want to recover the file afterwards.

                                Create a remove.desktop file. Copy this into the file

                                Code:
                                [Desktop Entry]
                                Type=Service
                                ServiceTypes=KonqPopupMenu/Plugin
                                MimeType=all/allfiles;inode/directory;
                                Actions=remove;
                                Encoding=UTF-8
                                X-KDE-Priority=TopLevel
                                
                                [Desktop Action remove]
                                Type=Application
                                Name=Delete
                                Name[it]=Rimuovi definitivamente
                                Icon=edit-delete
                                Exec=kdialog --warningyesno "The file\folder you selected will be deleted permanently. Are you sure?" && if [ $? = 0 ]; then errormsg=$(rm -f -r "%U" 2>&1 1>/dev/null); if [ $? = 1 ]; then kdialog --error "It is not possible to remove this object\n${errormsg}"; fi; fi
                                Then copy remove.desktop in ~/.kde/share/kde4/services/ServiceMenus (create the folder if it does not exist).

                                Comment

                                Working...
                                X