Tuesday, March 23, 2010

right now working on an autorun script for Ubuntu

i've created a shell script which will check whether a cd is mounted or not. But still trying to figure out how to execute a file on the cd because unlike autorun.inf in windows which will execute all the shell commands in that file, without knowing the path to a file in Ubuntu , you cannot execute anything through a shell script. The problem that i have experienced is that different cds have different paths i.e they cannot be accessed everytime from /media/cdrom or /media/cdrom0 .. therefore will have to find a way to get the path .. most probably will have to go into low level programming

1 comment:

  1. jus finished the script .. but there are some conditions for this script
    1. It wont work for Ubuntu Installation cds because of the path is not specified properly in /etc/mtab

    2. i've made it in such a way that the script will find the path of the cd rom and open a new browser using that path.

    3. Therefore you cannot open files with this script .. actually you can if you specify the path and the application with which the file should be open.. but then this wouldnt be autorun now would it ?

    I;ve posted it on this link ..
    http://www.mediafire.com/file/nnhymjwwlw3/cdautorun.sh

    Hope it makes a difference for someone out there ..Feedback is a must :D ... I've just entered the field of programming. I'm still learning .. and i need you to help me learn . Thanx in advance

    ReplyDelete