Find the answer to your Linux question:
Results 1 to 7 of 7
Hi everybody, I have a problem when I run a very small program which is supposed to display a jpg file on screen. I get this error message: sh: display: ...
  1. #1
    Just Joined!
    Join Date
    Jul 2008
    Posts
    4

    for some help please

    Hi everybody,

    I have a problem when I run a very small program which is supposed to display a jpg file on screen. I get this error message:

    sh: display: not found.

    I'm using Ubuntu 8.04
    Anybody has any idea about a possible resolution?

    Much appreciate your help!

  2. #2
    Just Joined!
    Join Date
    Jun 2004
    Posts
    4

    my be permission setting

    If you are the owner, then I don't know. But I get messages like that due to permissions settings.

  3. #3
    Just Joined!
    Join Date
    Jul 2008
    Posts
    4
    Yes, it's on my machine and the machine is not on a network(yet). Does it have anything to do with the video card?

  4. #4
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110
    Can you give details of the program you have running? Do you have X running? What do you get when you run the following command in a terminal
    Code:
    echo $DISPLAY

  5. #5
    Just Joined!
    Join Date
    Jul 2008
    Posts
    4
    This is what I get when I run the $DISPLAY command:

    :0.0

    The program that I compile and run is made of a very small C++ code which is ment to display a picture in jpg format on the screen, the picture being in the same folder.
    I'm not sure if X is running as I don't know what X is yet...I'm too new to Linux...

  6. #6
    Linux Newbie
    Join Date
    Feb 2008
    Location
    Bangalore, India
    Posts
    112
    If you already login as GUI mode then it might now allow you to start another display. Let us know if you have login in GUI mode.

    login into TUI mode and then run your script check what it does.

    OR

    If you have sh running on the remote computer:
    Code:
    export DISPLAY=remote_comp_ip:0
    xcalc &
    OR
    You also try opening another session of display manager and check if you can run your application on
    Code:
    export DISPLAY=localhost:0.1
    Refer this for more information, http://www.tldp.org/HOWTO/XWindow-User-HOWTO/
    bigunix.blogspot.com
    Registered Linux User: #476440

  7. #7
    Just Joined!
    Join Date
    Jul 2008
    Posts
    4
    Thanks everybody for your suggestions!

    The actual problem was the ImageMagick application which was not installed on my system. Once I've installed it, all went perfect, so I assume now(I may be wrong though) that the "display" command was part of this application.

Posting Permissions

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