|
This is a tutorial on installing Cygwin, a UNIX environment which runs on the Windows platform, and the KDE desktop for Cygwin. For this tutorial I used the latest Cygwin setup.exe, version 2.249.2.5, and the latest Cygwin DLL release, version 1.3.13-2. The KDE desktop environment Cygwin port used is version 2.2.2 beta 1. My host Windows OS is Windows XP. Also, this tutorial is designed in such a way that it assumes that the user has no previous experience with Cygwin or the UNIX environment. If you think that you do not need this tutorial or do not wish to learn more on the topic, please do not continue reading.
I wrote this tutorial because after attempting this myself and succeeding, there was a large interest in this topic and how to accomplish it. Also note that this tutorial is written with the intent so that the majority of users can successfully get Cygwin running with a GUI on top of it. Before I begin, there are a couple of things that I would like to mention so that someone doesn’t go through this whole process, and succeed in getting it to run only to be disappointed by one thing or another:
Things you should expect to see once Cygwin is up and running:
- Error messeges about something or other failing to work during start up or shut down.
- Cygwin is an emulation of the Linux/UNIX environment therefore there is a HUGE overhead when running a GUI on it (a.k.a. it runs slow even on a P4).
- It crashes… a lot.
Installing Cygwin:
Installing Cygwin itself is pretty easy compared to most things UNIX related. The only thing is make sure that you have enough space on your hard drive for everything (I’m not sure on the exact size, but just to be on the safe side, figure on 3GB) Just go to www.cygwin.com and download the setup.exe by clicking one of their many “Install Cygwin now” link boxes.
When download the setup file, you’ll notice that it’s a really small file. That is because the setup program downloads the files that it installs from one of many mirrors. When you run the program you are brought to a setup screen, click next. You’re given three choices, although the top choice is just essentially the bottom two combined. What I mean by this is that if you pick the top choice “Install from Internet” it will download all of the necessary files to install and then install them automatically. And since it does not delete the install files, there is no advantage to downloading the files first and then installing them from a local directory. Due to this fact, I will be assuming that the top choice “Install from Internet” is the choice that you made.
When you click next, you are taken to a screen to select a root install directory. C:\cygwin is the default choice. Since I have only very basic knowledge of Linux/UNIX commands and since I am writing this so that even the novice user can attempt this, I installed to the default directory to avoid further complications down the road. You also have the option to install for “All Users” or “Just Me”, that’s a personal preference that I’ll leave up to you. For the “Default Text File Type” I left it as UNIX.
Next you are given the choice of where to store the downloaded packages on your computer. Again this is a personal preference that has no impact on the install. The next step is selecting your internet connection. For the majority of us that will be a “direct connection”. If you use one of the two other options I am going to assume that you know what you are doing there, because truthfully, I don’t.
When you hit Next the installer downloads the list of mirrors with the packages for Cygwin. When the list comes up, choose the mirror closest to you for the fastest download time (these files are quite large). On a side note, if you are in the us, the “.edu” sites tend to be much quicker than most others due to the fact that college servers tend to have a lot of bandwidth. Once you select a mirror and click on Next to continue a file is downloaded and then the packages are listed. If you don’t know what you need (like me) then just go to the “All” folder and click once on Default to change it to Install. This will ensure that you have installed all the necessary files by simply installing everything. If you are more sure of yourself, be my guest to pick and choose what packages you want.
This time when you click Next the program will begin downloading the files and then once that’s done, it will start unpacking and installing them (finally, right? =). Once its all done (this will probably take a few hours or more so be prepared), it will prompt you for whether you want an icons installed on the desktop and/or start menu.
Installing the KDE desktop on Cygwin:
Start up the cygwin installer again and follow all the same steps as was done in the cygwin installation up until the point where you have to pick a mirror site to download from. Once you reach that point you should see a box labeled “User URL:”. In that box copy this url:
http://kde-cygwin.sourceforge.net/install
Then press the “Add” button. Then find that url in the mirror list and select it (make sure that it is the only url that is selected)and hit the Next button.
On the next screen, all of the KDE packages are listed in the same fashion as the Cygwin packages were. Again, if you know what you’re doing just pick and choose, as for the rest of us just go to the “All” folder and choose the install option. Once you selected what you needed, hit the Next button and the installer will begin downloading all of the selected packages. Now, if it gets to 99% and then complains about some error (this happened to me several times and then I found out that it happens to just about everybody) just hit ok and it will continue on with installing what it just downloaded.
Now the next step involves some command line actions. The command line code will be in bold just to make it more easily identifiable. The next thing that you have to do is setup the environment variables this is accomplished by opening the cygwin bash shell (looks a lot like the C: prompt shell in windows) and typing in the following once your user name comes up (that means that it is ready to accept commands)
$ ln -s /opt/kde2/bin/kde_setenv /etc/profile.d/kde2.sh
The next thing that we have to do after this to be able to start KDE is setup the X Window system to start with KDE. This is accomplished by the following commands:
$ echo “exec X –screen 0 1024x768x16 –engine 4 –ac \ -nowinkill -noreset emulate3buttons 100” >~/.xserverrc
$ echo “/opt/kde2/bin/startkde” >~/.xinitrc
Once that’s done you can then start KDE with the following command:
$ startx &
That’s it, you should be up and running. If it takes a while to load don’t worry, as long as you see the KDE splash screen loading stuff. Like I said at the beginning of this tutorial, if it blows up or is really slow, expect it, its still in beta. I followed these steps to the letter several times before I got it to work.
Also on a side note, when I initially did the installation the directions from the KDE on Cygwin website had some information about steps to take to “rebind the packages to make KDE run faster. Since going back there to review the steps for the tutorial, I can no longer find these steps. I do not have the proper commands written anywhere, so I could not even share them with if you wanted to try it out. I have a feeling that they took those commands down because the either are no longer needed since they finally wrote a script that is built-in to do it for you (not likely…) or they made everyone’s install of KDE crash.
I had to re-install KDE several times before I figured out that rebinding the packages was messing me up. So, if you do find the commands to rebind the packages (There should be two commands that do this), I recommend rebinding the first set of packages trying out KE to make sure it works and then the second and try it out again and see if it still works.
If you have any problems with this, perform searches on Google of the errors that you’re getting. Nine times out of ten someone else has already experienced your exact problem. Also, try http://sourceforge.net/ they tend to have a lot answers to questions available.
|
|