How I got Debian 3.1 to do everything Windows can.
I'm a beginning programming student and computer science major and thought it would be worth it to try something besides Windows for a change. I felt that trying Linux and learning it about would benefit my education.
Naturally, like most Linux beginners, I had a few problems getting it to work right. Luckily, I found LinuxQuestions.org. It helped me substantially. Also, having connections to an IT worker didn't help either. So, for anyone who is bored, I've decided to write about how I got my Debian system up and running from the beginning to the end. Step #1: Installation. I've heard from numerous sources that installing Linux (and Debian in particular), was a difficult process. I've found this to be ridiculously false. In fact, I thought it was easier then Windows, and I even had a recently installed hard drive and partition resizing to deal with. Without much thinking I inserted my newly burnt Debian 3.1 netinst installation disk into the CDROM drive and rebooted my computer. After mashing the Enter key at various prompts, I found myself at the partitioner screen. It was there that I came across my first (and only) problem with the installer; it wouldn't resize the Windows partition. That was easily solved. A quick Google search revealed that it probably refused to resize my partition because my main hard drive wasn't defragmented. After running the Windows defragmenter utility, it was very obvious that it was exactly the problem. My hard drive was a complete mess, to put it lightly. My iTunes library may have been the culprit. Anyway, I'm pretty glad that it didn't actually resize the partition; if it did, I imagine I basically would've lost half my system. (: After defragmenting, getting the base system up and running with the installer was only a few more Enter key-mashing sessions away. Before I knew it, I was booting in to version 2.4.27 of the kernel, where a prompt was eagerly awaiting commands. Step #2: Installation of core utilities. Before I went about getting the GUI set up, I immediately made use apt/aptitude and installed fundamental programs I couldn't live without. (G)Vim, sudo, ncurses, make, wget, bzip2 and such. For now, I just used the stable repositories (probably outdated, to be honest). No problems; and more of an extension of Step 1 then anything. Step #3: Getting X to work. This is where the problems began. Thinking I was ready, I went ahead and asked apt to retrieve the X Window System for me. That went okay...until I actually tried to run it! It kept crashing everytime I tried to start it. I went ahead and shoved my error messages into Google. There, I found that it probably wasn't a good idea to run my particular version of X on version 2.4.x of the kernel. So, I then looked into upgrading it. Step #4: Getting version 2.6.16 of the kernel set up. Now, I wasn't ready to compile anything just yet. It was late at night I believe, and I would be hardpressed to do something that involved that much...time. So, I asked apt to get the image for me. Not such a smooth move. For one thing, my internet didn't work when I booted into version 2.6. X finally worked, but my system would be of little use without internet. I tried and tried and without success to get the image working. It was no use, and I moved to the last resort: compile the kernel from scratch. It seems like most Debian users like to use apt to install the kernel sources and headers. I prefer a different method. Of course, I had to boot into version 2.4.27 to access the internet. Here's how I got my sources compiled (here, I will be using version 2.6.16): Code:
$ wget http://www.kernel.org/<whatever_the_path_to_the_sources_was>/linux-2.6.16.tar.bz2 Code:
title Debian 3.1; kernel 2.6.16. And now, everything just worked, and I started hating myself for not having done this sooner. Now, I could see webpages through a graphical browser on Linux for the first time. Step #5: Install Microsoft's TrueType fonts. Out of the box, Linux comes with a, um, a less then vast collection of open source fonts. Adding the non-free repositories to my /etc/apt/sources.list and then Code:
$ sudo apt-get install msttcorefonts Step #6: Getting a 1280 x 1024 resolution. Being accustomed to 1280 x 1024 (I got a new LCD monitor last Christmas), working in a 1024 x 768 environment was...less then pleasant. I knew I wouldn't be able to stand that much longer. After editing my XF86Config-4 without success a few times, it became apparent that X alone will not get me the high resolution I want. So, I decided to stop by NVIDIA's website to get the drivers for my video card. Now, for whatever reason, NVIDIA likes to keep their their drivers closed-source (who writes closed-source software for Linux, anyways?) so problems are more common. Mine was that the kernel module wouldn't compile. Fortunately, NVIDIA released a patch (http://www.nvnews.net/vbulletin/showthread.php?t=62021) that solved the problem. The module compiled successfully. And now X finally...crashed beautifully!? That's because it was having trouble loading GLX. Read on to see how I got that working. For now, a quick "dd" over the Code:
Load "glx" Step #7: Upgrade Fluxbox. Apt's stable respositories gave me an archaic version of Fluxbox (0.1.14, I believe) that is barely still even supported. Upgrading seemed to be a good idea. Fluxbox.org had source I needed to compile the newer version, 0.9.15. Rebooting left me with a minor - but annoying nonetheless - problem, no antialiasing. There is no way I'd be able to live with that. The Fluxbox developers want to use X to antialias the fonts now, it seems, after looking at their change log. No problem, but wasn't Code:
Xft.antialias: true Step #8: Deuglify X. Fluxbox has beautiful styles for the edges of windows, titlebars and the toolbar. But because I haven't installed KDE/GNOME, X styled most of the interface itself, with...less then pleasant results. GTK+ was the answer. Installing it seemed to be best way to skin the GUI. The problem was, without GNOME/KDE, there was no system utilites menu to select the skin from. That's where gtk-theme-switch comes in. I used Code:
$ sudo apt-get install gtk-theme-switch Step #9: Getting sound to work. For all people trying to get sound to work, I offer this piece of advice: please, please compile the kernel with ALSA built in. I had nothing but problems trying to compile ALSA, and nothing but problems trying get it working after retrieving it with apt. It only worked after a kernel recompile. The recompile itself was simple; repeat every step after retriving the source code, and making sure to create a new initial ram disk (mkinitrd -o /boot/initrd.img-<version> <version>). In menuconfig, find your way over to the "Sound" section. Build ALSA in, and make sure to select support for your appropriate sound devices. Okay, the applications will play music now, but still no output! This is because the ALSA developers decided to mute sound by default. That may be a good idea for reasons I know not of, but not for my case. No problem, all we need to do is obtain alsa-utils, to help us interface with the built-in ALSA. As per usual, I used apt. After that, listing to music is as simple as Code:
$ sudo alsamixer Step #10: Printing. Just like with the installation process, I've heard bad things with printing under Linux. Fortunately, getting it working was nowhere near as big of a hassle as I thought. The first thing I needed to is get CUPS working. After compiling CUPS, a simple Code:
$ sudo cupsd All the computers in my residence are connected to a LAN network; with my printer directly connected. Therefore, getting it to work on a system involves installing the drivers for it and figuring out its location on the network. I installed the drivers for my Brother printer and CUPS, and now CUPS had my printer available for management. The only thing my driver did wrong is think that it was directly connected to my PC. That wasn't the case. I needed to find the IP address of my printer and point CUPS in that direction. I was able to find that IP address by moving through the menus on the display screen attached to my all-in-one printer-fax-scanner-copier-and-whatever-else. However, I wasn't done yet. I still needed to find the port. Nmap helped with that. By typing Code:
$ nmap <ip_address_of_printer> Code:
$ lp <file_name_of_file_to_be_printed> Step #11: Getting the NVIDIA driver to support OpenGL and opening the testing repositories. Getting GLX working wasn't as big of a hassle as I expected it to be. As always, it was a matter of searching for the answer. In this case, the problem of OpenGL support was solved by accessing the testing repositories and using apt to retrieve the latest version of nvidia-glx. I readded the "Load "glx"" line in XF86Config-4 after retrieval of nvidia-glx, and to my surprise, X started flawlessly. Step #12: Getting Xgl (not really...). Seeing that I had finally enabled OpenGL support for my video drivers, I decided to look for ways to harness the power of my video card and OpenGL to create interesting special effects. At first, Xgl (www.novell.com/linux/xglrelease/) looked very impressive. Both true transparancy, and the cube effect looked very interesting. But doing some research afterwards gave me other ideas. For one thing, it isn't very stable. It's also very hard on the graphics card, and its support in Fluxbox were other reasons why it didn't look good. As far as Xgl goes...I think I'll wait until its a bit more mature. Step #13: Setting up a development environment (Java only). Now that I was mostly up and running, I decided to give a shot at using Linux for what it was made for: programming. It immediately became apparent to me that developing on Linux would be much easier then Windows, even at my early stages. The power of the command line and the effiency of bash together with VIM are two major factors. The only problem was that gij isn't quite mature yet and gave me some minor problems. That was solved by installing Sun's version of Java. --- And that's it! It's working now; and I can do nearly everything with Linux that I could Windows. Now that I know more about how Linux works, its benefits are becoming clearer. Again, this website was major source of help! Without it...I probably wouldn't be very far at all, if anywhere. |
First of all -- Great tutorial!! This would have helped me out a WHOLE lot if it had existed when I started with Debian! Here are some additions/suggestions for the tutorial:
----------------------------------------------------------------- For another way of connecting a Linux system to a Windows printer share, here is an excerpt from a great tutorial (http://excess.org/docs/linux_windows_printing.html ) Code:
3.2. CUPS Configuration If you're doing java development (or even C++ development now) you might want to check out Eclipse. I've looked for a long time for a good IDE and trust me, this one is good. The installation is simple and it really "just works" http://www.eclipse.org/ ----------------------------------------------------------------- For modifying kernel module options (which from time to time you may have to do), just create/modify an appropriate file under /etc/modprobe.d/ to add your options. For example, to modify the ivtv driver parameters, you could create the file /etc/modprobe.d/ivtv and add the following lines: Code:
alias char-major-81 videodev |
Thank you, bc808, for the additions and the compliments. [:
|
Very nice job and deserves stickification!
|
All times are GMT -5. The time now is 03:34 AM. |