My tips and tricks


Forum: DSL Tips and Tricks
Topic: My tips and tricks
started by: CyberCod

Posted by CyberCod on Mar. 14 2007,23:24
Below are just some of the tips and tricks I've come up with, they're pretty simple, but they may help some people out.

/opt/bootlocal.sh

this file is where you can put in commands that you want executed before the login prompt.  

If you have to manually configure your net or sound or something, you can just add the commands you use in this file and they will be executed before it gets to login.  My bootlocal.sh file looks like this


Code Sample

#!/bin/bash
#put other system startup command here
/sbin/syslogd
loadkey us
#---above here is the original stuff

sudo /mydsl/startwireless.sh #---this is a script to load my wireless drivers

sudo /mydsl/connectwireless.sh #---this is a script to connect to my home network

sudo /mydsl/startsound.sh #---my soundcard script

sudo mount /dev/hda3 /mnt/hda3 #---mounts my other partition

mpg123 /home/dsl/.hail.mp3  #---does a sound effect to let me know that the login is coming up

clear #clears the screen

echo " " #blank line
echo "  Keyboard fingerprint scan enabled..." # a little paranoia goes a long way to avoid would-be meddlers

echo " Authorized Personel only:"
echo " "




obviously those scripts must exist and the mp3 file must exist, but thats not too hard to figure out.  If you need to make a script, just make a blank file with the name ending in .sh and put your commands in there that you normally use to do said task and then save and close it and make it executable.

I have another longer startup sound put in /home/dsl/.xinitrc

I've also done away with the icons entirely and rely on the wmdrawer app from the Mydsl repos... which, once installed, can be configured with /home/dsl/.wmdrawerrc


My Right-click menu for the desktop has been customized.  You edit the file /home/dsl/.fluxbox/menu to do that.

here is how I have mine:

Code Sample

Debian MENU
[begin] (DSL)
 
    [submenu] (Games) {}
        [exec] (xTris ) {/usr/games/xtris -flashy}
        [exec] (Canfield) {ace_canfield}
        [exec] (Freecell) {ace_freecell}
        [exec] (Golf) {ace_golf}
        [exec] (Mastermind) {ace_mastermind}
        [exec] (Minesweeper) {ace_minesweeper}
        [exec] (Pegged) {ace_pegged}
        [exec] (Solitaire) {ace_solitaire}
        [exec] (Taipedit) {ace_taipedit}
        [exec] (Taipei) {ace_taipei}
        [exec] (Thornq) {ace_thornq}
        [exec] (XMahjongg) {/opt/Xmahjongg/xmahjongg -B /opt/Xmahjongg -g 640x480 -t small >&/dev/null}
        [exec] (1943) {/usr/games/xmame 1943}
        [exec] (Asteroid) {/usr/games/xmame asteroid}
        [exec] (Berzerk) {/usr/games/xmame berzerk}
        [exec] (Centipede) {/usr/games/xmame centiped}
        [exec] (Frogger) {/usr/games/xmame frogger}
        [exec] (Missile Command) {/usr/games/xmame missile}
        [exec] (OffRoad) {/usr/games/xmame offroadt}
        [exec] (Outrun) {/usr/games/xmame outrun}
        [exec] (Tempest) {/usr/games/xmame tempest}
        [exec] (Zaxxon) {/usr/games/xmame zaxxon}
        [exec] (Xgalaga) {/usr/games/xgalaga}
    [end]  
[submenu] (Desktop Applications) {}
     [submenu] (Text Editors) {}
        [exec] (Beaver) {beaver}
     [end]
[submenu] (Graphics) {}
      [exec] (xzgv Image Viewer) {/usr/bin/xzgv}
        [exec] (Xpaint) {/usr/bin/X11/xpaint}
                [exec] (Xzoom) {xzoom}
[exec] (GIMP) {gimp}
        [end]
     [submenu] (Office) {}
        [exec] (Ted Word Processor) {ted}
        [exec] (Siag Spreadsheet) {/usr/local/bin/siag}
        [exec] (PDF Viewer) {/usr/bin/xpdf}
        [exec] (MS Word Viewer) { /usr/local/bin/wordview.lua}      
        [exec] (Postscript Viewer) {/usr/local/bin/gvu}      
        [exec] (Calculator) {calcoo}
        [exec] (Calendar) {/usr/local/bin/calendar.lua}
[exec] (SQLite Book) {/usr/local/bin/sqlitebook.pl}    
        [exec] (PIM using Index) { aterm +tr -T "PIM using Index" -e /usr/bin/index}      
        [exec] (Net Dictionary) {dillo http://www.dictionary.com}      
     [end]
     [submenu] (Sound/MPEG/VoIP) {}
        [exec] (Dmix Sound Mixer) {dmix }
        [exec] (gPhone) {gphone }
[submenu] (XMMS) {}
   [exec] (Xmms Audio/MPEG) {xmms}
   [exec] (Xmms Play CD) {xmms /dev/cdrom}
           [submenu] (Xmms News Feeds){}
      [exec] (Xmms "KCPW NPR News") {xmms  http://kcpw.xmission.com:80/kcpw.ogg}
      [exec] (Xmms "CBC Radio One News") {xmms  http://oggtrial.nm.cbc.ca:80/cbcr1-toronto.ogg}
           [end]
[end]
     [end]
     [submenu] (Tools) {}
        [exec] (Mirror Selector){dslMirror.lua}
        [exec] (Net Manual) { aterm +tr -T "Internet MAN" -e /usr/local/bin/getman}      
     
           
     
        [exec] (X Window Snapshot) {xwd -out myscreen.xwd; xwud -raw -in myscreen.xwd}
        [exec] (Xkill) {xkill}
     [end]
  [end]

     [submenu] (Internet Applications) {}
        [submenu] (Browsers) {}
           [exec] (Firefox - Good but slow) {/usr/local/bin/firefox}
           [exec] (Dillo - Fast but limited) {dillo file:/usr/share/doc/dsl/getting_started.html}
[end]            
[exec] (AIM) { aterm +tr -T "nAIM" -e /usr/bin/naim}
           [exec] (nIRC #DamnSmallLinux) { aterm +tr -T "nIRC" -e /usr/bin/nirc dsl$$ irc.freenode.org}
           [exec] (ICQ) { aterm +tr -T "nICQ" -e /usr/bin/nicq}
       
       
     [end]

  [submenu] (Desktop Customization) {}
    [exec] (Edit this menu...) {beaver /home/roslin/.fluxbox/menu}
        [exec] (Edit Drawer menu...) {beaver /home/roslin/.wmdrawerrc}
[exec] (Switch GTK Theme) {/usr/bin/switch}
     [exec] (Icontool) {icontool.lua}
     [exec] (Wallpapers) {wallpaper.lua}
     [config] (Fluxbox Configuration)
     [submenu] (Styles) {}
        [stylesdir] (/usr/share/fluxbox/styles)
        [stylesdir] (~/.fluxbox/styles)
   
 [end]
     [workspaces] (Workspaces)
 [end]  
          [submenu] (System Configuration) {}
 
[exec] (Synaptic Package Manager) {/opt/root_synaptic}
   
    [exec] (Webdata Backup/Restore){aterm +tr -T "Webdata FTP Messages" -e /usr/bin/webdata}
    [submenu] (Printing/lpd) {}
[exec] (start) {sudo /usr/sbin/lpd}
[exec] (stop) {sudo killall -9 lpd}
[exec] (reload) {sudo /usr/sbin/lpc reread}
[exec] (configure printer) {aterm +tr -T "apsfilter" -e sudo  /usr/share/apsfilter/SETUP}
    [end]
    [submenu] (Net Setup) {}
      [exec] (netcardconfig) {aterm +tr -T "Netcardconfig" -e sudo -H /usr/sbin/netcardconfig }      
      [exec] (dial-up PPP) {sudo /usr/sbin/pppdial}
      [submenu] (DSL/PPPoE)
         [exec] (PPPoEconf) {aterm +tr -T "PPPoEconf" -e   sudo  -H /usr/sbin/pppoeconf }
         [exec] (Pon) {sudo -H /usr/bin/pon }
         [exec] (Poff) {sudo -H /usr/bin/poff }
      [end]
      [exec] (iwconfig) {iwconfig_setup}
      [exec] (wlcardconfig) {aterm +tr -T "wlcardconfig" -e  sudo  /usr/sbin/wlcardconfig }
      [exec] (ndiswrapper) {ndissetup}
      [exec] (prism2) {prism2_setup}
    [end]  




 [exec] (Keyboard) {aterm +tr -T "kbdconfig" -e  sudo  /usr/sbin/kbdconfig }
    [exec] (Xvesa) {/usr/sbin/xvesa.lua }
    [exec] (X Setup) {aterm +tr -T "X Setup" -e  /usr/sbin/xsetup.sh }
    [exec] (Top) { aterm +tr -T "Top" -e /usr/bin/top}
    [exec] (pstree) {aterm +tr -e /usr/bin/pstree.x11}
    [exec] (Set Date Time) {/usr/local/bin/datetool.lua}
    [exec] (System Stats) {/usr/local/bin/stats.lua}
    [exec] (PCMCIA Card Control){/usr/bin/cardcontrol.lua}
    [exec] (Mouse Config){/usr/local/bin/mouse-config.lua}
[submenu] (Daemons) {}
[submenu] (ssh) {}
  [exec] (start) {sudo /etc/init.d/ssh start}
  [exec] (stop) {sudo /etc/init.d/ssh stop}
  [exec] (restart) {sudo /etc/init.d/ssh restart}
  [exec] (reload) {sudo /etc/init.d/ssh reload}
  [exec] (force-reload) {sudo /etc/init.d/ssh force-reload}
[end]
   [submenu] (nfs-common) {}
  [exec] (start) {sudo /etc/init.d/nfs-common start}
  [exec] (stop) {sudo /etc/init.d/nfs-common stop}
  [exec] (restart) {sudo /etc/init.d/nfs-common restart}
   [end]
[end]
 
[end]


  [exec] (Samba Network Filesharing) {sudo LinNeighborhood}
 

        [exec] (Online Help Chat) { aterm +tr -T "IRC" -e /usr/bin/nirc dsl$$ irc.freenode.org}
        [exec] (Find) {sudo /usr/bin/gtkfind}
        [exec] (Run Program) {grun}  
       
[exit] (Exit to Command Line)



  [submenu] (Power Down) {}
      [exec] (Shutdown){ exitcheck.sh shutdown}      
      [exec] (Reboot){ exitcheck.sh reboot}
  [end]
[end]
Debian END



If you wanna test it out,rename yours first.  Then copy the text there into a new file named "menu" in the /home/dsl/.fluxbox directory.  Save.  Its instantly active and you can see what it looks like.  If you don't like it, just delete "menu" and then rename yours back.

The packages that have to be installed for all of that are:
dsl-dpkg.dsl
gnu-utils.dsl
gimp1.2.dsl
rox.dsl
samba.dsl
synaptic.dsl
wmdrawer.tar.gz
xgalaga.dsl
xmahjongg.tar.gz
xmame.dsl

note that they don't HAVE to be installed, they just have to be installed if you expect their menu items to do anything.

I imagine some of you will point out that I pretty much cut the balls off of the menu... but i'm customizing for a young girl and I wanted to get the more dangerous stuff off the menu.

All of this is really done to a second user, not the "dsl" user.  the  setup for the "dsl" user has been untouched.

I'll add more stuff later, this is pretty basic, but its good stuff for those of you who do permanent installs and want to customize.

Posted by WDef on Mar. 26 2007,22:51
I think it's a good idea to take the time to share customizations.
Posted by Thulemanden on April 06 2007,22:24
>/opt/bootlocal.sh
>this file is where you can put in commands that you want executed before the login prompt.  

Great, I guess this could be copying web server files to ramdisk from /mnt/hda1 after restarting the box if necessary

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.