Tiny Core Linux
Tiny Core Base => TCB Bugs => Topic started by: bj0 on January 12, 2011, 04:53:08 PM
-
The .xsession script that executes scripts in /home/tc/.X.d/ use "find .X.d -type f", which doesn't include symlinks. If extensions try to put script files in this directory to get executed when X starts, it becomes a symlink and doesn't get executed.
-
Just as a matter of interest, which extension from the repository appears to exhibit this problem?
If it is a private extension (e.g. 'my_ext.tcz') I'd simply include in this extension a startup-script (e.g. '/usr/local/tce.installed/my_ext') in which I'd search for such links and replace the symbolic link by a copy of the file in question. Or (probably eaiser) as the file in '~/.X.d' is assumed to be quite small I'd use something like 'echo "COMMANDS" > ~/.X.d/my_script' in said startup script.
-
--- etc/skel/.xsession Thu Jan 13 10:23:33 2011
+++ etc/skel/.xsession.ln Thu Jan 13 10:28:56 2011
@@ -9,4 +9,4 @@
fi
[ -x ./.mouse_config ] && ./.mouse_config &
[ $(which "$ICONS".sh) ] && ${ICONS}.sh &
-[ -d ".X.d" ] && find ".X.d" -type f -print | while read F; do . "$F"; done
+[ -d ".X.d" ] && find ".X.d" -type f -print && find ".X.d" -type l -print | while read F; do . "$F"; done
DISCLAIMER: untested
-
If you want to go down that path of changing '.Xsession' I'd suggest:
[ -d ".X.d" ] && find ".X.d" -type f -o -type l | while read F ; do . "$F" ; done
This is not Solaris which IIRC used to require '-print' in 'find' expressions, and I don't see the point of running two finds if one can do it.
-
If you want to go down that path of changing '.Xsession' I'd suggest:
[ -d ".X.d" ] && find ".X.d" -type f -o -type l | while read F ; do . "$F" ; done
This is not Solaris which IIRC used to require '-print' in 'find' expressions, and I don't see the point of running two finds if one can do it.
Agreed with your conclusion.
1. I did not find an '-o' option documented for busybox find, but then perhaps I was missing it somehow.
2. I had wondered myself about the necessity of '-print', but as it was already there, I didn't want to make a change which was not essential to achieve the goal.
So, if your suggestion works, it looks certainly more elegant ;)