WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: PCMANFM "Open Current Folder as Root" errors "gksu or kdesu is not found"  (Read 6067 times)

Offline baz

  • Full Member
  • ***
  • Posts: 216
I am using PCMANFM file manager and under Tools there is an option to "Open Current Folder as Root", however clicking on it generates the error "gksu or kdesu is not found". Is there any way to get around this?

Offline dentonlt

  • Sr. Member
  • ****
  • Posts: 318
    • the trombone analog
Re: PCMANFM "Open Current Folder as Root" errors "gksu or kdesu is not found"
« Reply #1 on: December 13, 2009, 01:17:04 AM »
Looks like GKsu has not been built for TC yet. I've downloaded it, and will try it out (maybe one of the main admins will beat me  :) )

EDIT:

pkgconfig path doesn't include freetype2.pc - I had to symbolic link from /usr/lib/pkgconfig to /usr/local/lib/pkgconfig. I think this is similar to a problem that JasonW was working on recently ... ?

Also requires libgtop and gnome-keyring. For now, I'm side-tracked into compiling those dependencies.
« Last Edit: December 13, 2009, 02:10:11 AM by dentonlt »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: PCMANFM "Open Current Folder as Root" errors "gksu or kdesu is not found"
« Reply #2 on: December 13, 2009, 10:19:07 AM »
Is freetype.pc recognized when this command is used before compiling?

export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig


Offline dentonlt

  • Sr. Member
  • ****
  • Posts: 318
    • the trombone analog
Re: PCMANFM "Open Current Folder as Root" errors "gksu or kdesu is not found"
« Reply #3 on: December 13, 2009, 04:29:17 PM »
Thanks, Jason - I'll try that out. I'm side tracked into compiling libgtop right now.

EDIT: Yep, command line works as -

Code: [Select]
./configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
Finds freetype no problem.
« Last Edit: December 13, 2009, 04:59:07 PM by dentonlt »

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: PCMANFM "Open Current Folder as Root" errors "gksu or kdesu is not found"
« Reply #4 on: December 13, 2009, 04:36:03 PM »
I don't want to discourage anyone from contributing to the community, but I wonder if adding gksu to the repository is really required. To me at least it would be also a bit contrary to the spirit of TC, which I consider to be in favour of avoiding "bloatware".

We might not need gksu to correct the PCMANFM behavior: According to the README file of pcmanfm (v0.5.2):
Quote
Switch To Root Problems:
  In "Tool" menu of PCManFM there is an option for you to switch to super user.
  By default PCManFM calls 'gksudo', and if it doesn't exists, it calls 'gksu'.
  If both of them don't exist, PCManFM will call 'kdesu'.
  In some distros, 'gksudo' is disabled by default. Instead, you can assign your
  preferable program during configuration, and the option is
  "--with-preferable-sudo=PROG"

So, I'd imagine rebuilding PCMANFM with "--with-preferable-sudo=sudo" might resolve the problem, without having to go through depencency hell to create some "GUI bloat".

Offline dentonlt

  • Sr. Member
  • ****
  • Posts: 318
    • the trombone analog
Re: PCMANFM "Open Current Folder as Root" errors "gksu or kdesu is not found"
« Reply #5 on: December 13, 2009, 04:55:20 PM »
maro - ah! I like less work ... :)

Thanks for suggesting that - I'll dig in that direction.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: PCMANFM "Open Current Folder as Root" errors "gksu or kdesu is not found"
« Reply #6 on: December 14, 2009, 02:52:27 AM »

So, I'd imagine rebuilding PCMANFM with "--with-preferable-sudo=sudo" might resolve the problem, without having to go through depencency hell to create some "GUI bloat".


It doesn't work on this way as sudo requires an argument, program executed, but the direction is good. I will rebuild it to use a wrapper script to execute a user defined program. Hope it will work.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: PCMANFM "Open Current Folder as Root" errors "gksu or kdesu is not found"
« Reply #7 on: December 27, 2009, 05:26:56 PM »
Current version of pcmanfm.tcz calls a file pcmansu to switch to superuser. As an easy solution, use the shell script below:

Quote
#!/bin/sh

[ -e /root/.gtkrc-2.0 ] || sudo ln -s /home/tc/.gtkrc-2.0 /root/.gtkrc-2.0

A=$(echo $1 | cut -f 3 -d ' ' | cut -f  2 -d "'")
sudo pcmanfm --no-desktop $A

Place it to /usr/local/sbin dir as pcmansu

It will open the current directory in a new pcmanfm window in superuser mode. Take it as a dirty demonstration only. Be careful using it not to demage your system.
« Last Edit: December 27, 2009, 05:32:59 PM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."