Have a question? ask www.kenlet.com
Home  |  FAQ  |  About  |  Contact  |  View Source   
 
SEARCH:
 
BROWSE:
    My Hood
Edit My Info
View Events
Read Tutorials
Training Modules
View Presentations
Download Tools
Scan News
Get Jobs
Message Forums
School Forums
Member Directory
   
CONTRIBUTE:
    Sign me up!
Post an Event
Submit Tutorials
Upload Tools
Link News
Post Jobs
   
   
Home >  Tutorials >  General Coding >  How to Install CYgwin and the KDE desktop on top of it
Add to MyHood
How to Install CYgwin and the KDE desktop on top of it   [ printer friendly ]
Stats
  Rating: 4.5 out of 5 by 6 users
  Submitted: 11/12/02
George Schwenzfeger ()

 
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.

Return to Browsing Tutorials

Email this Tutorial to a Friend

Rate this Content:  
low quality  1 2 3 4 5  high quality

Reader's Comments Post a Comment
 
george...thanks for the tutorial...i will have to do what you've done, and see if i can get it to work also. good job on getting it to work though.
-- J J, November 13, 2002
 
Whoa, man great posting. I look forward to checking it out. I am printing it as I write. I will get back and let you know how it works out for me. Thanks again for the work, tell me.. how does it work for you, and what platform you got it running on.

-- Freud Alexandre, November 14, 2002
 
Awesome tutorial, and great idea. Cygwin's the only reason I haven't completely switched to *nix yet...
-- David Harris, November 14, 2002
 
I'm trying this out as I'm writing this :-)
-- Ammon Beckstrom, November 14, 2002
 
Nice, but it would be nicer with some pictures to go along with it. Thanks though, this _is_ cool.
-- Aaron Brethorst, November 14, 2002
 
Here are some pics of the finished product, I had this link posted in a thread that I started located here. Hope that is what you were looking for.
-- George Schwenzfeger, November 15, 2002
 
Great tutorial! Much better than the online docs on how to do this :)

Just as a note, cygwin STILL doesn't run on Windows .NET Server (as of RC1) due to changes in the login methods used by .NET server. So, don't go running off to download this if you are fiddling with the beta OS like me...
-- A J, November 15, 2002
 
Neat. Now you just need to teach people how to install emacs.. =)
-- Larry Mak, November 15, 2002
 
Got an e-mail today from the project leader of putting KDE on Cygwin, Ralf Habacker, and in it he corrected one of the commands that I had wrote wrong:

The line
$ echo “exec X –screen 0 1024x768x16 –engine 4 –ac \ -nowinkill -noreset emulate3buttons 100” >~/.xserverrc

must be

$ echo “exec X –screen 0 1024x768x16 –engine 4 –ac
\ -nowinkill -noreset -emulate3buttons 100” >~/.xserverrc

(not -emulate... instead of emulate...)


And he also sent me a few tidbits on rebinding and where it's at currently:

Additional I have a note to the rebinding stuff.
Rebinding enables faster dll and application loading. We have removed the rebinding stuff currently, because rebinding requires, that every dll has a different base address (the runtime loader loads each dll of an application to another base address), which isn't completly possible at this time. If two dll's are at the same base address and are rebinded, this results into segment violation and application crashes.

On cygwin.com there is a work in process to fix this problems, but until this is ready, rebinding should not be used.

-- George Schwenzfeger, February 07, 2003
 
Great. I haven't found a single link explaining what the heck -ac and -engine do. Everyone just seems to take it for granted, and add in that damned slash, too. And the -engine -ac ? What are those? The -emulate3mousebuttons ... hey, come on, how many of us have 2 mouse buttons these days ?
I've got it set up exec X -fullscreen -screen 0 1024x768x32 -refresh 100 -lesspointer ...

and I'm just wanting to know what the parameters -ac and -engine do, and why is no one explaining the other parameters so that people who don't have a clue (like me :-p) don't blindly take these params by faith, and don't have a headache searching for what all the params do .
Sorry, don't mean to attack.
I'm just frustrated :-p.
ttyl.
-- J S, March 31, 2003
 
http://xfree86.cygwin.com/docs/ug/configure-cygwin-xfree-options.html

That explains most of the options, including the -engine 4 thing.
I'll have to ask the KDE2/Cygwin guys if -engine 4 helps or anything, since the default is to find DirectDraw and match the requested screen resolution and refresh rate as closely as possible.

http://www.mcsr.olemiss.edu/cgi-bin/man-cgi?Xserver+1

-ac disables host-based access control mechanisms.
Enables access by any host, and permits any host to
modify the access control list. Use with extreme
caution. This option exists primarily for running
test suites remotely.

Once again, the question that begs to be asked is, "Do we need THIS as a parameter to run KDE2 on Cygwin correctly ? "

Well we'll just have to ask Paul, Ralf, or Christopher - I'm assuming it's one of them only from their job descriptions on Source Forge .
Thanks anyway =p
-- J S, March 31, 2003
 
ps - still... why IS there a slash in the example ? Even if it's a two liner,
it only makes things HARDER to read when you're mixing and matching coding styles/standards, or maybe I'm just the only dull blade in the tooshed ?
Oh well.
-- J S, March 31, 2003
 
hi,

i keep on getting the error.
"unable to get setup.ini from http://kde-cygwin.sourceforge.net/install "

can someone please help?

thanks

sumod
-- sumod pawgi, December 09, 2003
 
Copyright © 2001 DevHood® All Rights Reserved