At the prompt, enter:
Kod: Zaznacz cały
sudo apt install xserver-xorg raspberrypi-ui-modsOnce the basic desktop is installed, use
Kod: Zaznacz cały
startx...to boot into the desktop UI. If you prefer to boot into the desktop permanently:
Run sudo raspi-config
Select System Options
Choose Boot/Auto Login
Select Desktop or Desktop Autologin depending on preference
Select Finish, then Reboot when prompted
To exit to the command line (as opposed to running a Terminal window), press Ctrl+Alt+F2. This will exit the desktop environment immediately dropping you back in the text-based command line interface.
You can also undo permanently booting into the desktop:
Run sudo raspi-config
Select System Options
Choose Boot/Auto Login
Select Console or Console Autologin depending on preference
Select Finish, then Reboot when prompted
(The above can also be done in the desktop using the Raspberry Pi Configuration tool. Select System > Boot choose between To desktop and To CLI.)
BONUS: How to Install GNOME on Raspberry Pi OS Lite
What if you wanted to install a completely different desktop environment on Raspberry Pi OS Lite? Plenty of alternatives are available, but for a typically modern Linux look, GNOME is a strong contender.
GNOME desktop on Raspberry Pi
Better still, it’s relatively straightforward to install on Raspberry Pi OS Lite. Note, however, that this is more suited to the 64-bit version of Raspberry Pi OS Lite. In fact, it probably won’t be usable on the 32-bit version.
To do this, enter:
wget https://github.com/TerraGitHuB/gnomefor ... stable.zip
Then unpack the ZIP file:
unzip stable.zip
Change directory:
cd gnomeforpi-stable
Finally, run the installation script. You have two choices here:
sudo ./gnomeforpi-install
sudo ./gnomeforpi-install –lite
If you select the first, the standard installation will be used; with the second, fewer packages are installed, making the process faster. For example, Chromium browser is installed with the full option. Whichever you choose, installation is going to take a few minutes to complete.
Midway through the process, you’ll be prompted to choose between the following as the default display manager
gdm3
lightdm
Either option is fine, but you may prefer gdm3 as this is designed for use with GNOME.
The Raspberry Pi should automatically reboot. At the login screen, you can use your usual credentials, but log in with the Xorg display server. To do this:
Click the Settings cog
Choose GNOME on Xorg
Enter your credentials
Click OK
You should now see the GNOME desktop running on your Raspberry Pi.
Installing a Desktop Environment on Raspberry Pi OS Lite Is Easy
The most important thing to take from this is that while reinstalling your Pi’s SD card with a full OS might seem easier, it isn’t. It takes just a couple of minutes to install a desktop environment on the Raspberry Pi OS Lite. That makes it a far quicker solution, and one that doesn’t overwrite any saved data on the device.
Better still, you’re not limited to the default PIXEL desktop as many other desktop environments can be installed on Raspberry Pi OS.