Programming :: Run A Script At Usb Insertion?

Sep 20, 2010

I'm trying to run clamAV antivirus on USB insertion. I read about "udev" but it seems to be very complicated. I thought about running the script when the /media folder changes. I couldn't do that either.

I'm running MS "XP" on virtualbox and I'm sharing the /media folder from the host to the guest that's why I need an ON-DEMAND antivirus that scans the usb disk on insertion. (Light scan[neglecting archives and large files] is preferred to not overload the processor).

The script will contain the clamAV command line. The problem is how to set the execution time of the script...

View 3 Replies


ADVERTISEMENT

Programming :: Socket Programming: Insertion Of 0x00 Into The Stream?

Dec 5, 2010

When sending data over the socket, the sending socket includes 0x00 after each sent byte. I wonder how this can be avoided -- I just want to transfer the data in the tx_buffer as it is.

# ./serv &
[1] 6895
# ./EUG 127.0.0.1
EUG: Data to be transmitted: 0x35 0x32 0x30 0xff 0x03 0x31
EUG: Data - #Bytes transmitted: 6
./serv: Here is the message: '5'

[Code]...

View 3 Replies View Related

Programming :: Recognize USB Insertion / Removal In Python?

Oct 15, 2010

How can I understand if a USB inserted or removed.

Someone said I need to study HAL. Is it true? If so I need some links, source code etc. do you know any?

View 1 Replies View Related

Programming :: How To Install Kernel Modules Automatically After Device Insertion

Jan 18, 2011

ubuntu could delay kernel module installation until device is inserted?Take my usb ath9271 wifi adapter as an example: when kernel boot up, no ath modules are installed until usb wifi apdapter is inserted, ath related modules are insmod.Could anybody how to achieve this? udev or something else?

View 5 Replies View Related

Fedora :: Script For Usb Insertion?

Sep 10, 2009

I am trying to figure out how to make Fedora run a certain command when I insert a USB device. Any ideas. I'd also like it to do different things based on which usb device I plug in.
I can write the script I just do not know the trigger sequence.

View 10 Replies View Related

General :: Insertion Of Vbr And VBR End Delay More

Apr 22, 2011

I am using Ubuntu marvic amd64 10.10. I installed ns-allinone 2.34. then I inserted vbr traffic according to one of forum from this linux " Insertion steps of VBR into NS2.34" I made the following changes

Makefile, line 36 : CC = gcc-4.3
Makefile, line 37 : CPP = g++-4.3
vbr_traffic.cc in ns2.34/tools then Makefile : tools/vbr_traffic.o of 183

then I use the command cd ns-allinone-2.34/ns-2.34/ && mv ns ns234 && make after that I delete the ns. with the new command I run the script with every time puase time 0 and simulation time 200, 10 250, 20 300, 40 400..... with DSR after completion of simulation, when i was try to plot graph between throughputs of receiving bits vs Maximul end to end delay, every time I got the delay more than 90, 100, etc so how can I reduce that problem. I thought problem was in insertion of vbr.

View 1 Replies View Related

Ubuntu :: USB Insertion Hangs System / Stop It To Do So?

Dec 19, 2010

I'm running Ubuntu 10.10, 64-bit on an HP 8740w. Sometimes (I don't have the frequency yet, but it has happened a half-dozen times in the past couple of weeks) when I insert a USB storage device the system hangs, requiring a power-cycle. I have been careful to either eject or "safely remove" every USB device, but it still happens. I believe it only happens when I remove a device and later re-insert it, but I don't have enough data points to be sure.

Most of the time, I'm running VirtualBox, but I haven't captured the USB device in a VM.

First question - how can I go about figuring out what might be going wrong? Once it happens, my options are extremely limited (power switch). When this happened one time I left the system for 30+ minutes, and it did not recover.

Of course, when I wanted to see it, I did 10 insertions/removals without a hang.

View 9 Replies View Related

Ubuntu :: Change Volume Upon Headphone Insertion?

Mar 22, 2011

is there a way to have my volume level change to a specified level when i insert my headphones to avoid having my ears blasted with music because i forget to turn the sound down when shutting off my computer last time? perhaps a alsa patch or a script?

View 5 Replies View Related

Debian Multimedia :: Encrypted DVDs Are Not Recognized Upon Insertion

Jun 21, 2015

I have Debian Jessie installed. When I insert a non-encrypted DVD movie DVD into the drive, a pop-up menu appears asking me what I want to do (e.g. "Open with vlc media player, etc.).

When I insert an encrypted DVD movie DVD into the drive, no pop-up menu appears.

I am able to play the encrypted movie DVD in vlc, and libdvdcss2 is installed. So my question is not about playing the DVD but rather about the failure to automatically detect it.

This behaviour happens in Gnome, Mate, and XFCE. (KDE has a Plasma Device Notifier Widget that is able to detect the encrypted DVD).

My other computer with Debian Wheezy is able to automatically recognize the encrypted DVD.

Here are the relevant lines from /var/log/syslog after the insertion of the encrypted DVD:

Code: Select allJun 21 14:52:04 debian-think-pad kernel: [ 2012.208964] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Jun 21 14:52:04 debian-think-pad kernel: [ 2012.208972] sr 1:0:0:0: [sr0] 
Jun 21 14:52:04 debian-think-pad kernel: [ 2012.208977] Sense Key : Illegal Request [current]
Jun 21 14:52:04 debian-think-pad kernel: [ 2012.208986] Info fld=0x400

[Code] ....

Here are the relevant lines from /var/log/syslog after the insertion of the non-encrypted DVD:

Code: Select allJun 21 14:55:39 debian-think-pad kernel: [ 2226.518955] UDF-fs: INFO Mounting volume 'Check Please', timestamp 2009/06/02 17:43 (1e5c)
Jun 21 14:55:39 debian-think-pad udisksd[1161]: Mounted /dev/sr0 at /media/daniel/Check Please on behalf of uid 1000
Jun 21 14:55:39 debian-think-pad org.gtk.Private.UDisks2VolumeMonitor[1081]: index_parse.c:191: indx_parse(): error opening /media/daniel/Check Please/BDMV/index.bdmv
Jun 21 14:55:39 debian-think-pad org.gtk.Private.UDisks2VolumeMonitor[1081]: index_parse.c:191: indx_parse(): error opening /media/daniel/Check Please/BDMV/BACKUP/index.bdmv

Whan I run the mount command after inserting the non-encrypted DVD the following line appears in the output:

Code: Select all/dev/sr0 on /media/daniel/Check Please type udf (ro,nosuid,nodev,relatime,uid=1000,gid=1000,umask=77,iocharset=utf8,uhelper=udisks2)

Granted, this issue is not a major problem as I can start vlc and play the DVD. However, it might be useful to some new users to Linux to have the pop-up menu appear. Additionally, it would be interesting to learn why it works in Debian Wheezy and not in Debian Jessie.

View 0 Replies View Related

Debian Configuration :: Udev Script To Run Service On Device Insertion

Jan 24, 2010

I have just bought a DVB-T usb dongle to watch some TV. The software I'm using is vdr, which has to be started through the /etc/init.d/vdr service. I have created a udev script that executes the service on device insertion. It works nicely, however now when I boot up the computer it takes ages to get to desktop. I believe it is because of the WAIT_FOR part. But without this part, the service starts too soon because the usb dongle has been inserted but the firmware has not finished loading. Can someone point out an alternative way to do it? The script is here [URL].

View 4 Replies View Related

Ubuntu Multimedia :: Toshiba Quosmio Speaker Not Muted On Headphone Jack Insertion?

Jul 28, 2011

My only glitch with Ubuntu, which runs flawlessly on this beast, otherwise.I have spent more than 50 hours on this problem. In my case, inserting headphone jack doesn't mute internal speakers. There is sound in the headphone though.alsamixer ot gnome-alsamixer doesn't even show the headphone option. So I cannot change their values.I have tried model= various options, with no avail.I have uploaded my information to alsa projct and the link is: http://www.alsa-project.org/db/?f=18...788fc1458ff422

View 1 Replies View Related

Programming :: 3D Programming - Difference Between JOGL And C++ OpenGL Programming?

Aug 27, 2010

I am interested in learning 3D programming. The thing is, I would hate to put too much effort to learn something that doesn't have future and is dying. My favorite language at the time is Java. My goal is professional programming.

So I have several questions:
1. Should I learn JOGL or start learning C++ and do C++ openGL programming?
2. Is there a big difference between JOGL and C++ openGL programming?
3. Is it worth to learn openGL? Does it have a future?
4. Is it a big difference between openGL and directX coding?
5. If choosing Java, then JOGL or LWJGL?

Why and what is the main difference between them?

View 4 Replies View Related

Programming :: Groovy Scripting - An Object-oriented Programming Language For The Java Platform ?

Mar 7, 2010

Groovy is an object-oriented programming language for the Java platform. I do not have experience in Java, only perl and shell scripts. Recently I have been asked to maintain a software written in groovy (also to make enhancements). So can I learn groovy without knowing java language. or isit I have to learn java before venturing into groovy.

View 1 Replies View Related

Programming :: Searching For Video Or Screen Cast Which Shows Device Driver Programming?

May 30, 2010

I did searched you tube but my results were not great.I have 2 books on KernelProgramming.I feel I need if some where I can get a video tutorial which can help me to understand how to develop a Linux Device driver that will be great.I had a look at Greg Kroah Hartmans video lecture of developing patches on ......I have been reading books and a lot of stuff.So I wish if I could get a video lecture that would be better

View 1 Replies View Related

Programming :: Timer In Socket Programming - Wait For X Sec After Read() And Then Disconnect The Client Connection

Mar 8, 2011

I have a server listening on incoming client connections. Once the client establishes SSL connection with the server, the server waits on read() from the client. Only Client can disconnect the connection. I want to have a timer in the server program to wait for x secs after read() and then disconnect the Client connection.

View 3 Replies View Related

Programming :: Totem Python Plugin Programming: Any Signal For Video Mouse Click?

Feb 9, 2011

I want that I click with the mouse on the video, it paused.I notice that there is "BaconVideoWidget" which I guess is the video rendering widget but it don't have signal named "clicked":

Code:
vd = totem_object.get_video_widget()
vd.connect("clicked", vd.hide)

[code]....

View 3 Replies View Related

Programming :: Socket And Timer Programming - Server Doesn't Execute Any Msg Which Client Sent

May 16, 2011

i have a server program which accept multiple client connection and am using polling. like every 2 secs it will look to client whether any data is received after it binded. i have used setitimer but there is runtime error i got.. the server accept all client connection but doesn't execute any msg which client sent.

#include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<sys/types.h>
#include<netdb.h>
#include<unistd.h>
#include<pthread.h>
#include<string.h>
[Code]....

View 1 Replies View Related

Programming :: Headers From Richard Stevens Network Programming Book Not Installing

Oct 27, 2010

I am learning network programming via a book of Richard Stevens.The sample source codes are given here
http://www.unpbook.com/unpv13e.tar.gz
I downloaded and unzipped the file in /usr/src folder.As per the instructions given in README of downloaded archive I did.

View 5 Replies View Related

Programming :: Unix Programming - Single Thread Server Can Support Exactly 2 Clients At Once

Sep 28, 2010

A simple TCP based chat server could allow users to use any TCP client (telnet, for example) to communicate with each other. For this question you should consider a single process, single thread server that can support exactly 2 clients at once, the server simply forwards whatever is sent from one client to the other (in both directions). Your server must not insist on any specific ordering of messages as soon as something is sent from one client it is immediately forwarded to the other client. As soon as either client terminates the connection the server can exit

View 4 Replies View Related

Programming :: Unable To Find Description Of Alsa's Programming Language

Dec 19, 2008

I am unable to find a description of alsa's programing language, this sort of stuff:

[Code]...

I need to know what, for example, 'ttable' means and what is its syntax. This seems to be a state secret.

View 2 Replies View Related

Programming :: Choice Of Programming Solutions For Collated Document Repository?

Feb 18, 2011

We have documents on multiple workstations and want to collate them into a single repository to provide text search and download. So far we have implemented rsync to copy files from each workstation under a directory for each workstation on a server (incidentally providing a backup) and have set up text search using Xapian with Omega; users access it via a web browser. Still to do is to set up a system to copy files from each workstation's area on the server to the repository.

Many files are duplicated. In these cases we want to preserve the names but keep a single copy of the file;hard links can be used for that.For each file to be copied from a workstation's area into the collated area we need to check whether it is a duplicate (file size and, if same, MD5 sum) and if so, create a hard link to the original rather than create a copy.A system to detect and replace duplicates in the collated area has been written using ruby and postgresql but the developer cannot commit to continuing this work. It does mean we have a postgresql database populated with "fingerprints" of files in the collated area.My first priority is to get the system working; in the longer term whatever is developed must be maintainable; I do not yet know which language skills are available locally.

I am fluent in bash and competent with awk. Ruby looks nice but I have started to learn python and do think it prudent to learn both at the same time. Python's postgresql capabilities are not settled but may be fine for the simple usage required.What to do? A bash solution would run very slowly but could be developed quickly. Language knowledge aside, I have found it difficult to install ruby on the server (CentOS 5.5;installed rvm but "gem" still not installed; seems a very complex system with its own package management).

View 7 Replies View Related

Programming :: Socket Programming While Displaying Received Message In File

May 11, 2011

i have problem in socket programming, while displaying received message in file,i got a problem... i cant able to write it in the file.... this is the code....

Code:
/* tcpserver.c */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
[Code]....

now my problem is run time error i can able to create file but i cant able to write file....log.txt contain nothing.... as here i have give sample code... dont say not initialising function and all.... i have initialised , please only see func1() - my problem is only not able to write msg which i got received from the client..

View 2 Replies View Related

Programming :: C++ Programming With Simple RTAI Functions Outputing Words?

Apr 11, 2011

I need help as I am not proficient with Linux C++ Programming. There are two parts which I need to do in the coding provided below.

1. Produce the program so it can output the word "Hey there!" and wait two minute and print the word "See you later!".

2. Produce the program that will output the text "Cool" every 20 seconds by setting a periodic task.

Quote:
#include <linux/kernel.h>
#include <linux/module.h>
MODULE_LICENSE("GPL");
int init_module(void)
{
printk("Hey there!

[Code]...

View 3 Replies View Related

Programming :: Programming Languages For Project Euler / Additional Ideas?

Jun 28, 2009

I've been working in the real world for a year making some money to go back and finish my masters, and now I'm coming to the end of my contract and am realising how little i remember and how small my scope has become; i basically do shell scripts and perl these days, and its making me uneasy. So instead of bitching about it , I'm going to endevor to complete Project Euler Using randomly generated programming languages for each problem, selected from

And post the fruits of my attempts at my blog (shameless plug) aswell as opening up my svn repository when I'm done. (altho i need to ask in another thread about svn permissions....)To my shame i havent ever touched C#, JavaScript, Ruby or Python, so all in all its going to be very interesting how much i screw up.Anyone have any additional ideas, or languages I'm missing or such? I was considering TCL or Haskell or Erlang at a strech, but i dont know how useful these three would be.

View 14 Replies View Related

Programming :: Use Socket Programming In Order To Implement Chatting Feature?

Aug 25, 2010

how to use socket programming in order to implement chatting feature

View 5 Replies View Related

Programming :: Termios Programming - Without Removing Carriage Return / Enter Key

Jun 30, 2010

I trying to write a UART(interfacing of serial devices) to linux machine but after I execute the following code to receive data I need to enter key (carriage return).... but I don't want to remove carriage return/enter key

[Code]....

View 13 Replies View Related

Programming :: Unix Programming - Single Process That Does Not Start Up Any Other Threads

Sep 28, 2010

i want a process that can operate as both a TCP echo server and a UDP echo server. The process can provide service to many clients at the same time, but involves a single process that does not start up any other threads.

View 3 Replies View Related

Programming :: Arrays In The C Programming Language Are Pointers To The First Element Of The Array?

Mar 27, 2010

I wonder why arrays in the C programming language are pointers to the first element of the array, not the first element of the array itself?

View 14 Replies View Related

Programming :: Design An Audio Chat Programming In Ubuntu

Apr 8, 2010

I want to design an audio chat programming in Ubuntu.So how shall I proceed? Any help on this please?I am complete novice in this topic. Currently my aim is to capture audio from microphone.

View 1 Replies View Related

Programming :: Bash Programming - Rename Files In A Loop?

Mar 31, 2011

I need to rename the resulted searched files from a loopI have the following code:

find . -name DOC* | while read i
do
find $i -type f -name '*.txt'
done

basically, I am searching for all txt files inside any folder starting with DOC name.this code is working fine with me.I need to rename those .txt files to .txtOLDOS: Ubuntu 10.4Bash shell

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved