|
2010-05-31
, 16:02
|
Posts: 726 |
Thanked: 345 times |
Joined on Apr 2010
@ Sweden
|
#2
|
debbie evince doc1.pdf
|
2010-05-31
, 16:03
|
Posts: 539 |
Thanked: 165 times |
Joined on Feb 2010
@ Berlin, Germany
|
#3
|
|
2010-05-31
, 16:05
|
Posts: 539 |
Thanked: 165 times |
Joined on Feb 2010
@ Berlin, Germany
|
#4
|
|
2010-05-31
, 16:06
|
Posts: 692 |
Thanked: 264 times |
Joined on Dec 2009
|
#5
|
Pardon my ignorance, I don't use Easy Debian, but why won'twork?Code:debbie evince doc1.pdf
|
2010-05-31
, 16:08
|
Posts: 726 |
Thanked: 345 times |
Joined on Apr 2010
@ Sweden
|
#6
|
I also don't know exactly how EasyDebian works but I guess all file calls need absolute paths. This happens.
|
2010-05-31
, 16:14
|
Posts: 726 |
Thanked: 345 times |
Joined on Apr 2010
@ Sweden
|
#7
|
Because Easy Debian runs in a chroot, you don't get the same working directory when you use a debbie/sudo debian command, so relative paths are useless.
And x-lette you're totally right, I could have done both of those things. I thought I'd just lay it out in a more self-explanatory manner to help the noobs understand.
|
2010-05-31
, 17:37
|
Posts: 692 |
Thanked: 264 times |
Joined on Dec 2009
|
#8
|
But, your script supplies the full path, from the root, down to your file, so Easy Debian must still be able to handle the whole file system. Or is the script run after the chroot has been set up? Then it's a matter of letting the wrapper script know where you started it from and if the file name starts with a "/". CWD is known when you start the wrapper script.
And, please, this is not me trying to bash () your script or your idea, I'm just trying to understand.
|
2010-10-09
, 22:53
|
Posts: 4 |
Thanked: 2 times |
Joined on Apr 2010
|
#9
|
sudo /sbin/debian su $DEBUSER -c "$*"
sudo /sbin/debian su $DEBUSER -l -c "cd $PWD; $*"
cd /home/user debbie ls -l dir/file.txt
cd /home/user debbie "ls MyDocs; df .; df /"
The Following User Says Thank You to stanman For This Useful Post: | ||
debbie evince `~/getabpath doc1.pdf`
(this example assumes you put the script in ~/ but you could put it in /usr/bin)
You could even integrate it into your debbie/debian scripts in /usr/bin to make this sort of thing automatic.
"Impossible is not in the Maemo vocabulary" - Caballero
Last edited by GameboyRMH; 2010-05-31 at 16:13.