Other Desktop environments installation script

Hello everyone,

I would like to offer, for those who might be interested, an automatic desktop environment installation script (probably yet another one) with bsddialog (GUI).
Indeed, I regularly use a script to test hardware and install the desktop environments I need on FreeBSD, so I decided to share it.

The script is only 21kB, it's written in very basic shell script (to remain easily understandable), and allows deploying all the desktop environments presented in the handbook, to choose from a collection of common desktop applications (including Ubuntu version of Chrome - for those who watch Netflix) and to automatically install and activate important utilities and features (USB devices automount, webcam activation, etc.).

The script requires you to provide a user (who will be allowed to log in to their desktop environment). You can create this user directly within the script. You can also rerun the script as many times as needed to add multiple users authorized to log in.

It does not detect any hardware of your computer, but offers to install the GPU configuration based on your choice (Intel Iris Xe, old Intel, Nvidia 535, AMD, or nothing - for virtual machines).
The script covers the most common cases, especially with a Nvidia graphics card placed on the PCI bus 1:0:0 by default (as is often the case on laptops).

Finally, it offers to automatically install VirtualBox or BVCP (or both).

Each configuration is functional immediately after running the script, and you can reboot directly into your desktop environment.
If this is not the case, it means your graphic configuration requires additional adjustments, but on the vast majority of computers I have tested, it works correctly.

It is preferable to run it right after a fresh installation of FreeBSD 14 (on real hardware, or as a guest on virtualbox...)

May it be of use to someone!

Of course, if some would like to see other applications in the choice offered, I can certainly add them!

Here is the link to the git created for the occasion:
https://git.asdf.cafe/majekla/freebsd/src/branch/master/freebsd-desktop.sh

1.png
2.png
3.png
4.png
 
Regarding the compatible computers that I often test, here is a short list for now concerning the choice of the graphics card in the script.

Laptops

- Intel Iris Xe
Chuwi Corebook X

- Intel (before Iris Xe)
Chuwi Larkbox Pro (Intel J4125)
Lenovo Thinkpad T470 (i5-7300U)

- NVIDIA
Dell Precision 7560 (Xeon W-11855M + NVIDIA RTX A4000)

- Intel (before Iris Xe) or NVIDIA (you have the choice)
Dell Precision 7520 (i7-7920HQ + NVIDIA Quadro P3000)
Dell Precision 7720 (i7-7820HQ + NVIDIA Quadro P3000)


Mini-PC

- Intel (before Iris Xe)
Fujitsu Esprimo Q920 (i5-4590T)
Dell Optiplex 7040 (i5-6500T)
Lenovo ThinkCenter M93p USDT Tiny Quad Core (i5-4590T)
Ace Magician JK06 (Jasper Lake N5100)
Chuwi Larkbox Pro (Intel J4125)

For virtual machines hosted on VirtualBox, the choice is that of 'Virtual Machine'.
The driver is already integrated in the xorg package (in other words, nothing happens when you choose 'Virtual Machine').
 
no.
I wrote the script following the handbook and added what I usually do.
The primary goal of this script was to remain as basic as possible, but to have something that works quickly.
desktop-installer seems to be an incredible software.. I tried it several times but I never succeeded in setting a desktop with it, so I don't use it.
 
Nice. I've been "rolling my own" on FreeBSD for a long time so don't use things like this but I do appreciate the effort needed.
One thing about desktop-installer is the detection of video drivers. Figure out the hardware, figure out what drivers to install is a lot of work but a lot of result.
One of the biggest things for desktop environments is "what do we install by default".
Get that right and the rest is easy.
 
The idea here is not at all to compare it to desktop-installer, which is a "huge" CLI application.

The script is easy to read and to modify/customize.
Thus, we know what is installed "by default".

Unlike for the softwares, I did not offer the option to customize the selection of usual utilities so as not to make the process too complex for beginners.
The webcams will be functional, and USB devices will also automount.

However, I can make changes if my opinion is not widely shared in this regard.
 
Thanks for sharing your script!

I have my own personal installation and configuration script but it's always interesting to see how other people do it ... perhaps I get some good ideas for my own script ...
 
I added auto-detection of the BusID for NVIDIA graphics.
Just to prove me wrong, this morning I tested a server for which the NVIDIA card was on BusID 33 :-D.. Even though for most laptops, it's 1.. there, it didn't work.. So I added 3 lines to the script to automatically retrieve the info. It should work.
 
  • Like
Reactions: mer
Oh, good catch! Thank you.
I am unmasked. :-D.

I sometimes copy and paste between various scripts of mine... and sometimes I forget to translate :-D..It's fixed now. Thank you.
 
Long time FreeBSD fan here. First post. Looking to get a T470 laptop set up with FreeBSD.

What do people recommend for desktop environments based on specific workloads? For example, what’s best for basic browsing? What’s best for gaming?

Would stock FreeBSD be better, or should one try a distribution geared toward desktop environments?

Etc…
 
The choice of a desktop environment is often a personal decision (more than a rational choice. For example, LXQT is very lightweight).

My personal preference always goes to XFCE, but if you're more comfortable with Gnome or KDE (which is very comprehensive on FreeBSD, especially with KDE Connect for smartphones), you'll have more options.

The FreeBSD installer does not offer a desktop environment installation; you have to do it yourself using command line after the first system boot (once installed).
However, it's not complicated. The Handbook documentation is very well done, and you can use this script or the desktop-installer package to automatically deploy your desktop environment.

If you're looking for a FreeBSD-based distribution with a ready-to-go desktop environment, you might want to check out NomadBSD, helloSystem etc... there are actually a few of them.

If you use the script, use the Intel (older than Iris Xe) graphics choice with your laptop (I also have a T470).
 
The choice of a desktop environment is often a personal decision (more than a rational choice. For example, LXQT is very lightweight).

My personal preference always goes to XFCE, but if you're more comfortable with Gnome or KDE (which is very comprehensive on FreeBSD, especially with KDE Connect for smartphones), you'll have more options.

The FreeBSD installer does not offer a desktop environment installation; you have to do it yourself using command line after the first system boot (once installed).
However, it's not complicated. The Handbook documentation is very well done, and you can use this script or the desktop-installer package to automatically deploy your desktop environment.

If you're looking for a FreeBSD-based distribution with a ready-to-go desktop environment, you might want to check out NomadBSD, helloSystem etc... there are actually a few of them.

If you use the script, use the Intel (older than Iris Xe) graphics choice with your laptop (I also have a T470).
Thank you. I'm trying GhostBSD currently. Wine seems to work as well for my basic windows needs.
 
New script update for freebsd-desktop.sh

Additions:
- An initial internet connection test has been added.
- It now also checks for the existence of the user of the entered future desktop environment, as well as for any potential new user, with a loop.
- The script now automatically manages the detection and configuration of Intel Iris Xe, Intel HD/UHD Graphics, VirtualBox/Bhyve, NVIDIA (provided your card is compatible with the current default version in the repository - 535. I will do custom configurations later for nvidia graphics if I have time).
If 2 graphics cards are detected (for example, an integrated processor graphics unit + an NVIDIA), the script offers a choice of which one to use (I have not yet been able to test this part but it should work).
If no graphics cards are detected automatically, then the manual selection menu is displayed as before.
- The choice of locales has also been added (especially for the translation of GNOME/LXQT/XFCE... or the keyboard layout for Xorg. I'm still stuck on the keyboard in GNOME (in gdm, it's settled) which I can't set to anything but QWERTY without going through the graphical settings. If anyone knows how, I'm all ears.)
- The installation of utilities is sped up in case some are already installed on the system (especially when re-running the script).
- Several checks have been added to avoid sending the same information twice to /boot/loader.conf or other files.

Notes:
Currently, vscode and youtube-dl have disappeared from the quaterly repository, so selecting them in the application menu is pointless.

It remains a basic script in which each operation is a function, and where the entire sequence is located at the bottom of the script.

I test the script on about ten different machines each time, but of course, this is just a small sample (especially with all existing graphics cards).
I hope, however, that it covers a good part of the current machines. At least, it covers mine!

Testing will be greatly appreciated!

 
Back
Top