Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: emninger on October 31, 2015, 07:16:52 AM
-
As i understand, Wbar is the standard programm starter for TC.
Now, i see that wbar only takes those programs which are loaded on boot and that therefore are present in ram. Is it possible to configure it in a way that the reference to the program that should be started is in some way static, i.e. wbar does the "Load app locally" AND starts the program then?
-
See Apps GUI -> Apps -> Maintenance -> OnDemand Maintenence
This will create scripts in /etc/sysconfig/tcedir/ondemand which, if PNG images with the same name but with .img file name extension are present, will show up in wbar after login in to the desktop.
You can get the png icons from /usr/local/share/pixmaps .
This way you can add many items to wbar without wasting your RAM.
-
Thanks a lot! Sounds good :D
-
See Apps GUI -> Apps -> Maintenance -> OnDemand Maintenence
This will create scripts in /etc/sysconfig/tcedir/ondemand which, if PNG images with the same name but with .img file name extension are present, will show up in wbar after login in to the desktop.
You can get the png icons from /usr/local/share/pixmaps .
This way you can add many items to wbar without wasting your RAM.
Tried that for gimp and abiword and it's working fine. Although: It was a bit difficult to find the real (physical) png files of the apps (and not only the symlinks). And i had to rename them to *.img. But now, they're there sitting in the wbar. Thanks again for the excellent tip. :D
-
Yeah, the functionality to automatically copy those icons for OnDemand items was removed at some point in the past. At least I believe to remember that some Tiny Core 4.x release still copied those icons if the extension was already loaded.
cp /usr/local/share/pixmaps/abiword.png /etc/sysconfig/tcedir/ondemand/abiword.img
-
For anyone interested, I made some icon eye candy for newly created OnDemand items.
Only works if the extension in question is already loaded and then added to OnDemand.
If ImageMagick is installed, a semi transparent icon will be generated, which will be used by wbar until the OnDemand item is loaded.
--- /tmp/core/usr/bin/ondemand
+++ /tmp/more/usr/bin/ondemand
@@ -117,6 +117,23 @@
echo 'ondemand -e '"$EXTN"' "$@"' >> "$FILE"
chmod +x "$FILE"
+if [ -e "$FREEDESKTOP"/"$APPNAME".desktop ]; then
+ FREEDESKICON="$(/bin/busybox awk 'BEGIN {FS = "="} {if ( $1 == "X-FullPathIcon" ) {icon = $2}} END {print icon}' "$FREEDESKTOP"/"$APPNAME".desktop)"
+fi
+if [ -z "$FREEDESKICON" ] && [ -e /usr/local/share/pixmaps/"$APPNAME".png ]; then
+ FREEDESKICON="/usr/local/share/pixmaps/$APPNAME.png"
+fi
+if [ -n "$FREEDESKICON" ]; then
+ # convert PNG to be semi-transparent via ImageMagick, if available.
+ if [ $(which convert) ]; then
+ convert "$FREEDESKICON" \
+ -alpha set -channel A -evaluate multiply 0.6 +channel \
+ /etc/sysconfig/tcedir/ondemand/"$APPNAME".img
+ else
+ cp "$FREEDESKICON" /etc/sysconfig/tcedir/ondemand/"$APPNAME".img
+ fi
+fi
+
# Optional as flwm does not need a make_ondemand.
[ $(which ${DESKTOP}_ondemand) ] && ${DESKTOP}_ondemand "$APPNAME"
Needs manual modification of core.gz .