diff --git a/src/client/application/application-client.vala b/src/client/application/application-client.vala index e6eb4707..4bf3ae52 100644 --- a/src/client/application/application-client.vala +++ b/src/client/application/application-client.vala @@ -289,44 +289,15 @@ public class Application.Client : Gtk.Application { _("Unknown") }); - // Distro name and version using LSB util + /// Application runtime information label + info.add({ _("Distribution name"), + GLib.Environment.get_os_info(GLib.OsInfoKey.NAME) + }); - GLib.SubprocessLauncher launcher = new GLib.SubprocessLauncher( - GLib.SubprocessFlags.STDOUT_PIPE | - GLib.SubprocessFlags.STDERR_SILENCE - ); - // Reset lang vars so we can guess the strings below - launcher.setenv("LANGUAGE", "C", true); - launcher.setenv("LANG", "C", true); - launcher.setenv("LC_ALL", "C", true); - - string lsb_output = ""; - try { - GLib.Subprocess lsb_release = launcher.spawnv( - { "lsb_release", "-ir" } - ); - lsb_release.communicate_utf8(null, null, out lsb_output, null); - } catch (GLib.Error err) { - warning("Failed to exec lsb_release: %s", err.message); - } - if (lsb_output != "") { - foreach (string line in lsb_output.split("\n")) { - string[] parts = line.split(":", 2); - if (parts.length > 1) { - if (parts[0].has_prefix("Distributor ID")) { - /// Application runtime information label - info.add( - { _("Distribution name"), parts[1].strip() } - ); - } else if (parts[0].has_prefix("Release")) { - /// Application runtime information label - info.add( - { _("Distribution release"), parts[1].strip() } - ); - } - } - } - } + /// Application runtime information label + info.add({_("Distribution release"), + GLib.Environment.get_os_info(GLib.OsInfoKey.VERSION) + }); /// Application runtime information label info.add({ _("Installation prefix"), INSTALL_PREFIX });