1

This Question poses as a challenge since a previous Thread at RPiSE suggest that there is no a definite way to know which Image Version for Raspbian Jessie is installed on a particular Pi.

This thread should be another breakaway question to determine whether or not a Raspberry Pi with Jessie-Lite does have GUI (Pixel) on it or not.

An amateur way is probably to trigger which startx for GUI environments if accessing a Pi with ssh

But is there more information that can be obtained from the Raspbian File System where there are GUI components on a particular Jessie-Lite distribution?

3

One possible way would be to check if the raspberrypi-ui-mods package is installed, which should give a good clue on whether the Pi has Pixel installed. This is possible by running for example apt list raspberrypi-ui-mods --installed. This lists the version of the package if it is installed.

If you want to do know if Pixel might be installed from without using apt, you could search for packages listed in /var/lib/apt/extended_states that match such a system.

You can be quite sure if you find the following entries:

  • pix-plym-splash (pixel plymouth splash screen)
  • pix-icons (pixel icon set)

This might already give you a good start and might even be enough for most situations as most people won't install a boot splash screen and an icon set specifically designed and branded for a desktop environment they don't have installed. Just my two cents.

There are much more clues to be found though, and with some digging on what components Pixel consists of (or uses by default, like lightdm) you could also find out which folders/files, init scripts and configuration files are needed for those components to run. Ultimately, you could then conclude from their (non-) existence in the filesystem if Pixel is installed.

Keep in mind though that in linux many different combinations of packages might achieve the same thing, meaning that you might under some circumstances face a situation where somebody runs just some parts of some common combination like, lets say, Pixel.

You might then be able to tell that there is a GUI based on lxde installed together with a lightdm display manager that is sporting the pi-greeter running on X11, but possibly no more than that.

0

It's not really that "there is no a definite way to know which Image Version for Raspbian Jessie is installed" but that the two images you're talking about, Raspbian PIXEL and Raspbian Lite, are the same OS with different sets of packages installed. Either one can, in theory, be turned into the other by adding and/or removing packages; in practice people quickly do system updates and perhaps add their own packages to produce a system that is then neither of the original two images, exactly.

The question of whether a system "has a GUI" is about as ill-defined. A system may not have an X11 server on it (and thus not be able to render a local graphical display, e.g., via the HDMI port) but still have graphical programs that can be displayed on a remote X11 server being used by someone logged in over the network. Or a system might have an X11 server but not have the desktop software installed to actually display a desktop of the sort one normally considers to be "the GUI." Or perhaps it doesn't have the standard Raspbian LXDE or PIXEL desktop software available, but does have a completely different set of desktop software such as Xfce or Gnome.

What you need to do is figure out quite precisely what you want to do and what other software you need to do that and then ensure that other software on which you depend is installed. Typically this is done by making your software a package and, when you create that package, stating the other packages on which it depends. This will cause the dependencies to be installed automatically when your package is installed. That may involve installing a lot or very few GUI components, depending on what libraries and the like your software uses.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.