How do I run a unix command to quit ARD if it is running on a remote server I am trying to access?

how do I run a unix command to quit ARD if it is running on a remote server I am trying to access?

killall "Remote Desktop"
Regards.

Similar Messages

  • How to run piped Unix commands

    Hi,
    I'm trying to run piped Unix commands using Runtime.getRuntime().exec(...) but apparently the pipe symbol ("|") doesn't seem to work...
    Here is basically what I'm trying to do: running "command1 | command2" where both "command1" and "command2" have dynamic values. I could create a shell script and execute it through Java but there has to be a cleaner way...
    Can anyone help me with this?
    Thanks,
    Thierry

    The | symbol for a pipe is understood by a shell, so it was right to point to this direction.
    If you still have a problem, that might be because of another reason. What did happen, how exactly� did it not work? Did you take care of the stdin and stdout channels of the launched process?

  • How to run a unix command in java

    Hi all,
    I need to run a unix command in my standalone java application.my java program is in windows.Is it possible to run unix command on windows system.help me out.
    I tried this
    Process p = Runtime.getRuntime().exec("ps -ef");
                BufferedReader stdInput = new BufferedReader(new
                     InputStreamReader(p.getInputStream()));
                BufferedReader stdError = new BufferedReader(new
                     InputStreamReader(p.getErrorStream()));i get IO Exception -Create Process ps-ef error=2

    If you want to run a command from java for a windows platform, you should check windows knows the command.
    So, load up a DOS prompt and type ps -ef and see what happens.

  • Having trouble in running a unix command and getting the output

    Hi,
    I am trying to run a unix command from within the java code. I am not able to make it work. I am enclosing the code and the error message that I am getting. Any help is highly appreciated.
    import java.io.*;
    public class RunCommand {
        public static void main(String args[]) {
            String s = null;
            try {
                Process p = Runtime.getRuntime().exec("cat UNIX_ASCII_TEXT_FILE | A_UNIX_PROGRAM -d");
                BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()));
                BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getErrorStream()));
                // read the output from the command
                System.out.println("Here is the standard output of the command:\n");
                while ((s = stdInput.readLine()) != null) {
                    System.out.println(s);
                // read any errors from the attempted command
                System.out.println("Here is the standard error of the command (if any):\n");
                while ((s = stdError.readLine()) != null) {
                    System.out.println(s);
                System.exit(0);
            catch (IOException e) {
                System.out.println("exception happened - here's what I know: ");
                e.printStackTrace();
                System.exit(-1);
    }The error message that I am getting is
    Here is the standard output of the command:
    SLu|%%$$=
    Here is the standard error of the command (if any):
    cat: cannot open |
    cat: cannot open A_UNIX_PROGRAM
    cat: cannot open -dLooks like the cat command is working and not the pipe command and the command after the pipe. But when I run the UNIX command from the command prompt I get the expected result.

    You might read this article and see if its approach works.
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Run multiple unix commands from ODI procedure

    I want to run a series of unix commands from ODI procedure. I dont want to use Unix shell scripts. (I know that works).I am just trying to place the contents of the shell scripts in ODI procedure with Operating system as technology. But I am unable to execute the proecedure.
    For example below is a very small 3 line commands I would execute
    filename="/var/test.txt"
    ls -l $filename > /var/anotherfile.txt
    chmod 777 $filename
    I am not sure if there is any specific syntax that I have to follow for executing unix commands. Also I dont want to write a Jython and use os.system command as well.
    Appreciate any help on this

    First your original question... You can put more than one DOS command on a single line, simply separate each command with an ampersand (&). For example:
    mkdir c:\abc & cd abc & dir*
    Regarding your concerns about performance, well that would depend on exactly what you mean. Using CLIENT_HOST (or HOST on the server) simply opens a shell (DOS in this case) then passes your command to it. The performance of performing this action really isn't measurable. Basically you are just pressing a button and you should get a near immediate action. As for the performance of executing each command, that has nothing to do with Forms. Once the command is passed to the shell, the rest is a function of the shell and whatever command you passed.
    Having said that, if you were to write something sloppy like a loop (in pl/sql) which called CLIENT_HOST lots of times repeatedly, then yes there would be a performance problem because the pushing of the button will cause an exchange to and from the server and each cycle in the loop will do the same.
    So the answer to how performance is impacted will depend on what exactly you need to accomplish. If it is a single call to CLIENT_HOST, this should be fine.

  • Running a Unix command as "root" with NSTask

    Hi,
    I'm new to objective-C and Cocoa programming. I already know C and C++ (from classes I had in Uni.) but this one goes farther than what I've seen. Stricltly for learning purposes, I'd like to make a three button window where you click on a button and it launches /etc/daily and the two other cron tasks. But, in order to launch those commands, you need to use sudo. I guess wrapping a Unix command in a Cocoa application uses NSTask, but how do you get the app to run with root access?
    Any help will be appreciated
    iBook G4 (12)   Mac OS X (10.4.8)  

    How about launching Terminal with a script that calls
    sudo? sudo will query the controllying TTY
    (Terminal) for the user's (which had better be an
    admin user) password.
    There should be no way to do this without requiring
    admin authentication, preferably interactive. If
    there were, it would be a privilege escalation
    vulnerability in OS X...
    That is exactly what I am looking for: I'd like my application the ask for administrator privileges before running the Unix scripts.
    iBook G4 (12")   Mac OS X (10.4.8)  
    iBook G4 (12")   Mac OS X (10.4.8)  

  • Running multiple unix commands form java

    hi i have a probelm when i am trying to run more than one command from java:
    i want to run it by using bin/ksh -c (this will take the first arg so i have probelm with runnig commad like" less abc.txt)
    commands to be run:
    1- ll -tr
    2-mkdir x
    3-less abc.txt
    Runtime rt = Runtime.getRuntime();
    Process pr = rt.exec("/bin/ksh -c ll;pwd;less abc.txt");
    which commands i am allowing to run form the java and how can i make it
    best regrdas
    Thanks in advance.

    eddie100 wrote:
    hi i have a probelm when i am trying to run more than one command from java:
    i want to run it by using bin/ksh -c (this will take the first arg so i have probelm with runnig commad like" less abc.txt)
    commands to be run:
    1- ll -tr
    2-mkdir x
    3-less abc.txt
    Runtime rt = Runtime.getRuntime();
    Process pr = rt.exec("/bin/ksh -c ll;pwd;less abc.txt");
    which commands i am allowing to run form the java and how can i make it
    best regrdas
    Thanks in advance.put your commands in a shell script and then call the script from java ...
    import java.io.*;
    class Runner {
            public static void main(String[] argv) throws Throwable {
                    Process p = Runtime.getRuntime().exec("/export/home/caleb/c_code/t.sh");
                    BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
                    String line;
                    while( (line=br.readLine()) != null ) System.out.println(line);
    }

  • How to Move file / call UNIX command using ABAP Program

    Hi, ABAP Guru.
    I need to Cut & Paste file (Move file from one location to another location) on Network Shared Drive using ABAP program.
    But I can't figured out how to do this and what ABAP Command / FM / Method (and maybe UNIX command) that being used.
    Please give me the advice.
    Best regard and Thank you all.
    Nattapash C.

    all methods for your requirements should be in class CL_GUI_FRONTEND_SERVICES

  • Export Unix Commands Templates in ARD

    I was looking for a way to export my unix command templates and came across this thread without a conclusion.
    https://discussions.apple.com/message/2184297#2184297
    After digging around myself, I found that the com.apple.RemoteDesktop.plist mentioned in the previous didn't contain my unix commands.
    Long story short, they are located in Users/$username/Library/Application Support/Remote Desktop/Presets/UnixCommandTask.plist
    Copy the UnixCommandTask.plist around and you're set.
    Should work for 10.6 and up and maybe below too.
    *For OSX Lion and Mountain Lion users, see the following for how to find the Users Library:
    https://discussions.apple.com/thread/4176215?start=0&tstart=0

    you can easily change the serial to a different one
    after copying the plist file from within ARD.
    Preferences > General > Change Serial Number
    so why is it not a good idea?
    Cause the preference files stores all clients data.
    So if I want to use that preferencesfile to another client,
    it will surely show the other clients data like missing.
    I havent tried this. Just my guess, but you right about
    the serial.
    Send the unix commands:
    networksetup -help
    and
    systemsetup -help
    This commands just show the build in templates commands.
    I want to export my own templates, without remaking them
    on every clients server. No big deal but anyway...
      Mac OS X (10.4.3)  

  • UNIX command to quit pages without saving?

    I know that killall "pages" quits pages, but I need a command to quit without saving.. I can't find on anywhere and I don't know anything about unix commands!!!

    Welcome,
    Opening the Pages dictionary there seems to be a standard command:
    tell application "Pages"
      quit saving no
    end tell
    Regards,
    Shawn

  • Unix Command to Move Folders back into Directory

    As you can see from my previous thread: https://discussions.apple.com/thread/3138884?tstart=0
    I ended up reinstalling Mac OS X 10.6.0 after using "mkdir" and "mv" Unix commands to move my old files to a "previous" folder and I'm still trying to access my account because it's Vile Vault protected. I wish I knew how to move my old folders out from previous into /volumes/macintosh\ HD
    Basically it looks like this right now
    ~/Volumes/Macintosh/HD\ Previous (I'm not even sure if that's written the right way
    I need to move all of the folders out from Previous into ~/Volumes/Macintosh\ HD and deleting the existing ones in it.
    All I want to do is have my old Kernel Panic back because I know how to fix it now.
    Thank you very much!

    Hi Philip
    Philip Han wrote:
    I honestly despise the forum setup... Whenever I wait too long the cursor loses focus so when I hit backspace I go back a page and lose everything I wrote. This has happened to me on 3 different computers now.
    I don't have this problem at all, and I can't make any suggestions on how to fix it.  Maybe you should post a separate thread in the Using the Forums Forum.
    So in the end I went against your advice and moved Applications and Users back to their original folder in HD and I logged in just fine! Well, I did have to boot into single user mode to restore Admin Privileges by creating a new account and then changing Privileges. Some programs didn't start up but it's okay, I know which ones rely on System and whatnot but at least I have nearly everything in its original place and I can back it all up.
    Ahh, you're made of sterner stuff than me !
    Best Buy has $99 1TB WD Passport SE's (The USB 3.0 Version actually!) so I grabbed one immediately and set up Time Machine.
    Sounds like a good choice. 
    Seriously, what other way can you ensure that your data is safe without using File Vault? I use Truecrypt for some things that I don't access much, but daily operations? I'd rather just put up with the sluggish performance of FV!
    I think it depends on what level of security you need. Do you routinely have files that simply must not be read by a third party if your computer gets stolen? 
    FV has always struck me as a hammer to crack a nut, and if something goes wrong you can't even take the disk to a data recovery specialist to get your information back.
    On occasions when I have data that must be kept secure I use Disk Utility to set up an encrypted sparse bundle, which I keep on the desktop. When I need to access files in the bundle then I double click on it and enter the password to mount it.  A minor problem with this is that TM will copy across the whole sparse bundle even if just one file on it is edited. Even so, it's not really a problem since TM is working in the background.
    Thank you for all your help Bob!
    You're most welcome
    Bob

  • How to run Unix command with Pipe ( | )?

    Dear Friends,
    I have to execute the below unix command through java program.
    *ps -ewwo pid,args | grep -E "abc.sh|xyz.jar" | gawk '{ print $1 }' | wc -l*
    My code to execute this command is,
    Runtime run = Runtime.getRuntime();
    File workDir = new File("/root/sat");
    String psCmd = "ps -ewwo pid,args | grep -E \"abc.sh|xyz.jar \" | gawk '{ print $1 }' | wc -l";
    Process process = run.exec(psCmd, null, workDir);
              String line;
              int i = process.waitFor() ;
              if(i == 0) {
              BufferedReader buf = new BufferedReader( new InputStreamReader( process.getInputStream() ) ) ;
              while ( ( line = buf.readLine() ) != null )
                   System.out.println("Line - ["+line+"]") ;
              } else {
                   BufferedReader stdErr = new BufferedReader(new InputStreamReader(process.getErrorStream()));
                   // read the output from the command
                   while ((line = stdErr.readLine()) != null) {
                   System.out.println(line);
                   }When i execute this command, i'm getting output as,
    ERROR: Garbage option.
    When i analyse the above error, i found that, the PIPE ( | ) command is not supported through java.
    Could anyone please help me how to execute the above unix command (with | ) in java?
    Thanks in advance,
    Sathish

    The pipe has to be interpreted by a shell so you need
    String[] psCmd =
        "sh",
        "-c"
        "ps -ewwo pid,args | grep -E \"abc.sh|xyz.jar \" | gawk '{ print $1 }' | wc -l"
    Process process = run.exec(psCmd, null, workDir);You should also read, re-read and then implement the recommendations in the 4 sections of http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html .

  • How to execute a Unix Command in java

    Hi, Iam trying to execute a unix command on Sun Solaris by passing that command to a java program. How can I achieve this?
    Thanks in advance.

    Have a look at the javadoc around the Runtime.exec() method. If the command is a shell command then you might have to execute a shell as well as the command.
    For example, if you wanted to run a unix command 'ls -l > output.txt' the you might have to pass the following string into the exec() method,
    "/bin/sh ls -l > output.txt'

  • How to run a HOST command from Report 2.5

    Hello everybody,
    I want to pass an unix command from a Report. I am running the report (Report 2.5) on an Unix server and I want to pass a unix host command inside the Before Report Trigger of the report. But Report2.5 is not recognising the HOST built-in. Is there is any way around?
    Thank in advance.
    Samujjwal Basu

    First off is that openssl command correct? Should it be this instead:
    openssl pkcs8 -inform der -nocrypt -in test.der -out result.pem
    Try out your openssl command within a command prompt so that you know that it works ok. I think the command line you specified waits on stdin (well it does for me).
    After that.....
    runtime.exec creates a Process object. If you do this:
    Process openssl = runtime.exec("....")
    then you can examine the return code from openssl to see the exit code - for instance if the input file does not exist then exit = 1. You can test for this with Java
    Alternatively you could get the stderr from the process and look inside it - if it is 0 length then all is good, if it has some text in there then it has likely failed. You could then throw an exception and include the stderr output in the exception messgae. You may need to experiment with this, runnig it first when openssl is happy then running it again when openssl is upset.
    M

  • Running Unix command through Java

    Hi
    I am trying to run the unix command "rf filename" through Java and it doesnt seem to work.
    Can anyone help in this case please
    String cm = "rm ";
    String delFile =  args[0];        // this path is /data/temp/filename.doc
    Process p = Runtime.getRuntime.exec(cmd +delFile);Also since i dont have access to delete the file through my login i always login as root for a few commands.
    Is there a way i can specify user name & password & then run the command?
    Please let me know
    Thanx

    Please discard the above msg i got a solution by just adding file.delete
    thanx

Maybe you are looking for

  • Linking to (or importing) large FM books in Windows 7

    We've been using the latest CS to develop our source content in Frame, and linking to that from Robohelp (in order to generate OLH). It hasn't been a pleasant process, especially, but it has been sufficient for the last year and a half or so. I'm swi

  • Windows 2008 R2 Sp1 Blue Screen Error and solution

    Hi Guys its been like the 5th time i keep on getting this error on my exchange server which is hosted under Windows 2008 R2 Sp 1 this is the error below please help Problem signature:   Problem Event Name:    BlueScreen   OS Version:    6.1.7601.2.1.

  • Desktop wont Recognize Bluetooth Blackberry

    Just bought New Toshiba P770 laptop that has Bluetooth.  Just installed Blackberry Desktop Manager 6.1 and updated my Curve 8530 to 5.0. When I connect my Curve to the laptop, it shows connected, but Desktop doesn't recognize it and wont give me the

  • My serial number is no longer valid.

    I have bought a new mac but when I reinstalled my flash builder, my serial number is marked as invalid. I used the version of flash builder which I found on the creative cloud as I no longer have a cdrom. Is this the reason ? Should I have used the c

  • AppV 5.0 SP2 HF4 - Registry not applying when set via DynamicConfig.xml

    I have an AppV 5.0 package of VMWare and have tweaked the dynamicconfig.xml file to add a registry key.  I am applying the package with the AppV 5.0 management and publishing server globally.  This is what my dynamicconfig.xml looks like, pulled from