This sounds interesting to me. But there’s some “Danger Will Robinson!” triggers going off. I don’t know how much data you’re looking for, but to get as many people as possible to run it, there’s some things you may want to consider.
Some of the data will be easy to gather as the user, such as the various gsettings
values, default browser, distro version. Other data likely will need more access, via sudo
or root
access, which may make some users a bit twitchy.
If you make this a graphical desktop application, you make it harder for people to get and run, and the maintenance of it becomes much larger, especially if you want it to be run across many distros. If (for example) you leverage GNOME 40 to build it, and expect to only get responses from those users, you limit yourself to a tiny proportion of the Linux desktop userbase.
I’d suggest making this a simple command line tool, perhaps a Go or Rust binary, which has minimal additional external requirements. That way it can be easily installed (via whatever packaging system, but also via curl or whatever) and executed.
There’s some prior art here, in Ubuntu we run ubuntu-report
post-install. It doesn’t gather all the data you’re after, but it does grab a fair amount of it. It’s GPL’ed and available on GitHub. Here’s what it looks like if you run it in a terminal, which I just ran on my personal desktop:
alan@robot:~$ ubuntu-report -f
This is the result of hardware and optional installer/upgrader that we collected:
{
"Version": "21.04",
"OEM": {
"Vendor": "Intel Corporation",
"Product": "NUC8i7HVK",
"Family": "Intel NUC"
},
"BIOS": {
"Vendor": "Intel Corp.",
"Version": "HNKBLi70.86A.0053.2018.1217.1739"
},
"CPU": {
"OpMode": "32-bit, 64-bit",
"CPUs": "8",
"Threads": "2",
"Cores": "4",
"Sockets": "1",
"Vendor": "GenuineIntel",
"Family": "6",
"Model": "158",
"Stepping": "9",
"Name": "Intel(R) Core(TM) i7-8809G CPU @ 3.10GHz",
"Virtualization": "VT-x"
},
"Arch": "amd64",
"GPU": [
{
"Vendor": "1002",
"Model": "694c"
}
],
"RAM": 32.8,
"Disks": [
4000.8,
1000.2
],
"Partitions": [
490.2,
1,
983.5,
3844.6,
976.3
],
"Screens": [
{
"Size": "531mmx299mm",
"Resolution": "1920x1080",
"Frequency": "60.00"
},
{
"Size": "531mmx299mm",
"Resolution": "1920x1080",
"Frequency": "60.00"
}
],
"Autologin": false,
"LivePatch": false,
"Session": {
"DE": "KDE",
"Name": "KDE",
"Type": "x11"
},
"Language": "en_GB",
"Timezone": "Europe/London",
"Install": {
"Media": "Ubuntu 20.04.1 LTS \"Focal Fossa\" - Release amd64 (20200731)",
"Type": "GTK",
"OEM": true,
"PartitionMethod": "manual",
"DownloadUpdates": false,
"Language": "en",
"Minimal": false,
"RestrictedAddons": false,
"Stages": {
"0": "language",
"12": "console_setup",
"14": "console_setup",
"16": "wireless",
"23": "prepare",
"45": "partman",
"53": "partman",
"54": "partman",
"55": "partman",
"67": "partman",
"74": "partman",
"131": "partman",
"153": "partman",
"154": "partman",
"158": "partman",
"168": "partman",
"191": "partman",
"202": "partman",
"215": "partman",
"216": "partman",
"225": "partman",
"229": "start_install",
"230": "timezone",
"237": "usersetup",
"254": "user_done",
"466": "done"
}
},
"Upgrade": {
"From": "20.10",
"InstallMedia": "Ubuntu 20.04.1 LTS \"Focal Fossa\" - Release amd64 (20200731)",
"Type": "Text",
"ThirdPartySources": false,
"Stages": {
"0": "start",
"2": "PREPARE",
"10": "MODIFY_SOURCES",
"127": "FETCH",
"314": "INSTALL",
"316": "INSTALL",
"357": "INSTALL",
"1161": "POSTUPGRADE",
"1165": "CLEANUP",
"5934": "REBOOT"
}
}
}
Do you agree to report this? [y (send metrics)/n (send opt out message)/Q (quit)] y
Easy to use and run, transparently showing what is gathered, and offers the option to send or not. You can see some of the anonymised and aggregated gathered statistics at https://ubuntu.com/desktop/statistics
We took the (contentious) decision to run this (optionally) on install for all new users. Your use case seems different, but you’re after similar information. Worth a look. It’s helped us to understand what systems people install on. Your scope appears a lot wider, which would need a lot of care not to reveal personal information, but I’m sure you’re aware of that.