Score:0

x11 dialog not show in screen 2 - set DISPLAY

us flag

I am trying to call a dialog using nxdialog --dialog

nxdialog --dialog panic --class warning --message "my message" --caption "MSG"

A dialog pops'up in my screen 1 ($DISPLAY is set to :1) There are also some warnings:

/usr/bin/nxdialog:267: PyGTKDeprecationWarning: The keyword(s) "type" have been deprecated in favor of "message_type" respectively. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  dlg = Gtk.MessageDialog(type=icon, flags=Gtk.DialogFlags.MODAL,
/usr/bin/nxdialog:267: PyGTKDeprecationWarning: The "flags" argument for dialog construction is deprecated. Please use initializer keywords: modal=True and/or destroy_with_parent=True. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  dlg = Gtk.MessageDialog(type=icon, flags=Gtk.DialogFlags.MODAL

Changing the DISPLAY does not work:

  export DISPLAY=:0; nxdialog --dialog panic --class warning --message "my message" --caption "MSG"

No windows is shown, error is:

Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused
/usr/bin/nxdialog:267: PyGTKDeprecationWarning: The keyword(s) "type" have been deprecated in favor of "message_type" respectively. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  dlg = Gtk.MessageDialog(type=icon, flags=Gtk.DialogFlags.MODAL,
/usr/bin/nxdialog:267: PyGTKDeprecationWarning: The "flags" argument for dialog construction is deprecated. Please use initializer keywords: modal=True and/or destroy_with_parent=True. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  dlg = Gtk.MessageDialog(type=icon, flags=Gtk.DialogFlags.MODAL,
Caught exception: Gtk couldn't be initialized. Use Gtk.init_check() if you want to handle this case.

What value should be used in $DISPLAY? I've tried several possibilities, only export DISPLAY=:1 works.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.