Run command on headphone insert?g in my headphio

Hi, I was wondering if there was a simple way to run a command/script on headphone insert/unplug. I'm trying to mute my speakers when I plug in my headphones on my laptop, but when I plug them in, the integrated subwoofer is not muted. So, I'm just planning on running a script using amixer to accomplish this. Is there a way to run a script automatically when I plug in my headphones?

This might be a start for you: http://www.thinkwiki.org/wiki/ACPI_acti … ery_events

Similar Messages

  • URGENT-How to run command in java application???

    URGENT!
    i would like to run command to invoke some applications (like invoke application using command line in DOS) in my java appication.
    Do anyone know how to do this? Thanks a lot.

    This question has been asked upteen times.
    ok the code is
    for win95
    Runtime.getRuntime().exec( "start c:\\tmp.txt" );
    for win 2000
    Runtime.getRuntime().exec( "cmd /C startc:\\tmp.txt" );
    //change the file to your desire file..
    i am not so sure about win98, sorry...

  • Error while running commands at RMAN prompt

    Hi ,
    We have a few oracle 10g(10.2.0.3) databases on AIX platform.We use RMAN backup with a recovery catalog database.
    The rman full(level 0)backups are scheduled dailly and running fine.When I tried to run commands like 'list backup','report obsolete' I'm getting the following errors.
    connected to target database: TICSPROD (DBID=2626621498)
    connected to recovery catalog database
    RMAN> report obsolete;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to redundancy 3
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of report command at 08/04/2011 07:49:36
    RMAN-06004: ORACLE error from recovery catalog database: ORA-03113: end-of-file on communication channel
    ORACLE error from recovery catalog database: ORA-03114: not connected to ORACLE
    RMAN> list backup;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of list command at 08/04/2011 07:56:25
    RMAN-06004: ORACLE error from recovery catalog database: ORA-03113: end-of-file on communication channel
    ORACLE error from recovery catalog database: ORA-03114: not connected to ORACLE
    But the recovery catalog database is up and running fine.For few other databases I'm able to run the above commands without errors and for some databases I'm getting the errors as mentioned above.
    Could someone help me out with this...

    Thanks Tycho for your reply.
    Please find the output of the query in recovery catalog.
    SQL> select * from v$resource_limit;
    RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL LIMIT_VALU
    processes 49 83 5000 5000
    sessions 30 63 5505 5505
    enqueue_locks 27 94 65910 65910
    enqueue_resources 27 73 24440 UNLIMITED
    ges_procs 0 0 0 0
    ges_ress 0 0 0 UNLIMITED
    ges_locks 0 0 0 UNLIMITED
    ges_cache_ress 0 0 0 UNLIMITED
    ges_reg_msgs 0 0 0 UNLIMITED
    ges_big_msgs 0 0 0 UNLIMITED
    ges_rsv_msgs 0 0 0 0
    gcs_resources 0 0 0 0
    gcs_shadows 0 0 0 0
    dml_locks 0 76 24220 UNLIMITED
    temporary_table_locks 0 3 UNLIMITED UNLIMITED
    transactions 1 10 6055 UNLIMITED
    branches 0 0 6055 UNLIMITED
    cmtcallbk 0 1 6055 UNLIMITED
    sort_segment_locks 0 5 UNLIMITED UNLIMITED
    max_rollback_segments 11 11 6055 65535
    max_shared_servers 20 20 800 800
    parallel_max_servers 0 32 320 3600
    22 rows selected.
    The alert log of the catalog database is continously getting refreshed with the following message.
    Incremental checkpoint up to RBA [0x3b3.a780.0], current log tail at RBA [0x3b3.a78f.0]
    Mon Aug 8 00:16:17 2011
    Incremental checkpoint up to RBA [0x3b3.abf8.0], current log tail at RBA [0x3b3.ac4f.0]
    Mon Aug 8 00:46:19 2011
    Incremental checkpoint up to RBA [0x3b3.1451b.0], current log tail at RBA [0x3b3.1451b.0]
    Mon Aug 8 01:16:21 2011
    Incremental checkpoint up to RBA [0x3b3.14b15.0], current log tail at RBA [0x3b3.14baa.0]
    Mon Aug 8 01:46:23 2011
    Incremental checkpoint up to RBA [0x3b3.14be1.0], current log tail at RBA [0x3b3.14bf0.0]
    Mon Aug 8 02:16:25 2011
    Incremental checkpoint up to RBA [0x3b3.15069.0], current log tail at RBA [0x3b3.150a9.0]
    Mon Aug 8 02:46:27 2011
    Incremental checkpoint up to RBA [0x3b3.150ed.0], current log tail at RBA [0x3b3.150ed.0]
    What could be the potential cause of the issue I'm facing .Could you please guide me...

  • How to run command SQLLoader Oracle in c#

    Hello,
    How to run command SQLLoader Oracle in c#. I try my sourcode for run this SQLLoader, but nothing happen and error "No process is associated with this object.". Please tell me how i fix it. Thanks.
    This is my code:
    System.Diagnostics.Process process1;
    process1 = new System.Diagnostics.Process();
    process1.EnableRaisingEvents = false;
    string strCmdLine;
    strCmdLine = @"/C SQLLDR XL/secreat@O11G CONTROL=E:\APT\LoadXL.ctl";
    System.Diagnostics.Process.Start("CMD.exe", strCmdLine);
    process1.WaitForExit();
    process1.Close();

    jesperdj ,thanks:)
    actually,i am using eclipse to run my ant tasks programmatically,but I got trouble with the AntRunner class.it seems that i should config a proper classloader for it,but i just don't know how.please lend a hand:)thanks
    robin

  • BUG: Run command does not follow current project

    The Debug command respects which project is currently active, i.e. selected by the user in the project folder.
    The Run command, however, does not.
    Version 11.1.1.0.31.51.56
    Workaround:
    Choose a class file with a main method, then issue run.
    Regards,
    Erik

    Hi,
    is it as web project or a Swing project ?
    Frank

  • No "Run" command (FB4 standalone, Mac OS X)

    I downloaded FB4 and installed it as standalone. I can't find a "Run" command that works anywhere in the program's menus or toolbars.
    I had Eclipse (the Cocoa version, hence why I installed FB4 as standalone) and parts of Adobe CS4 Master Collection already installed on this computer. I am positive I'm running the copy of Eclipse that was installed with FB4, rather than my exlsting copy.
    Here are images of my toolbar and the "Run" menu.
    How can I configure FB4 to allow me to test my AS3 programs?

    Hmm, perhaps I spoke too soon.
    The run commands are available in the program's default workspace. They disappear when I switch to another workspace (in this case, example files from a lynda.com course).
    Maybe I should do some more research on my end...

  • Using computer variables in task sequence "Run Command Line"

    I am attempting to deploy VMs through VMware's vRealize Automation tool using CM. The process creates a CM computer object then creates a direct rule on a CM collection for the new computer object. During the creation of the computer object vRA creates computer
    variables provided by me on the computer object. I see the computer object built and i see the custom variables on the computer object:
    Name Value
    dns1 10.10.10.10
    dns2 10.10.10.11
    gateway 10.10.10.1
    ipAddress 10.10.10.2
    netMask 255.255.255.0
    In the task sequence the last step is to "Run Command Line":
    cmd /c netsh int ip set address name="Ethernet0" static %ipAddress% %netMask% %gateway% & cmd /c netsh int ip set dns name="Ethernet0" static %dns1% & cmd /c netsh int ip set dns name="Ethernet0" static %dns2% index=2
    When the TS gets to that step it doesn't substitute the variables in the command with the computer variables listed above. Looking at the smsts logs after the deployment is complete I see lines stating:
    Set Command Line:...
    Start executing command line:...
    Executing command line:...
    ProgramName = ...
    All of those lines show the command exactly as it is above with the %variables% intact.
    The command immediately fails with the error:
    Invalid address parameter (%ipAddress%). It should be a valid IPv4 address.
    Does anyone have a suggestion on why the TS isn't using the variables? I found this article https://technet.microsoft.com/en-us/library/bb693541.aspx but its for 2007 not 2012. I wasn't able to find something comparable for 2012.

    I don't know why anyone here thinks you *need* sccm osd to achieve fully automated customizations.
    Customer selects base image (2008 r2 core, 2008r2 gui, 2012 r2 core, 2012 r2 gui), which should be thin and with zero customizations anyway,
    vaai accelerated clone creates vm,
    ip addr/gateway/dns config is injected with powercli,
    customers config management engine agent of choice is installed via powercli script injection/execution (we have puppet users, ConfigMgr users, saltstack users, IEM users, Cheff users),
    the clone completes in ~2 minutes and a VM is presented to the customer in less than 5 minutes 
    Deploying windows VMs via SCCM OSD is not only slow, but requires dev work on the customer side to get things rolling which wastes everyone's cycles including your own

  • BO Edge 4.0 Installer stuck on "Run command-line executable"

    Hi,
    Our BO Edge BI Server 4.0 Installer on Windows Server 2008R2 is stuck on one of the last steps; "Run command-line executable".
    Before is was stuck on "WaitForCMSForTheFirstTime". We upped the RAM to 16GB and then the installer went past this, but after a full reset of the server and trying again it is now stuck a few steps later on "Run command-line executable". This is very frustrating, especially since there is no error message at all, no install log and the installer is just stuck indefinitely and we had to cancel it.
    At that point the Central Configuration Manager shows this:
    Apache Tomcat - Running
    BW Publisher Service - Stopped
    SAP BO Mobile Authentication Server - Stopped
    SAP BO Mobile Processing Server - Stopped
    Server Intelligence Agent - Running
    We can't deinstall from Windows to start over at this point because the installer says an install is in progress.
    What is going on?
    Help urgently needed and appreciated
    Edited by: J. Knulst on Jan 11, 2012 7:48 AM
    Edited by: J. Knulst on Jan 11, 2012 7:50 AM

    Hello,
    Yes, certain stages run for a long duration. "Run command-line executbale" runs for atleast 45 mins. It's normal.
    My suggestion would be to leave it for 45 mins-90 mins.
    Now that you have interrupted your installtion, try uninstalling it through the control panel.
    In case you can't see the software there, then you have to edit registry entries, which is very tiresome.
    Regards,
    Sonia

  • Cannot run command window

    In Windows I would expect to call up a seperate command window with the following, but it appears to freeze up. What am I doing wrong?
    import java.io.*;
    public class command {    
      public static void main(String[]args) {
        try {
          Process runprogram = Runtime.getRuntime().exec("C:\\windows\\system32\\cmd.exe");
          try {
            runprogram.waitFor();
          catch(InterruptedException e){}
        catch(IOException e) {
          System.err.println("Cannot run command window");
    }

    What about this...
        Process proc = null;
        try
          proc = Runtime.getRuntime().exec("start cmd");
          proc.waitFor();
        catch(Exception e)
          e.printStackTrace();
        }Some dukies would be nice next time ;-)

  • Run commands in new tab in Terminal.app

    hello, i want to know is there a way to run commands and these opens a new tab in terminal.app.
    i know i can open a new tab with cmd+t , but i have a folder with hundreds of files with the name [email protected] and each file has the string ssh://username@server...
    i use these folder in the dock like a bookmark of servers that i administrate, if i set that ssh default is the app iTerm.app then every of these file i execute opens in a new tab of iTerm, but if i set ssh default to Terminal.app for every file open a new windows of Terminal.
    I would like to use Terminal.app if somebody help to find a way to open these conections in a new tab.
    You can try to open the terminal.app, them in safari type ssh://localhost... and you see a new window of terminal.
    Sorry for my bad english
    Regards
    Diego.

    I wonder if you're too tied to one solution. I do a very, very similar thing to what you're doing, except that I support 900 or so machines (I work for a hosting provider -- so, I'm not kidding.. promise!).
    The basics of my setup are as such:
    I have the host names of all the servers in a text file. In my .bash_profile I have a routine that loops through each server name and, if needed, generates a bash script named for the server in a directory I've set up in my path (~/bin/hosts). That file has the command string for ssh that I use to connect to the server in it. For example, for a server named 'foo', I'd have a file named '~/bin/hosts/foo', and the contents would look something like this:
    ssh -X username@foo
    This is the part I really like. I create each one as it's own bash script so that it can be found and indexed by spotlight, which I use as my app launcher. So, once each script has been created, all I have to do is cmd-space (to open spotlight) then type in the server name to continue. This works great except that it opens a new window every time. So annoying. As of today, though, I now have a new bash script:
    tab ssh -x username@foo
    A very small change, but with a huge effect. The other change is that I put the "tab" subroutine in a bash script in my path as well. So, now when it launches the ssh command it's in a new tab. Exactly as I wanted.
    I'm hoping this will help you. Even if not, though, try to remember to keep an open mind. I know the "url" scheme you're using works well, but I actually prefer my way (of course.. I made it up ). Whichever way you go, I wish you the best of luck.
    Cheers,
    4

  • Running commands on VMs remotely

    Hi Everyone
    New to all of this so please bear with me!
    Starting a new project and looking to compare between the use of Hyper V and ESXi.  
    The project is to grab vms regardless of state, turn them on and execute scripts stored on a vm drive. The script execution has to be performed / issued by a user. C# is the main underlying code but we can potentially put in references to use powershell
    scripts / whatever else if we can achieve this using hyper v.
    I know from doing a bit of reading on ESXi that we can do this using a number of ways - vmrun to start, stop and run commands on the actual vm itself. using other vmware libraries and APIs.
    I have read that powershell commands include starting vms, taking snapshots, shutting down vms but I was wondering if we can get into the actual VM remotely / somehow in-order to, for example, run a script which is stored on that VMs C drive.
    Has anyone tried this / is it do-able? -  I have had no luck finding any examples of what we need. 
    Kind Regards,
    Ashley

    I have a few things that I have done historically.
    Really, you have two options.  a WMI (API) call or a WinRM / PowerShell remoting call.
    The difference between the two is 1) security settings and 2) ease of use.
    For WinRM the security needs to be more open then WMI.  But, it is far easier to script as you simply open a remote session and you keep scripting along in the remote shell (the tricky part is pulling values back to the local session).  With WMI
    you always get the values back since you never spawn into another session.
    Below is a WinRM example of using WinRM and returning some value back:
    It executes a WMI command on the remote machine to fin the file I am looking for (as that is faster) and then I read the file with the script.
    # This block of script executes remotely and returns the content of hte CtxSta.config file.>
    $sta = invoke-command -Session $s -ScriptBlock {
    $staArray = get-wmiobject CIM_DataFile -filter 'Extension="config" and FileName="CtxSta"'
    # If IIS Integration is installed there could be multiples, this is the one that CSG is hard coded to use.
    foreach ($e in $staArray) {
    if ($e.Path -match "citrix\\system32") {
    $sta = $e
    get-content -path ([string]$sta.Name)
    # We have returned to local execution.
    foreach ($e in $sta) {
    switch -wildcard ($e) {
    "UID*" {
    $e = $e -replace "UID", ""
    $e = $e -replace "=", ""
    $e = $e -replace " ", ""
    $staId = $e
    $staId
    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

  • Oracle EM Grid Control Error: Failed to run command in process

    I am trying to change "Backup Settings". After entering the Host Credentials, when I click the OK button, I receive the following error message.
    Validation Error
    Examine and correct the following errors, then retry the operation:
    Error - Connection to host as user <user> failed.ERROR: Failed to run command in process
    Any Suggestions? Thanks in advance!

    Hi,
    If you are using linux/windows the hostname credentials should be the user who has installed the oracle 10g database software, if Windosw the user you are using need to be member of the ora_dba group and have Local Security privilege 'Log on as a batch job'.
    What you need to do is go to start----> Programs----> admin tools----> Local security policy --->local policies ---> user rights assignments
    In the list to your right, look for 'Log on as a batch job', double click and add the same OS local user you using to access OEM web to the group.
    I hope this will solve your problem.
    Cheers,
    Francisco Munoz Alvarez
    http://www.oraclenz.com

  • Running command prompt commands in java

    I can use:
    Process j = Runtime.getRuntime().exec("command";
    BufferedReader stdInput = new BufferedReader(new InputStreamReader(j.getInputStream()));
    BufferedReader stdError = new BufferedReader(new InputStreamReader(j.getErrorStream()));
    to run commands in the command line buf if i make another process..the command will not run...any ideas?

    ProcessBuilder can simplify things:
    redirectErrorStream
    <quote>
    If this property is true, then any error output generated by subprocesses subsequently started by this object's start() method will be merged with the standard output, so that both can be read using the Process.getInputStream() method. This makes it easier to correlate error messages with the corresponding output.
    </quote>

  • Error running command: /usr/java/bin/java: error execing process: Not enoug

    Error running command: /usr/java/bin/java: error execing process: Not enough space
    In a whole root zfs zone the webconsole service fails to start. This is what I get:
    svc:/system/webconsole:console (java web console)
    State: maintenance since Fri Aug 27 14:32:41 2010
    Reason: Start method exited with $SMF_EXIT_ERR_FATAL.
    See: http://sun.com/msg/SMF-8000-KS
    See: man -M /usr/share/man -s 1M smcwebserver
    See: /var/svc/log/system-webconsole:console.log
    Impact: This service is not running.
    # more /var/svc/log/system-webconsole:console.log
    ^C# more /var/svc/log/system-webconsole:console.log
    [ Aug  6 09:30:40 Disabled. ]
    [ Aug  6 09:30:40 Rereading configuration. ] [ Aug  6 09:30:52 Enabled. ] [ Aug  6 11:32:50 Enabled. ] [ Aug  6 11:33:02 Executing start method ("/lib/svc/method/svc-webconsole start"
    Starting Sun Java(TM) Web Console Version 3.1 ...
    The console is running.
    [ Aug  6 11:33:25 Method "start" exited with status 0 ] [ Aug 27 14:32:15 Enabled. ] [ Aug 27 14:32:28 Executing start method ("/lib/svc/method/svc-webconsole start"
    Error running command: /usr/java/bin/java: error execing process: Not enough spa ce [ Aug 27 14:32:41 Method "start" exited with status 95 ] # df -k
    Filesystem kbytes used avail capacity Mounted on
    / 0 4341506 3761710 54% /
    /dev 8103216 4341506 3761710 54% /dev
    proc 0 0 0 0% /proc
    ctfs 0 0 0 0% /system/contract
    mnttab 0 0 0 0% /etc/mnttab
    objfs 0 0 0 0% /system/object
    swap 2498344 360 2497984 1% /etc/svc/volatile
    /platform/SUNW,T5240/lib/libc_psr/libc_psr_hwcap2.so.1
    8103216 4341506 3761710 54% /platform/sun4v/lib/libc_psr.so.1
    /platform/SUNW,T5240/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1
    8103216 4341506 3761710 54% /platform/sun4v/lib/sparcv9/libc_psr.so.1
    fd 0 0 0 0% /dev/fd
    swap 2497984 0 2497984 0% /tmp
    swap 2498024 40 2497984 1% /var/run
    Grp-MFNY/billables/RV
    20514816 22 3761710 1% /RV
    Grp-MFNY/billables/TT_DB
    20514816 28 3761710 1% /TT_DB
    Grp-MFNY/billables/tab

    You need to find the java exceptions - most likely in the logs in the /var/log/webconsole/console directory.
    A wild guess is you don't have enough swap space to perform a fork.
    -- Ken

  • Run Command through Java Program.

    I am giving ping command in exec method of Runtime().
    But ping syntax is different for linux and windows. So when I run command on windows it wasn't worked. I am giving command --> ping -c5 ipaddress . This works fine for linux but in windows, there is no -c option. So is there any solution to overcome this situation?
    please reply ASAP.
    Thanks,
    Raj

    I am writing code that runs ping command on all OS.
    Ping syntax different for different OS (like
    windows,linux,solaris etc).
    I don't want to check for each OS and run command
    specific to that OS.
    I want to write a generic program so ping command
    execute regardless of which OS. This is self-contradictory. You can't use one command line string on different platforms if they don't support this one command string.
    The ping command is different (concretely, this -c option you mention is indeed not supported on Windows - what does it do anyway?) on different OS.
    So, you basically have two options:
    - You use only a subset of the ping options, one that does run on all your platforms (I actually expect ping to be pretty portable anyway but...).
    - Or you do use platform specific options like -c, in which case there's no way around checking the running OS and generating a specific command line.
    Can I use system calls in my program to execute the
    ping command, If yes, how?Rephrase please.

Maybe you are looking for

  • HT204053 Issue with Apple ID iPhone 4S iOS 6.0.1

    There is an issue, with Apple ID on iPhone 4S Apple ID, by entering wrongly Apple ID at the first time, it can't be changed anymore, or I just can't find where to change it, for proper use of App Store application and update of other apps.

  • Problem sending email

    I fail to send email with the error message "This message could not be delivered and will remain in your Outbox until it can be delivered. Sending the message content to the server failed." No problem in receiving emails and the Connection Doctor too

  • Online Number Not Working

    I bought an online number and to the best of my knowledge it is activated.  When I call it, it will just ring and go to voicemail, but it does not ring on my computer or mobile phone (android with skype installed and running).  Please help me remedy

  • Are there any type of wanderlust/travel/future life goals type of diary apps?

    I am trying desperately in the app store on my mac to find a diary like application that isn't just about journalism. I have these future goals to go back to school, become a midwife and travel but I can never seem to keep these goals, especially if

  • XML Error Message for Every one hour in SXMB_MONI

    Hi All, I am getting XML error Message for every one hour in PI when I check in SXMB_MONI I can see this. Details Below Sender Componant : PI Sender Interface : SAPCCMS Reciever Interface/Reciever Componant : Both are empty. PI Version 7.1 Can anybod