You are not logged in.

#1 2011-06-18 09:43:35

thejoschi
Member
Registered: 2010-05-14
Posts: 19

ktsuss does not start app outside terminal

Hello everyone,

I am using WindowMaker as my window manager and there is one
application which needs to be run with root privileges. As an alternative
to programs like gksu I found ktsuss.

ktsuss AUR link

The program which needs the root privileges is linux wbfs manager.

wbfs AUR link

When I start the program from my terminal application (roxterm) inside WindowMaker
like "ktsuss wbfs_gtk" I get asked for the root password and everything
works fine. But as soon as I drag the icon for the application to my clip and
use "ktsuss wbfs_gtk" as application path and name, I get asked for the
password but the program does not start.

It would be a great help if anyone of you could help me out on this issue or
give me some hints.

Thanks in advance

Phil

Offline

#2 2011-06-25 08:30:40

thejoschi
Member
Registered: 2010-05-14
Posts: 19

Re: ktsuss does not start app outside terminal

Hello,

does no one have any idea?

Regards
Phil

Offline

#3 2011-06-25 14:08:01

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,242

Re: ktsuss does not start app outside terminal

2 possibilities come to mind :

  1. when started from icon ktsuss can't find the executable
    this can be tested by giving the full path to the ktsuss executable.

  2. the icon does not pass wbfs_gtk as  a parameter to ktsuss
    if this is the case, there should be a paramater field


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2011-06-25 14:30:49

thejoschi
Member
Registered: 2010-05-14
Posts: 19

Re: ktsuss does not start app outside terminal

Hi Lone Wolf,

thank you very much for your reply.

Lone_Wolf wrote:

when started from icon ktsuss can't find the executable
this can be tested by giving the full path to the ktsuss executable.

I did try this out at first, but unfortunately this is not working...

Lone_Wolf wrote:

the icon does not pass wbfs_gtk as  a parameter to ktsuss
if this is the case, there should be a paramater field

This is the output of ktsuss --help:

Usage: ktsuss [OPTION] <command>
Run a command as another user

OPTIONS:
    -v, --version        Gives ktsuss version info
    -u, --user USER      Runs the command as the given user
    -m, --message MESG   Change default message in ktsuss window
    -h, --help           Show this help

This is how my configuration window for the WindowMaker icon looks like:

wbfswmakerstarter.jpg

From a terminal window everything is okay.

Best regards
Phil

Offline

#5 2011-06-25 15:30:17

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,242

Re: ktsuss does not start app outside terminal

thejoschi wrote:

Hi Lone Wolf,

thank you very much for your reply.

Lone_Wolf wrote:

when started from icon ktsuss can't find the executable
this can be tested by giving the full path to the ktsuss executable.

I did try this out at first, but unfortunately this is not working...

i think i may have worded that incorrecxtly, have you tried putting

ktsuss /usr/bin/wbfs_gtk

if that also doesn't work, the problem is likely between your windowmanger and ktsuss .

Some alternatives to achieve what you want :

try the following command in the icon  :

$ su -c "wbfs_gtk"

readup on sudo in the arch wiki, and allow your user to execute wbfs_gtk as root without a password.

Last edited by Lone_Wolf (2011-06-25 15:30:57)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2011-06-25 21:03:48

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: ktsuss does not start app outside terminal

@thejoschi - Its a bug in ktsuss. I've emailed the author before but I do not know if he released a fix yet.

Offline

#7 2011-06-26 07:23:56

thejoschi
Member
Registered: 2010-05-14
Posts: 19

Re: ktsuss does not start app outside terminal

Hello,

anonymous_user wrote:

@thejoschi - Its a bug in ktsuss. I've emailed the author before but I do not know if he released a fix yet.

Thank you very much for the information and Lone_Wolf, thank you for helping me on this issue.

Now at least I know, it is a ktsuss problem. Maybe I can find another tool which does the same job for me, but is as slim as this one.

Best regards
Phil

Offline

#8 2011-06-26 22:52:51

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: ktsuss does not start app outside terminal

The author just told me that the fix should already be in the svn.

Offline

#9 2011-06-27 13:31:41

thejoschi
Member
Registered: 2010-05-14
Posts: 19

Re: ktsuss does not start app outside terminal

Hello anonymous_user,

anonymous_user wrote:

The author just told me that the fix should already be in the svn.

thank you very much for your reply...

When I download the tarball again and try to compile it, I receive this error message:

[philipp@cobalt ktsuss]$ makepkg -s
==> Bestimme letzte svn Revision ...
  -> Gefundene Version: 4
==> Erstelle Paket: ktsuss 4-1 (Mo 27. Jun 15:20:02 CEST 2011)
==> Prüfe Laufzeit-Abhängigkeiten...
==> Prüfe Buildtime-Abhängigkeiten...
==> Empfange Quellen...
  -> ktsuss.patch gefunden
==> Überprüfe Gültigkeit der Quell-Dateien mit md5sums...
    ktsuss.patch ... Durchgelaufen
==> Entpacke Quellen...
==> Beginne build()...
A    ktsuss/pixmaps
A    ktsuss/pixmaps/ktsuss.png
A    ktsuss/pixmaps/Makefile.am
A    ktsuss/configure.ac
A    ktsuss/INSTALL
A    ktsuss/src
A    ktsuss/src/errors.h
A    ktsuss/src/Makefile.am
A    ktsuss/src/ktsuss.c
A    ktsuss/COPYING
A    ktsuss/Makefile.am
A    ktsuss/autogen.sh
A    ktsuss/CREDITS
A    ktsuss/README
Ausgecheckt, Revision 4.
==> SVN checkout done or server timeout
==> Starting make...
patching file ktsuss.c
Reversed (or previously applied) patch detected!  Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file ktsuss.c.rej
==> FEHLER: Ein Fehler geschah in build().
    Breche ab ...
[philipp@cobalt ktsuss]$ 

Most parts of the output are in german, but I think the problem is obvious.

This is the output of cat ktsuss.patch:

[philipp@cobalt ktsuss]$ cat ktsuss.patch 
diff -u a/ktsuss.c b/ktsuss.c
--- a/ktsuss.c    2011-04-20 17:39:40.920494000 +0200
+++ b/ktsuss.c    2011-04-20 22:24:21.850244000 +0200
@@ -290,6 +290,7 @@
     int m = 0, i = 1;
     guint counter = 0;
     gchar *command = NULL;
+    gchar *command_run = NULL;
     gchar *username = NULL;
     gchar *password = NULL;
 
@@ -430,7 +431,9 @@
                 dialog = NULL;
                 /* using argv instead of cmd_argv is fine, because 'su' is going
                  * to implement its only parsing nevertheless*/
-                run(username, password, argv[i]);
+                command_run = g_strjoinv(" ", &argv[i]);
+                run(username, password, command_run);
+                g_free(command_run);
                 counter = 3;
             }
             if (!explicit_username) {
[philipp@cobalt ktsuss]$

The changes from the author are visible, but I do not understand how to handle the error
message. I can understand the meaning of it, but not how to solve this issue.

Thanks for your support.

Best regards
Phil

Offline

Board footer

Powered by FluxBB