5 Slint
stormdragon2976 edited this page 2023-06-12 15:43:22 -04:00

Getting Your System Ready

Okay, here it is: The how-to for getting Audiogame-manager to work on Slint. Why, well because of all them audio games out there that people are playing in Windows that we want to play too. This little guide assumes you have some familiarity with the command line, since you're a Slint user, but even a beginner shouldn't have any trouble with this, since you won't have to make the mistakes I did. Hehehehe! Most things can be done as the regular user, so any commands etc you'll execute as your normal user will be preceded by the dollar sign, ($) and as the super user, or root there will instead be a hash or number sign. (#) Where some of the root commands will be, you can precede the command with the word sudo followed by a space. Also, it is assumed that your Slint system is fully upgraded, if it isn't, do that now, as it will be very important that nothing should need to be upgraded for one of the steps to follow.

# slapt-get -u

followed by the Enter key.

# slapt-get -upgrade

followed by the Enter key.

Also, you may want to attach a monitor to your pc if it's a desktop as even though you may not need to see graphics the X windowing system will very likely expect one and will work better with one then without.

CAUTION! CAUTION! CAUTION! Some of these instructions will involve editing files, which I must strongly recommend that you back up before editing, in case you make a mistake.

Optional Pulseaudio Configuration

Okay, this already sounds scary, but don't worry, it's really not, and you may like things the way they are by default, so I'll briefly describe my test box's setup. It's got two sound cards, one built-in audio, and a usb headset. Speech for the regular text console goes through the built-in sound card, and everything else goes through the usb headset, including the output of the Orca screen reader, and every other sound too, music, games and even things sent through speech-dispatcher that are not screen reader related. This is not the default behavior of Slint, as I said before, you may have reason to do something differently, or leaving things as they are so you could skip this step, but I've found this handy because it seems to speed up game play a bit, and all the speech, game sounds etc, come from one place. This modification is really easy to do, only one line in one file need be changed. This means you'll be using a text editor, whichever one you like and your magical superuser powers. So unless you're skipping this step, let's begin.

So in your console, or even your gui terminal if you like that, we'll be in the home directory. Mine would be /home/testo, which of course I'll refer to later in the guide, yours of course will be different. We'll go through some of these steps again later, so it will be pretty familiar by the time we're done. As we must be the superuser here, we're going to open a file in the /etc/speech-dispatcher directory called speechd.conf, which we're going to quickly back up before we edit. We'll use the cp command to copy the speechd.conf file to another file with a different name, so in case something goes wrong, you'll be able to restore the original. So now type

$ sudo cp /etc/speech-dispatcher/speechd.conf /etc/speech-dispatcher/speechd.conf.backup

followed by the Enter key.

You'll likely be asked for your password, which is the root user password. Go ahead and type that followed by the Enter key, and you'll be returned to your prompt. Now we can edit the file safely. next we open the text editor of choice, for my test box it's Nano so the command would look like this:

$sudo nano /etc/speech-dispatcher/speechd.conf

followed by the Enter key.

You may have a different editor so do the next step however your editor works. You want to search for the line that says:

AudioOutputMethod "libao"

All you need to do here is to replace what's between the quotes, "libao" with the word "pulse" and then save the file.

If you have a graphical terminal running when you do this, you'll lose speech when you do thefollowing command, but it will come back. If you've done this in a console, and don't have a graphical user interface running yet, your speech will be fine. What we need to do is to kill any currently running instances of speech-dispatcher so that when it gets called again, most likely by Orca, it will direct speech output through Pulseaudio. so here, we type the following command.

$ sudo killall speech-dispatcher

followed by the Enter key.

If you get the responce that says "No process found". That's okay. In the regular text console your speech would only stop if you're using a speech method that depends upon speech-dispatcher, such as speechd-up for example. If you're using espeakup, you're using alsa, which will not be affected by this change.

The speech in your graphical terminal will stop upon pressing the Enter key. Simply press the Enter key in your graphical terminal and speech will restart, as Orca is now sending speech through Pulseaudio in the second sound device.

Now all your game output as well as any speech in the graphical user interface will all come from the same place. So now on to the next step... Way to go you command line ninjas!

Getting audiogame-manager

So first, we need to go get the subject of our task, Audiogame-manager. It's stored in what's called a git repository, and we can get it from there with a program called git. This will download all the stuff we need to run, install/uninstall and other things relating to the audio games it supports, which are quite a few. What I recommend is making a subdirectory in your home directory, I call mine git, like this

$ mkdir git

followed by the Enter key.

Now you'll want to get into that directory, with the following command.

$ cd git

followed by the Enter key.

now we're going to call the git program and tell it to go to the repository and fetch the Audiogame-manager stuff we will need with this command.

$ git clone https://git.stormux.org/storm/audiogame-manager

Followed by the Enter key.

You'll see a lot of text on the screen, so you can shut speech up with the Control key a few times until it's done. When it is, we can see what we've got with the following command.

$ ls

followed by the Enter key.

We have another directory, called audiogame-manager/ Notice the slash at the end? That tells us that it's a directory and not a file, which means we'll be going into that with yes, the cd command. Like this.

$ cd audiogame-manager

followed by the Enter key.

Audiogame-manager can do some other things then just running the audio games it supports, one of these is to check to see that all the required software is there before you try to use it and have it just fail. Pretty cool eh? The following command will execute the audiogame-manager.sh script, play any news about the project, and then check to see if you have all of what it needs to run. So here's the command.

$ ./audiogame-manager.sh -c

followed by the Enter key.

Installing Wine

We get the message that we need to install wine before continuing, so rather then fight it, we'll just play along. Before we do, however, a little explanation is in order. Most programs, and indeed operating systems are 64-bit nowadays, yet many of the games we want to play are 32-bit, so what to do? Well, Slint, like it's parent Slackware, is what we call multi-lib capible, though this is not configured by default. So we have to prepare things a bit.

So, still being in our /git/audiogame-manager directory, we want to go back up to the home directory where we started out. Really easy. just do this command.

$ cd

followed by the Enter key.

First we need to make the system multi-lib compatible, so it can run both 32-bit and 64-bit applications, and this will be done by means of an automation script for just this purpose, and we'll use a program called wget, which also grabs things from the internet, but in this case it's going to be a single file, which we'll run as root to fetch and install the multi-lib components. So we'll get the script first with this command.

$ wget https://slackware.uk/~dive/scripts/alien-multilib-rsync.sh

followed by the Enter key.

You'll get a bunch of text on the screen, indicating that the file is downloading. It shouldn't take too long, but when it's done, we're going to want to check it to make sure that it points to the correct repository, as we're using slackware 15.0 packages and not 14.0 ones. This is where we'll be using a text editor, to at least check, but if necessary, edit that file to point to the correct repository, and instead of our normal user, we'll have to do this as root. We'll also have to make sure the file is executable, also as root. We're going to be using super user privileges for a bit, so we'll not use the sudo command here. So type the following command.

$ su

Followed by the Enter key.

When asked for your password, type the root password you configured the system with when installing it followed by the Enter key. As always, when the password is typed, it will not be displayed. Now you'll notice that your prompt has changed to let you know you're now doing things as the super user. We're now going to edit this file. I use nano but any text editor will do. as an example I would type the following from here.

# nano alien-multilib-rsync.sh

followed by the Enter key

The line we're interested is a few from the top, and after some notes it would do one well to read. Here's the line in my copy of the file.

URL=rsync://bear.alienbase.nl/mirrors/people/alien/multilib/15.0/

So, we see that the number there is 15.0 but after getting it yours may be different. If not, then no need to change it, if it is, change the 14.0 or 14.2 or whatever it might be, so that the numbers match those in the example above. When that's done, close your text editor, saving your work. We're now going to make sure that the file is indeed executable so type the following command.

# chmod +x alien-multilib-rsync.sh

followed by the Enter key.

We now know that the file is executable, so we'll run it, and then silence the speech with Keypad Enter.

# ./alien-multilib-rsync.sh

followed by the Enter key, then silence the speech with the Keypad Enter key for example, if using espeakup.

You can temporarily disable speech in your graphical terminal too, by using the key combination insert plus letter s. but you'll have to use that combination again to turn speech back on.

On a decent connection this can take anywhere from a half hour, or perhaps a bit longer, on older systems it could be an hour or so. You can check to see if things are still processing by typing the Control key, and if it's still busy, just type the Keypad Enter key and speech will go silent until the next key press, or using the insert plus letter s combination in your gui terminal. When it's finally done, and you're returned to the command prompt, you'll now be multi-lib capable, so next it's time to go get WINE and anything else we need.

Having made sure the system is fully upgraded before beginning to do anything in this guide, we're now ready to procede to the next step, which is to blacklist the packages that make the system multi-lib, so future system upgrades will not over-write them and undo all your hard work. As we're still logged in as the super user, the next thing we're going to do is to go to a directory outside the home directory of your normal user, with the following command.

# cd /etc/slapt-get

followed by the Enter key.

Here's a file whith which we're going to be very familiar in this tutorial, as we're going to have to come back to it again to set it up to get wine and other things we will need. The file in question is slapt-getrc, which controls various options for the slapt-get utility used to update install and upgrade Slint. In this file, there is a line beginning with

EXCLUDE=

all in uppercase which we are going to add to. The best way to show you this is to give you an example of what one of my test boxes has in this line. Here it is.

EXCLUDE=^devs,^kernel-huge-*,^kernel-generic-*,^kernel-modules-*,^kernel-headers-*,-i?86-,^zzz-settings,^mozilla-firefox,^aaa_glibc-solibs,^gcc,^gcc-brig,^gcc-g++,^gcc-gdc,^gcc-gfortran,^gcc-gnat,^gcc-go,^gcc-objc,^glibc,^glibc-i18n,^glibc-profile

To get a list of these packages to exclude you could pretend to do an upgrade with the command

# slapt-get -upgrade

followed by the Enter key, but instead of answering y to the upgrade, you'd just take note of all the packages that are to be upgraded, writing them down somewhere else, then aborting the install by answering n to the upgrade.

This is why the system needs to be fully upgraded, because everything that you see that the system wants to upgrade, is all the multi-lib stuff you just spent time installing. As a note, you'll have noticed that I had a few things already there, such as Firefox that don't appear in the list of potential upgrades. Your EXCLUDE= line may look different, so keep that in mind. This is also why you'll have, or will, before we go on back up this or any file you are about to edit, especially if it'sa system file as this one is. You'd then add them in the format you see on the

EXCLUDE=

line in that file using whatever text editor you like, I use nano myself. Close the editor you used to edit this file, thereby saving your work, but we don't want to exit superuser mode yet. In fact, re-open your slapt-getrc file, because there's one more line we want to change. There are several lines in the file that begin with the word

SOURCE

and some of them will have a hash or number sign in front of that word and some will not. Each of these lines enables fetching from various Slackware repositories used by Slint. The one we want to change is the one that says

# SOURCE=https://slackware.uk/people/alien/sbrepos/15.0/x86_64/:DEFAULT

All we want to do is remove the hash or number sign from that line and then save the file. Now after doing that, we can close the editor saving your work, and return to our home directory. In my case I would do

# cd /home/testo

followed by the Enter key.

Now, we want to update the package lists that slapt-get accesses, and we'll do this just as we do when updating the system, like this.

# slapt-get --add-keys

followed by the Enter key.

When that finishes we then type

# slapt-get -u

followed by the Enter key.

After that completes,

# slapt-get -upgrade

followed by the Enter key, and we can answer y to the upgrade prompt.

You'll see that the packages we marked for exclusion will not be upgraded and thus our multi-lib configuration will not be over-written. One last thing before we move on to the next step, from time to time, especially after huge upgrades, you'll want to run the

# ./alien-multilib-rsync.sh

followed by the enter key command so that the multi-lib components will get upgraded.

If there have been no changes to the repo you'll be informed of this, and if there have been changes, the script will update accordingly and exit.

Now it's time to get WINE, which is the application we use to run Windows software in Linux. It's as easy as the following command

# slapt-get -i wine

followed by the Enter key.

You'll want to silence speech as this takes a bit, and will be quite verbose if you don't. When it finishes though, you'll have WINE installed.

For now, we can leave the superuser mode, by typing

# exit

followed by the Enter key.

Audiogame manager Dependencies

You'll now see you're back to your normal user as it has a dollar sign instead of the hash or number sign in the prompt again. We want to go to the audiogame-manager directory to check and if need be, write down any software audiogame-manager says we need to install. So from here type

$ cd git/audiogame-manager

followed by the Enter key.

Once again, we're going to have audiogame-manager check to see what we need to install.

$ ./audiogame-manager -c

followed by the Enter key.

There'll probably be a dialog box asking if you'd like to hear the latest news, go ahead and type the Enter key to listen to the news, which will play through the audio device you use to listen to music, play games etc. Once the news plays, audiogame-manager then checks to see what programs it needs and will tell you what's missing that you'll need to install. I've been running a test box while doing this article, and discovered that after WINE installed, audiogame-manager reported two packages that were not installed. They happened to be cabextract and dos2unix and they are rereally easy to install. As it happens, dos2unix is no longer required as of the revision of this documentation.

So, letsget back to the good ol' superuser mode. We can even do it from here in the audiogame-manager directory. Since you now have the instruction on how to do that, we won't rehash that, so once you're superuser again, lets install that package. We'll install cabextract, like this.

# slapt-get -i cabextract

followed by the Enter key.

Now we can exit superuser mode by typing

# exit

followed by the Enter key.

Now you're back in normal user mode, and we can run

./audiogame-manager.sh -c

followed by the Enter key.

The news you'll hear is quite old now, but you'll only hear it once, so since you probably heard it the first time, you'll not hear it again unless there are updates. while on the subject of updates, if audiogame-manager needs an update, when you run it it will tell you when it does, giving you a dialog box giving you the choice to let it update, highly recommended, or to not update. After running the check, you should see that all the programs it needs are installed and you're good to go. Now, there's just one more thing to do, and we can begin playing with audiogame-manager. type

$ cd

followed by the Enter key.

Now you're back in your home directory, I like to do this to keep from getting lost, and we're going to a place we normally don't have to go and work with another file, and a text editor will be needed and once again, we'll be the superuser. so, here we go. so become superuser again, and when you are, type

# cd /etc/rc.d

followed by the Enter key.

The file we need to edit, then make executible is called rc.local, just one of the many rc scripts in this directory. What it does, is runs various commands that you want to do before you log in. so, using your favourite text editor open this file. I use nano myself, but there are many. Look for the end of the file, and on a blank line type the following.

sysctl vm.mmap_min_addr=4096

then close the file, saving your work. Now, to make this file executable, just like before, we type

# chmod +x rc.local

followed by the Enter key.

Now when the computer boots up, every time, it'll execute that little command which will prevent WINE from griping more then it already sometimes does, and will make the installs and even games startup speed a bit better. We're done here, so we can just exit superuser mode by typing

# exit

folowed by the Enter key.

If you're not in your home directory just type

$ cd

followed by the Enter key, and you should be.

We have a lot of games to choose from, and various switches that make audiogame-manager do the things it does. Now that you've got it installed, the rest of the reading is really already at the following url and will tell you how to use the various aspects of the manager.

https://git.stormux.org/storm/audiogame-manager

Happy gaming! Remember to get to audiogame manager, simply type from anywhere in the terminal:

cd ~/git/audiogame-manager

Followed by the enter key.