TeamSpeak 3 is a communication platform with support for voice and text chat, as well as other interesting features. Many online gaming communities use this as their means of comms. Installing the client for Linux requires you to run a script that extracts its program files into the current directory. Launching the program is only possible by running the launch script in the install folder. This can get pretty tedious, so one way to make this easier is to put it on your command line.
One solution is to create a symlink to the launch script and put it in a directory (already) on your PATH. I’ll you show how to install TS3 and get everything set up in this post.
Note that at any time, if you want to undo the installation or uninstall Teamspeak 3, you can simply delete any files that were extracted from the .run file.
First, download the latest client version for your system (Linux) and architecture (32 or 64 bit) here: http://www.teamspeak.com/?page=downloads. This will download a .run file containing all the program files. This file will hereby be referred to as the “.run file”.
The client can be installed to and ran from any location as long as you have permissions. However, I’m choosing to install it in /opt. This is a typical location to install third-party software that is not part of the default Linux installation; more information can be found here. Change directory to wherever you want to install, and optionally create a folder called ts3. In this example I’ll use /opt.
$ cd /opt (optional) $ sudo mkdir ts3 && cd ts3
If using /opt, we need to use sudo to create folders and files there.
When we run the .run file, a folder will be created in its directory containing the program files. If you created a ts3 folder, then your folder structure will look something like this after installation:
where XXX is the architecture.
We can then move the .run file to the folder where we want to create the TeamSpeak3-Client… folder, in this example /opt/ts3.
$ sudo mv /TeamSpeak3-Client-linux_XXX-YYYY.run /opt/ts3 (or) $ cd /opt/ts3 $ sudo mv /TeamSpeak3-Client-linux_XXX-YYYY.run ./
where XXX is the architecture and YYYY is the version.
Now we have to run the .run file. If you’re not already in the directory that the file is in, do so now. Then change mode on it to make it executable:
$ chmod +x TeamSpeak3-Client-linux_XXX-YYYY.run
And then finally run it:
$ sh TeamSpeak3-Client-linux_amd64-3.0.16.run
Follow the prompts that the file gives you. When reading the licence, you can press “q” to be returned to the terminal to install. Enter in “y” to begin installing or “n” to quit.
You can now verify that Teamspeak runs by changing directory to the program files and running the run script:
$ cd TeamSpeak3-Client-linux_XXX $ . ts3client_runscript.sh
This should open up TeamSpeak 3 in a new window. Congratulations, you’re almost done!
If you run scripts from a certain location and it’s on your PATH (eg. ~/bin), change directory to that now. If you don’t have such a folder, make one anyway (eg. ~/bin).
$ cd ~ $ mkdir bin $ cd bin
Now we’re going to create a symbolic link (symlink) to the Teamspeak 3 run script. Type in the following:
$ ln -s /opt/ts3/TeamSpeak3-Client-linux_XXX/ts3client_runscript.sh ~/bin/ts3
To add this directory to your PATH so you can simply type in “ts3” to launch Teamspeak, enter in the following:
$ export PATH=~/bin:$PATH
Test this by changing to your home directory and calling the symlink:
$ cd ~ $ ts3
If successful, TeamSpeak 3 should open up again.
To make these changes permanent, add this to your ~/.bashrc file somewhere:
# add ~/bin to PATH export PATH=~/bin:$PATH
and then source it:
$ source ~/.bashrc
That’s pretty much it. You can leave the .run file where it is in your installation folder or delete it as we’re not using it anymore. And now you’ve got TeamSpeak 3 on your command line!
Any questions, comments, or “that’s not how it works” are welcome in the comments or at email@example.com.