GUI that open a Linux terminal, run commands and retrieve results

Hi
I am currently designing a GUI that should make it easier for users to execute a command line statement and read the information that is returned.
I should not have any issues with the actual GUI, but I have not been able to find any examples to help with how to open a command terminal, enter a command and retrieve the results. I am aware that using a screen scraper is a possibility, but if anyone is aware of any examples to achieve this, that would be great.
Thanks
Matt

Is the command line app a simple, straightforward one
that just prints its output? (Eg. ls, dmesg, or any application
that simply print results without reading input)
If so, try this tutorial on calling a program
and reading its output:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
But if your commandline app is a rich-interactive one
(eg. a full screen menu program or full screen text editor
or something), then it's much much more complicated.

Similar Messages

  • Hi I would like to know, how do I add a Hyperlink on Flash, that opens a PDF in adobe reader and not the web browser.

    Hi I would like to know, how do I add a Hyperlink on Flash, that opens a PDF in adobe reader and not the web browser.

    Yoh, what is FSCCommanr ? sorry man I am an absolute beginner in Flash. I tried the code:
    /* Click to Go to Web Page
    Clicking on the specified symbol instance loads the URL in a new browser window.
    Instructions:
    1. Replace http://www.adobe.com with the desired URL address.
       Keep the quotation marks ("").
    instance_name_here.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);
    function fl_ClickToGoToWebPage(event:MouseEvent):void {
      navigateToURL(new URLRequest("http://www.adobe.com"), "_blank");
    this is the same code I used before and it opens a pdf file in a web browser, and it doesn't open an AutoCAD file.

  • I just updated my MAC operating system and when I went to open a recent document in numbers, the document that opened had none of my data and was formatted differently.  Can I get my document with all my information back?

    I just updated my MAC operating system and when I went to open a recent document in numbers, the document that opened had none of my data and was formatted differently.  Can I get my document with all my information back?

    I suggest the easy stuff first:
    1) quite Numbers and restart Numbers
    2) reboot the computer
    After that try opening the same document in another user space

  • Terminal Runs Command Automatically

    Hello,
    I was working on an AppleScripts that would open the terminal and connect to a server via ssh to use as a shortcut. I just realized that I could just create and save a new command in the terminal to get the same result.
    Anyway, I somehow made it so now anytime I open a window in the terminal it runs the ssh command to connect to my server. How do I change it back to the default settings?
    Thank you.
    -Matt
    p.s. Let me know if there is a better site or forum to post these types of questions to.

    Just go to Macintosh HD > Users > +your home folder+ > Library > Preferences and delete the file com.apple.terminal.plist and everything should be fine. Make a .command or .term file to run your SSH session, or use an SSH client like JellyfiSSH.

  • Open second form at run-time (and transfer variables)

    Hi,
    i'm searching for a method to open a second (maybe attached) form from an existing form at run-time.
    The goal would be to have a button in a form which runs a function as click event that opens the second form and transfer field values from the existing form to the new opened form.
    To new form should opened in a separate Adobe Reader window because the user should have the possibility to save or print the both forms separately.
    Regards

    Hi,
    check this solution.
    http://blogs.adobe.com/formfeed/2010/07/shared_data_in_packages_part_2.html

  • How do I block an ad that opens up a new Firefox window and keeps telling me my system performance is poor? I can't even capture the link.

    This particular ad, supposedly from a Windows Certified Partner, opens in a second Firefox window and keeps flashing the message that my System Performance is Poor, wanting me to click on their ad and let them do whatever nasty things they want to my system. I have not been able to capture the path but next time it comes up, I will write down all that I can see.
    If I have closed my main Firefox screen first, and then close out this ad, the next time I open Firefox, the ad opens and all my standard tabs are gone, requiring me to reopen each one seperately (Facebook, Google, etc).

    Just to address the last point: check your History menu to see whether you have the Restore Previous Session option and use that if you can. If that is grayed out or doesn't restore everything, check the Recently Closed Windows and Recently Closed Tabs lists for other pages.
    The unwanted window may be generated by an add-on. Try disabling ALL nonessential or unrecognized extensions on the Add-ons page. Either:
    * Ctrl+Shift+a
    * "3-bar" menu button (or Tools menu) > Add-ons
    In the left column, click Extensions. Then, if in doubt, disable.
    Usually a link will appear above at least one disabled extension to restart Firefox. You can complete your work on the tab and click one of the links as the last step.
    Any improvement?
    Here are some other things to check:
    (1) user.js file that changes Firefox startup behavior and overrides your preferences. This article describes how to track that down and delete it if you have one: [[How to fix preferences that won't save]].
    (2) Possible hijacked shortcut. Check the "target" of the desktop icon you use to start Firefox to see whether it lists the unwanted page. To do that:
    right-click the icon > Properties > Shortcut tab
    For 64-bit Windows 7, the Target should be no more and no less than this:
    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
    (3) Possible undisclosed bundle items. If you have installed any free software recently, check your Windows Control Panel, Uninstall a program for surprises. If you click the "Installed on" column head to group by date, it is easier to spot bundled junk. Remove everything suspicious or unrecognized.
    (4) Supplemental clean up scans. Our support article lists tools other Firefox users have found helpful: [[Troubleshoot Firefox issues caused by malware]].
    Hopefully that cures it.

  • Can my iMac that has 3gb of memory run lion and lightroom

    Can I run lion and lightroom on my iMac. the computer only sees 3bg of ram

    I sincerely doubt it!
    You have a 2006 model iMac that can only handle up to 3 GBs of RAM.
    OS X, by itself, needs between 2-4 GBs of RAM to do its stuff smooth, quickly and efficiently.
    Every update and iteration of OS X uses more CPU, GPU, RAM and hard drive resources.
    You start running a high resource app, like Lightroom, along with OS X and your iMac is going to take a pretty good hit on performance.
    It all boils down to not having nearly enough RAM memory for the application and tasks you require.
    Here are the Minimum specs for installing OS X 10,7 Lion
    http://support.apple.com/kb/HT4949
    Here are the minimum specs for Adobe Lightroom
    http://www.adobe.com/products/photoshop-lightroom/tech-specs.html
    You would need at least 6 GBs of RAM to be able to run OS X and Lightroom
    Based on your previous post, you must be taking a serious performance hit already running Lightroom or Photoshop.

  • Button that opens website or sends http commands

    I have a cocoa-applescript application that contains a window called "Window," a WebView called "Browser" and a Button called "go."
    All I would like to be able to do is push the button and it opens a website in the WebView. This seems simple but I cannot figure it out.
    Also if possible, since another button will be just giving commands to something over the internet, is there a way to send the http command without displaying the website?
    Just as some further Info, I am trying to make something to control my IP Webcam. Most of the commands it needs are in the form of "http://(ip address):(Port)/(the command).cgi"

    Didn't my WebView example help?
    Assuming you have an IB outlet connection from your webview to your script's instance for it (for example, myWebView), and an IB action connection from your button to your script's button handler, the code in your button handler would be something like:set theURL to current application's class "NSURL"'s URLWithString_("http://www.apple.com") -- or whatever
    myWebView's mainFrame's loadRequest_(current application's class "NSURLRequest"'s requestWithURL_(theURL))
    If all you want to do is send the command without any webview, you can use the curl shell utility.

  • How can I uninstall firefox when the add/remove programs in control panel doesn't work, nor does opening it in the run command?

    I tried to uninstall firefox using the control panel, add/remove programs. When I click on remove it does nothing. Then I tried using run, firefox, uninstall, helper and this does nothing either. Is there another way to remove it or repair it? I am using windows xp not 2000.

    For details of how to manually remove Firefox see http://kb.mozillazine.org/Uninstalling_Firefox - it gives details of the folders you need to delete.
    What is your problem with Firefox, re-installing Firefox does not normally fix problems.

  • How to develop software that would assist the user to store and retrieve personal information using c#

    The Personal Assistant software should be designed to meet the following specifications:
    When the application is executed, a menu with the following options should be displayed:
    contact details
    meetings
    On selecting either of the proceeding options, a submenu with the following options should be displayed:
    Add new record
    Delete record
    Edit record
    Search record
    The Contact details option would enable the user to add, edit, delete, and search the contact details of various people. The contact details include information such as name, address, phone number, and email address.
    Similarly, the Meetings/appointment option enable the user to add, edit, delete, and search meetings/appointments details. The meetings/appointment details include information such as date of meeting/appointment, time, and location.
    Note: The address book and the meetings/appointment details should be stored in files.
    When the application is run, reminders for the meetings/appointments scheduled for current date should be displayed on the screen. 

    Hello,
    Depending on your expertise you would design the source files that will contain your data to use followed by writing code to read in the data into containers that are encapsulated into classes where the classes have properties and methods to work the data
    in regards to display, edit, update, add and search/filter. The last bullet, display reminders would work off a trigger i.e. you call the code when the app opens or off a timer.
    Since it appears you are excluding databases which would be best for working this project I would suggest looking at using xml file to store data. From looking at the requirements you will need a relationship model.
    To give you code would almost be writing the app for you hence no code.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • How to run SQL and export results to Excel

    My task is to run a custom SQL script and create Excel file via running SQL Developer from command line (invoked by a scheduled script). Is this possible using SQL Developer?
    The thing I'm trying first is to run a user-defined report in SQL Developer and save the results to an Excel file. Only 16000 result rows, but took 10 minutes to do the export and still cannot finish. Is there another way to do it?
    Many thanks.

    Thanks K for the update.
    I have done csv files before using pl/sql, no problem at all. It's just that in current work environment, we're using a 3rd party tool to make the Excels and I was asked to study the feasibility of using SQL Developer instead of our current commercial tool to do the job.

  • Executing system commands and capturing results

    How do I get the result of executing a system command using Runtime? For example, if I execute "cmd /c dir", how do I get to the result of the dir command from the Process that is returned?

    Process p = Runtime.getRuntime.exec("...");
    InputStream in = p.getOutputStream();
    // now read the "in" stream just as you would any
    other stream.Slight typo getRuntime(), but it's close...

  • Asmcmd CP command and naming result

    Hi,
    Could comeone explain me why when I try to copy a control file stored in ASM the name of the copy is not the one i excepted ?
    ex :
    asmcmd > cp mydb01.ctl.3523.12 mydb02.ctl
    asmcmd > ls
    asmcmd > mydb01.ctl.3523.12 mydb02.ctl.4325.13
    Why 'mydb02.ctl' has been renamed 'mydb02.ctl.4325.13'
    Is is due to OMF ?
    Can I force asm to name as I want ? and how?
    Thanks for response
    S.Grenet

    S. Grenet wrote:
    Ok
    I think I've understood the naminp principes.So, this should be clear then :
    +"Every file created in ASM gets a system-generated filename, otherwise known as a fully qualified filename. ASM files are Oracle-managed files unless you created the file using an alias"+
    Is there really not possibility to name the file as I want ?Possibility was mentioned in those docs you just read, so read again about creating an alias for the system-generated filenames.
    [mkalias Command|http://download.oracle.com/docs/cd/B28359_01/server.111/b31107/asm_util.htm#BABHBEDG]

  • 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

  • Windows run command alternate

    What i am missing in this ultimate mac machine is the functionality of windows run command and windows explorer path bar in the folder toolbar, where we can paste the path of any file so get that in any window, for example i browsed one file which is saved in several sub folders now i get it path, now if i want to attach that file from my apple safari browser i have to do through all the search to get into that folder where as if i wish there is any way to just copy paste that path into attachment pop up box to get in that directory directly,

    Does "Finder -> Go -> Go to Folder" help in getting to a file where you know the path?
    And Spotlight can quickly get to an application
    If you are not offended by Application -> Utilities -> Terminal, you can use
    open /path/to/your/file
    If your file type is not associated with the desired app, you can use
    open -a ApplicationName /path/to/your/file
    As I do not fully appreciate the Windows 'run' command and Windows Explorer, I can not be sure I am even close in my suggestions.
    Then again, it is possible that there are a few more solutions than what I have already suggested, if I did fully understand the different uses of 'run' and Windows Explorer.

Maybe you are looking for

  • Cannot login my Windows 8.1 Pro with my live ID, don't have the Microsoft Logon Option

    My laptop was installed with a Windows 8.1 Pro, and it worked very well before, i can login with my domain account and Windows Live ID, but today when i startup my laptop and i cannot find the option "Login with Microsoft/Live ID", i only can login w

  • How to connect weighbridge to sap

    Hi Friends, I have a requirement from my client. My client having Way bridge, After lorry coming That vehicle weight taken by a device and its directly prints as gross weight than after unloading it takes the tare weight of the lorry with key gate en

  • VT70 output type. urgent

    Hi Hi have out type for picking list Zpak where i want for some material Text should be added. it is only for some material with some plants and otherthings should not change. can anybody explain the logic how to do it. thanks in advance Ramachandra

  • Passing Field Symbols in FM

    Hi Friends,                         In my FM, i want to pass field symbol back to my main program for further use. How can i achieve the same.                         In my source code section of FM, FIELD-SYMBOLS: <t_dyntable> TYPE STANDARD TABLE,  

  • Exchange server-Removing a Domain Controller from the forest

    Hi Guys, I need some help on removing a faulty domain controller from the AD forest. Here is the scenario: 1. The FSMO roles have been seized to a new domain controller already. 2. The old one is non-functional and is down for ever. I know the steps