Announcement

Collapse
No announcement yet.

Disable Trash / KGPG Default Setting / Context Menu

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

    Disable Trash / KGPG Default Setting / Context Menu

    Hi guys

    3 wishes at the same time..

    1. I would like to disable system wide the use of trash (dumbest invention, imho). The goal is, whenever I press "delete" or choose "remove/delete" from a context menu, it should ask me "Would you like to delete file/folder xyz?" and after choosing "yes" simply delete it.

    2. When I right click on a folder/file and choose "Actions=>Encrypt File/Folder" it should just ask me after the symmetric password I would like to choose (incl. re-type) and then just put it at the same location where the source is. No asking about saved key-profiles and clicking "options" choosing symmetric and so forth.

    3. I have a windows keyboard and I would like to use the "context key". Meaning if I press this key it should simulate the right mouse click.

    Which fairy can satisfy my wishes?

    #2
    Re: Disable Trash / KGPG Default Setting / Context Menu

    Originally posted by squirrel
    1. I would like to disable system wide the use of trash (dumbest invention, imho). The goal is, whenever I press "delete" or choose "remove/delete" from a context menu, it should ask me "Would you like to delete file/folder xyz?" and after choosing "yes" simply delete it.
    Really? So, you've never deleted the wrong file by mistake? If true, you're a better computer user than most everyone one else! Have you never, after sitting at the keyboard for hours on end, tired and frustrated, not wanting to give in on the 'problem at hand,' not deleted a file you shouldn't have, and either realized it right after you did it, or later, discovered that something just doesn't work any more, only to have it dawn on you that "maybe I shouldn't have deleted that file" after all?

    For myself, I like having the trash bin there. I personally empty it before I shut down my session.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Disable Trash / KGPG Default Setting / Context Menu

      Yes, really.

      First, I have a clean major system-backup. Second, when I make big changes to the system I make another backup for an easy step back.

      For documents I'm working with file versions + a full backup to another partition and to an external harddisk.

      Do you know the trick(s)?

      Comment


        #4
        Re: Disable Trash / KGPG Default Setting / Context Menu

        Well, some quick searches in the Forum weren't very productive. I'm sure there are ways to delete files without sending them to the trash (in Linux, there is almost always a way to get something done), but I haven't found it (yet).
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: Disable Trash / KGPG Default Setting / Context Menu

          Ah, the Sleuth prevails! 8)

          Open Konqueror. Click on Settings | Configure Konqueror | Behavior and check the Show 'Delete' context menu entries which bypass the trashcan box. In the Ask Confirmation For check (or uncheck) what you want confirmation for.
          Windows no longer obstructs my view.
          Using Kubuntu Linux since March 23, 2007.
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            Re: Disable Trash / KGPG Default Setting / Context Menu

            Hi Snowhog

            I'm sorry, I forgot to mention that I'm using the Kubuntu default filemanager "Dolphin". That said, the settings in Konqueror did not change the behavior in Dolphin. Is it may possible to change the "Delete"-shortcut? Meaning instead just do the "Delete" it should do "Shift-Delete"?

            Comment


              #7
              Re: Disable Trash / KGPG Default Setting / Context Menu

              I don't (won't) use Dolphin. That said, I checked, and unfortunately Dolphin's Configure Dolphin has a lot to be desired - it has almost nothing really to configure. :P Someone who uses, and has experience with, Dolphin may be able to add to this. Sorry I couldn't assist any better.
              Windows no longer obstructs my view.
              Using Kubuntu Linux since March 23, 2007.
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                Re: Disable Trash / KGPG Default Setting / Context Menu

                Not a problem! Thanks for the try!!

                May I ask why you refuse to use Dolphin? What is the future direction? Isn't Dolphin the default filemanager in KDE4 too? Isn't it always a big hassle to change the default filemanager by yourself (that's why I migrated from Ubuntu to Kubuntu, I can't stand Nautilus)? Maybe I should make Konqueror to my default filemanager?

                Comment


                  #9
                  Re: Disable Trash / KGPG Default Setting / Context Menu

                  Dolphin has a nasty habit of changing ownership on users files (~/home/user) to root, resulting in some unpleasant suprises! This happens when Dolphin is started from the command line by root (kdesu dolphin). This is a 'feature' that has been well documented. I'm sure it will be fixed. But ....

                  I like Konqueror. It's multi-purpose use, as is, is good enough for me.
                  Windows no longer obstructs my view.
                  Using Kubuntu Linux since March 23, 2007.
                  "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                  Comment


                    #10
                    Re: Disable Trash / KGPG Default Setting / Context Menu

                    1. I would like to disable system wide the use of trash (dumbest invention, imho). The goal is, whenever I press "delete" or choose "remove/delete" from a context menu, it should ask me "Would you like to delete file/folder xyz?" and after choosing "yes" simply delete it.
                    Use: Shift + Delete (it will bypass trash system) =>



                    3. I have a windows keyboard and I would like to use the "context key". Meaning if I press this key it should simulate the right mouse click.
                    Maybe: System Settings > Accessibility > Input Actions...


                    Dolphin has a nasty habit of changing ownership on users files (~/home/user) to root, resulting in some unpleasant suprises! This happens when Dolphin is started from the command line by root (kdesu dolphin). This is a 'feature' that has been well documented. I'm sure it will be fixed. But ....
                    Hmm - upgrade from kdesudo (1.1-0ubuntu2) to 1.1-0ubuntu2.2 fixed that (at here).
                    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


                      #11
                      Re: Disable Trash / KGPG Default Setting / Context Menu

                      Originally posted by Rog131

                      Use: Shift + Delete (it will bypass trash system) =>
                      But I would like to set this as the default behavior for pressing "Delete".

                      Maybe: System Settings > Accessibility > Input Actions...
                      Thanks!

                      Comment


                        #12
                        Re: Disable Trash / KGPG Default Setting / Context Menu

                        But I would like to set this as the default behavior for pressing "Delete".

                        Have you tried with Dolphin >Settings > Configure Shortcuts ?

                        There is Shortcut for Selected Action: None/Default/Custom...



                        If those don't help:

                        Replacing default (move to the trash) action from Delete button (in the keyboard).


                        #1 DCOP script

                        - Make script file (name could be deldolphin)
                        - Make it executable. (right click file > Properties > Permissions -> is executable)
                        - Drop it in the /usr/bin/

                        deldolphin:
                        Code:
                        #!/bin/sh
                        
                        
                        DOLPHINS=`dcop dolphin-*`
                        
                        for D in $DOLPHINS
                        do
                          if [ `dcop $D Dolphin isActiveWindow` ]
                           then
                             dcop $D Dolphin activateAction delete
                             break
                          fi
                        done
                        When called script will check witch Dolphin window is active and activate action "delete" for that Dolphin window (same action as now is Shift+Delete).


                        #2 KEYBOARD

                        In the System Settings > Accessibility > Input Actions.

                        Create first: New Group (My Actions)

                        Then: "New Action"

                        General tab
                        Action name: Delete
                        Action type: Keyboard Shortcut -> Command/URL (Simple)


                        Keyboard Shortcut tab
                        Press button icon, choose you button (Delete button)


                        Command/URL Settings tab
                        Command/URL to execute: /usr/bin/deldolphin

                        Note #1
                        If you want default action back: System Settings > Accessibility > Input Actions, choose Action "Delete" and press Delete Action button.


                        Note #2
                        If you press Delete and there are nothing to remove -> Dolphin will crash with signal 6 (SIGABRT)


                        Links:

                        DCOP Wilki
                        http://en.wikipedia.org/wiki/DCOP

                        Using DCOP from the command line
                        http://linuxgazette.net/issue97/oregan2.html

                        Connect KDE applications using DCOP
                        http://www.ibm.com/developerworks/li...kdeml01KDEDCOP

                        Copying data to the clipboard from the command line under KDE
                        http://ftp.traduc.org/doc-vf/gazette.../104/104F.html


                        Tested (seems to work):
                        Attached Files
                        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


                          #13
                          Re: Disable Trash / KGPG Default Setting / Context Menu

                          Originally posted by Rog131
                          But I would like to set this as the default behavior for pressing "Delete".

                          Have you tried with Dolphin >Settings > Configure Shortcuts ?

                          There is Shortcut for Selected Action: None/Default/Custom...
                          OMG, I'm so embarassed. Sorry, I didn't realize that you can adjust those shortcuts in every application...

                          The only thing I couldn't resolve so far is my KGPG issue. Do you may have an idea how to resolve that?

                          Thank you very much for your time and effort, very much appreciated!

                          Comment


                            #14
                            Re: Disable Trash / KGPG Default Setting / Context Menu

                            2. When I right click on a folder/file and choose "Actions=>Encrypt File/Folder" it should just ask me after the symmetric password I would like to choose (incl. re-type) and then just put it at the same location where the source is. No asking about saved key-profiles and clicking "options" choosing symmetric and so forth.
                            You want ?: Right click > Encrypt > 2xpassphrase > Encrypted file/(packed)folder


                            If so - Don't use Kgpg (it is front end for gpg). man gpg tells:
                            GPG(1) GNU Privacy Guard GPG(1)

                            NAME
                            gpg - OpenPGP encryption and signing tool

                            SYNOPSIS
                            gpg [--homedir dir] [--options file] [options] command [args]

                            <snip>

                            --symmetric

                            -c Encrypt with a symmetric cipher using a passphrase. The default
                            symmetric cipher used is CAST5, but may be chosen with the
                            --cipher-algo option. This option may be combined with --sign
                            (for a signed and symmetrically encrypted message), --encrypt
                            (for a message that may be decrypted via a secret key or a
                            passphrase), or --sign and --encrypt together (for a signed mes‐
                            sage that may be decrypted via a secret key or a passphrase).
                            => gpg -c foo

                            encryptfile.desktop and encryptfolder.desktop use kgpg:
                            Code:
                            Icon=kgpg
                            Exec=kgpg -e %F

                            Changing
                            - copy encryptfile.desktop to myencryptfile.desktop

                            myencryptfile.desktop:
                            Code:
                            [Desktop Entry]
                            ServiceTypes=all/allfiles
                            ExcludeServiceTypes=kdedevice/*
                            Actions=MYencrypt
                            
                            [Desktop Action MYencrypt]
                            Name=Encrypt File (GPG)
                            Icon=gpg
                            Exec=gpg -c %F
                            - copy encryptfolder.desktop to myencryptfolder.desktop
                            Code:
                            [Desktop Entry]
                            ServiceTypes=inode/directory
                            Actions=MYencrypt
                            
                            [Desktop Action MYencrypt]
                            Name=Archive & Encrypt Folder (GPG)
                            Icon=gpg
                            Exec=ark --add-to %U %U.zip;gpg -c %U.zip;rm -f %U.zip

                            Note
                            myencryptfolder.desktop will pack folder with zip; encrypt zip-file;remove zip-file.


                            More:
                            man ark
                            man rm

                            Topic: Service Menus with Dolphin
                            http://kubuntuforums.net/forums/inde...opic=3088743.0

                            Creating Konqueror Service Menus
                            http://developer.kde.org/documentati...vicemenus.html
                            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


                              #15
                              Re: Disable Trash / KGPG Default Setting / Context Menu

                              You are my hero!

                              I would like to extend this a little bit, but I don't know where I can find the "Open With"-files.

                              Code:
                              [Desktop Entry]
                              ServiceTypes=all/allfiles
                              ExcludeServiceTypes=kdedevice/*
                              Actions=MYdecrypt
                              
                              [Desktop Action MYdecrypt]
                              Name=Decrypt & Unzip (GPG)
                              Icon=gpg
                              Exec=gpg -d %F;ark -caption "%c" %i %m --guess-name --extract-to "%d" "%
                              This should decrypt the file and extract it into a new subfolder. Right now even the simple "gpg -d %F" does not work. It asks me for the passphrase but doesn't do anything with the file it seems. When I open it with "Open With / KGPG" it works, so I guess the answer lies in this file..?

                              This starts to make fun, I really should spend one or two weekends to read more about those things (as you suggests with your links ).

                              Comment

                              Working...
                              X