But, it occurred to me (while writing that bug report) that the correct solution would be to change sysinfo to behave like this (source code is listed below):
1) Currently, the Gnome() method assigns "/usr/share/gnome-about/gnome-version.xml" to the String variable gnome_about. It then changes the value of the string in case there exists a "gnome-version.xml" file in the "/opt/gnome/share/gnome-about/" directory.
PROPOSAL:
2) A similar change should be made if there exists a "gnome-version.xml" file in the "/usr/share/gnome/" directory. (This file comes from the gnome-desktop3-data package).
Here is the Gnome() method from SystemInfo.cs in the sysinfo package:
I thought that I'd file a bug (https:/ /bugs.launchpad .net/ubuntu/ +source/ gnome-desktop/ +bug/899882) against the source of this error...
But, it occurred to me (while writing that bug report) that the correct solution would be to change sysinfo to behave like this (source code is listed below): gnome-about/ gnome-version. xml" to the String variable gnome_about. It then changes the value of the string in case there exists a "gnome-version.xml" file in the "/opt/gnome/ share/gnome- about/" directory.
1) Currently, the Gnome() method assigns "/usr/share/
PROPOSAL:
2) A similar change should be made if there exists a "gnome-version.xml" file in the "/usr/share/gnome/" directory. (This file comes from the gnome-desktop3-data package).
Here is the Gnome() method from SystemInfo.cs in the sysinfo package:
//read GNOME version
public void Gnome() {
String temp;
Boolean gnomeB = false;
//Fedora, RedHat, Debian, Ubuntu, ... gnome-about/ gnome-version. xml"; "/opt/gnome/ share/gnome- about/gnome- version. xml")) share/gnome- about/gnome- version. xml";
String gnome_about = "/usr/share/
//SuSE
if (File.Exists(
gnome_about = "/opt/gnome/
try {
using (TextReader textread = File.OpenText( gnome_about) ) {
while ( gnomeB == false ) {
temp = textread. ReadLine( );
//get version from xml "platform> ")) {
if ( temp.EndsWith(
temp = temp.Remove(0, 12); temp.IndexOf( "</platform> "), 11);
system_ gnomev = temp;
temp = temp.Remove(
}
if ( temp.EndsWith( "minor> ")) {
temp = temp.Remove(0, 9); temp.IndexOf( "</minor> "), 8);
system_ gnomev = system_gnomev + "." + temp;
temp = temp.Remove(
}
if ( temp.EndsWith( "micro> ")) {
temp = temp.Remove(0, 9); temp.IndexOf( "</micro> "), 8);
system_ gnomev = system_gnomev + "." + temp;
temp = temp.Remove(
}
//get distributor "distributor> ")) {
if ( temp.EndsWith(
temp = temp.Remove(0, 15); temp.IndexOf( "</distributor> "), 14);
system_ gnomeo = temp;
temp = temp.Remove(
}
//get build date "date>" )) {
if ( temp.EndsWith(
temp = temp.Remove(0, 8); temp.IndexOf( "</date> "), 7);
system_ gnomeo = system_gnomeo + " " + temp;
temp = temp.Remove(
gnomeB = true;
}
}
}
} ception ex) { Console.WriteLine( ex ); } undException ex) { Console.WriteLine( ex ); }
catch (FileNotFoundEx
catch (DirectoryNotFo
}