Results 1 to 5 of 5

Thread: $DISPLAY question

  1. #1
    Junior Member
    Join Date
    Nov 2003
    Posts
    16

    $DISPLAY question

    Greeting again !

    I want to use xconsoleto (keep an eye on logs.
    but when starting the apps. from a shell,
    keeps telling me :
    dah@home:/# xconsole
    Error: Can't open display:

    I got the same result for a bunch of other X
    apps. ?!?

    How can I resolv this problem ?

    Thanks

  2. #2
    Senior Member
    Join Date
    Oct 2003
    Location
    Sydney, Australia
    Posts
    157
    This could be the result of one of two (or possibly both) things.

    Firstly, you need to have an environment variable called DISPLAY set to tell the X programs where to draw themselves. This should be set when you are first logged in, but often when you su to root this is not set in the root shell. This is normally set to ":0.0" which means the first display on the local machine. You can double check what the value should be by echoing the value of $DISPLAY before you su to root.

    However, when you have done this, it is possible that you will get an error about the connection being refused by the server. In order to fix this, you must run the xhost command to grant access permissions to your display. This must be done before you su to root. It should be possible to run something like "xhost localhost" which will allow access to any program running on your local machine, but I couldn't seem to get this work. You can also do "xhost +" which basically completely disables any sort of access control.
    WARNING, doing xhost + is a security risk if your computer is connected to any sort of a network because it basically allows open access to your machine.

  3. #3
    Junior Member
    Join Date
    Nov 2003
    Posts
    16
    Follow up on the problem with $DISPLAY

    When doing a "su -"
    and trying to start any apps. in a shell, error cannot connect to display.
    but when executing the apps. from under the original user account
    everything seems to work fine ...

    but I have problem with video4linux, camserv seems to not
    work properly :-S

    please help

  4. #4
    Senior Member
    Join Date
    Nov 2003
    Posts
    1,323
    For some security reasons X only allows one connection at a time. You can either do: kdesu appname to run it as root or create a workaround with:
    ln -s /home/your_username/.Xauthority /root/.Xauthority
    Sorry, not a clue about camserv. Any error messages on that one?

  5. #5
    Junior Member
    Join Date
    Nov 2003
    Posts
    16

    $DISPLAY problem

    no error from camserv, even if I start the process using
    a 'usual' account. (not admin / root) and nothing
    comes up onthe webpage...

Similar Threads

  1. Replies: 5
    Last Post: 07-09-2005, 04:40 PM
  2. Display
    By maestrobwh1 in forum General Support
    Replies: 3
    Last Post: 09-19-2004, 12:58 AM
  3. Display
    By illcuban in forum General Support
    Replies: 2
    Last Post: 12-21-2003, 07:14 PM
  4. Grub settings, quick question... really my last question :p
    By mark1221 in forum Hdd Install / Debian / Apt
    Replies: 2
    Last Post: 11-01-2003, 10:32 PM
  5. cannot get x to display
    By jclochesy in forum Hardware & Booting
    Replies: 6
    Last Post: 08-25-2003, 11:04 AM

Posting Permissions

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


Dell PowerEdge M610 Blade Server E5620@2.2GHZ (6x)8GB RAM (2x)146GB 15K SAS HDD picture

Dell PowerEdge M610 Blade Server E5620@2.2GHZ (6x)8GB RAM (2x)146GB 15K SAS HDD

$75.00



DELL PowerEdge R730XD 24x 2.5

DELL PowerEdge R730XD 24x 2.5" Server Dual 750W Dual Heatsink - BareBones TESTED

$299.99



Supermicro 4U 36 Bay Storage Server 2.4Ghz 8-C 128GB 1x1280W Rails TrueNAS ZFS picture

Supermicro 4U 36 Bay Storage Server 2.4Ghz 8-C 128GB 1x1280W Rails TrueNAS ZFS

$721.06



H261-Z61 2U 24SFF AMD Server 8x EPYC 7551 256-Cores 256GB RAM 8x25G NIC 2x2200W picture

H261-Z61 2U 24SFF AMD Server 8x EPYC 7551 256-Cores 256GB RAM 8x25G NIC 2x2200W

$2512.18



DELL PowerEdge R730 Server 2x E5-2690v3 2.6GHz =24 Cores 32GB H730 4xRJ45 picture

DELL PowerEdge R730 Server 2x E5-2690v3 2.6GHz =24 Cores 32GB H730 4xRJ45

$275.00



Dell PowerEdge R720XD Xeon E5-2680 V2 2.8GHz 20 Cores 256GB RAM 12x4TB picture

Dell PowerEdge R720XD Xeon E5-2680 V2 2.8GHz 20 Cores 256GB RAM 12x4TB

$510.00



Dell PowerEdge R720 Server - 2x8c CPU,256Gb RAM, 128Gb SSD/3x600Gb SAS, Proxmox picture

Dell PowerEdge R720 Server - 2x8c CPU,256Gb RAM, 128Gb SSD/3x600Gb SAS, Proxmox

$340.00



Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD picture

Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD

$389.99



Dell PowerEdge R820 Server 4x E5-4620 2.2GHz 32-Core Total 256GB 0HD 2x 1100w  picture

Dell PowerEdge R820 Server 4x E5-4620 2.2GHz 32-Core Total 256GB 0HD 2x 1100w

$315.00



1U Supermicro Pro Server X10DRU-i+ 2x Xeon E5-2620 V3 32GB DDR4 RAM 4x 10GE RAIL picture

1U Supermicro Pro Server X10DRU-i+ 2x Xeon E5-2620 V3 32GB DDR4 RAM 4x 10GE RAIL

$190.00