Friday, September 18, 2015

Linux and SU access

Copy and Paste the following to a new text file:


#!/bin/sh
# Super User Execute
# Gives PkExec current environmental variables
#  and passes current parameters thru running shells to it.
#
# Use this file instead of gksu, gksudo, and, pkexe.
# /usr/bin/suxe

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY $1 $2 $3 $4 $5 $6



save it as "~/suxe" then open a terminal

and enter the following:


sudo cp ~/suxe /usr/bin/suxe


then enter:

su chmod -x /usr/bin/suxe


on some distros you may need to:
use the exact syntax of your homefolder
instead of "~/":
e.g.
sudo cp /home/your-user-name/suxe /usr/bin/suxe

cd /usr/bin
su chmod -x ./suxe


this trick works good for Thunar custom actions.  


No comments :

Post a Comment

Contact Form

Name

Email *

Message *