Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Applications
Reload this Page CD application automatically starts stuff?
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Applications I cant get "X" app to work... also discussion about linux programs.

Reply
 
Thread Tools Display Modes
Old 06-17-2008   #11 (permalink)
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.
RuffLiner5579 is offline   Reply With Quote
Old 06-17-2008   #12 (permalink)
Linux Engineer
 
Join Date: Nov 2007
Location: Córdoba (Spain)
Posts: 1,159
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.
i92guboj is offline   Reply With Quote
Old 06-17-2008   #13 (permalink)
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.
RuffLiner5579 is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
 

Free Magazines
Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe
Systems Management News, the newspaper for IT systems administration and data center managers!
Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 06:07 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.2.0