Slackware, Simplified: Entry 3 - Configuring graphical environments within Slackware

This is a blog series designed to help people starting out with Slackware, or just considering it, be able to use it to their fullest extent, presented in a beginner-friendly manner.

Slackware is the most based distro!

It's been a little while since the previous entry, but trust me, today's entry is a good one.

So, up to this point, you've installed Slackware, configured the package manager, probably installed some packages, and maybe even set some system services using Slackware's bloat-free BSD-style init system. But this entire time, you might have been stuck logging into a terminal and THEN having to start the GUI with startx. Pretty inconvenient, right? Well, the first part of today's entry will explain how to boot into a lovely graphical environment.

BOOTING INTO A GUI

The process of configuring Slackware to boot into your GUI of choice is rather easy: just use your favorite editor to edit /etc/inittab. Here, I've cropped out all the unnecessary bits to show only what we need to edit right now.

Editing /etc/inittab so we can boot into a GUI

See that line that reads "id:3:initdefault" ???

All you gotta do is change that 3 to a 4. As explained in the comment above the line we're changing, this is the default runlevel for booting straight into a GUI using a login manager. By default it's set to 3, which makes us boot into a terminal.

When we reboot, we'll be greeted with a login manager (I cannot show this, unfortunately, since I'm using the same machine to write this blog AND run all these commands).

If you experience any issues with your desktop environment refusing to start once you enter your login credentials, reverting this change is as easy as typing Ctrl-Alt-F6. This particular virtual window always brings you to a TTY, regardless of the default runlevel, giving you a way of undoing your edits.

Now I'll explain how to change your GUI of choice easily, and even add new ones to the mix!

CHANGING AND ADDING GUIS

Depending on what desktop environment and window managers you chose to install when installing Slackware for the first time, you can type xwmconfig to bring up a nice menu allowing you to choose from any of the installed graphical environments. Select whichever one you prefer, and the next time you start a graphical environment, either with startx or by booting into a login manager, you'll be greeted by a new GUI!

You can even add new ones. Say, for example, I wanted to use dwm, a lightweight dynamic window manager. All I have to do to make it available to xwmconfig is write an xinitrc file for it, and move that file over to /etc/X11/xinit/ and give it a name such as, for example, /etc/X11/xinit/xinitrc.dwm.

For example, my own /etc/X11/xinit/xinitrc.dwm:

while xsetroot -name "`date` `uptime | sed 's/.*,//'`"
do
sleep 1
done &
st &
feh --bg-fill /home/tronnerd82/Downloads/wallpaper.jpg &
xcompmgr &
transset -a 0.75 &
exec dwm

With this, I can set my default window manager to dwm, and once I startx, it'll start dwm with all the settings I've added here (status bar, opens the st terminal on startup, uses feh to set the background, starts xcompmgr and sets the transparency on all applicable windows to 0.75).

Started up dwm, the most based window manager

THAT'S ALL I GOT TODAY!

This was a much shorter entry than the previous two, I know, but I see that as a plus, since that makes it more succinct and to-the-point. As always, I must stress that you should not rely on this blog as your sole source of Slackware information. The SlackDocs wiki and the LinuxQuestions forum are great resources that cover far more than I do, and in much greater detail. I just do this for fun and to make Slackware more approachable to beginners.

Hopefully you learned something, and I'll see you next time!


0 Kudos

Comments

Displaying 0 of 0 comments ( View all | Add Comment )