En/Trinity desktop environment twm
Welcome to Simone Giustetti's wiki pages.
Languages: English - Italiano
Configuring TDE as the Default Graphical Interface for Slackware Linux
As any other general purpose Linux distribution, Slackware can be deployed for different uses. Slackware is usually installed on servers where, due to its stability and small footprint, it is ideal to host network services and forget about their existence. Another common use is: desktop Pc. Installing some third party packages, you can have a word processor, a powerful spreadsheet software, a presentation software and more. In the latter scenario it is worth to start your Linux box in GUI mode, in order to have all of the programs and tools for your daily work immediately available. You can configure Slackware to run one of the graphical interfaces it ships:
and with a little effort you can configure custom GUIs too, GUIs not included among the official packages, like Gnome or TDE. In this article I'll show you how to configure Trinity Desktop Environment as the default graphical interface for Slackware 15.0 and how to load it at boot time.
Get and Install TDE
First of all you'll have to install the Trinity Desktop Environment, if you haven't already. You have two choices: the first one consists of downloading the source code for the graphical environment, build it, then install the resulting packages. That is the subject of many pages of this web site and I'll suggest you to read through the ones describing the build tree available from the very same pages and its internals. Alternative build trees are available in Internet, in GitHub, for example, and other source code web repositories. Having no tie to the authors of those, nor to GitHub, I cannot route you to their location, nor suggesting one among the available. The second way consists of finding pre-built packages in Internet. I, again, share no bound with the authors, nor the organizations hosting third party repositories for Slackware Linux, therefore I cannot offer any suggestion about them. Whatever you choose, please install TDE before reading further.
Check the TDE Configuration
Before you touch any system configuration file, you should check for the Trinity Desktop Environment configuration to work fine. Two scripts located in directory /etc/profile.d are meant to set the correct path for the Qt3 libraries and TDE and to set the environment variables to sane values. All of which is needed for the GUI to run smoothly. The script names are:
- tqt3.sh and trinity.sh, for the commonly used Bash shell.
- tqt3.csh and trinity.csh, for whoever prefers working with the C shell.
While installing, updated versions of the scripts are copied to the /etc/profile.d directory with extra extension .new to avoid overwriting existing ones. This precaution avoids the risk of accidentally removing customized lines and updates included in the scripts. To enable the last installed version of each script and make it default you'll have to:
- Update them copying in all of the customization.
- Rename them replacing older releases. When using the Bash shell, for example, the commands to run are:
cd /etc/profile.d mv tqt3.sh.new tqt3.sh mv trinity.sh.new trinity.sh
- Make sure to enable the execution flag for each script. Sometimes permissions are removed while building packages mainly for security concerns. The commands, again for the Bash shell, are:
chmod a+x tqt3.sh chmod a+x trinity.sh ls -lah tqt3.sh trinity.sh -rwxr-xr-x 1 root root 402 Jun 4 21:16 tqt3.sh -rwxr-xr-x 1 root root 5.4K Jun 4 23:46 trinity.sh
The three "x" characters included in the permission string state the scripts are executable, granting they'll be executed starting with next user authentication on.
The last check is related to the /etc/X11/xinit/xinitrc.trinity file. For the reasons listed above, the .new extension is concatenated to script names while installing the tdebase package, resulting in xinitrc.trinity.new. Once again, in order to configure TDE, you'll have to copy any customization in the file then rename it:
cd /etc/X11/xinit mv xinitrc.trinity.new xinitrc.trinity
And make it executable:
chmod a+x xinitrc.trinity ls -lah xinitrc.trinity -rwxr-xr-x 1 root root 533 Mar 22 20:07 xinitrc.trinity
Set TDE as Default GUI
After performing all checks concerning the TDE configuration, you can go on setting it as default graphical environment. Slackware ships a handy tool for system administration based on the ncurses library, able to run both in a text shell as well as a GUI. Such tool is named pkgtool and can be run in any terminal by writing down its name then pressing the RETURN key. You are going to change the system configuration therefore high privileges, root ones to be more specific, are required for the job.
Fig: 1 - Pkgtool main interface.
To change the system configuration: select the Setup option using the keyboard arrow keys, then press RETURN. In the following screen select the configuration script, xwmconfig, pressing the SPACE bar on the keyboard. An asterisk will appear left of the script name. Press ENTER to continue.
Fig: 2 - Start up the GUI configuration tool.
You'll be presented with a list of graphical interfaces currently installed on your system. Select the TDE option: xinitrc.trinity, at the bottom of the list in our example.
Fig: 3 - Select TDE as default GUI.
Press the RETURN key to confirm your choice and the program will configure the selected environment then will return to shell prompt. You can check Trinity Desktop Environment to be your default graphical interface running startx from a terminal or restarting your system session and TDE will be loaded in place of the previously active GUI.
Configure the GUI to Load at Startup
To automatically load the GUI instead of a text console at startup, change the default runlevel from 3 to 4. Keeping it simple, a runlevel in a Linux / UNIX system is a mode of operation. To different runlevels correspond starting a list of services different by name, function and number. Slackware Linux reserves the 4th runlevel to the GUI while other distributions use the 5th one to such end.
To change the default system runlevel from 3 to 4 you'll have to update system file /etc/inittab changing line:
Save the updated file and reboot the system for the new runlevel to kick off. Be careful never to set the default runlevel to 0 or 6. If you do, the system will be unable to boot successfully and you'll be forced to start your machine with an external rescue disk and to update the /etc/inittab line of code once again.
Graphical Login Manager
When the system GUI starts, you'll be welcomed by the window of a log-in manager among the installed ones. Not being included in standard Slackware, tdm, the TDE log-in manager, will be overlooked in favor of gdm, kdm, sddm or, whenever nothing else is available, xdm a component of the X server.
Tdm can be configured as default log-in manager, but the way to do so varies with Slackware Linux version. Latest stable release, 15.0, configures runlevel 4 through 2 scripts:
- /etc/rc.d/rc.4: Which includes the default configuration for the whole system.
- /etc/rc.d/rc.4.local: Which is dedicated to customization.
The tdebase package includes its own rc.4.local file, configured to use tdm as the default log-in manager. The file is installed with extra extension .new to avoid overwriting existing customization. To enable the script, you'll have to treat it as any other TDE configuration file:
- Copy any customization in it.
- Rename the updated script removing the .new extension and make it executable:
cd /etc/rc.d mv rc.4.local.new rc.4.local chmod a+x rc.4.local ls -lah rc.4.local -rwxr-xr-x 1 root root 1.7K Jun 4 23:46 rc.4.local
Reboot your computer and, if everything is configured correctly, you'll be greeted by the tdm authentication window:
Fig: 4 - TDE authentication window.
To avoid potential issues, I'll point out that tdm does not permit to authenticate as root. Before you start the graphical log-in manager, create a standard user or otherwise you'll risk to be prevented from successfully logging-in to your Linux box.
Another tip I'd like to share is: configure everything while in text mode (runlevel 3) then test your configuration running command:
This way, if anything should fail, starting the GUI will result in some error messages and you'll be returned immediately to the shell, with the ability to read log files and debug errors.
This article provides basic instructions to configure TDE as the default Slackware Linux GUI and start it at boot time. The article includes instructions to configure tdm as log-in manager, to authenticate users through a GUI window.
For any feedback, questions, errors and such, please e-mail me at studiosg [at] giustetti [dot] net
- Slackware home page
- Slackware Linux for the ARM architecture
- Unofficial Support page for Slackware and Raspberry Pi
- TDE home page
- TDE download links
- Slackware Linux beginners guide
- Ncurses library home page
Languages: English - Italiano