You are not logged in.
Pages: 1
Since I replaced dchroot with schroot I have a problem.
In /usr/bin I have a script run32.sh to run 32 bit applications, and symbolic links like acroread32 pointing to run32.sh, firefox32 pointing to run32.sh etc.
Here is the run32.sh I had before
#!/bin/bash
cmd=`basename $0 | sed -n s/32//p`
for (( i=1; $i<=$#; i=$i+1 )); do
esc[$i]=$(sed -e 's#\([^[:alnum:]]\)#\\\1#g' <<<${!i})
done
exec schroot -p "$cmd" "${esc[@]}"
The for loop is a trick I stole from the web for escaping some characters.
But this is not working anymore with schroot.
So I modified run32.sh like this:
#!/bin/bash
cmd=`basename $0 | sed -n s/32//p`
ct=0
arg=\"
for i in "$@"
do
ct=$(($ct+1))
if [ $ct -eq 1 ]
then
arg="$arg$i"
else
arg="$arg $i"
fi
done
arg=$arg\"
echo exec schroot -p $cmd $arg
exec schroot -p $cmd $arg
Notice that at the end I echo the exec command and then I execute it.
It works fine for simple arguments, like
acroread32 foo.pdf
but not for composite arguments like
acroread32 foo boo.pdf
or
acroread32 foo\ boo.pdf
(this last one is when I use the tab key to complete the name of the file).
The thing that I really don't understand is that, typing
acroread32 foo boo.pdf
the echoed command is
exec schroot -p acroread "foo boo.pdf"
and I get an error
I: [Arch32-8398824e-10d9-4adf-a299-10c09116e262 chroot] Running command: "acroread foo boo.pdf"
but then, if i type directly to the command line
exec schroot -p acroread "foo boo.pdf"
it opens the file!
Has somebody a solution to deal both with files like "foo.pdf" and "foo boo.pdf"?
Offline
Is there any reason your choosing to use acroread over some other form of pdf viewer via a chroot?
Offline
Is there any reason your choosing to use acroread over some other form of pdf viewer via a chroot?
Usually I use kpdf but for some particular features acroread is better. But it's not the point, acroread is just an example. You can do another example with firefox 32 bit, that I use for flash and jre, and mplayer 32 bit, that I use for some win32 codecs.
Offline
I personally ditched schroot and went back to dchroot. No need to fix something that isn't broken. I just made my own pkgbuild and renamed the package to dchroot_old so that it is not automatically updated by pacman (no idea why schroot wants to automatically replace dchroot).
I posted the PKGBUILD in this thread: http://bbs.archlinux.org/viewtopic.php?id=56785
Offline
Pages: 1