Udev refuses to run my scrips [solved]

I've created a udev rule at /etc/udev/rules.d/81-zte.rules with the following:
SUBSYSTEMS=="usb", ATTRS{product}=="ZTE HSUSB Device", KERNEL=="sd?1", NAME="%k", SYMLINK+="zte", GROUP="storage", RUN+="/home/afulm/.scripts/zte.sh"
It works except that it for some reason refuses to run my script. What have I done wrong?
The script is a simple scripts that mounts my device:
#/bin/bash
notify-send 'ZTE Blade mounted.' --icon=dialog-information
sudo mount /mnt/zte
thunar /mnt/zte
Last edited by afulm (2012-09-17 15:59:27)

stewie wrote:
#/bin/bash
notify-send 'ZTE Blade mounted.' --icon=dialog-information
sudo mount /mnt/zte
thunar /mnt/zte
Is this script executable?
It also looks like you might have the first line wrong. I think it should be:
#!/bin/bash
Oops.
lucke wrote:
Those commands are run by root (thus sudo is redundant) and they have no knowledge of your X session.
DISPLAY=:0.0 su yourusername -c "thunar /mnt/zte"
would probably work and for notify-send (which uses dbus) see this topic. You can test those commands by running them as root in a virtual console and observing whether you see the desired effect in your X session.
Thanks it works now.

Similar Messages

  • Is it possible to run a group solve from the batch manager?

    I'd like to know if it is possible to run a group solve defined in OFA 11i that contains solve and copy data from the batch manager.
    Thank you
    Luigi Polverini
    Synesis s.r.l.
    null

    Problem: I have a Perl script in my AIR App's install directory that needs executable permissions on a Mac.
    Solution: Chmod the file in my AIR App.
    My code looks something like the following:
    if (Capabilities.os.indexOf("Mac OS") > -1) {       
                        var dlFile:File = File.userDirectory;
                        var _chmod:File = new File("/bin/bash");
                        dlFile = new File(file);
                        var nativeProcess:NativeProcess = new NativeProcess();
                        var chmodStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
                        chmodStartupInfo.executable = _chmod;           
                        var args:Vector.<String> = new Vector.<String>();
                        args.push("-c"); 
                         // Trace so I can make sure the command and path are correct in the debugger              
                        trace ("\"chmod ugo+x '"+dlFile.nativePath+"'\"");
                        args.push("chmod ugo+x '"+dlFile.nativePath+"'");
                        chmodStartupInfo.arguments = args;
                        nativeProcess.addEventListener(NativeProcessExitEvent.EXIT, onExitError );
                        chmodStartupInfo.executable = new File(file);                       
                        var process:NativeProcess = new NativeProcess();
                        process.start(chmodStartupInfo);  
    I really hope this helps someone else.

  • Flash Player refuses to run, if outdated.  Can I change this setting?

    I work in a video production environment -- tonight we ran into a problem where a couple of live monitoring systems were not working because Flash refused to run; presumably, because it's out of date.   In this case, the systems are "Deep Frozen" (locked down, essentially).
    While I think I understand the underlying reasoning for this, it's highly disruptive.    Is there a way we can change Flash Player so it doesn't refuse to run if it's outdated?
    These systems are on OSX Yosemite.  It's possible it's not just a Flash Player setting, but a browser setting -- still trying to track this down.  
    Tips, pointers would be appreciated!
    Thank you.

    Yeah, that makes sense.  Faronics is really into buzzwords.  It was hard to cut through the marketing-speak to figure out what they were actually doing.
    The plug-in blocking technology on Mac is called xprotect.  You can disable it, which might make sense in your use-case, but it's typically a really bad idea for the average end-user.
    sudo mkdir /System/Library/Launchdaemons/Disabled
    sudo mv /System/Library/LaunchDaemons/com.apple.xprotectupdater.plist /System/Library/LaunchDaemons/Disabled/com.apple.xprotectupdater.plist
    sudo /usr/libexec/PlistBuddy -c "Delete:JavaWebComponentVersionMinimum" /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.meta.plist
    I'm guessing that these files are mutable on the system and not part of the persistent snapshot, or I imagine that the blocking would have went away after a reboot.  I'm thinking that you can probably disable these and update the relevant snapshots to ensure that you're not picking up new xprotect blacklists in the field.
    If you're just hitting the same set of consistent local IPs for your monitoring backend, it might make more sense to preconfigure them in Safari as always allowed vs. wholesale disabling xprotect.
    Hopefully that's helpful.

  • Flash player refuses to run.

    flash player refuses to run. have tried all the fixes but am unsuccessful....

    Welcome to the Adobe Forums.
    The more information you supply about your situation, the better equipped other community members will be to answer. Please supply the following Information:
        •    Adobe product and version number
        •    Operating system and version number
        •    Browser and version number (where applicable)
        •    The full text of any error message(s)
        •    What you were doing when the problem occurred
        •    Screenshots of the problem (if possible)
        •    Computer hardware, such as CPU; GPU; amount of RAM; etc.

  • Photoshop Elements now refuses to run

    Photoshop Elements 4.0 now refuses to run on my Intel Macbook (10.4.10). It used to work flawlessly. One day, it just refused to open. The loading screen would come up, then it would crash and say "Photoshop Elements has unexpectedly quit." Nothing changed on my computer between the last time I used and when it started to crash. No new software, no updates etc. I have tried doing these things to fix the problem:
    -Rebooting
    -Deleting the Photoshop Elements .plist file
    -Using a different user account on my computer
    -Repairing permissions on my hard drive
    -Uninstalling Photoshop Elements and reinstalling it
    All of which have failed to work. Nothing I have done has been able to work.
    Message was edited by: littlevish

    Thanks, Barbara.
    In no particular order, while the images are from the same camera, I get the same problem with images from other sources scanned in with my Epson 4490 scanner.
    I run diskwarrior from time to time, but not on a regular basis. Is it not a good utility to use?
    I am sure I deleted the twain driver, certainly from the import/export file you mentioned. There is no other mention when I use 'Find'.
    There a lot of caches. I have deleted the Opera cache.
    Donald

  • When i try to install a program in my macbook Pro, the message appear: Run preflight scrip and after Run the postflight script. How i'll fix this?

    When i try to install a program in my macbook Pro, the message appear: Run preflight scrip and after Run the postflight script. How i'll fix this?

    Here are the Mac requirements:
    System Requirements Mac Version (*)
    Mac OS X 10.6.1, 10.7.1, 10.8.1 or 10.9.1
    1.83 GHz cpu or better
    Nvidia Geforce 8600, ATI Radeon X1600 or better (min 256 MB VRAM)
    1 GB RAM
    2 GB free hard drive space
    DVD-ROM Drive
    Are you sure that you have the Mac version, as there is a Windows version, as well as a few game console versions.
    Sounds as though that may be a Windows or other version.

  • Anyone provide accurate info on why after 1 yr, after guarantee period expiry the DVD player on our I mac running Intel core duo processor with OS 10.6.8 refuses to run DVDs? CDs run

    Can anyone provide accurate info on why after 1 yr, ( just after guarantee period expiry) the DVD player on our I mac running Intel core duo processor with OS 10.6.8 refuses to run DVDs?
    CDs run without problem and until recently the DVD we have (all original no pirated copies) ran; we have used a CD cleaner disc to no avail.

    Welcome to the Apple boards:
    I suggest an erase and install and use your backup for any important files you have.
    Did you perform a disk check/repair and permissions repair and a PRAM zap before updating? While not required, they are usually necessary to avoid issues.
    There are so many reasons for a bad install, that it is impossible to list them all.
    Out-of-date software, drivers, etc, haxies, and other software can cause problems.
    My three updates were without incident, so it is possible for a perfect update, but unless you supply us with details about your previous system, programs, apps, drivers, etc., it is not possible to figure out what happened.
    Again, whenever installing an update to an OS, a clone or other full backup is absolutely necessary, as reading the posts on this board indicate.

  • CS6 Has to Run as Administrator - SOLVED!!

    A number of us have had problems with CS6 Beta insisting on running with administrative priviliges.  So far, I don't see a solution listed.
    My case seems to be the same as others.  We are booting from an SSD on which Windows is loaded.  We also have a second drive of the old mechanical sort .  All programs are loaded on this drive.
    Okay, if that's your situation, read on....  My boot SSD is the C: drive and my hard drive is D:.  When I installed CS6 Beta, it refused to run until I set it to run as administrator.
    I went into Edit -> Settings -> Performance and on the Scratch disk setting, I checked D: and unchecked C:.  Aha!  That'll fix it.  BUT IT DIDN'T!!  CS6 still insisted on Administrative priviliges!!
    Tonight I went back into the Performance settings and noticed something.  You can change the order of the drives.  Since the C: drive was unchecked, I naturally assumed Photoshop would skip over it.  THAT ASSUMPTION IS WRONG!!
    Just for the heck of it, I changed the order of the drives by highlighting the C: drive then going to the right and clicking the down arrow.  I then OK'ed that setting, went out of Photoshop and brought up Explorer where I unchecked "Run as Administrator" for Photoshop.exe.  Then I rebooted.  When I brought up CS6, IT WORKED!!  It no longer needed to run as Admin!
    Fix it, Adobe!
    Gerry Swetsky
    PC - Windows 7 Professional 64 bit
    8 Gig RAM
    Asus GeForce GTX550
    OCZ Technology 60 Gig SLD3 SSD
    WD 750 Gig SATA III HD

    I don't use Bridge, but it (Bridge) seems to be pre-set to run as administrator.
    Thank you very much for the link.  Adobe needs to know about this problem.
    Gerry

  • Cannot run the macro SOLVER.XLAM!MainEx error message

    Ive had this problem for awhile but am now needing to use solver for my schoolwork. 
    Anytime i try to use the solver function under the data tab this error message pops up. 
    I have tried taking off and readding the add-in under options. 
    when i try to access solver in the visual basic panel it asks for a password which i have never set
    Im running excel 2013 on windows 7
    I have tried many things and am exhausted. No solution has been posted to this problem on the site or anywhere on the web 
    THIS IS NOT WHEN IM TYPING MACRO CODE IN VBA. its just when i try to use solver for simple spreadsheet calculations. 
    when i click solver i get the error cannot run module: SolverCode
    when i try to access the solver code in vba a password is required 

    Hi,
    As far as I know,  the Solver add-in code has the password by design, it is protected on purpose and copyrighted. They are designed for use from the spreadsheet only. 
    Then, as the error message:" Cannot run the macro SOLVER.XLAM!MainEx error message." Please try to do the following methods to fix the issue:
    1. Open VBE (Alt+F11)>Click Tools> References>set to SOLVER>Show immediate code pane (Ctrl+G)>Copy/paste (or write): application.run "solver.xlam!auto_open"
    2. Disable the other Excel add-ins, such as
    Adobe PDFMaker.
    3. Repair Office 2013.
    Regards,
    George Zhao
    TechNet Community Support

  • (Newbie Alert) KMymoney refuses to run

    Hello,
    I installed kmymoney2 (0.8.9-1), but it refuses to run:
    buzz ~ $ kmymoney
    kmymoney: error while loading shared libraries: libkabc.so.1: cannot open shared object file: No such fileor directory
    Moreover, its .desktop file is being installed into /opt and does not appear under kde's menu.
    Could anyone help me, please?

    rbaprado wrote:
    rbaprado wrote:
    lucke wrote:
    Interesting, only i686 has -2.
    Rebuild it yourself using ABS, if it works after rebuilding, send a notice to its maintainer (swiergot).
    No good:
    checking for dcopidl... /opt/kde/bin/dcopidl
    checking for dcopidl2cpp... /opt/kde/bin/dcopidl2cpp
    checking for mcopidl... not found
    configure: error: The important program mcopidl was not found!
    Please check whether you installed aRts correctly or use
    --without-arts to compile without aRts support (this will remove functionality).
    make: *** Nenhum alvo indicado e nenhum arquivo make encontrado. Pare.
    I managed to compile it with --without-arts, but got 0.8.9-1 again :-(
    You just need to bump the 'pkgrel' line in the PKGBUILD file. When you do this, just bump it to the version that you're looking for so that future upgrades will overwrite the file.
    pkgname=kmymoney2
    pkgver=0.8.9
    pkgrel=2
    Oh yeah, mcopidl is in KDE-libs somewhere. I don't have KDE installed so I can't tell you where.
    Last edited by skottish (2008-08-31 16:33:43)

  • Boot Camp refuses to run on new iMac with 10.4.7

    I am setting up a brand new 17" Intel iMac for a client, and after using Software Update to download all required updates, including Mac OS 10.4.7 and firmware update SMC 1.1f5, Boot Camp Assistant refuses to run, saying that a firmware update is required.
    Since I have confirmed that I have already installed the latest firmware update, I can only conclude that something in 10.4.7 broke Boot Camp or that the Boot Camp Assistant is simply not aware of SMC 1.1f5, which is the latest version.
    Anybody else out there run into this problem also?

    I also believe I typed the date wrong, it was 17 APR not 16 MAY it was available.
    Firmware Updates are not customarily installed through Software Update. The SMC Firmware Update was an exception. Usually, because they can be a bit disruptive if you're not prepared for them, Firmware Updates are more user intentional/active. They usually require you to download them directly to your desktop, read the install instructions and install when you have prepared your Mac to receive the install without chance of interupting the process.

  • ADR refuses to run this month

    Hi all,
    I have a test environment and I created an ADR for software updates. I went and had a look after the expected run time and the rule had not run. "Last Evaluation Time" was blank. The rule is enabled. I checked the ruleengine.log and I see no errors.
    I've been trying to figure it out today and changing the time in the evaluation schedule and seeing the new entries change in the log. For some reason, every time I change the evaluation schedule, the log tells me it will run next month. This seemed to happen
    when I changed my ADR time from 10:00PM to 11:00PM well before the expected evaluation time because I realized my SUP would sync at 10. Prior to the change, the ruleengine.log said:
    Refreshed ScheduleList instance for Rule (16777220) from schedule string (02ECBAC000231400) with next occurence (11/12/2013 10:00:00 PM) SMS_RULE_ENGINE 10/28/2013 4:09:43 AM 1736 (0x06C8)
    After the change:
    Refreshed ScheduleList instance for Rule (16777220) from schedule string (02ECBAC000231400) with next occurence (12/10/2013 11:00:00 PM) SMS_RULE_ENGINE 11/4/2013 3:00:18 AM 1736 (0x06C8)
    Now, I'm wondering if the change in time (from Daylight savings time) might have something to do with it? That time change happened on the 2nd.
    For example:
    Today is the third Wednesday of the month. I change my ADR to run tomorrow (the third Thursday) at 11:00 PM and recur every month on the 3rd Thursday. The log displays the following entry:
    Refreshed ScheduleList instance for Rule (16777220) from schedule string (02F5BAC000251600) with next occurrence (12/19/2013 11:00:00 PM) SMS_RULE_ENGINE 11/20/2013 11:19:21 AM 1736 (0x06C8)
    It seems that the ADR refuses to run this month and I can't for the life of me figure out why. Any thoughts on this? I hope this post isn't too confusing. I'm still a relative noob when it comes to SCCM

    Hi,
    Here is a useful article for your reference.
    Using System Center 2012 Configuration Manager - Part 9. Deploying Monthly Updates
    http://www.windows-noob.com/forums/index.php?/topic/6799-using-system-center-2012-configuration-manager-part-9-deploying-monthly-updates/
    Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • [SOLVED] udev rules: cannot run command

    I want to run a scipt everytime I plug in my external harddrive. I read the documentation and create a file called /etc/udev/rules.d/extern_hd.rules:
    SUBSYSTEMS=="usb", SYSFS{serial}=="33504D315647585A", SYMLINK+="ExternHD", RUN+="/root/scripts/test.sh"
    The symlink "ExternHD" gets created. The permissions of test.sh are rwxr-xr-x root root, but it never gets executed. What am I doing wrong?
    Last edited by Kei (2007-09-18 11:30:35)

    Solution was easy... Udev doesn't want to start anything from within /root, so I put a hardlink to /usr/local/bin/ and now everything works fine.

  • [SOLVED] Perl refuses to run certain utilities

    [Aside: Sorry, not really an Arch newbie, but I am a forum and Perl newbie; not sure where else to post this.]
    I am the current maintainer of the AUR package called mesa-demos-git; it was flagged out-of-date, and I was going to examine the problem (and throw in the new VCS syntax for good measure) when I was greeted with this fun little error:
    ==> Starting build()...
    autoreconf: Entering directory `.'
    autoreconf: configure.ac: not using Gettext
    autoreconf: running: aclocal -I m4
    Attempt to reload Scalar/Util.pm aborted.
    Compilation failed in require at /usr/lib/perl5/site_perl/Data/Dumper.pm line 297.
    aclocal: error: echo failed with exit status: 1
    autoreconf: aclocal failed with exit status: 1
    Running aclocal by itself in a directory with a configure.ac fails, as one would expect from the above error (even though it has worked in the past on other packages I've updated in the last couple weeks).
    I also wasn't thinking for a while and thought it was a missing module, so I ran cpan to try to install it, but cpan fails with the same error.
    Yeah, so something's wrong with the perl configuration on my system; I tried a `pacman -Rnsdd perl` and a reinstall, but to no avail. Actually, since no package seems to own /usr/lib/perl5/site_perl/Scalar/Util.pm, I have no idea where to start.
    What's going on here and how can I even begin to solve this?
    Last edited by luolimao (2013-05-28 03:03:46)

    Does any package own anything in site_perl? I ask because that directory is empty on my system. I'm wondering if those files have been installed manually and are being used instead of the versions in core_perl/vendor_perl such as /usr/lib/perl5/core_perl/Scalar/Util.pm, for example.

  • [solved] cron refuses to run a command

    For some reason, cron just won't run a one particular command.
    Here's my crontab:
    */1 * * * * /usr/bin/modprobed_db store &> /dev/null
    */1 * * * * touch ~/.config/modopodo &> /dev/null
    The second command is there just to check cron is working. And yes, it works. Each minute it creates that file.
    But the first one just won't work.
    I moved it underneath the second command - no difference.
    I changed cronie to dcron - no difference.
    But when I try this command in terminal - it works perfectly fine.
    Why?
    Last edited by Lockheed (2013-11-28 07:32:18)

    @WonderWoofy, that is a good point. I installed the new version and now it seems to work with cron.
    However, I am still puzzled why the last one didn't work in cron, while it worked in terminal.

Maybe you are looking for

  • How do I share music between 2 iTunes libraries on the same computer?

    I have 1 iTunes account,1 laptop and 2 iPods that are each sync'd to their own library.  How do copy music from library 1 to library 2?

  • FCPX: file type question (MP4 or what?)

    Hi there, here's one more. I was editing some video from Sony A-55 camera and noticed something odd. When stopping in parts of the film where there is movement, a zigzag-edge appears. Now this would be fine in, say, DV. But the footage is supposed to

  • Text length in Sap Script

    Hi all, how can I force auto adjust of Text leght in Sap Script ? I have a text to print, and when it is taller than page area it is printed in another page Ok. But I don't want that it is printed in another page, I want that it is adjusted automatic

  • Cannot start Discoverer Viewer and Discoverer Plus on client.

    I have installed Discoverer 9.0.2.39.0 on MS Windows 2000 server. When I'm trying to start Discoverer Plus an error is occured: DiscoServerException ??? ??????? ????????? ???????? ????????? ??????. ???????? ?? ?????????. - Nested exception: exception

  • Console.app crash

    Hello , my console.app crashes. Looking at it with Instruments , i see that it block when trying to read an directory , but i cannot figure out which directory is that. Process: Console [354] Path: /Applications/Utilities/Console.app/Contents/MacOS/C