[sf-lug] how to run software automatically at start up; how to make a ram disk

jim jim at well.com
Mon Aug 6 15:04:23 PDT 2012


    (Reporting on startup application using Ubuntu 10.04 
with Gnome 2.30.2). 
    I wrote a simple shell script /home/jim/bin/hi.sh 

-------------------
#!/bin/bash
# test script 

echo "
hello 
" > ~/Desktop/hiwashere 

echo "
hello
" 
read 
-------------------

I changed its permissions to be executable 
$ chmod 755  ~/bin/hi.sh 

    I used System > Preferences > Startup Applications 
and added ~/bin/hi.sh to the list. 

    I restarted the box and things seemed to behave as they 
always do--not a good sign. 
    Turns out the script had run. It created the file 
~/Desktop/hiwashere but the file icon was not visible as 
it was located in the upper left corner under another file 
icon that was larger. So by default new file icons seem to 
be added to the upper left corner regardless of another file 
icon's mapping to that location, and the new file icon is 
obscured by the older file icon. 
    I'd expected to see a terminal window showing 
hello 
waiting for me to hit the Enter key, but that was not the 
case, and when I used the  ps  command I could see there was 
no process ID for a waiting terminal window (thinking maybe 
a bash shell was still active and somehow its window didn't 
appear in the GUI. 
    It seems odd to me that the shell instance terminated: 
as if something sent a kill command to the process or 
something sent it a newline character via stdin. 




On Mon, 2012-08-06 at 13:41 -0700, jim wrote:
> Last Sunday we were playing with startup programming. 
> 
>     Here's a link to Artem Nosulchik's Linux Screw article 
> on making a ram disk. 
> 
> http://www.linuxscrew.com/2010/03/24/fastest-way-to-create-ramdisk-in-ubuntulinux/ 
> 
>     It's nicely written--right to the point and clear as 
> a bell. One of the purposes he explains is for using lots 
> of small files, for example a suite of Perl scripts in a 
> ram disk avoids the latency of hard disk access for each 
> script or data file accessed. 
>     Among the readers' congratulatory comments, someone 
> mentions using the RAM disk to spare multiple writes to 
> an SSD device (I'm assuming the software in use writes to 
> the ram disk and at the end of a session or every so often, 
> the user copies the contents of the ram disk to the SSD). 
> 
>     What's that to do with startup programming? Another 
> reader asks how to set the system up so the ram disk is 
> created at boot time. Yet another reader provides a link: 
> http://www.ubuntuka.com/autostart-ubuntu-startup/ 
> 
>     Use System > Preferences > Startup Applications and 
> click the add button to add whatever you'd like to run at 
> start time: for example, your create a ram disk shell 
> script. 
>     I'll try that now and report. 
> 
> 
> 
> 
> _______________________________________________
> sf-lug mailing list
> sf-lug at linuxmafia.com
> http://linuxmafia.com/mailman/listinfo/sf-lug
> Information about SF-LUG is at http://www.sf-lug.org/






More information about the sf-lug mailing list