Bug 2222286 - tuna without a subcommand on a machine without a display doesn't exit gracefully
Summary: tuna without a subcommand on a machine without a display doesn't exit gracefully
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: tuna
Version: 9.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: John Kacur
QA Contact: Qiao Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-12 14:37 UTC by John Kacur
Modified: 2023-07-12 15:07 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-162119 0 None None None 2023-07-12 14:41:35 UTC

Description John Kacur 2023-07-12 14:37:26 UTC
If you run tuna without a subcommand it tries to run a gui.
If you are installed on a server without a display you get some kind of an error message. It would be better to detect the situation and exit gracefully with some kind of an explanation or usage message.
You get the same result when you issue the gui subcommand

Comment 1 John Kacur 2023-07-12 14:41:12 UTC
 su -c "tuna gui"
Password:(tuna:7645): Gtk-CRITICAL **: 11:31:55.573: _gtk_css_lookup_resolve: assertion '(((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) ((provider)); GType __t = ((_gtk_style_provider_private_get_type ())); gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; }))))' failed
/usr/lib/python3.9/site-packages/tuna/tuna_gui.py:40: Warning: g_object_set_data_full: assertion 'G_IS_OBJECT (object)' failed
  self.wtree.add_objects_from_file(tuna_glade, ("mainbig_window", "tuna"))(tuna:7645): Gtk-ERROR **: 11:31:55.573: Can't create a GtkStyleContext without a display connection
Trace/breakpoint trap (core dumped)
[acme@nine linux]$


Note You need to log in before you can comment on or make changes to this bug.