LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 08-28-2008, 03:00 AM   #1
niroperera
LQ Newbie
 
Registered: Aug 2008
Posts: 3
Thanked: 0
Question Is it possible to create autorun for CD..open a html file...


[Log in to get rid of this advertisement]
hi everyone...
I'm very new to linux areana...and now experiencing..it.

so i wanted tryout autorun cd which open index.html when insert cd without user have to mount.it.

i found code from http://research.silmaril.ie/autoruncd/

and..code was this..
...........................................................................

#! /bin/sh

# autorun binary for Linux CDs. Put this file on the CD in the root
# directory. It will execute automatically when the CD is inserted.
# It looks for a browser and runs it on index.html or similar.

# Copyleft 1999, 2000, 2001, 2002 Silmaril Consultants
# Terms of the GNU General Public License apply.

###################################################################

BROWSER=`which mozilla 2>&1`

if [ ! -x "$BROWSER" ]; then

BROWSER=`which netscape`

if [ ! -x "$BROWSER" ]; then

BROWSER=`which opera`

if [ ! -x "$BROWSER" ]; then

BROWSER=`which konqueror`

if [ ! -x "$BROWSER" ]; then

echo No known browser available
exit 1

fi

fi

fi

fi

HOMEPAGE=`grep homepage autorun.inf | awk 'BEGIN {FS="="} {print $2}'`

if [ ! -f "$HOMEPAGE" ]; then

$BROWSER /media/cdrom &

fi

$BROWSER $HOMEPAGE &

exit 0



...........................

it says to save text file as autorun and finish..
but i tried this and this didnt work for me...
i was trying it in UBUNTU, FEDORE..TOO...
PLEASE..CAN ANYONE HELP ME...
THANK YOU VERYMUCH..
niroperera is offline  
Tag This Post , ,
Reply With Quote
Old 08-29-2008, 01:21 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :}
Posts: 18,838
Blog Entries: 1
Thanked: 160
The only distro that I've seen using something like
an auto-run feature so far was SuSE Enterprise Desktop.
Tinkster is offline     Reply With Quote
Old 08-29-2008, 03:04 AM   #3
David the H.
Senior Member
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian Sid/kde3.5
Posts: 2,462
Thanked: 129
Quote:
Originally Posted by niroperera View Post
it says to save text file as autorun and finish..
but i tried this and this didnt work for me...
i was trying it in UBUNTU, FEDORE..TOO...
PLEASE..CAN ANYONE HELP ME...
THANK YOU VERYMUCH..
This is very vague. "It didn't work" doesn't tell us much. You need to explain in more detail what you tried and what the output was.

And as both the previous poster and the web page pointed out, autorun ability has to be enabled on the system first, something which most Linux machines don't have by default. Besides, while it's certainly possible to set up commands to run programs when media are inserted--kde and gnome have that feature for example--the actions that will run are user-defined (mount the disk and start the file manager, for example) and they will not generally pay any attention to an arbitrary "autorun" file on the media itself.

Personally I absolutely despise any kind of automatic media actions (even simple pop-up dialogs), and have purposefully disabled all functions of that sort on my machines (and I did the same on Windows before I switched). Apart from it being a security risk (why would anyone let some script run arbitrary commands before knowing what they are?), it's also just plain annoying, since what I want to do is not necessarily what the media thinks I want to do. Autorunning media is just a BAD IDEA, in my opinion.
David the H. is offline     Reply With Quote
Old 09-01-2008, 05:40 AM   #4
niroperera
LQ Newbie
 
Registered: Aug 2008
Posts: 3
Thanked: 0

Original Poster
Hi.. David the H.

Please forgive me for my bad questioning. Thank you for your kind reply.
that was right. autorun is a bad idea for any PC..
but i wanted to tryout a cd which can run on linux, windows and mac when only by inserting cd into cdrom....

when doing this...I used to create ISO image, using Cgywin(on windows). on cd media there is a autorun.inf for windows..
and another file called "autorun"(specified above discuss containing that code was there) for Linux. and autorun feature for mac was written when ISO image create(But i couldn't tested this on MAC).

CD contains html page(index.html) which called by autorun file.. that is the beginning page..
So...need is to open this index.html file when insert cd to drive...
as so far u saying, is it possible to do..?
as u said..it have to enable(autorun function on Linux) in user's machine..
or are there any other method to open that index.html file..without any special user activity on linux...
I'm very appreciating your help..
and again sory about my bad asking question..
thanks..
niroperera is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a .chm file from html files on Linux ? annaben Linux - Software 3 11-07-2006 06:25 PM
Whenever I create a file in /var/www/html/, it is at permission 600 (forbidden) Josh1billion Linux - Software 4 03-18-2006 11:24 PM
Open HTML file in default browser through C++ Last Attacker Linux - General 10 10-20-2005 01:32 PM
Autorun a .html file on inserting a DVD ilhbutshm Linux - Software 10 04-20-2005 12:07 PM
How to create autorun CDs in Linux shivanand Linux - General 5 04-04-2005 08:13 PM


All times are GMT -5. The time now is 11:55 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration