Bind mounts do the same job as links. Links are better.!
Ibidem; Correct. My post on the first page shows the 3 files that run it ( It`s old now ).
First is a unique script that exports the pkg. name+ver., runs script 2 passing app. exec. and args.
Second is a generic script, mounts Sq. files and unionfs-fuse, runs script 3 passing app. exec. and args.
Third is a generic tiny ( 31 b ) "hook" script that does chroot and runs the app`s. exec.
There`s a RW config. dir. layer, on a RO app. dir. layer, on a RO / layer, all on a union dir.
Chroot into the union dir. and all 3 layers should be accessible as / . Right?
I look at the union dir. and all of the layers ARE there. Chroot isn`t playing nice.
xMahjongg runs just fine in this setup, but so far nothing else works.
### I`m now thinking of different ways to use the union without chroot.
I thought of 5 unions, Save layers mounted on each: /etc, /var, /opt, /root, /usr/share
Each of them like this: unionfs-fuse /tmp/OS/etc=RW:/tmp/OS/sq.mnt/etc=RO /etc
Links in /etc point to the AppPkg /etc dir. So the config. files are in AppPkg.
Also 1 union like Puppy ( chroot ) with a Save layer of only configs. and links on / .
No App. installs in Save because there`s no need to with AppPkgs.
For Puppy I`ve said before that there should be 2 Save files, for configs. and apps.
.
First is a unique script that exports the pkg. name+ver., runs script 2 passing app. exec. and args.
Second is a generic script, mounts Sq. files and unionfs-fuse, runs script 3 passing app. exec. and args.
Third is a generic tiny ( 31 b ) "hook" script that does chroot and runs the app`s. exec.
There`s a RW config. dir. layer, on a RO app. dir. layer, on a RO / layer, all on a union dir.
Chroot into the union dir. and all 3 layers should be accessible as / . Right?
I look at the union dir. and all of the layers ARE there. Chroot isn`t playing nice.
xMahjongg runs just fine in this setup, but so far nothing else works.
### I`m now thinking of different ways to use the union without chroot.
I thought of 5 unions, Save layers mounted on each: /etc, /var, /opt, /root, /usr/share
Each of them like this: unionfs-fuse /tmp/OS/etc=RW:/tmp/OS/sq.mnt/etc=RO /etc
Links in /etc point to the AppPkg /etc dir. So the config. files are in AppPkg.
Also 1 union like Puppy ( chroot ) with a Save layer of only configs. and links on / .
No App. installs in Save because there`s no need to with AppPkgs.
For Puppy I`ve said before that there should be 2 Save files, for configs. and apps.
.
Excellent idea, especially for netbooks.sunburnt wrote:I like the idea of many slide-out panels.
I posted a concept of labeled colored bars anywhere along the screen sides. hover to slide-out.
On a single left side panel: desktop buttons, drive/partition buttons, task-bar buttons, and tray.
Task-bar and drive/partition buttons are stacked vertically so lots of them fit in a small space.
Another left side panel bar labeled menu is a slide-out apps. menu that can also be DnD on.
Desktop icons get covered up, but the bars and panels are on-top, so drag-hover-select-drop.
Desktop icons are messy, slide-out panels organize items and the desktop`s clean and pristine.
Thanks greengeek; All "loose file" apps. in one layer, and everything else in the other.
Portable to the future... Never gonna happen, they keep changing everything.
JWM has changed, and the apps. change for no reason at all it seems.
GTK folks redo all kinds of stuff on a regular basis, and so do many others.
Only the base Linux O.S. stuff stays the same, neer as I can tell...
Standards. IF they don`t wanna, it`s okay, then they`re just not compatible.
What if Firefox`s user base fell because they didn`t follow "app. standards".
Portable to the future... Never gonna happen, they keep changing everything.
JWM has changed, and the apps. change for no reason at all it seems.
GTK folks redo all kinds of stuff on a regular basis, and so do many others.
Only the base Linux O.S. stuff stays the same, neer as I can tell...
Standards. IF they don`t wanna, it`s okay, then they`re just not compatible.
What if Firefox`s user base fell because they didn`t follow "app. standards".
Last edited by sunburnt on Thu 24 Jan 2013, 07:50, edited 1 time in total.
jpeps; And mixing the apps. and those config. files make for a real mess.
Make it easy to do separate backups of the configs. and also the apps.
Speaking of mixing, how about /root and /home for configs. and user files?
At least put the config. files in a hidden sub dir. so the noobs don`t bork it.
Make it easy to do separate backups of the configs. and also the apps.
Speaking of mixing, how about /root and /home for configs. and user files?
At least put the config. files in a hidden sub dir. so the noobs don`t bork it.
Last edited by sunburnt on Thu 24 Jan 2013, 07:57, edited 2 times in total.
True enough. But if you set a well designed precedent others will quickly adopt/modify it. I think thats a great idea to have a separate savefile for personal settings/private data. I'm gonna give that idea 12.5 out of 10sunburnt wrote:Portable to the future... Never gonna happen, they keep changing everything.
- puppy distro layer
- app layer
- personal layer
Last edited by greengeek on Thu 24 Jan 2013, 08:00, edited 1 time in total.
Possibly so, but did Uncle Bill foresee Android? I doubt he did, yet Android gives many users a data experience they are happy with. Good ideas that give the end user the experience they want can sometimes win through in the modern market regardless of the origin.sunburnt wrote:It`s the "Uncle Bill" syndrome, "Do it my way or not at all...".
I hope you get some breakthroughs with your preferred puppy architecture - I think you have some ideas here that users will appreciate.
Not sure why you say that...sunburnt wrote:You have the layers reversed. And config. not personal.
Choice 1 would be to select the puppy you prefer.
Choice 2 would be to select the range of apps someone else has added to the puppy. (eg: "multimedia pack", or " "science pack")
Choice 3 would be to graft your own personal (private) settings over the top of everything. (eg: "wireless key", and/or "local language") etc
Ibidem; I think your script example was for chroot into an empty dir.?
My script was including / in the union stack so everything should work. Right?
This explains the error: "/proc is already mounted", it was already working.
So why`s it fail to find the google-chrome file which I can see in the union?
My script was including / in the union stack so everything should work. Right?
This explains the error: "/proc is already mounted", it was already working.
So why`s it fail to find the google-chrome file which I can see in the union?
Is chrome invoked in a command invoked by chroot?sunburnt wrote:Ibidem; I think your script example was for chroot into an empty dir.?
My script was including / in the union stack so everything should work. Right?
This explains the error: "/proc is already mounted", it was already working.
So why`s it fail to find the google-chrome file which I can see in the union?
For reference, this:
Code: Select all
chroot "/path/to/" something
setup.sh
That`s pretty much what my run script does.
At the bottom is the run script
I tried this setup with avidemux and it can`t find the exec. file also.
Chrome`s wrapper script errors oddly, when it can find it.
But xMahjongg runs great with the exact same setup. Really weird...
At the bottom is the run script
Code: Select all
======= Script: chrome
#!/bin/sh
cd ${0%/*}/.AppPkg
export Pkg="chrome-24_i386"
./setup google-chrome --user-data-dir=profile --disk-cache-size=20971520 &
======= Script: setup
#!/bin/sh
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Mnt. Sq. Files & Union, Run App.
if [ "$1" ];then
echo -e "\n\n### Run: $Pkg\n"
App="$Pkg/$Pkg.app" ### Mount App. Sq. File
Sq="$Pkg/$Pkg.sq"
[ ! -d $App ]&& echo -e "### ERROR: NO App. Dir.: $Pkg.app\n" && exit
[ ! "`ls $App`" ]&& if [ -f "$Sq" ];then # IF app dir. empty
mount -t squashfs -o loop $Sq $App # IF Sq. file, mnt.
[ $? -gt 0 ]&&
echo -e "### ERROR: Fail Mount App. File: $Pkg.sq\n" && exit
echo -e "# Mount App. Sq. File: $Pkg.sq\n"
fi
### Mount union fs
unionfs-fuse $Pkg/$Pkg.rw=RW:$Pkg/$Pkg.app=RO:/=RO $Pkg/$Pkg.u
[ $? -gt 0 ]&&
echo -e "### ERROR: Fail Mount Union: $Pkg.u\n" && setup &
echo -e "# Mount Union: $Pkg.u\n"
./run $@ & ### Run hook file
else #>>>>>>>>>>>>>>>>>>>>>>>>>>>> Delete Dependency Link, Unmount Sq. Files.
echo -e "### End: $Pkg\n"
umount -f $Pkg/$Pkg.u # Unmount union fs
[ $? -eq 0 ]&& echo -e "# UnMount Union: $Pkg.u\n" ||
echo -e "### ERROR: Fail UnMount Union: $Pkg.u\n"
Mnt=`mount`
App=`echo "$Mnt" |grep $Pkg.app`
if [ "$App" ];then umount -d $Pkg/$Pkg.app # Unmount App. file
[ $? -eq 0 ]&& echo -e "# UnMount App. Sq. File: $Pkg.sq\n" ||
echo -e "### ERROR: Fail UnMount App. File: $Pkg.sq\n"
fi
fi
======= Script: run
chroot $Pkg/$Pkg.u $@
./setup &
Chrome`s wrapper script errors oddly, when it can find it.
But xMahjongg runs great with the exact same setup. Really weird...
I've modified the shell scripts in ways that should be synonymous with your version.
Let's see if I'm following the logic (BTW, it seems clearer with a code block per file, and your commenting style somehow seems to obscure it):
Which suggests that your code will not work with wrappers that execute things in the background...
Also, you might check the return values from unionfs-fuse: it looks like a nonzero return would cause that sort of issue.
OK, so the "setup &" is unmounting everything...sunburnt wrote:That`s pretty much what my run script does.
At the bottom is the run scriptI tried this setup with avidemux and it can`t find the exec. file also.Code: Select all
======= Script: chrome #!/bin/sh cd ${0%/*}/.AppPkg export Pkg="chrome-24_i386" ./setup google-chrome --user-data-dir=profile --disk-cache-size=20971520 & ======= Script: setup #!/bin/sh #>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Mnt. Sq. Files & Union, Run App. if [ "$1" ];then echo -e "\n\n### Run: $Pkg\n" App="$Pkg/$Pkg.app" ### Mount App. Sq. File Sq="$Pkg/$Pkg.sq" [ ! -d $App ]&& echo -e "### ERROR: NO App. Dir.: $Pkg.app\n" && exit [ ! "`ls $App`" ]&& if [ -f "$Sq" ];then # IF app dir. empty mount -t squashfs -o loop $Sq $App || { echo -e "### ERROR: Fail Mount App. File: $Pkg.sq\n" && exit } echo -e "# Mount App. Sq. File: $Pkg.sq\n" fi ### Mount union fs #this ought to exit on failure, surely? unionfs-fuse $Pkg/$Pkg.rw=RW:$Pkg/$Pkg.app=RO:/=RO $Pkg/$Pkg.u || { echo -e "### ERROR: Fail Mount Union: $Pkg.u\n" && setup & } echo -e "# Mount Union: $Pkg.u\n" ./run $@ & ### Run hook file else echo -e "### End: $Pkg\n" umount -f $Pkg/$Pkg.u && echo -e "# UnMount Union: $Pkg.u\n" || echo -e "### ERROR: Fail UnMount Union: $Pkg.u\n" Mnt=`mount` App=`echo "$Mnt" |grep $Pkg.app` if [ "$App" ];then umount -d $Pkg/$Pkg.app && \ echo -e "# UnMount App. Sq. File: $Pkg.sq\n" || \ echo -e "### ERROR: Fail UnMount App. File: $Pkg.sq\n" fi fi ======= Script: run chroot $Pkg/$Pkg.u $@ ./setup &
Chrome`s wrapper script errors oddly, when it can find it.
But xMahjongg runs great with the exact same setup. Really weird...
Let's see if I'm following the logic (BTW, it seems clearer with a code block per file, and your commenting style somehow seems to obscure it):
Code: Select all
chrome
#cd .AppPkg; mount union
# run google-chrome --user-data-dir=profile --disk-cache-size=20971520 &
# == chroot $Pkg/$Pkg.u google-chrome --user-data-dir=profile --disk-cache-size=20971520
# when this exits we run:
# setup &
Also, you might check the return values from unionfs-fuse: it looks like a nonzero return would cause that sort of issue.
I agree with Ibidem about backgrounding the ./setup command.
I hadn't forgotten about this thread. Instead I had been experimenting here on my system as a normal user. Actually, suing chroot by itself is impossible as a normal user -even if using sudo! (The same will actually apply to mount itself.)
So I had been looking for other solutions and came across 'schroot' -but it needs configuring for individual chroots -although it claims to be safer than real chroot. But then, I found fakechroot which seems to solve the problem nicely. Both schroot and fakechroot are debian projects so they should be in the repos you are using.
I hadn't asked before, but what system exactly are you trsing this all on. If you are running as root or running some puppy derivative, then your results are not gonna reflect any sort of reality for people using other systems.
Anyway, I just got a chroot working here using unionfs-fuse and fakechroot without any problems at all. I had downloaded the chrome browser a couple of days ago and first got it working normally to avoid any mix-ups. Apparently the chrome builds have less dependencies than using the real chromium. I'll try to get an example chrome-in-union working tomorrow and post the results.
I hadn't forgotten about this thread. Instead I had been experimenting here on my system as a normal user. Actually, suing chroot by itself is impossible as a normal user -even if using sudo! (The same will actually apply to mount itself.)
So I had been looking for other solutions and came across 'schroot' -but it needs configuring for individual chroots -although it claims to be safer than real chroot. But then, I found fakechroot which seems to solve the problem nicely. Both schroot and fakechroot are debian projects so they should be in the repos you are using.
I hadn't asked before, but what system exactly are you trsing this all on. If you are running as root or running some puppy derivative, then your results are not gonna reflect any sort of reality for people using other systems.
Anyway, I just got a chroot working here using unionfs-fuse and fakechroot without any problems at all. I had downloaded the chrome browser a couple of days ago and first got it working normally to avoid any mix-ups. Apparently the chrome builds have less dependencies than using the real chromium. I'll try to get an example chrome-in-union working tomorrow and post the results.