You are not logged in.

#1 2009-09-07 10:32:55

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

How to teach pcmanfm to use ktsuss instead of gktu/kdsu?

Hello.
I use a bare x with compiz with no DE.
Sometimes I want to run x apps with root access but gksu wants gnome-keyring as a dependency which I don't need.
I found the alternative ktsuss and it works well but when I click "open as root" in pcmanfm it complains that gksu and kdsu are not installed. I want it to use ktsuss.
I tried to google even the simple pair of words "pcmanfm ktsuss" but nothing shows up.

Any clue?

thanks!

Offline

#2 2009-09-09 10:56:31

virtuemood
Member
Registered: 2009-04-04
Posts: 33

Re: How to teach pcmanfm to use ktsuss instead of gktu/kdsu?

rm /usr/bin/gksu
ln -s /usr/bin/ktsuss /usr/bin/gksu

I know this is a bad solution. just kidding!  (^o^)

Offline

#3 2009-09-09 11:31:07

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

Re: How to teach pcmanfm to use ktsuss instead of gktu/kdsu?

You may be kidding but I really tried it tongue and it still doesn't work.
Seems like ktsuss doesn't get the parameters from pcmanfm because it complains "could not run command, command not found".
This error usually pops up when you type "ktsuss" with no command afterwards.
Maybe gksu and ktsuss operate differently?

Offline

#4 2009-09-09 12:48:51

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Re: How to teach pcmanfm to use ktsuss instead of gktu/kdsu?

Mmm linking works here...

I have a file containing

$cat /home/$USER/bin/gksu 
#!/bin/bash
cmd=$1
xterm -geom 60x5 -T "xdg-su: $cmd" -e su -c "$cmd"

Which I guess is a crude form of ktsuss

Then as root

ln -s /home/user/bin/gksu /usr/bin/gksu

Offline

#5 2009-10-28 07:51:05

supulton
Member
Registered: 2008-12-31
Posts: 58

Re: How to teach pcmanfm to use ktsuss instead of gktu/kdsu?

Try a wrapper script.

Here's one I found on zenwalk forums. Works great.

#!/bin/bash
COMMAND="$(echo "${@}" | tr -d "\'\"\\")"
BIN="$(echo "${1}" | cut -d" " -f1)"
KTSUSS="/usr/bin/ktsuss -u root"
export PATH="${PATH}:/sbin:/usr/sbin"
[ "$(id -u)" = "0" ] && KTSUSS=""
[ -x "${BIN}" ] && exec ${KTSUSS} ${COMMAND}
for path in $(echo ${PATH} | sed -e 's/:/ /g') ; do
    [ -x "${path}/${BIN}" ] && exec ${KTSUSS} ${path}/${COMMAND}
done

save the file as "gksu" in your path, make it executable, and pcmanfm should recognize it.

Offline

#6 2009-10-28 12:18:04

dobedo
Member
From: Belgium
Registered: 2008-10-04
Posts: 113

Re: How to teach pcmanfm to use ktsuss instead of gktu/kdsu?

SoleSoul wrote:

Hello.
I use a bare x with compiz with no DE.
Sometimes I want to run x apps with root access but gksu wants gnome-keyring as a dependency which I don't need.
I found the alternative ktsuss and it works well but when I click "open as root" in pcmanfm it complains that gksu and kdsu are not installed. I want it to use ktsuss.
I tried to google even the simple pair of words "pcmanfm ktsuss" but nothing shows up.

Any clue?

thanks!

Hi, I found this url http://www.linux.org.ru/view-message.jsp?msgid=3641007 but it's in russian (and I don't speak russian).
Anyway, can you try this ?

pcmanfm --with-preferable-sudo=ktsuss

Edit: ...hum, it looks like a configure option for the build, not an option at runtime. So you might need to build pcmanfm with that option.

Last edited by dobedo (2009-10-28 12:21:57)

Offline

Board footer

Powered by FluxBB