Code Sample |
#!/bin/bash # An add-on for Rapidweather Remaster of DSL Linux, version 0.2.9 # Based on Damn Small Linux 0.6.2 # For IBM 350 P90 only. Contains specific file locations for this machine only. # A way to obtain Opera 6.03 installed in /dev/hdb3, SuSE Linux. # Copy everything to ramdisk and run it from there. # File name and location is /home/damnsmall/download/boot_opera.sh # System must be restored from /dev/hda1 for this file to be present. # Run this script from the fluxbox menu. # First, mount hdb3 echo Getting Opera 6.03 files from the hard drive... mount -o rw /dev/hdb3 /mnt/hdb3 sleep 2 # make some directories mkdir /ramdisk/usr/ # mkdir /ramdisk/usr/bin ## don't need this directory mkdir /ramdisk/usr/share mkdir /ramdisk/usr/share/opera mkdir /ramdisk/usr/lib mkdir /ramdisk/usr/lib/opera mkdir /ramdisk/usr/lib/opera/6.03-20020813.1 echo "Copying Opera to ramdisk." sleep 2 # copy all the files to ramdisk: sudo cp -r /mnt/hdb3/usr/share/opera /ramdisk/usr/share # copy the opera executable: sudo cp -r /mnt/hdb3/usr/lib/opera/6.03-20020813.1/opera /ramdisk/usr/lib/opera/6.03-20020813.1/opera echo "Opera has been copied to ramdisk." # Unmount hdb3 now that we have the Opera files. sleep 2 umount /mnt/hdb3 # run the opera executable after a little wait. sleep 1 ## now the ramdisk directories should be ready for use. echo "Running Opera 6.03:" # Using the modified opera wrapper script in /home/damnsmall/download to start opera. /home/damnsmall/download/start_opera ## the terminal will remain open while Opera runs. # now that Opera has been closed, remove the ramdisk files and directories for Opera: sleep 1 sudo rm -R /ramdisk/usr/* sudo rmdir /ramdisk/usr # once Opera is closed print this message: echo "Opera is now closed, bye." sleep 1 exit |
Code Sample |
Debian MENU [begin] (Menu) [exec] (Mozilla Firefox) {/opt/firefox/firefox} [exec] (Opera 6.03) {rxvt -rv -fb 10x20 -geometry 60x10+20+12 -cr yellow -T "Install_Opera" -e sudo /home/damnsmall/download/boot_opera.sh} [exec] (Sylpheed Mail) {sylpheed} |
Code Sample |
#!/bin/sh # Location of the Opera binary # Modified for RR of DSL Linux. OPERA=/ramdisk/usr/lib/opera/6.03-20020813.1/opera if test ! -f ${OPERA}; then echo "The Opera binary is not located at \"${OPERA}\"." echo "Please modify the wrapper script at \"${0}\"." exit 1 elif test ! -x ${OPERA}; then echo "You do not have execute rights on \"${OPERA}\", please ask the sysadmin to chmod +x it." exit 1 fi # Opera enviroment if test "${OPERA_DIR}" = ''; then if test -d /ramdisk/usr/share/opera; then OPERA_DIR=/ramdisk/usr/share/opera else echo "OPERA_DIR unset and not found at expected location (/usr/share/opera)" exit 1 fi fi # Opera Plug-in enviroment, Add more plugin search paths here # If OPERA_PLUGIN_PATH is set NPX_PLUGIN_PATH will be ignored |