1
Index: lshw-02.13/src/gui/integration/console.apps
2
===================================================================
3
--- lshw-02.13.orig/src/gui/integration/console.apps 2008-05-09 22:32:50.000000000 +0200
4
+++ lshw-02.13/src/gui/integration/console.apps 2008-05-10 15:55:32.000000000 +0200
7
-PROGRAM=/usr/sbin/gtk-lshw
8
+PROGRAM=/usr/sbin/lshw-gtk
10
Index: lshw-02.13/src/gui/integration/gtk-lshw.desktop
11
===================================================================
12
--- lshw-02.13.orig/src/gui/integration/gtk-lshw.desktop 2008-05-09 22:32:50.000000000 +0200
13
+++ lshw-02.13/src/gui/integration/gtk-lshw.desktop 2008-05-10 15:55:32.000000000 +0200
15
Comment=HardWare LiSter
16
Categories=Application;System;X-Red-Hat-Base;X-Fedora;
17
Icon=/usr/share/lshw/artwork/logo.svg
18
-Exec=/usr/bin/gtk-lshw
19
+Exec=/usr/bin/lshw-gtk
23
Index: lshw-02.13/src/lshw.cc
24
===================================================================
25
--- lshw-02.13.orig/src/lshw.cc 2008-05-10 15:51:50.000000000 +0200
26
+++ lshw-02.13/src/lshw.cc 2008-05-10 15:55:32.000000000 +0200
33
__ID("@(#) $Id: lshw.cc 1959 2008-05-09 20:32:50Z lyonel $");
36
fprintf(stderr, "\t-xml output hardware tree as XML\n");
37
fprintf(stderr, "\t-short output hardware paths\n");
38
fprintf(stderr, "\t-businfo output bus information\n");
39
- if(getenv("DISPLAY") && exists(SBINDIR"/gtk-lshw"))
40
+ if(getenv("DISPLAY") && exists(SBINDIR"/lshw-gtk"))
41
fprintf(stderr, "\t-X use graphical interface\n");
42
fprintf(stderr, "\noptions can be\n");
48
- if(enabled("output:X")) execl(SBINDIR"/gtk-lshw", SBINDIR"/gtk-lshw", NULL);
49
+/* if(enabled("output:X")) execl(SBINDIR"/gtk-lshw", SBINDIR"/gtk-lshw", NULL); */
51
+ if(enabled("output:X")) {
52
+ execl(SBINDIR"/lshw-gtk", SBINDIR"/lshw-gtk", NULL);
53
+ // Execl only returns if an error has occurred.
54
+ if ( errno == ENOENT ) {
55
+ fprintf(stderr, "ERROR: Sorry, cannot run the X11/GTK interface because %s/lshw-gtk\n is not available.\n", SBINDIR);
56
+ fprintf(stderr, "HINT: Install the lshw-gtk package in Debian.\n");
58
+ fprintf(stderr, "ERROR: There was an error when trying to execute %s/lshw-gtk: %s\n", SBINDIR, strerror(errno));
59
+ fprintf(stderr, "Will just print the information on screen\n");