Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 13 of 13
Originally Posted by i92guboj When you are in X you might have some luck traying to run the gnome-volume-manager. I know it's supposed to handle all that stuff under gnome, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Jun 2008
    Posts
    15

    Quote Originally Posted by i92guboj View Post
    When you are in X you might have some luck traying to run the gnome-volume-manager. I know it's supposed to handle all that stuff under gnome, and it might work on other environments as wel. You need to have the hal daemon running, of course.
    OK I get that I need an environment to run some tools but I can't figure this out what GNOME, XFS, KDE, JVM or any other has to do with the mounting of a CD.
    I should maybe say that I don't need a GUI from the software I use only for an application to pop up when I mount something.
    I think that I need a 2nd break off or some shcooling.

  2. #12
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Quote Originally Posted by RuffLiner5579 View Post
    OK I get that I need an environment to run some tools but I can't figure this out what GNOME, XFS, KDE, JVM or any other has to do with the mounting of a CD.
    I should maybe say that I don't need a GUI from the software I use only for an application to pop up when I mount something.
    I think that I need a 2nd break off or some shcooling.
    The problem is not the graphical environment per sé.

    I will try to explain it in a clearer way, just bear with me.

    Nowadays, on most modern distros, hal is a daemon that runs in the background since the boot time, and it can notify to other programs when a given peripheral or media is attached. This is the foundation for any autoplay feature, but the autoplay feature doesn't grow out of thin air. For it to exist, the first thing is that your applications, desktop, wm or an independent application needs to actually listen to hal, because, if no application listen to hal, then it's like if hal was saying nothing.

    This is what kde, xfce, gnome-volume-manager and the like do. They listen to hal (provided you enabled that feature at compile time and in the respective configurations) and act consequently providing the user with some dialogs and windows letting him choose what to do with that just-plugged media.

    No one ever cared enough to write a similar thing for command line, and that's why if you want some autoplay feature you are going to have to implement it yourself (as far as I know). Note that, as I said, there are ways to automount devices if that's all you need. Again: see ivman (it's another daemon that sits in top of hal). If all you need is to autmount stuff then it can be done in command line using ivman.

    I don't know if ivman is able to do anything more, I only knew it as an automounter based on hal but I have never seen it doing any other thing. I might investigate it later and report back if I find something. But only if I have the time.

    Sorry if the explanation was too obscure, I tried to do my best :P


    Update: this might be of interest for you. I have installed ivman and it's shipped with a file called /etc/ivman/IvmConfigActions.xml. There you can read this:

    Code:
        <!-- example - autoplay CDs with audio tracks and no data tracks -->
        <!--
        <ivm:Match name="hal.volume.disc.type" value="dvd_rom">
            <ivm:Match name="hal.volume.disc.has_audio" value="true">
                <ivm:Match name="hal.volume.disc.has_data" value="false">
                    <ivm:Option name="exec" value="/usr/bin/cdplay -d '$hal.block.device$' -c" />
                </ivm:Match>
            </ivm:Match>
        </ivm:Match>
        -->
    
        <!-- example - autoplay video DVDs -->
        <!--
        <ivm:Match name="hal.volume.disc.is_videodvd" value="true">
            <ivm:Option name="exec" value="pumount '$hal.block.device$' &amp;&amp; /usr/bin/mplayer dvd://1 -really-quiet -fs" />
        </ivm:Match>
        -->
    So, I think this is what you are looking for. You have there an example for cdplay and another for mplayer. Check the docs of your distro to discover how to enable services at startup, you need to enable ivman.

    I hope this helps.

  3. #13
    Just Joined!
    Join Date
    Jun 2008
    Posts
    15

    Thumbs up

    Wow i92guboj I learn new things all the time.
    I will play a bit at it and look for more info on ivman to get all the specks.
    Thank you.

Page 2 of 2 FirstFirst 1 2

Posting Permissions

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