DSL Ideas and Suggestions :: multiple storage folder for extensions



hello,
with the number of extensions growing at a fast pace, it's more and more difficult to find our way to the one needed in the fluxbox menu, or in the MyDSL click and Load app.

So i came up with the idea to store the extension in subfolders inside the optional one... but these are only recognised by emelfm.
I think that an implementation in the fluxbox menu and in the MyDSL app of such a way to manage extension should be a great addition to this already very good distro.

Thinking about it, if such an upgrade should come to life, the subfolders may be named after the existing fluxbox menu entries,  and the extensions, once loaded, should appear in these ones instead of the mydsl entry (which should imho be used only to load and unload extension)

Another idea would be to extend the capabilities of the mydsl boot parameter to include folders to be automaticaly loaded. This way, one could setup specialized environnement just by placing extensions in the right folders (eg. a game folder, a work one, an internet one, etc...)

As a linux complete newbie, however, i'm unable to do it by myself, that's why i suggest.

Thanks for all the great work allready done... and to come.

I was thinking the same thing the other day.  At least a way to sort them and still have the folders scanned at boot time to appear in the mydsl menu.
themes folder
games
ham_radio
tools
net

i think it is possible to add a MYDS_DIR= bootoption. (like KNOPPIX_DIR="

then you need a patch to /etc/init.d/dsl-config like:

Code Sample

echo -n "${BLUE}Checking for myDSL apps... ${NORMAL}"
  if checkbootparam "mydsl"; then
     CKMYDSL="yes"
  fi

>>   MYDSL_DIR=""
>>   MYDSL_DIR="$(getbootparam 'mydsl_dir')"

  if checkbootparam "toram"; then
     TORAM="yes"
     mount -t iso9660 /dev/cdrom /cdrom2 > /dev/null 2>&1
>>      getmydslapps "/cdrom2$MYDSL_DIR"
     umount /cdrom2
  else
>>      getmydslapps "/cdrom$MYDSL_DIR"
  fi
  MYDSL="$(getbootparam 'mydsl')"
  if [ ! -z "$MYDSL" ]; then
     MYDSL="/mnt/$MYDSL"
     echo "$MYDSL" > /etc/sysconfig/mydsl.mount
     mount "$MYDSL"
     if [ $? == 0 ]; then
        UMOUNT="yes"
>>         getmydslapps "$MYDSL$MYDSL_DIR"
        if [ "$UMOUNT" == "yes" ]; then
           umount "$MYDSL"
        fi
     fi
  fi


maybe it is possible to do a hotfix.
put the new dsl-config in a dsl-config.dsl in the root of your MYDSL= ( this will overwrite the old dsl-config) and then have it call itself?

henk.

This is how i did it

i made a copy of/etc/init.d/dsl-config to /etc/rc5.d/S02dsl-config

i modified the lower part oft the file to:

Code Sample


MYDSL_DIR=""

mkmydslmenu(){
  MYMENU="/var/tmp/mydsl.menu"
  if [ -d "$MYMENU" ]; then
     DSLMENU="$HOME/.fluxbox/menu"
     WORK="/var/tmp/menu.$$"
     CNT=$(wc -l "$DSLMENU"|awk '{print $1}')
     RESTOFIT=`expr "$CNT" - 2`
     head -2 "$DSLMENU" > /"$WORK"
     echo "   [submenu] (myDSL-$MYDSL_DIR) {}" >> "$WORK"
     for FILE in `ls $MYMENU/ 2>/dev/null`
     do
        cat "$MYMENU/$FILE" >> /"$WORK"
     done
     echo "   [end]" >> "$WORK"
     tail -"$RESTOFIT" "$DSLMENU" >> "$WORK"
     mv "$WORK" "$DSLMENU"
     rm -rf "$MYMENU"
  fi
  return 0
}


# Reread boot command line; echo last parameter's argument or return false.
getbootparams(){
stringinstring " $1=" "$CMDLINE" || return 1
result="${CMDLINE##*$1=(}"
result="${result%%[)]*}"
echo "$result"
return 0
}
### END functions

HOME="/home/dsl"
INSTALLED=""
TORAM=""
CKMYDSL=""

  CMDLINE="$(cat /proc/cmdline)"

  echo -n "${BLUE}Checking for myDSL apps... ${NORMAL}"
  if checkbootparam "mydsl"; then
     CKMYDSL="yes"
  fi
 
 
  if checkbootparam "mydsl_dir"; then
 
 
  MYDSL_DIRS="$(getbootparams 'mydsl_dir')"

echo $MYDSL_DIRS


  for MYDSL_DIR in $MYDSL_DIRS
  do

  if checkbootparam "toram"; then
     TORAM="yes"
     mount -t iso9660 /dev/cdrom /cdrom2 > /dev/null 2>&1
#      getmydslapps "/cdrom2"
     getmydslapps "/cdrom2$MYDSL_DIR"
     umount /cdrom2
  else
#      getmydslapps "/cdrom"
     getmydslapps "/cdrom$MYDSL_DIR"
  fi
  MYDSL="$(getbootparam 'mydsl')"
  if [ ! -z "$MYDSL" ]; then
     MYDSL="/mnt/$MYDSL"
     echo "$MYDSL" > /etc/sysconfig/mydsl.mount
     mount "$MYDSL"
     if [ $? == 0 ]; then
        UMOUNT="yes"
#         getmydslapps "$MYDSL"
getmydslapps "$MYDSL$MYDSL_DIR"
        if [ "$UMOUNT" == "yes" ]; then
           umount "$MYDSL"
        fi
     fi
  fi
  mkmydslmenu
  done
 
  echo " ${BLUE}Done. ${NORMAL}"

else
  echo " ${BLUE}None. ${NORMAL}"
fi



1. a small change to mkmydslmenu()
2. a new getbootparams()
3. many more changes in main part
 ( check for mydsl_dir=, loop all mydsl_dirs)

4. than made a .dsl file of if ( tar -czvf S02dsl-config.dsl /etc/rc5.d/S02dsl-config)
5. copied to the boot root or MYDSL=
6. added mydsl_dir=(dir1 dir2) to the boot prameters

This is how it works:

first it does the normal loading of dsl extentions (during /etc/rcS.d)
then it does the extra loading (during /etc/rc5.d)

as a result you get all extentions loaded from the root and /optional AND all extentions en optionals from the directories named in mydsl_dir=( ... )

this results in the following fluxbox menu:
Code Sample

ebian MENU
[begin] (DSL)
  [submenu] (myDSL-/dir2) {}
 [submenu](Install Optional Extensions){}
   [exec](bittorrent){/usr/bin/mydsl-load /cdrom/dsl-wendy/optional/bittorrent.dsl}
 [end]
  [end]
  [submenu] (myDSL-/dir1) {}
  [exec] (AbiWord) {/opt/abiword/abiword}
  [exec] (MPlayer) {/usr/bin/gmplayer}
    [submenu](Install Optional Extensions){}
   [exec](samba){/usr/bin/mydsl-load /cdrom/dsl-henk/optional/samba.dsl}
 [end]
  [end]
  [submenu] (myDSL) {}
     [exec] (FireFox) {/opt/firefox/firefox}
   [exec] (Amsn) {/usr/bin/amsn}
[exec] (Aterm) {/opt/aterm/dsl-aterm}
 [submenu](Install Optional Extensions){}
   [exec](nmap){/usr/bin/mydsl-load /cdrom/optional/nmap.dsl}
 [end]
     [exec] (Rox Filer) {/opt/.start_rox}
     [submenu] (tcltk) {}
        [exec] (tclsh) {rxvt -rv -fn fixed -T "tclsh8.3" -e /bin/tclsh8.3}
        [exec] (wish) {rxvt -rv -fn fixed -T "wish8.3" -e /bin/wish8.3}
     [end]
  [end]
  [submenu] (Apps) {}
     [submenu] (Editors) {}
.....



henk.

wow ! seems to be exactly what i mean ! thanks a lot, i'll try it this week-end...
it might be a good idea to post it to the repository as a .dsl for the tech afraid newbies however.

Next Page...
original here.