LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-08-2008, 03:17 AM   #1
tuttu47
LQ Newbie
 
Registered: Dec 2008
Posts: 3

Rep: Reputation: 0
How to hide the messages that are displayed when a USB device is plugged in?


Hai,

I'm new to Linux and am facing a li'l problem. I am running a script that copies some file from my pendrive to a folder. But the problem, when the script is running; and then I plug in my pendrive; the control goes out of the script (which is a menu box) and prints some messages like "detected High speed USB device" etc on the screen. How can I supress these messages; so that no other messages are displayed when my script is running?

Thanx in advance :-)
 
Old 12-08-2008, 06:28 AM   #2
harry2006
Member
 
Registered: Aug 2006
Location: /hawaii/honolulu/downtown
Distribution: Fedora 10[Cambridge] and Ubuntu 9.04[Jaunty]
Posts: 201

Rep: Reputation: 30
I don't want why you want to do that. Anyways thats not the problem. What I can figure out from your mesasge is that you want to keep an offline backup of some folder in you pendrive, right?then rather than running your script manually everytime after plugging that USB device, why dont you put that "run script command" in the udev rules itself. I bet this will make life much easier though you've to put some effort initially learning udev, but it'll payoff in the long run.
Secondly, you dont want any message to be displayed whenever this copying process is going on, right? then just remove the notify message that is available in the .rule file in /etc/udev/rules.d/ directory meant for your USB device. Just learn how to add/modify these rules then you would be writing off nice rules to take backup or anything you like whenever a new device gets plugged.
For udev you may like to start here,
http://reactivated.net/writing_udev_rules.html
Hope it helps
 
Old 12-08-2008, 11:00 AM   #3
tuttu47
LQ Newbie
 
Registered: Dec 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks a lot for the reply... But I believe my problem was not completely understood. I am running a bootup script that basically is a dialog utility; and it displays a menu with some options. But if i just plug in a usb when this menu is on display; all the "high speed device detected ..." etc is output to the screen; ie it is written over my menu. So what I want is that when my menu is displayed; whatever device is plugged in or out; no (a complete NO) messages should come on to the screen... my script (menu) should be undisturbed... (ie the screen should remain as it is...). I know its possible; but I just donno how... Any help is deeply thanked...
 
  


Reply


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
FAT32 hd failure -plugged usb device Jose Rivas Fedora 2 04-03-2008 03:25 PM
How to detect programatically if a USB device is is plugged-in / plugged out? franc Linux - Software 3 02-01-2007 04:01 AM
usb device works only when is plugged in after booting Jaa Linux - Hardware 2 08-22-2006 10:00 AM
how to know a usb device is plugged in/out lordofring Linux - Software 2 04-25-2005 01:15 PM
Why does PC hang when USB device is plugged in? DeepSPiN Fedora 1 12-03-2003 10:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:00 AM.

Main Menu
Advertisement
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
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration