Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-30-2005, 10:10 AM   #1
LQ Newbie
Registered: Jul 2004
Location: Vienna
Distribution: Debian Sid
Posts: 26

Rep: Reputation: 15
automount and autorun

I am using the gnome-volume-manager for automounting purpose. I burned a script called on a CD. This script will be start after mounting. But i always have to confirm a dialog to execute this script. How can I avoid this confirmation dialog? Or is it possible to send a command from terminal to that dialog.

I also thought that I can use gtk options which are
--gdk-debug=FLAGS Gdk debugging flags to set
--gdk-no-debug=FLAGS Gdk debugging flags to unset
--display=DISPLAY X display to use
--sync Make X calls synchronous
--no-xshm Don't use X shared memory extension
--name=NAME Program name as used by the window manager
--class=CLASS Program class as used by the window manager
--gtk-debug=FLAGS Gtk+ debugging flags to set
--gtk-no-debug=FLAGS Gtk+ debugging flags to unset
--g-fatal-warnings Make all warnings fatal
--gtk-module=MODULE Load an additional Gtk module
-V, --version
-?, --help Show this help message
Session management options
--sm-client-id=ID Specify session management ID
--sm-config-prefix=PREFIX Specify prefix of saved configuration
--sm-disable Disable connection to session manager
to suppress the dialog. But there isn`t any flag.
Does anyone has an idea.
I didn`t find any other application but gnome-volume-manager as an easy way to automount AND start a script. A console-based-automount would be nice. With automount I don`t figured out how to run a script after mounting.
Thanks for any help

Last edited by xxfunkxx; 09-30-2005 at 03:36 PM.
Old 10-18-2005, 04:06 PM   #2
LQ Newbie
Registered: Jul 2004
Location: Vienna
Distribution: Debian Sid
Posts: 26

Original Poster
Rep: Reputation: 15
Thumbs up solved

Finally i made same changes in the source code of the gnome-volume-manager.
I downloaded the source and changed 2 lines in the file manager.c
In the function gvm_ask_autorun() i skipped the lines where the dialog is called!
 * gvm_ask_autorun - ask the user if they want to autorun a specific file
 * Returns TRUE if the user selected 'Run' and FALSE otherwise
static gboolean
gvm_ask_autorun (const char *path)
	GtkWidget *askme;
	gboolean retval;

	/* MY EDIT */
	retval = TRUE;
       /* MY EDIT */

       askme = gtk_message_dialog_new (NULL,
					_("Run command from inserted media?"));
	/*FIXME!! A better secondary label....*/
	gtk_message_dialog_format_secondary_text (GTK_DIALOG (askme),
			_("The file \"%s\" on the inserted media is an auto-run"



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Gnome-volume-manager and device name punx120 Debian 4 08-26-2005 12:17 PM
gnome-volume-manager or supermount PinRojas Linux - Software 1 07-19-2005 06:58 PM
gnome-volume-manager and HAL quadfour Mandriva 2 06-25-2005 12:19 AM
automount cd and usb memory in gnome 2.8 testing sarge with gnome-volume-manager gvm pevelius Debian 0 12-20-2004 02:15 AM
Gnome-Volume-Manager isn't working TazG Linux - Software 0 08-05-2004 06:57 PM

All times are GMT -5. The time now is 03:30 AM.

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