![]() |
Search |
| Home |
Desktop FreeBSD Part 3: Adding SoftwareBy Ed Hurst |Apr 12, 2007 at 16:10:53FreeBSD is very much a source-based system. The operating assumption of the architects of FreeBSD is that you will compile most things from the source code. The system is designed to work that way, and does it exceptionally well. The famous "Ports Collection" is rather unique in making a large number of packages available ready to build and seldom requires anything but a few commands in a terminal window. Having tried to build specialized applications on several different versions of Open Source operating systems, I can assure you that compiling on FreeBSD is about as easy as it gets. At this point, dialup users need to configure KPPP. From the KDE menu button, go to Internet, then KPPP. For the most part, the program options should be self-explanatory. If nothing else, click on the "Help" button. There really isn't room to cover the details of it here. Our problem is that dialup connections are a major bottle-neck for really big programs. If you have time, and your connection is fairly stable, you can download the source code for something like NEdit using the ports system, and it's quite likely to be fine. However, the source code for Firefox is massive, and could easily require you to get it in chunks over several days via FTP. That is, providing you use an FTP client that knows how to start where it left off last time -- Konqueror does just fine at this, but the ports building scripts are intelligent enough to start where you last left off if you stop the process before finishing. You can also download pre-made packages, but you would be forced to use whatever version was available when your version of FreeBSD was released. Something like Firefox is a moving target, and newer version often have really useful improvements, or security fixes. The newest version is available for FreeBSD, but it is always built with all sorts of newer supporting libraries, sometimes newer than you have on your system. It seems nobody builds Firefox with any sort of backward compatibility for the standard releases of FreeBSD. You'll have to update everything at the same time. For computers with a good fast connection, that's fine. They can be kept up to date with regular rebuilding. We dialup users will have a hard time playing that game. Commercial users of FreeBSD and serious hobbyists will keep up with the current version of everything, but ordinary desktop users should probably avoid that sort of thing until they have some experience. Until you're ready, there's the Linux compatibility. You may recall I advised everyone to install and enable Linux compatibility. That's because with programs like Firefox, there are far more Linux users out there, and the Linux versions are more backward compatible. And we can run them as they are. In the case of Firefox, it's slightly complicated, but the install script in the ports system will take care of everything. On some machines, the Linux version will run faster than it would if you ran Linux itself. A very large number of Linux applications work in FreeBSD, and many are already scripted in the ports. If your supplier for the FreeBSD install CD also offers the full collection of packages built for that release on more CDs, it can save you a great deal of time. You can get a good idea what's available by visiting the FreeBSD Ports Page. You can search the database for the version of FreeBSD you run, and there are links to download binary packages ready to install. Please note: the assumption here is you are running a standard release of FreeBSD, so be sure to select in the drop down list your version with the "RELEASE" tag, not "CURRENT." So you choose your package, click the link that says "Package" under the description, and download something. When finished, you need to open a Konsole window, and login temporarily as root:
You'll be asked to type in the password. Afterwards, you'll be at a
different style of prompt. You should be still in your own home
directory, where I'm assuming you saved the package just downloaded.
Type
Obviously, "something" is replaced by the package name. If
there are no problems, if you have all the other stuff needed for that
package, it will install and set it up, then return to the root prompt.
If there is something missing, you will get an error message with a
specific list of packages that you must have before installing this
one. Go back and get them, install them, try again to install the
original package, and you should be set. It's a good idea to move them
to another place when this is done, to avoid clutter in your home
directory. I recommend you store them in
Then move the package there:
If you can't afford the hard drive space, simply delete the packages that were successfully installed. However, assuming the worst case, we are going to download and install a small and simple package that is very useful. Having logged in as root in a Konsole window, type
You need to be in the directory with the application you are building. If you are one folder above, you'll be building everything in that category -- all the various editors, in this case. Dialup users, from the KDE menu, open the KPPP program and connect. When that's done, click in the Konsole window and type
You should see some messages flashed on the screen; try to read them
and understand what's happening. Usually, there will be a hunt for the
source files, then not finding them, an attempt to download them. There
will be a display of progress. Next, the package will be configured,
then it will be compiled and so forth. Finally, you will see some
message indicating the application was registered and the prompt will
come back. Now type Basic tip: You can always stop the process by typing
With some packages, you'll see the process downloading other stuff that it has to have before going on to the main event. The editor named "joe" runs in the console/CLI, which means it also works in a Konsole window in KDE. Konsole is one of several "terminal emulators" that allow you to operate as if you were without a GUI, but do it while running the X server. It compares favorably to a DOS prompt in Windows. However, there are other terminal emulators, and one is called "xterm." It's also on your system, because it's a part of the X.org packages. Got GUI? You've got xterm. There are others, and we will learn to customize in a later article. For now, let's look at our new editor, joe, in the Konsole window.
At the prompt, simply type However, I will tell you it is possible to make some adjustments to
First, we have to change the permissions on the file so you can
edit. Right-click, and you should see a list of options, including
"Properties" at the bottom. On the window which pops open,
click on the "Permissions" tab, then the drop down bar near
the top of that page next to "Owner." Select the option
"Can Read and & Write." Click the "Okay"
button. Then, open Kedit and use the "Open file" function to
open this If you are totally clueless, and you need to make it work today, you
can e-mail me for a copy of my .joerc. I have mine setup to write plain
text files a certain way. The right margin stops at 72 characters,
which is the Internet standard, and some of the keyboard commands are
different. I compose text in block format, with a blank line between
each paragraph. If the lines get too far out of place by changes, I
type The reason I have chosen joe for this exercise is that it's the
easiest to use for what it does. When you find yourself needing to edit
files from the console/CLI as root, Ed Hurst is Associate Editor of Open for Business. Ed operates a computer ministry in Oklahoma City. He loves computers, runs FreeBSD and GNU/Linux and reads all sorts of things. Article Path: Home: Computers and Technology: Linux and BSD on the Desktop: FreeBSD: Desktop FreeBSD Part 3: Adding Software Re: Desktop FreeBSD Part 3: Adding Software Ed, Wonderful series of articles. I’m a long time Linux user, and I’ve recently become interested in the BSD way of doing things, so I was glad to see these articles showing up. I would like you to consider one thing: PLEASE stop referring to Linux as GNU/Linux. Now, I’m not looking to start a holy war, but please let me explain my reasoning. Linux is the operating system - the kernel upon which all other services run. The GNU utilities/programs are a small subset of Linux compatible code - nothing more. It’s no more “GNU/Linux” than it is “Xorg/Linux”. In fact, by any standard of measure, “Xorg/Linux” would be more accurate. Think about it, measured by lines of code, percent of usage, or importance to the desktop, Xorg is a far more important component than the GNU utilities or programs (for which there exist viable alternatives in nearly every case). The one “holy and untouchable” exception to this arguement follows: “But Linux is built using the GNU Compiler collection, so it’s foundational to the operating system.” This is so blindly stupid that it makes me ill to have to reply to it, but here goes: The GNU compiler is a good TOOL, just like the Intel and Microsoft compilers. But let’s face it, it is a tool, nothing more. The Linux kernel doesn’t depend on it to “validate it’s existence” any more than it depends on Xorg. Further, as I understand it (please correct me if I’m wrong), BSD is still compiled with GNU’s beloved compiler also, and nobody runs around calling it “GNU/BSD.” In any case, something to think about I hope. Thank you again for your efforts. By the way, what do you think of PC-BSD? Posted by GregM - Apr 13, 2007 | 11:53:15 Re: Desktop FreeBSD Part 3: Adding Software I must admit that I did not read the entire article, for several reasons. 1) I have been using FreeBSD for over 5 years as a desktop and server environment. This -r option is VERY useful. It will fetch the package for you from the main FreeBSD repo's... and ALL the dependencies that you don't already have. Obviously you would need to connect to the internet in what ever way you would normally. If you have older dependencies (which you should not if all your software is installed via the packages) then use the -f option to force the new dependency to install, this might or might not crash the system it just depends on how much you want to risk it. Last tip when you install something from the ports, I would use "make install clean" instead of "make install" the clean bit tells the system to literally clean up after it's self and delete the files used for compiling the package. I fortunately have never had to deal with FreeBSD and dialup , but I am sure there is a way of auto-connecting when needed? Just my few tips I should really tidy up my JBSD installation article... and the scripts to go with it... Posted by Jayton - Apr 14, 2007 | 15:2:53 Re: Desktop FreeBSD Part 3: Adding Software Well, Greg, that reference to GNU is an editorial decision not made by me. Jayton, I wrote the original version while tied to dialup, and a very slow connection at that. When I tried using the -r switch, it didn’t work well. Manual downloads were safer. This series is predicated on near-worst-case situations: What’s the one safest way to get this done? Extra options would only confuse newbies. However, I’m very glad you added it just in case someone wants to try it. As for auto-connecting: Yes, there is a way, but it was unsuitable for my home user, two-computer situation. Again, I’m writing from the low-end. Posted by Ed Hurst - Apr 14, 2007 | 19:50:43 Re: Desktop FreeBSD Part 3: Adding Software Greg, sorry for that (and for my bad english), but you like it or not, Linux isn’t an operating system, it is only a kernel. The whole operating system is a combination of a kernel (Linux), and the user-land formed by GNU software. Regards. TooManySecrets<br> Posted by TooManySecrets - Apr 15, 2007 | 12:35:24 Firefox updating? Hi, I’ve been considering FreeBSD for my home Posted by MacroRodent - Apr 17, 2007 | 2:2:23 Re: Desktop FreeBSD Part 3: Adding Software As a dialup user I learned a lot of tricks to download the latest versions of software using binary patches on old versions. I suggest you to try misc/xdelta… KDE uses them so you don’t have to download the whole source, but anyone could just download the new version and the old version to a computer they own at work with a faster connection and compute a xdelta… Tricks to make the compressed tarball match the original involve trying an older version of bzip2 and/or the -9 option, or with gzip try the -9 & -n options using, of course, GNU gzip since 6.2-STABLE is using a newer BSD licensed program. Posted by Richard W. - Apr 17, 2007 | 20:1:14 Re: Desktop FreeBSD Part 3: Adding Software Have you ever tried Debian/kFreeBSD? I really curious on how this OS works out. Maybe I give it a try someday. Posted by Florian Stinglmayr - Apr 29, 2007 | 15:12:19 Re: Desktop FreeBSD Part 3: Adding Software In reply to - MacroRodent’s - question on Firefox upgrad on FreeBSD, I would say, use portupgrade, simply install portupgrade from FreeBSD ports, portupgrade -vNPrR firefox -v: verbose cheers, Posted by Ricky - May 3, 2007 | 12:4:51 Re: Desktop FreeBSD Part 3: Adding Software GNU/Linux is the right spelling because (as previously said by “TooManySecrets”) it’s (almost) always a combination of GNU userland and linux kernel. If you build BSD userland ontop of Linux kernel (which could be possible, but never done since you already a real BSD kernel) then you may be should call it BSD/Linux. Then there is the Debian/kFreeBSD, which using the same justification is a GNU/BSD variant. There is also of course pure GNU when using the HURD processor. As you can see more and more UNIX-like OSes are hybrids between some kernel and some userland because you can’t do UNIX without neither of them, most popular hybrid being Mac OS X, followed by Linux. However since in most cases the assembly parts of hybrid UNIX-like OSes are not being build by the same team the pure ones tend to be more stable (at least according to netcraft http://uptime.netcraft.com/up/today/top.avg.html ), most notable examples being the BSDs and Solaris (followed by other UNIX vendors, and pure GNU (with HURD) being virtually nonexistent) Posted by Anton - May 8, 2007 | 15:36:26 Re: Desktop FreeBSD Part 3: Adding Software Ed, thanks for the article; some bits that seem important to me: pkg_add -r is very useful indeed, and pkg_add also has -K argument which instructs the pkg_add to leave the downloaded package file rather than delete it after installing; it is also possible to manually check the url of the ftp package repository and specify the url with the pkg_add command (the location of 5.4 packages changed after the 5.5 release, pkg_add -r could not find them by default). the -K argument is mentioned in the pkg_add’s man in release 6, not in release 5; a FreeBSD package collection on DVD is also useful (the respective release). Posted by Gleb - May 8, 2007 | 18:7:9 Re: Desktop FreeBSD Part 3: Adding Software Ricky suffests “portupgrade -vNPrR firefox” to my concerns Posted by MacroRodent - May 9, 2007 | 5:0:55 Re: Desktop FreeBSD Part 3: Adding Software “Firefox updating? Hi, I’ve been considering FreeBSD for my home There are several answers or opinions that may answer your question. If you don’t like compiling from source you can always use an alternate package site. For reference; please check out: http://bsdpants.blogspot.com/ Now with respect to compiling software. The ports system is going under a few changes. One change that will speed up the compile time is the use of the -j flag. Ports will be able to be built a lot quicker. Here are two projects that may be of interest: Parallelization in the Ports Collection Revise ports / package system database backend and implement unified interface Other SOC projects can be found here; So in essence; the compile time is being addressed or you can use a different repository for your software requirments. Regards, Posted by FreeBSD_User - May 11, 2007 | 16:19:43 Re: Desktop FreeBSD Part 3: Adding Software FreeBSD, as of today, except Mac, has been mostly targeting more of those server-oriented users … if you alias: portupgrade -NvrR as of “pu” then just pu firefox will get you an equivalence of: apt-get install firefox I think it’s just as cool or better than Debian/Ubuntu/Xandros and at least than RedHat… hehe Posted by Ricky - May 14, 2007 | 1:34:11 Re: Desktop FreeBSD Part 3: Adding Software ola! Freebsd is powerfull to serve !! Posted by Alfredo - May 28, 2007 | 18:12:35 Re: Desktop FreeBSD Part 3: Adding Software It is fun reading all this silly and mostly irrelevant nonsense about how to name something that is merely a tool that enables you to use your computer. Who cares and what does it all matter? What do we matter for that matter? Posted by Boepie - May 31, 2007 | 4:20:17 Trackback: FreeBSD für den Desktop: Eine Anleitung Das FreeBSD auf dem Desktop nutzbar ist wird immer noch gerne Trackback from grUNIX - Aug 16, 2007 | 2:6:59 Please enter your comment entry below. Press 'Preview' to see how it will look. |
UPDATED: BSD on the DesktopBy Ed HurstIn an extensive multi-part report, OFB's Ed Hurst presents how the power of the FreeBSD operating system can be harnessed for the desktop. Using understandable instructions and relevant tips, Ed provides the tools for mere mortals to enjoy BSD's fabled stability. |
![]() |
Write for OFBOpen for Business accepts commentaries and other works on technology, current events, politics, philosophy, business and other relevant matters for publication. Commentaries should be 600-800 words in length, other works vary but should generally be kept to less than 1500 words. If you think you would like to contribute, contact OFB's editor, Timothy R. Butler. |
| Home |
| © 2001-2008 Universal Networks, All Rights Reserved. Some content rights may be held by Universal Networks' providers and used under license. |