Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-41695

$DISPLAY necessary despite -display option

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.8.5
    • None

      I have compiled the helloworld program from http://doc.qt.digia.com/4.4/tutorials-tutorial-t1.html

      I have two X displays: The normal display of my laptop :0 and an Xnest at :66. For this test I have run Xnest like this "Xnest :66".

      My DISPLAY variable ":0". When I start the helloworld program with "./t1 -display :66" it opens on the Xnest display. So far everything seems fine.

      If I do "unset DISPLAY" and run the program I get this:
      ---------------------------
      $ ./t1 -display :66

      (t1:28278): Gtk-WARNING **: cannot open display:
      ---------------------------

      So providing -display tells the program to use the Xserver at :66 but it obviously still requires $DISPLAY to open on the provided display. It seems that $DISPLAY is opened before -display is parsed.

      (that Gtk message is also strange, what is going on there?)

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            dedietri Gabriel de Dietrich (drgvond)
            uli42 Ulrich Sibiller
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes