LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-19-2013, 04:03 PM   #1
hyperhead
Member
 
Registered: Mar 2011
Location: UK
Distribution: Slackware-current
Posts: 95

Rep: Reputation: 7
gksu-polkit does not allow arguments with launched executable


I am running Slackware 14 64 Bit.

I am writing a python program to launch and monitor dnscrypt-proxy

I am trying to use gksu-polkit to launch dnscrypt-proxy with arguments

e.g. gksu-polkit /usr/local/sbin/dnscrypt-proxy -d -u user -l /var/log/dnscrypt

However whenever I try to use arguments from bash prompt I get the following:

gksu-polkit /usr/local/sbin/dnscrypt-proxy -d -u user -l /var/log/dnscrypt
Code:
** (gksu-polkit:10372): WARNING **: Unknown option -d

Usage:
  gksu-polkit [OPTION...] - run programs as root

Help Options:
  -h, --help       Show help options
If I wrap the executable and arguments in double or single quotes the I get the following error:

Code:
Failed to run /usr/local/sbin/dnscrypt-proxy -d -u username -l /var/log/dnscrypt

Failed to execute child process "/usr/local/sbin/dnscrypt-proxy -d -u username -l /var/log/dnscrypt" (No such file or directory)
Has anybody every successfully launched an executable with gksu-polkit and used arguments, as far as I can tell none of the switches that are available with gksu can be used with gksu-polkit.
 
Old 04-20-2013, 07:03 AM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,270

Rep: Reputation: Disabled
The program "gksu-polkit" is not part of Slackware. Where did you obtain it? Are you running Slackware or one of its derivatives?

Eric
 
Old 04-20-2013, 07:07 PM   #3
hyperhead
Member
 
Registered: Mar 2011
Location: UK
Distribution: Slackware-current
Posts: 95

Original Poster
Rep: Reputation: 7
Hi, I'm running:

NAME=Slackware
VERSION="14.0"

I pulled gksu-polkit down with sbopkg.

gksu-polkit-20100909_d7e3160-x86_64-1_SBo
polkit-0.105-x86_64-3
polkit-gnome-0.102-x86_64-1
polkit-qt-1-0.103.0-x86_64-1

I remember something like gksu is not included in the Slackware (maybe I just didn't check?!), I'm going to have to go back and see why I came to be using this. I guess I will find some way of supporting several methods of invoking dnscrypt-proxy as root.

Thanks

Last edited by hyperhead; 04-20-2013 at 07:08 PM.
 
Old 04-20-2013, 11:31 PM   #4
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,448

Rep: Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877
you can try creating a wrapper script with the content
Code:
/usr/local/sbin/dnscrypt-proxy -d -u user -l /var/log/dnscrypt
and invoke that with gksu-polkit.

or try with ktsuss (but it doesn't use polkit).

but these programs (ktsuss and gksu-polkit) are often used to launch graphical apps that need to run as root under an user session.
if you just need to launch a console application, maybe could be easier to just switch to root (with "su -") and launch it.

Last edited by ponce; 04-20-2013 at 11:44 PM.
 
Old 04-21-2013, 07:56 AM   #5
hyperhead
Member
 
Registered: Mar 2011
Location: UK
Distribution: Slackware-current
Posts: 95

Original Poster
Rep: Reputation: 7
ktsuss did the trick, thanks.

In terms of using su, dnscrypt-proxy is launched by a Python script which is running as the desktop user and has a GUI with notification icon, so I needed to grab the root password just to launch dnscrypt-proxy / alter /etc/resolv.conf. Dnscrypt-proxy actually does end up running as the desktop user, but needs to be launched initially as root

Thanks for the help
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Those Polkit/PolicyKit XML files a pain to view? Polkit Explorer now avaiable... LXer Syndicated Linux News 0 03-31-2013 03:42 PM
Polkit-kde-agent cmake problems f0rdracing Linux From Scratch 0 03-31-2013 03:45 AM
PolKit - Permission Errors In KDE cordesir Linux From Scratch 8 12-27-2012 01:53 PM
[SOLVED] polkit-0.107 fail spiky0011 Linux From Scratch 7 10-14-2012 12:46 PM
LXer: KDE extends Polkit support to polkit-1 LXer Syndicated Linux News 0 12-26-2009 12:00 PM


All times are GMT -5. The time now is 01:47 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration