Thursday, November 18, 2021

Motif & The X Window System

Something about the X Window System evokes images of Cray supercomputers or research laboratory workstations from 1990. Of course, X is as ever-present with Linux now, though very few developers seem to want anything to do with it. X provides tools for showing a display, mainly a terminal and a blank screen, when its server is started.

 

I logged in. Prompt!

By default, Debian does not install X. Or a window manager. You must do it by waving your magic wand and typing

sudo apt install xorg mwm

This will install the X11 server and the Motif Window Manager. "Motif?" you say, "Now that is a very UNIX workstation setup!" Yes, Motif, the window manager employed in the Common Desktop Environment is also ever-present on the Debian servers. Some of that is because its source code doesn't require too much maintenance. Let us take a look.


 

Once installed, one starts X with a simple startx command. The screen will be black and you will see a ×-shaped cursor. This seeming end-of-time nothingness is actually where the journey begins. What you are seeing is called the root window. The fact that there is a mouse pointer means a GUI exists in this space somewhere. To do something, one right-clicks and opens the root menu.

As a side note, many X Window programs expect an actual 3-button mouse. They seem to use the center and right buttons in bizarre inconsistent ways, particularly with copy/paste actions. You can change the way the buttons are "bound" to specific actions, but we shall skip this for now.

The first xterm against an actual "desktop" background.

From the Root Menu, select New Window. This generic-sounding menu item means "open a terminal and make it the active window." 

Another level of comfort we can add is a desktop surface. In the terminal, type

xsetroot -gray

which will color the root window with a simulated gray bitmapped pattern. (At least now we aren't falling off into space.)

 

Various clients opened from terminal. One has been minimized (iconified).

Opening clients (programs) from the terminal link them to that terminal. If the terminal is closed, all programs started from it will close, too. You can test this by typing

xclock &

xedit &

xcalc &

xlogo &

The ampersands (&) make each program run as a background process. You can continue to use the terminal this way. To blow everything up, double click the square in the upper left corner of the terminal. This will close the terminal. Any work that was done in the open clients will be lost! Not so safe, is it?

Wednesday, November 17, 2021

DIYA: Debian Installed Yet Again

Rather than bore you with the lengthy install of Debian Linux, which is now in version 11, I will merely gloss over some of my configuration details.




It's important to choose Expert Install... because I think I'm an expert. Sure, why not? It also keeps certain automatic scripts from downloading and running stuff that I don't want installed.


"Root access? You shouldn't be here."

 

After passing through standard menus, such as Choose Language, Choose Keyboard, Load Installer.... (hit Enter for many of them), it will ask about the root user. There's a part of Linux/UNIX that requires administrative access to certain operations, like installing or removing software. On Windows systems, they call it an "elevated prompt."


(Don't allow root login.)

Contrary to my previous install 5+ years ago, it's now commonly suggested to not allow root login. This will make the installer set your only user account as a sudoer, that is, you may use the sudo command to do administrative operations.


Guided partitioning.

If for some unholy reason you wish to also boot into MS Windows on the same physical hard drive, do not continue. MS Windows has a rather aggressive way of taking over a physical drive, then allowing you to shrink its portion of space to install another operating system. It's very complicated, and you're better off using a separate physical drive for the Linux install, completely separated from Windows.


Data destruction imminent!


It's critical that you select the correct drive to partition. Finally, select Finish partitioning and write Changes to disk. This will destroy (or make inaccessible) any data that's already on the disk. Even lost partitions with data can be restored with the right software (i.e. Ultimate Boot CD). But for now, the disk needs to be partitioned, formatted, and mounted to install Linux.

I used targeted drivers.
 

Once again, always allow non-free software!

Also allow backported software, just to be flexible.

Finally, don't allow any desktop environments.


Once again, this is an experimental system. I will start with the X server next.

In practice, I use Xfce on my ThinkCentre and I believe my Raspberry Pi 400 uses LXDE. 

Incidentally, the Raspberry Pi desktop is an excellent setup for anybody looking to start their life in Linux with minimal resources.