The officially official Devuan Forum!

You are not logged in.

#1 2024-08-20 23:05:25

VH
Member
Registered: 2018-07-31
Posts: 38  

gksu is depreciated in Daedalus - can I still use it as .deb package

gksu is depreciated in Daedalus.  So while I was searching for an alternative, someone mentioned that I can still use it as .deb package.   

https://itsfoss.com/gksu-replacement-ubuntu/   <---look at the comment section. 

LeDechaine
1 year ago

You do NOT need to replace it. You just need to download it again. Debian: http://ftp.us.debian.org/debian/pool/ma … _amd64.deb http://ftp.us.debian.org/debian/pool/ma … _amd64.deb http://ftp.us.debian.org/debian/pool/ma … _amd64.deb If it ain't broke, don't fix it. pkexec is a piece of trash that did not work half the time and did not do what I wanted it to do the other half of the time. Just download this and get back gksu. And watch closely apt or "apt hold" gksu to be sure to not lose it (it's what we should have been warned to do before this change happened, actually).

What would be the Devuan equivalent of  http://ftp.us.debian.org/debian/pool/ma … _amd64.deb  ?   Where can I find it? 

I haven't found satisfactory alternative yet.  I would like to use it in scripts and not think about them.

Any help and suggestions would be appreciated.

Last edited by VH (2024-08-20 23:42:37)

Offline

#2 2024-08-20 23:47:09

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,303  

Re: gksu is depreciated in Daedalus - can I still use it as .deb package

Offline

#3 2024-08-21 07:01:54

steve_v
Member
Registered: 2018-01-11
Posts: 403  

Re: gksu is depreciated in Daedalus - can I still use it as .deb package

I would like to use it in scripts and not think about them.

Using unmaintained binaries from removed packages in scripts is the antithesis of "just forget about them". Sooner or later gksu will break (especially being GUI bloat linked against GTK), if you want reliable scripts use a supported method like pkexec.

If you must use gksu, at least port it properly (i.e. rebuild it against current libraries) rather than pulling in binary packages from an old release.

Last edited by steve_v (2024-08-21 07:03:21)


Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Offline

#4 2024-08-22 03:37:26

EDX-0
Member
Registered: 2020-12-12
Posts: 96  

Re: gksu is depreciated in Daedalus - can I still use it as .deb package

there are 2 alternatives that ARE in debian and devuan without messing with outdated packages.

one is to use an askpass frontend for sudo, sudo with the -A flag will launch a helper program to get the user password, i've seen even rofi used for that purpose (mind you the author recomends to NOT use rofi for sudo askpass) but a good package for that is ssh-askpass-gnome (gtk frontend), then simply put this line on your .profile export SUDO_ASKPASS="/usr/bin/ssh-askpass"

two is to use pkexec with some polkit authentication agent, most desktop environments have their own polkit agent autostarted but if your's doesn't or you use a window manager then the package policykit-1-gnome provides a gtk polkit auth agent, the autostart desktop file specifies it as gnome only iirc, but you can add your own autostart entry in ~/.config/autostart or simply run /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 somewhere in your .xsession.

Offline

#5 2025-01-14 18:27:27

greenjeans
Member
Registered: 2017-04-07
Posts: 712  
Website

Re: gksu is depreciated in Daedalus - can I still use it as .deb package

I have despised pkexec since I first saw it, broke my heart to see gksu go bye-bye. You should be able to use it the same way gksu was used, just a simple "gksu (program name)" for things that need authentication, but oh hell no doesn't work like that. Piece of crap.

My current workaround: A script that adds all the pkexec bulls**t necessary to make authentication happen. Called it "gksu.sh" so now I just use that the same way I used to use gksu, i.e. "gksu.sh (program-name)". This is especially helpful for file-manager extensions that I wrote a long time ago that used gksu.

# Script to convert gksu to pkexec for extensions already written
# without adding a lot of code to the .desktop command line.
# Usage: "gksu.sh [program]"

#!/bin/bash
if [ -z $1 ]; then
 echo -e "at least 1 argument required!\n" >> /dev/stderr
 exit 1
fi
COMMAND=$1
shift #shift first arg
for ARG in "$@"
do
 if [ -z "$ARGS" ]; then
  ARGS="$ARG"
 else
  ARGS="$ARGS $ARG"
 fi 
done
ARGS=\'$ARGS\'
eval pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY $COMMAND $ARGS
exit 0

https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded January 2025!
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#6 2025-01-14 22:08:58

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,303  

Re: gksu is depreciated in Daedalus - can I still use it as .deb package

Or use my rrqsu smile

#!/bin/sh
set -e

if [ $(id -un) = root ] ; then
    exec "$@"
fi

if [ "$SUDO_ASKPASS" = "$0" ] ; then
    exec yad --entry --title="PASSWORD" --entry-label="$*" --hide-text
fi

exec env SUDO_ASKPASS="$0" sudo -A "$@"

Offline

Board footer