[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to correctly pass filename to dchroot



On Tue, 03 Jan 2006 20:46:52 +0000
Koen Vermeer <k.a.vermeer@tudelft.nl> wrote:

> Hi,
> 
> I recently installed Debian on a new 64 bit laptop. As I also like to
> run OpenOffice, I installed a 32 bit chroot. With a simple 'dchroot -d
> oowriter', I can now start Writer.
> 
> I'd like to be able to simply click a file on my Gnome desktop. It's
> easy to tell Gnome to run 'dchroot -d oowriter', but I cannot tell it
> how to pass the filename. The problem is that, if I have a file with
> name 'test test.doc', I can open it by running 'dchroot -d oowriter
> "test\ test.doc'. The following methods don't work:
> dchroot -d oowriter test test.doc
> dchroot -d oowriter test\ test.doc
> dchroot -d oowriter "test test.doc"
> 
> I expect that I'm not the only one with this problem, so how did
> others solve it? Or should I be asking aroung on a Gnome list?
> 
> Thanks for any help!
> 
> Koen

if the directory is accessible under the same name as  on the main
system (using bind mount) then the following script works well for me:

###########################################################
/usr/bin/run-chroot.sh:
###########################################################
#! /bin/sh

ARGS=""
for i in "$@" ; do
        ARGS="$ARGS '$i'"
done

dchroot -d  "`basename $0`" "$ARGS"
###########################################################

i then make symbolic links to it named as the commands in the chroot
(works only for tools you don't have installed 64bit to...in this case
you have to modify the script and make copys...)

yours
albert

-- 
Albert Dengg <a_d@gmx.at>



Reply to: