helloSystem / hello

Desktop system for creators with a focus on simplicity, elegance, and usability. Based on FreeBSD. Less, but better!
2.3k stars 57 forks source link

How to identify helloSystem from terminal? #67

Open linuxhw opened 3 years ago

linuxhw commented 3 years ago

I want to add support for helloSystem to https://github.com/linuxhw/hw-probe

But I can't find a way to identify helloSystem from terminal. Probably you need to add name of the system to uname like it was done by other BSD flavors.

probonopd commented 3 years ago

Hello @linuxhw, thanks for reaching out. Keep in mind that #helloSystem is FreeBSD. We are not using our own kernel, and we are using the official packages (unlike e.g., GhostBSD and NomadBSD from what I understand).

Is there a standard way to communicate that this is FreeBSD but the helloSystem flavor of it? I don't want e.g., scripts that check uname -s for FreeBSD to be screwed up.

For the same reason, I am also hesitant to edit /usr/local/etc/os-release.

linuxhw commented 3 years ago

Thank you.

I need to identify the helloSystem flavor to understand how often people choose to download and install helloSystem instead of original FreeBSD. I'll identify it by locating the start-hello program on the filesystem in the next version of hw-probe.

Do you have any plans to rename start-hello in future?

probonopd commented 3 years ago

Do you have any plans to rename start-hello in future?

Might happen as things are still very much in the flow. Maybe it would be better to add a dedicated file for this purpose somewhere. Do you have examples of how other BSD flavors do this? Right now I am using /.url to point to the commit that produced the initial installation of the system, but that is probably not the cleanest way to do things.

probonopd commented 3 years ago

By the way, is there a Qt based tool to run hw-probe and submit the results yet? I would like to build this functionality into helloSystem. Maybe need to write a simple tool in PyQt5.

linuxhw commented 3 years ago

Do you have any plans to rename start-hello in future?

Might happen as things are still very much in the flow. Maybe it would be better to add a dedicated file for this purpose somewhere. Do you have examples of how other BSD flavors do this? Right now I am using /.url to point to the commit that produced the initial installation of the system, but that is probably not the cleanest way to do things.

  1. xxxbsd-version - a utility to print system version (e.g. freebsd-version, opnsense-version)
  2. /VERSION file on NomadBSD containing version number
  3. Custom /etc/issue file on ClonOS
  4. Custom /etc/os-release on DragonFly
  5. Custom uname on TrueOS, MidnightBSD, XigmaNAS
  6. Custom repository name on HardenedBSD
linuxhw commented 3 years ago

By the way, is there a Qt based tool to run hw-probe and submit the results yet? I would like to build this functionality into helloSystem. Maybe need to write a simple tool in PyQt5.

We only have simple KDialog-based app for KDE. See https://forum.rosalinux.ru/viewtopic.php?p=46807&sid=8ba14f7512ecb79d327b83cdf5917cf4#p46807 (sources: https://abf.rosalinux.ru/import/hw-probe-gui). The probe description entered in it - is an obsolete thing. Now we are able to write a "review" of the probe by changing statuses and adding comments for all devices (look for REVIEW big green button in your probes).

probonopd commented 3 years ago

Please join #helloSystem on irc.freenode.net or on Matrix if you have some time, I'd like to discuss a few things with you for optimal integration into helloSystem.

linuxhw commented 3 years ago

Please join #helloSystem on irc.freenode.net or on Matrix if you have some time, I'd like to discuss a few things with you for optimal integration into helloSystem.

I'm not familiar with both messengers. Could you please explain how to enter? The first URL returns "unable to connect" for me. I have Skype installed btw.

probonopd commented 3 years ago

This also leads to the question whether helloDesktop should somehow be identified as its own desktop environment.

probonopd commented 3 years ago

https://webchat.freenode.net/#helloSystem

linuxhw commented 3 years ago

This also leads to the question whether helloDesktop should somehow be identified as its own desktop environment.

It's currently identified (erroneously?) as Openbox.

probonopd commented 3 years ago

Openbox is the window manager it uses, but the rest (Menu, Dock, Filer...) is custom. Listing it as "Openbox" is not wrong, but it is like listing KDE Plasma as "kwin".

linuxhw commented 3 years ago

Made first probe of the VM. Temp link: https://bsd-hardware.info/index.php?probe=eeaa86e5fd

linuxhw commented 3 years ago

Openbox is the window manager it uses, but the rest (Menu, Dock, Filer...) is custom. Listing it as "Openbox" is not wrong, but it is like listing KDE Plasma as "kwin".

Yep. Need a way to identify helloDesktop somehow.

probonopd commented 3 years ago

As for the system identification, investigate https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238953 for adding in "helloSystem" there.

As for the desktop identification, I need to think of a good way. Since helloSystem is still under heavy development, process names are still in the flux. How are other running desktop environments identified?

linuxhw commented 3 years ago

As for the desktop identification, I need to think of a good way. Since helloSystem is still under heavy development, process names are still in the flux. How are other running desktop environments identified?

  1. By XDG_CURRENT_DESKTOP env variable
  2. By installed package name & version
  3. By ps x | grep wm
  4. Any other way you suggest (e.g. grep some file, etc.)
probonopd commented 3 years ago

Working on a Hardware Probe GUI utility, I ran into the following questions.

I ran sudo hw-probe and it uploaded data without informing or asking me.

I did NOT use -upload.

Is this a bug?

I ran sudo hw-probe twice and it seemingly created two different records for the same machine. Is this a bug?

  -upload
      Upload result to the hardware database. You will get
      a permanent URL to view the probe.

      By use of this option you confirm uploading of 32-byte
      prefix of salted SHA512 hash of MAC addresses and serial
      numbers to prevent duplication of computers in the DB.

Is there a way to first make a probe, then review it (especially that the UUIDs and serial numbers all have been properly removed), and only then upload it?

Is there a way to upload a probe temporary?

This would be useful during testing, I don't want to spam the database with redundant probes.

Is there a way to delete probes made accidentally?

probonopd commented 3 years ago

First rough sketch:

image

image

image

linuxhw commented 3 years ago

Working on a Hardware Probe GUI utility, I ran into the following questions.

I ran sudo hw-probe and it uploaded data without informing or asking me.

I did NOT use -upload.

Is this a bug?

Yep. Already fixed in master.

I ran sudo hw-probe twice and it seemingly created two different records for the same machine. Is this a bug?

  -upload
      Upload result to the hardware database. You will get
      a permanent URL to view the probe.

      By use of this option you confirm uploading of 32-byte
      prefix of salted SHA512 hash of MAC addresses and serial
      numbers to prevent duplication of computers in the DB.

Nope. The state of the computer has changed, so you get new probe ID each time. But HWID is the same in all probes (same computer hardware).

Is there a way to upload a probe temporary?

This would be useful during testing, I don't want to spam the database with redundant probes.

Do not worry to spam the database. All duplicate probes are identified automatically and will be removed in future. But you have a limit of ~10 probes per IP / 6 hours.

Is there a way to delete probes made accidentally?

Yep. But only by notifying me by E-mail. Probes are anonymous, there is no any meaningful info in them, so absolute majority of people don't worry about this and we receive less than 5 requests yearly to remove a probe. Probably we can generate some private token in future to let people remove new probes.

probonopd commented 3 years ago

Thanks. Is there a way to first make a probe, then review it (especially that the UUIDs and serial numbers all have been properly removed), and only then upload it?

linuxhw commented 3 years ago

First rough sketch:

Looks good. But need to replace description on the first page, currently it's mostly about the database itself not about the probe. Probably, we need something like this:

Anonymously share your hardware specifications and logs with the developers and contribute to the growth of the international BSD Hardware Database. You'll get a permanent probe URL to view and share collected information.

linuxhw commented 3 years ago

Thanks. Is there a way to first make a probe, then review it (especially that the UUIDs and serial numbers all have been properly removed), and only then upload it?

hw-probe -all
# review /root/HW_PROBE/LATEST/hw.info
hw-probe -upload

UUIDs/serials are not removed, they are encrypted by SHA512 with salt and truncated. E.g. UUID B264A8D5-CBCB-44B0-A167-1E86B4FB2F37 becomes D6856A9A-5A8B-44F8-AFDC-1F7BEB1E157C. It still has UUID format, but it's not your UUID.

probonopd commented 3 years ago
hw-probe -all
# review /root/HW_PROBE/LATEST/hw.info

It is full of UUIDs and serial numbers that I would never want to upload. Can we please have those removed on the client so that we can see what actually gets uploaded.

linuxhw commented 3 years ago
hw-probe -all
# review /root/HW_PROBE/LATEST/hw.info

It is full of UUIDs and serial numbers that I would never want to upload. Can we please have those removed on the client so that we can see what actually gets uploaded.

All UUIDs and serials are encrypted by SHA512 with salt and truncated in /root/HW_PROBE/LATEST/hw.info. Take another look.

probonopd commented 3 years ago

All UUIDs and serials are encrypted by SHA512 with salt and truncated i

Couldn't these just be replaced by XXX-XXXXXX... to make it more obvious?

Taking the real UUIDs and serials and replacing them by other globally unique identifiers isn't making it much better imho.


This is what I have right now:

https://user-images.githubusercontent.com/2480569/103355050-91bfdd00-4aad-11eb-98dc-8f2b555c4cdf.mp4

linuxhw commented 3 years ago

All UUIDs and serials are encrypted by SHA512 with salt and truncated i

Couldn't these just be replaced by XXX-XXXXXX... to make it more obvious?

We need to collect them to identify computers by generating unique HWIDs. Hundreds of attackers yearly try to break and overflow the database by falsified probes, so this is necessary.

I understand that decorating UUIDs/serials in such way is not obvious. Probably we need to describe the anonymization process in more detail.

Taking the real UUIDs and serials and replacing them by other globally unique identifiers isn't making it much better imho.

This makes probes anonymous.

probonopd commented 3 years ago

Probably we need to describe the anonymization process in more detail.

This would be highly appreciated. helloSystem is a system that is designed to care about privacy. So explanation is good.

I am working on a way to identify helloSystem and version number. It will be via the packages list. Stay tuned.

linuxhw commented 3 years ago

This is what I have right now: deleteme2.mp4

This was fast! And looks great!

linuxhw commented 3 years ago

Probably we need to describe the anonymization process in more detail.

This would be highly appreciated. helloSystem is a system that is designed to care about privacy. So explanation is good.

Changed description to:

The tool uploads 32-byte prefix of salted SHA512 hash of MAC addresses and serial numbers to properly identify unique computers and hard drives. UUIDs are decorated in the same way, but formatted like regular UUIDs in order to save readability of logs. All the data is uploaded securely via HTTPS.

linuxhw commented 3 years ago

It would be helpful to show generated probe URL on the last screen.

probonopd commented 3 years ago

It is shown. I have blurred it in the video.

probonopd commented 3 years ago

To answer the original question:

Information needed Information source Comments
helloSystem is the variant of FreeBSD that is running on the computer The package helloSystem is listed in pkglist in the Hardware Probe This is a transitional package that is not available for download outside of the helloSystem ISOs
Version of helloSystem Version of the package helloSystem in pkglist in the Hardware Probe E.g., 0.3.0_0C123 = Version 0.3.0, build number 0C123 (123rd build in the 0.3 series). Note that prerelease builds may already have the version number of the upcoming release.
helloDesktop is the desktop environment currently running The process /usr/local/bin/start-hello is running. Apparently this information is not contained in the hardware probe? The process name might change in the future
Version of helloDesktop Version of the package helloSystem in pkglist in the Hardware Probe helloDesktop is only released as part of helloSystem, hence the versions are identical
grahamperrin commented 3 years ago

Shortlist of my helloSystem probes:

probonopd commented 3 years ago

pkglist correctly shows unknown-repository helloSystem 0. I am working on getting the 0 to a usable value.

probonopd commented 3 years ago

For the versioning, we are roughly following this scheme. E.g., 0.3.0_0C123 = Version 0.3.0, build number 0C123 (123rd build in the 0.3 series). Note that prerelease builds may already have the version number of the upcoming release. Updated above.

probonopd commented 3 years ago

Hello @linuxhw are you collecting Power Management related information that one could use to find out on which machines e.g., sleep works?

probonopd commented 3 years ago

What is needed to make hello to show up under "DE" without the need for any changes on the @linuxhw side?

image

Possibly this is related to https://github.com/helloSystem/ISO/issues/79.

linuxhw commented 3 years ago

To answer the original question: Information needed Information source Comments helloSystem is the variant of FreeBSD that is running on the computer The package helloSystem is listed in pkglist in the Hardware Probe This is a transitional package that is not available for download outside of the helloSystem ISOs Version of helloSystem Version of the package helloSystem in pkglist in the Hardware Probe E.g., 0.3.0_0C123 = Version 0.3.0, build number 0C123 (123rd build in the 0.3 series). Note that prerelease builds may already have the version number of the upcoming release. helloDesktop is the desktop environment currently running The process /usr/local/bin/start-hello is running. Apparently this information is not contained in the hardware probe? The process name might change in the future Version of helloDesktop Version of the package helloSystem in pkglist in the Hardware Probe helloDesktop is only released as part of helloSystem, hence the versions are identical

Support for helloSystem has been implemented by the commit https://github.com/linuxhw/hw-probe/commit/e71dba9f9a4cfda9fb4255bbdf1c1e8b3a7c8d2d.

See https://bsd-hardware.info/?d=helloSystem

probonopd commented 3 years ago

Excellent @linuxhw, thank you very much. HIghly appreciated.

One detail: The icon used on https://bsd-hardware.info/?d=helloSystem is not high quality. And look a the shadow. Could you please use https://github.com/helloSystem/hello/blob/master/branding/computer-hello.png instead?

Thank you so much!

probonopd commented 3 years ago

...and things have become simpler for bsd-hardware contributors - no need to install anything, no need for the command line anymore...


Easy way to Contribute

Everyone can contribute to the database even without having BSD installed on their computers by writing a helloSystem Live image to a USB stick once and then probing all the computers around w/o the need to install or modify anything!

image

Just do:

Now you can probe all your computers around by booting from this USB stick!


Easy way to Contribute
----------------------

Everyone can contribute to the database even without having BSD installed on their computers by writing a [helloSystem Live image](https://hellosystem.github.io/docs/) to a USB stick once and then probing all the computers around w/o the need to install or modify anything!

![image](https://user-images.githubusercontent.com/2480569/103484839-12564480-4df2-11eb-8c57-d6ee6ef48e2b.png)

Just do:

* Download and write the [helloSystem Live image](https://hellosystem.github.io/docs/) to any USB stick
* Plug it to any computer
* Power on the computer, enter the Boot Menu and select the USB stick
* Connect to WiFi or just plug the Ethernet cable
* From the menu, launch the __Hardware Probe__ utility and follow the on-screen instructions

Now you can probe all your computers around by booting from this USB stick!
grahamperrin commented 3 years ago

https://github.com/helloSystem/hello/issues/67#issuecomment-753611844

Sorry, I'm late to this, focus has been elsewhere, I still haven't found time to digest it all.

In Matrix yesterday:

probono: hi, any reason to not use e.g. 12 in lieu of 0 for 12-based builds? For example hello-0C139-12.1-amd64.iso might instead have been hello-12C139-amd64.iso

probonopd commented 3 years ago

@linuxhw currently shows helloSystem 0.3.0. This is correct, but helloSystem 0.3.0 (0C139) would be even better because it would allow one to distiguish the various builds that got made during development of the 0.3.0 cycle. (In the package, we need to use 0.3.0_0C139 due to restrictions of FreeBSD tooling but 0.3.0 (0C139) would be the correct way to display this so that it becomes clear that the build number is not part of the marketing version.)

linuxhw commented 3 years ago

One detail: The icon used on https://bsd-hardware.info/?d=helloSystem is not high quality. And look a the shadow. Could you please use https://github.com/helloSystem/hello/blob/master/branding/computer-hello.png instead?

The icon has been updated.

probonopd commented 3 years ago

Looking great:

image

Seems correct.

helloSystem 0.3.0 (0C139) would be nice to have.

linuxhw commented 3 years ago

...and things have become simpler for bsd-hardware contributors - no need to install anything, no need for the command line anymore...

Added to https://github.com/linuxhw/hw-probe/blob/master/INSTALL.BSD.md

linuxhw commented 3 years ago

helloSystem 0.3.0 (0C139) would be nice to have.

Fixed.

linuxhw commented 3 years ago

Hello @linuxhw are you collecting Power Management related information that one could use to find out on which machines e.g., sleep works?

By what command this info can be obtained?

probonopd commented 3 years ago

Great question. I was hoping you knew the answer.

What we could do is add some interactive testing to the Hardware Probe application that would run some tests as described on https://wiki.freebsd.org/SuspendResume, and then ask the user whether they have worked.

Would that be acceptable? Do you already have the concept of asking the user questions or do all tests have to be completely automatic?

linuxhw commented 3 years ago

After copying of the probe URL to clipboard (by right mouse click), the clipboard is cleared after closing the application and I can't use it (e.g. paste it to the browser).

probonopd commented 3 years ago

Interesting observation! I can reproduce it and will open a ticket. Workaround: Paste it in the browser while the app is running.

Even better: We should directly open the browser, maybe we need a button rather than a symlink.