Author Topic: The question I always forget to ask...  (Read 1259 times)

Offline bicol_willem

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2378
The question I always forget to ask...
« on: November 26, 2012, 01:37:56 AM »
Why do we have in file manager of any user the option "delete as root"??

I have NEVER found a machine where this option actually works.

It always comes down to "Sorry-KDE su"    Cannot execute command rm -f-r blablablabla.

 ???

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10649
  • MLUs Forever!
Re: The question I always forget to ask...
« Reply #1 on: November 26, 2012, 03:53:44 AM »
.... because it works for the most of us I guess .....
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline bicol_willem

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2378
Re: The question I always forget to ask...
« Reply #2 on: November 26, 2012, 07:23:35 AM »
.... because it works for the most of us I guess .....

To see is to believe... 

Offline agmg

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1899
  • Certified Windows Hater
Re: The question I always forget to ask...
« Reply #3 on: November 26, 2012, 07:36:18 AM »
This right-click option has never worked for me either...  :-\
For the whole world, you are someone.
For someone, you are the whole world.

Offline Linuzoid

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1404
    • LinuzoidArt Studio
Re: The question I always forget to ask...
« Reply #4 on: November 26, 2012, 07:40:50 AM »
Doesn't work for me either :'(
Be very, very kind to your neighbors, but don't take the fence down!

Online Crow

  • Hero Member
  • *****
  • Posts: 8768
  • OBJECTS IN MIRROR... ARE LOSING
Re: The question I always forget to ask...
« Reply #5 on: November 26, 2012, 07:53:18 AM »
Never had a problem with that option and is very useful.
I shall pass this way but once;
any good therefore that I can do,
or any kindness that I can show
let me not defer nor neglect it,
for I shall not pass this way again.

Linux User #330412

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: The question I always forget to ask...
« Reply #6 on: November 26, 2012, 07:58:22 AM »
Same error here too. Does not work for user files/directories or root files/directories in my KDE installation.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10649
  • MLUs Forever!
Re: The question I always forget to ask...
« Reply #7 on: November 26, 2012, 09:12:47 AM »
bicol_willem
                     Apologies ......  indeed it fails to work now ......  and looking at the command in use it appears to be a syntax error.

Try from a user console

kdesu  'rm -f -r' /<file>

and the failure as you reported occurs .....  but try the following

kdesu  rm -f -r /<file>

and it performs as it always has for me.

« Last Edit: November 26, 2012, 10:26:12 AM by Just17 »
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline bicol_willem

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2378
Re: The question I always forget to ask...
« Reply #8 on: November 26, 2012, 10:23:25 AM »
How did Crow escaped the syntax error?  ???

I have tried this through the time on minimum 20 installs (KDE), PC and laptop alike and never saw it working.

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: The question I always forget to ask...
« Reply #9 on: November 26, 2012, 10:31:21 AM »
bicol_willem
                     Apologies ......  indeed it fails to work now ......  and looking at the command in use it appears to be a syntax error.



Where did you see? I have looked under /usr/share/kde4/services/ServiceMenus/ but there is no reference to 'Delete as root'..... :(
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline bicol_willem

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2378
Re: The question I always forget to ask...
« Reply #10 on: November 26, 2012, 10:37:01 AM »
bicol_willem
                     Apologies ......  indeed it fails to work now ......  and looking at the command in use it appears to be a syntax error.



Where did you see? I have looked under /usr/share/kde4/services/ServiceMenus/ but there is no reference to 'Delete as root'..... :(

The command shows actually during the action right click - delete as root - when root password is asked

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: The question I always forget to ask...
« Reply #11 on: November 26, 2012, 10:40:49 AM »
Uh. Oh. Lack of attention. Sorry.

Now on to finding where the yellow is this line in our configuration files.

There must be a grep command to do this somewhere....
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10649
  • MLUs Forever!
Re: The question I always forget to ask...
« Reply #12 on: November 26, 2012, 11:00:07 AM »
I don't know what is generating that 'delete as root' entry.

It becomes available when DoAsRoot is installed .....  which gives a service menu      open_as_root.desktop   with just the one entry 'open_as_root'.

But I get not 'Open As Root' as one might expect, but  'Edit As Root' and 'Delete As Root'  as the service menu entries.

In other words ......  I have no idea  :D

Using the ServiceMenuEditor I have read only access to the 'Delete As Root' service menu which has the following command

kdesu "rm -f -r" %U

There are also an 'Open As Root' and  'Edit As Root'  service menu entries in the editor.

EDIT
            sram.d.desktop   is the service menu concerned ?
« Last Edit: November 26, 2012, 11:09:40 AM by Just17 »
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: The question I always forget to ask...
« Reply #13 on: November 26, 2012, 11:08:32 AM »
Gotcha!

/usr/share/kde4/services/ServiceMenus/sram_d.desktop

Open it using "Edit as root" (it works) ;) and then remove those quote marks from the last line of that file. Save.
It should look like below:

Code: [Select]
Exec=kdesu rm -f -r %U

Try "Delete as root". It should work now.

If everyone finds this correct, then we should report it to Neal perhaps? or Archie?
« Last Edit: November 26, 2012, 11:10:19 AM by sling-shot »
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10649
  • MLUs Forever!
Re: The question I always forget to ask...
« Reply #14 on: November 26, 2012, 11:11:51 AM »
Gotcha!

/usr/share/kde4/services/ServiceMenus/sram_d.desktop

Open it using "Edit as root" (it works) ;) and then remove those quote marks from the last line of that file. Save.

Try "Delete as root". It should work now.

If everyone finds this correct, then we should report it to Neal perhaps? or Archie?

Yep .......  removing the quotation marks around the command allows it to complete, and the Edit As Root works still even though that still has quotation marks around it.

.....  but I wonder if something else is involved here .....

EDIT:
              Why do I not see (in the Service Menu List)
Open As Root ?

Answer:   It does appear .....  but ONLY for directories!
« Last Edit: November 26, 2012, 11:22:01 AM by Just17 »
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT