Find the answer to your Linux question:
Results 1 to 2 of 2
Hello world! I am trying to be able to open programs from the command-line (console), but it tells me that I need to specify the display. The way I always ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! Vampire5's Avatar
    Join Date
    Jan 2012
    Posts
    22

    Question Specifying displays


    Hello world!
    I am trying to be able to open programs from the command-line (console), but it tells me that I need to specify the display. The way I always thought you did that was as following:
    Code:
    $ ./firefox -display=:0
    Does anyone have any suggestions?

  2. #2
    Just Joined!
    Join Date
    Sep 2005
    Location
    Edmonton, Canada
    Posts
    49
    Different progams use different syntax for specifing a display, but a universial way to do it is to set the environment var $DISPLAY before running the program:

    export DISPLAY=:0
    ./firefox

    will work. Keep in mind the same user must own the :0 display and run the program. Running the command as root also works, but is not recommended, of course.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •