You are not logged in.
Pages: 1
I had some problems with commands launched via tazbox su in Slitaz cooking.
I had to modify the tazbox script as follows
change this line
export SU_CMD="$2 $3 $4 $5"
into
export SU_CMD="${@:2}"
otherwise long commands i.e. with many options won't pass
regards
Offline
Pushed: http://hg.slitaz.org/slitaz-tools/rev/277277e6fb08
Thanks.
Offline
Why not just use $@ ?
Offline
${@:2} => $2 $3 ...
$@ => $1 $2 ...
Offline
Ah, so it starts the variable list one place later. Good trick to know.
Offline
Actually I think that the correction also needs to be also applied in line
test $(id -u) = 0 && exec $2 $3 $4 $5
which should become
test $(id -u) = 0 && exec ${@:2}
tkoun
ps: updating the comment just before would complete the correction.
Offline
i'm in rolling trying to install some spacefm plugins.
spacefm asks for a su frontend to complete the operation.
spacefm receipts has the configure otion [c]--with-preferable-sudo="/usr/bin/subox"[/c] but subox is not present anymore.
slitaz-tools-boxes installs a /usr/bin/gksu which is a broken link to /usr/bin/subox .
how do i resolve this trouble?
i tried to make /usr/bin/gksu a script to run [c]tazbox su[/c] but with no luck.
in the end i built ktsuss with this receipt
[c]# SliTaz package receipt.
PACKED_SIZE="36.0K"
UNPACKED_SIZE="68.0K"
PACKAGE="ktsuss"
VERSION="2"
CATEGORY="utilities"
SHORT_DESC="su graphical frontend"
MAINTAINER=""
WEB_SITE="http://code.google.com/p/ktsuss/"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="http://ktsuss.googlecode.com/files/$TARBALL"
DEPENDS=""
BUILD_DEPENDS="gtk+-dev"
# Rules to configure and make the package.
compile_rules()
{
cd $src
./configure --prefix=/usr \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
$CONFIGURE_ARGS &&
make && make DESTDIR=$DESTDIR install
}
# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
cp -a $install/* $fs
}[/c]
Is there any better solution?
thanks
Offline
Actually, tazbox su is the proper way to do it - even in stable since subox loops back to it
Offline
the problem seems to be that spacefm has some predefined su frontend hardcoded from which you can select and it changes the command to send accordingly:
[c]sudo
-c /bin/sh /usr/bin/spacefm-auth root /tmp/spacefm.tmp/46bfeae8-tmp.sh 3d0319e8d63e1bbc8e754afc38361153165a8c640b80417f8cfaffbe0d3bc10c
gksu
-g -D SpaceFM Command /bin/sh /usr/bin/spacefm-auth root /tmp/spacefm.tmp/4c3548eb-tmp.sh dd1fcf473cad1aea09059a754d40e493ae88c07117f06d8eeca524d5b4c7c34b
ktsuss
/bin/sh /usr/bin/spacefm-auth root /tmp/spacefm.tmp/19fb2a4d-tmp.sh 4719becaadb5c0bd0684cd1704753e0292985450046846ad14f34a89b6de8903[/c]
Offline
Thanx for explaination.
Seems like we need to patch SpaceFM sources to work with 'tazbox su'. Here is native SliTaz box with icon designed specially for SliTaz.
Offline
i started to look at it, but real life calls me in the morning.
maybe it would be better use tazbox and give su argument in vfs-file-task.c ?
i will not mind if you do the job for me ;-)
Offline
Ernia, ok, if you think this job is your, I not touch it 
By the way, am at work now, on short coffee break. Working till 15:30...
Offline
i'm on holiday, i just put the jackhammer down, so i got two hour of bonus, i'm afraid it's not enough, maybe two weeks would be enough :-)
Offline
I must go out so i have no time to work on patching Spacefm, if i ever would be able to do it.
would not it be simpler to build spacefm with [c]--with-preferable-sudo="/usr/bin/gksu"[/c] and make /usr/bin/gksu a wrapper for tazbox su?
this seems to work:
[c]#!/bin/sh
COMMAND="${@}";
#catch spacefm gksu call
if echo "$COMMAND" | grep spacefm-auth ; then
SPACEFM_COMMAND="$(echo $COMMAND | sed 's/^.*\/usr\/bin\/spacefm-auth/\/usr\/bin\/spacefm-auth/')";
exec /usr/bin/tazbox su "$SPACEFM_COMMAND";
else
#no catch
exec /usr/bin/tazbox su "$COMMAND";
fi[/c]
and could be updated to fit other programs
Offline
i patched spacefm and changed receipt to make spacefm to use tazbox out of the box, i enclose file with receipt and stuff dir
Offline
http://www.filedropper.com/spacefmtazboxtar
as i'm here this is the tazpkg
http://www.filedropper.com/spacefm-084
Offline
I think that the choice of sed-ing out bash from spacefm before building the package has a disadvantage that needs to be considered.
A lot of spacefm plugins (eg. find plugin) need bash in order to properly run once installed (with sh they break).
So I advise against removing the bash dependency from spacefm unless unless this plugin issue is solved. A spacefm-plugin package where bash dependecies have been cleaned can be an alternative approach.
Offline
i agree
Offline
Pages: 1
[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 1.57 MiB (Peak: 1.77 MiB) ]