How do I autorun a CD in Linux?
Results 1 to 8 of 8

Thread: How do I autorun a CD in Linux?

  1. #1
    Member omin's Avatar
    Join Date
    Feb 2002
    Posts
    60

    How do I autorun a CD in Linux?

    Well, the title says it all really but I'll give some more info...

    I have a cd containing various web pages and some media heavy flash (version 7) content.
    This CD needs to be able to autorun when inserted into a computer.

    This CD needs to autorun on multiple operating systems (Windows & Linux).
    Creating an autorun.inf for windows is easy but when it comes to Linux I have no idea how to go about this. Is it as simple as creating an 'autorun.inf' equivalent or is it more complicated than this?
    Is there anything else that I need to be aware of when dealing with this?



    Cheers!
    \"Clouds are not spheres, mountains are not cones, coastlines are not circles, and bark is not smooth,
    nor does lightning travel in a straight line.\" -Benoit Mandelbrot

  2. #2
    Senior Member gore's Avatar
    Join Date
    Oct 2002
    Location
    Michigan
    Posts
    7,177
    Depends on a few things.... On my SUSE boxes I insert CDs and they auto run. Not sure how you'd go about doing it for every version and Kernel....

  3. #3
    Senior Member Cemetric's Avatar
    Join Date
    Oct 2002
    Posts
    491
    Maybe these websites will get you what you need ??

    Website 1

    Website 2

    They both talk about making a multiplatform autorun cd ..which automatically open HTML pages...If that is what you are looking for.

    .C.
    Back when I was a boy, we carved our own IC's out of wood.

  4. #4
    Member omin's Avatar
    Join Date
    Feb 2002
    Posts
    60
    I had a funny feeling it would be Gore that replied.

    Depends on a few things...
    Ummm, like what? That is the sort of info I am after.

    On my SUSE boxes I insert CDs and they auto run.
    Great, but HOW? There must at least be a file on the CD (autorun.inf equivalent) telling the OS what to do?


    Thanks for the links Cemetric. I have already found the second and am currently ploughing throught it. The part that concerns me is this...

    However, some systems fail to import the path for autorun correctly, or they start up in the user's home directory instead of the CD mount-point, so they fail to find htmlview; others don't implement htmlview at all, so it's easier to use something like this script, which tests for different ways to open the file. You may want to edit it to do other things also.
    The link to 'this script' is dead so I have no idea about what other methods are used.
    \"Clouds are not spheres, mountains are not cones, coastlines are not circles, and bark is not smooth,
    nor does lightning travel in a straight line.\" -Benoit Mandelbrot

  5. #5
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,401
    AFAIK there isn't any autorun feature on *nix.. At least nothing "standard".. There may be some distros that have their own version but I doubt it would work on all of them. I know for a fact FreeBSD doesn't have it..

    I think you may have more luck looking at GNOME and/or KDE for anything remotely like autorun.inf.. Think about it.. If I'm in a console... What would start? But as far as I'm concerned, I'd consider auto-running anything from a cd a security risk..

    Why not make a README or something similar in the root and dump everything else in subdirectories? Add the autorun.inf for the average Joe Windows user... I'm sure Linux/BSD users are able to figure out they need to start with the README

    Heck, if you want something really wild, why not build your own live-cd?
    Oliver's Law:
    Experience is something you don't get until just after you need it.

  6. #6
    Member omin's Avatar
    Join Date
    Feb 2002
    Posts
    60
    SirDice - thanks for the pointing me in the right direction.

    Please bear in mind I'm still quite a noob when it comes to Linux so I am doing LOTS of reading, lots of google searches, more reading...

    It seems that you are correct that any autorun functionality - autoplaying music CDsis carried out by either GNOME or KDE, each of which use a different method.

    It would seem that KDE uses autorun or kautorun and GNOME uses magicDev, both of which support an autorun file which can be put in the root of the CD and run when the CD is automounted (by autofs?).
    (and I would guess even then could change between distros?)

    Are there other frontends/GUIs other than these 2 that provide similar functionality?

    I tend to agree with you as far as having clear instructions in the readme. Also clear instructions on the CD Label/Inlay. This would seem to be a better solution than trying to cater for all possible distros. However, I have an enquiring mind and still want to know as much about this as possible!


    Gore - you say on your SUSE boxes they do this. Which front end are they running? I have seen both KDE and GNOME for SUSE (again, are there others?).
    \"Clouds are not spheres, mountains are not cones, coastlines are not circles, and bark is not smooth,
    nor does lightning travel in a straight line.\" -Benoit Mandelbrot

  7. #7
    Senior Member gore's Avatar
    Join Date
    Oct 2002
    Location
    Michigan
    Posts
    7,177
    KDE and Gnome do it but any other Window Manager may not. As you already said, and you're right, not all of them just do that.

    I'd go with the README thing. When X isn't loaded and I want to listen to a CD, I pop the CD in, then type the command of whatever CD Player I want to use that works in text mode. Or if I need to read data, I tell it to.

  8. #8
    Member omin's Avatar
    Join Date
    Feb 2002
    Posts
    60
    ...some more reading later...

    ok, so it seems that KDE and GNOME are both widely used with most (?) distros. If this is the case I would still like to create an autorun that would at least cover these 2 windows managers.

    While I am aware of the security risks associated with autorunning CDs, it still makes sense to me to take advantage of this feature IF availible. I guess this is partly where the MS/*nix divide lays - ease of use versus security/control and finding a balance between the 2.
    anyway....

    In a shell script is it posssible to return what browsers are availible on the system or to just run an html file with an 'associated' program?

    I have tried this..

    #!/bin/sh
    fullpath=$(pwd)
    exec konqueror $fullpath/index.html

    ... which seems to work fine but of course only when konqueror is installed.
    \"Clouds are not spheres, mountains are not cones, coastlines are not circles, and bark is not smooth,
    nor does lightning travel in a straight line.\" -Benoit Mandelbrot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •