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.