Cypress run -browser cypress run -browser chrome The “browser” argument can be set to chrome, chromium, edge, electron, firefox to launch a browser detected on your system.

Skip to end of metadataGo to start of metadata

It is common for users of the Luddy School Linux systems to want to run graphical applications (such as matlab, mathematica, vivado, etc) on these Linux servers and display them on their local computers. This document details the steps required to do this using the IU Research Desktop (RED) as well as alternative options for Mac, Windows, and Linux systems.

The Research Desktop (RED) at IU on the IU Carbonate system is the recommended method of running such graphical programs. This page gives information about how to get started using RED but see the UITS RED KB page for more detailed information.

  1. Create your Carbonate account - In order to use RED you must have a Carbonate account. If you do not yet have an account, go to https://access.iu.edu/Accounts/Create. If you have the option to select that account you will see something like this:
    Please contact us if you do not have the option to create the Carbonate account and you don't already have one (you can list your current accounts at https://access.iu.edu/Accounts).
    When you select the Carbonate account to create, you will be required to fill out the request form that will look like this:
    Just fill that in appropriately based on the work you will be doing. In general, for CS classes or research you can select:
    1. Primary Discipline: Informatics, Library Science, and Computing
    2. Primary Sub-Discipline: Computer Science
    3. Check both 'I will' boxes
    4. You will NOT be accessing FERPA restricted data (if you will, please contact us)

    Once you submit your request, you should get an email within about an hour with the subject Carbonate Account Created indicating the account is ready to go.
  2. Log Into RED - Once the Carbonate account is created, you can log in at:

    When you log in, you should see the RED desktop that will look like this:

    Note that the RED web interface is not the only option, albeit a convenient and easy to use one. You can also use it via the ThinLinc client per Download, install, and configure ThinLinc Client to use Research Desktop (RED) at IU.
  3. Bring up the Terminal Application - From the RED desktop, double-click on the terminal application:
  4. Log into the Desired Server - From the terminal application, you can log into the server of choice by running something like:
    ssh -X silo.sice.indiana.edu

    Replace silo.sice.indiana.edu with the server of choice. The terminal application and ssh will look something like this:

  5. Run the Application - Once you are logged into the linux system of choice (eg. silo) just run the command for the desired application (eg. matlab, vivado, etc) at the terminal prompt and it will be displayed on the RED desktop. For example, if you wanted to run matlab:
    Replace 'matlab' with whatever application you want to run (eg. vivado, emacs, etc).
  6. Log Out or Disconnect - There are two icons on the RED desktop you can use as follows:
    1. Disconnect ThinLinc Session - This keeps your session and applications up and running so you can log in later to reconnect. Please use this only if you need to keep the session active.
    2. Log Out - This will close all running application and end your session entirely. Please note that ThinLinc is a licensed product with a limited number of licenses available. Please be a good citizen and log out when you are done to free resources.

For more details about the Research Desktop, a good starting point is the UITS KB page About Research Desktop (RED) at IU.

While we strongly recommend using the Research Desktop (RED) as described above, there are other operating system specific options that you can use.

Mac OS X

  1. Install XQuartz on your Mac, which is the official X server software for Mac
  2. Run Applications > Utilities > XQuartz.app
  3. Right click on the XQuartz icon in the dock and select Applications > Terminal. This should bring up a new xterm terminal windows.

  4. In this xterm windows, ssh into the linux system of your choice using the -X argument (secure X11 forwarding). For example, to log into silo.sice.indiana.edu you would run something like:
    ssh -X [email protected]
    A very small number of applications may require the use of -Y instead of -X but we recommend only using -Y if -X fails for the application you are using.
  5. Once you are logged into the linux system, you can just run the GUI program of your choice (ie. matlab, mathematics, etc) and it will display on your Mac.
  1. Install the Xming software.
  2. If you have not already done so, download putty.exe from the PuTTY site and install it.
  3. Run Xming on your PC to start the X server. You should see the Xming icon in the taskbar if it is running (although you may have to click the little arrow in the taskbar to see it)
  4. Run PuTTY and set things up as follows:
    - Enter the server name in Host Name (eg. silo.sice.indiana.edu)
    - Make sure the Connection type is set to SSH
    - Enable X11 forwarding (Connection > SSH > X11)
  5. Log in using your normal IU username and passphrase
  6. Once you are logged into the linux system, you can just run the GUI program of your choice (ie. matlab, mathematics, etc) and it will display on your PC.
  1. ssh into the linux system of your choice using the -Y argument (secure X11 Forwarding). For example, to log into silo.sice.indiana.edu you would run something like:
    ssh -X [email protected]
    A very small number of applications may require the use of -Y instead of -X but we recommend only using -Y if -X fails for the application you are using.
  2. Once you are logged into the remote linux system, you can just run the GUI program of your choice (ie. matlab, mathematics, etc) and it will display on your Mac.

It is also possible to run graphical programs remotely using VNC. This is a popular tool that lets you run a VNC server on the remote linux server and connect to it using a VNC client on your local system. There is more information about this option in Using VNC via ssh tunneling.

We do not recommend using this approach and RDP support on the linux systems may disappear at any time. Please consider the Research Desktop (RED) as the long term option.

The methods listed above are recommended because they put the least amount of load on the servers and should provide adequate performance. However, there is an alternate method using RDP (Remote Desktop) that will work on some of our Linux servers. For those systems you can connect using the native Remote Desktop client (Windows), the Microsoft Remote Desktop App (Mac OS X), or either xfreerdp or rdesktop (Linux). You will get a full GUI desktop using this method so you can start any GUI application you need. The downside of this approach is that since you are running a full GUI desktop it puts much more load on the server and your performance may suffer. For that reason, we urge you to use other options only use RDP as a last resort if those do not work for you.


Calling Command-Line Tools

Open App From Terminal Mac

In AppleScript, the do shell script command is used to execute command-line tools. This command is implemented by the Standard Additions scripting addition included with OS X.

Note

Mac Run App From Terminal With Arguments Examples

The Terminal app in /Applications/Utilities/ is scriptable and provides another way to execute command-line tools from scripts.

Executing Commands

The direct parameter of the do shell script command is a string containing the shell code you want to execute, as demonstrated in Listing 39-1, which simply lists a directory.

APPLESCRIPT

Listing 39-1AppleScript: Executing a simple shell command that lists the contents of a directory
  1. do shell script 'ls /Applications/'
  2. (*
  3. --> Result:
  4. 'App Store.app
  5. Automator.app
  6. Calculator.app
  7. Calendar.app
  8. ...'
  9. *)

Since the direct parameter of do shell script is a string, you can concatenate it with other strings at run time. Listing 39-2, for example, concatenates a shell command to a previously defined parameter value.

APPLESCRIPT

Listing 39-2AppleScript: Concatenating a command with a value
  1. set theHostName to 'www.apple.com'
  2. do shell script 'ping -c1 ' & theHostName

Quoting Strings

The shell uses space characters to separate parameters and gives special meaning to certain punctuation marks, such as $, (, ), and *. To ensure that strings are treated as expected—for example, spaces aren’t seen as delimiters—it’s best to wrap strings in quotes. This process is known as quoting. If your string contains quotes, they must also be escaped (preceded by a / character) so they are interpreted as part of the string. Listing 39-3 shows an example of an error occurring as a result of a parameter that contains a space.

APPLESCRIPT

Application

Mac Run App From Terminal With Arguments Regarding

Mac Run App From Terminal With ArgumentsListing 39-3AppleScript: An error resulting from a string containing a space
  1. set thePath to '/Library/Application Support/'
  2. do shell script 'ls ' & thePath
  3. --> Result: error 'ls: /Library/Application: No such file or directoryrls: Support: No such file or directory' number 1

The easiest way to quote a string is to use the quoted form property of the text class, as demonstrated in Listing 39-4. This property returns the string in a form that’s safe from further interpretation by the shell, regardless of its contents.

APPLESCRIPT

Listing 39-4AppleScript: Quoting a string to prevent errors
  1. set thePath to quoted form of '/Library/Application Support/'
  2. --> Result: '/Library/Application Support/'
  3. do shell script 'ls ' & thePath
  4. (*
  5. --> Result:
  6. 'App Store
  7. Apple
  8. ...
  9. '
  10. *)

More Information

Run Application From Terminal Mac

For more information about the do shell script command, see Commands Reference in AppleScript Language Guide and Technical Note TN2065.

Run Application From Terminal

Copyright © 2018 Apple Inc. All rights reserved. Terms of Use Privacy Policy Updated: 2016-06-13