Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install an Adobe AIR file running ssh in a terminal (no GUI):

sudo Adobe\ AIR\ Application\ Installer -silent -eulaAccepted MyAirApp.air

But I receive the following error:

(Adobe AIR Application Installer:7509): Gtk-WARNING **: cannot open display:

How can this be done?

EDIT: This command is being run remotely using SSH

share|improve this question
up vote 4 down vote accepted

How to run a Adobe AIR application on a headless server

The problem is not that you are trying to run it from a terminal. The problem is that there is no graphical display running on the machine. You seem to be running on a headless server.

I'm aware of two possibilities:

  • If you connect with ssh, you can add the -X option and allow the Adobe AIR application to use your local display
  • You can fool Adobe AIR into believing that there is a display running by installing xvfb. Use the script bellow which I've copied from this post:

Copy this code into a file named

# Author: Matthew Wilson, rPath, Inc. 
# This could probably be done more elegantly in Python... 

for ((d=0; d < 20; d++)); do 
    Xvfb -ac $DISPLAY > /dev/null 2>&1 & 
    sleep 2 
    jobs -l %1 > /dev/null 
    pid=$(jobs -l %1 2>&1 | grep Running | awk '{print $2}') 
    if [ -z "$pid" ]; then 
    if ps $pid > /dev/null 2>&1; then 

if [ -z "$pid" ]; then 
    echo "unable to start Xvfb" 
    exit 1 

trap "kill -9 $pid" SIGINT SIGTERM EXIT 



Call chmod +x to give it execution rights. Call your application with the in front of it. In this example this would be:

sudo "Adobe AIR Application Installer" -silent -eulaAccepted MyAirApp.air

Edit: Added information from comments and the script from link.

share|improve this answer
Thanks for the answer - it makes sense then. I am running this command by SSH remotely. Running the command directly on the box works. How would we get it to run successfully through SSH? Also by using xvfb? – davenewza Oct 16 '13 at 9:58
It will work with ssh too. But with ssh you aren't forced to use xvfb, you can use the -X option with ssh and allow Adobe AIR to use your local display. – MadMike Oct 16 '13 at 10:40
You can use xvfb-run command instead of the script. – Pawel Markowski Dec 22 '15 at 10:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.