Skip to content

Instantly share code, notes, and snippets.

@qnord
Last active September 4, 2018 19:22
Show Gist options
  • Save qnord/530a33e99a61d7604a5869f24abd7e3f to your computer and use it in GitHub Desktop.
Save qnord/530a33e99a61d7604a5869f24abd7e3f to your computer and use it in GitHub Desktop.
Installing (compiling) KDE1 on Linux

Installing (compiling) KDE1 on Linux

This small guide will show you how to install KDE1 on most Linux distributions. However, there are some prerequisites prior to compiling. You will need:

  • libjpeg-turbo
  • libpng
  • libtiff
  • libx11
  • libXext
  • perl
  • git
  • gcc
  • g++
  • cmake
  • make (GNU make)

Installation

QT1

Make sure you have enough privileges to access the /opt directory (or use mkdir to create it if it's not there), and then clone the QT1 repository:

git clone https://github.com/KDE/qt1
cd qt1

Now, you will need to compile QT1. First, set the QTDIR environment variable to your current working directory, and then type in make to see all the options for compiling:

export QTDIR=$PWD
make

You will see options such as linux-g++-shared and linux-g++-static. Since we're compiling on a Linux system, you'll want to choose either of those. For this guide, it may be more straight-forward to go with the shared library variant.

make linux-g++-shared

Create a directory lib and compile:

mkdir lib
make

After that is done, move the entire directory into /opt as qt1 (very important). You will now have QT1 installed on your system and can begin setting up KDE1 libs.

kdelibs

Clone the kdelibs repository and cd into the cloned directory:

git clone https://github.com/KDE/kde1-kdelibs
cd kde1-kdelibs

You will need to go into cmake/FindQt1.cmake and change /opt/qt1/lib64 to /opt/qt1/lib. This can easily be done with sed:

sed -i 's/lib64/lib/' cmake/FindQt1.cmake

Next, create a directory where we will build the libraries and cd into it. We'll use build

mkdir build
cd build

Next, we will compile kdelibs and install it (make sure you have the correct privileges):

cmake .. -DCMAKE_INSTALL_PREFIX='/usr'
make
make install

You should now have the directory kde1 located in the /opt directory. Make a symbolic link to the English (en) directory as default (this will prevent some issues with not being able to view manuals). Alternatively you may find some other languages in the share/doc/HTML directory.

ln -s /opt/kde1/share/doc/HTML/en /opt/kde1/share/doc/HTML/default

KDE1

The final step is to install the actual, base system. Clone the KDE1 base repository and cd into it:

git clone https://github.com/KDE/kde1-kdebase
cd kde1-kdebase

You will need to apply a patch to prevent some issues (credits to z3ntu):

wget http://dreamsiege.net/files/kcmikbd-moc.patch -O - |patch -Np1

Like compiling kdelibs, we'll need to create a directory for building and cd into it:

mkdir build
cd build

To compile and install, simply do:

cmake .. -DCMAKE_INSTALL_PREFIX='/usr' -DCMAKE_LIBRARY_PATH='/opt/kde1/lib'
make
make install

Now you will have KDE1 installed on your system. To actually use it, however, you will need to put this in your ~/.xinitrc file:

export PATH=/opt/kde1/bin:$PATH
export LD_LIBRARY_PATH=/opt/qt1/lib:/opt/kde1/lib
exec startkde

This will properly set up the PATH variable so that you will be able to execute your KDE1 programs and set up the LD_LIBRARY_PATH so it knows where to find the libraries.

Now, exit out of X (or if you're already not in it) and type in a console:

startx

This will start KDE1 and you can begin using it. You may also find the kdetoys, kdeutils and kdegames repositories interesting.

Screenshot

KDE1 screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment