OpenBSD Journal

When In Doubt, Use It From Base

Contributed by phessler on from the learn-to-use-your-system dept.

When I first learned how to use Unix-like systems, I started off with a full-featured Linux distro, using all of the super-fancy toys and programs. Initially, when I started using OpenBSD I kept using those. After a while, I wanted to avoid installing all of these extra programs when setting up a new machine. In this article, I'll be discussing some commonly used programs, and their built-in replacements.

A few years ago, I started to realize that my desktop environment was very cluttered. I had so many different applications that I used, it was a pain to install all of them. I slowly started my way down a path to use the built-in features of OpenBSD as much as possible.

First bit was easy. aterm is a perfectly cromulent terminal program, but I had only really used it for the transparency feature. I was getting fed up with it, so I switched to xterm. Fiddled around a bit with the settings, and are now quite happy with the results.

I have this in my ~/.Xdefaults file:
XTerm*loginShell: true
## faceName is supposed to be blank 
XTerm*faceName:
XTerm*faceSize:10
XTerm*foreground: white
XTerm*background: black

Next was my editor. Emacs. I immediately tried out 'mg', and realized it supported the main features I used (typing, with the occasional backspace, save and quit). Yes, I know there are many additional features to emacs, but I simply didn't use them. For that other editor, if you don't use those extra features, you can also change from 'vim' -> 'vi'.

I have this in my ~/.mg file:
global-set-key } blink-matching-paren-hack
blink-matching-paren
set-default-mode blink
auto-indent-mode
dired-backup-unflag
make-backup-files

Next, my window manager. I ended up doing the "backwards" migration of window managers. GNOME/KDE -> xfce -> blackbox -> fvwm. I wanted my WM to stay out of the way, but still support features. I'm continuously playing with the features and settings, but I'm very happy with what I have. While I haven't used it much, 'cwm' seems to be very popular with a number of developers. Reminds me a bit of Ion, dwm, and other keyboard-control WMs.

With the majors out of the way, I did a `pkg_info` to see what ports I had installed, and looked around to see if I could replace any of them. I saw Xscreensaver, which can be easily replaced by xidle and xlock. xidle simply runs a program after an idle timeout. xlock locks the terminal, and displays pretty pictures. Since I'm usually not at my computer when the screensaver is active, I don't really care what is on it. xlock does have a nice selection of modes, some of which are similar to what Xscreensaver has. Very simple, yet useful.

I have this in my ~/.Xdefaults file:
XIdle.timeout: 300
XLock.mode: random
XLock.mousemotion: on
XLock.nice: 19
XLock.program: /usr/games/fortune -a
XLock.random.modelist: maze bat biof pyro drift eyes lisa marquee matrix \
        molecule nose pacman petri space swarm tetris worm xcl

cdrecord used to be the standard way to write CDs, but OpenBSD added the ability to burn an ISO onto a cd with cdio in 4.0. Instead of having to install mkisofs, we have mkhybrid. The command line is compatible, and is the way the Official OpenBSD cds are created.

This is the new command I run to burn an ISO onto a blank cd:
mkhybrid -V "important backups" -l -J -L -r -T -o backup.iso ~/mp3

cdio tao backup.iso
Leave a comment on which third-party packages you've replaced with something from base.

(Comments are closed)


Comments
  1. By Lawrence Teo (lteo) lteo.openbsd1 ! calyptix.com on http://www.calyptix.com/

    Not exactly a replacement.. but..

    For "general" coding, I use vim. But for the times when I want to be absolutely sure that the editor is not trying to be cute and add/remove characters or indent stuff without me knowing, I use OpenBSD's vi (e.g. when working with patches or when editing OpenBSD's source code :))

    One thing I really like about OpenBSD as a development environment is that when you run vi, you get pure vi. On other systems, running vi gets you vim, which can be a bit annoying for the above reason.

    Comments
    1. By Anonymous Coward (71.232.224.231) on

      > Not exactly a replacement.. but..
      >
      > For "general" coding, I use vim. But for the times when I want to be absolutely sure that the editor is not trying to be cute and add/remove characters or indent stuff without me knowing, I use OpenBSD's vi (e.g. when working with patches or when editing OpenBSD's source code :))
      >
      > One thing I really like about OpenBSD as a development environment is that when you run vi, you get pure vi. On other systems, running vi gets you vim, which can be a bit annoying for the above reason.

      Could you give an example where vim inserts or deletes characters when you don't want it to? And btw, try ":set compatible" in vim.

    2. By Anonymous Coward (80.4.12.138) on

      Try vim -C or make sure you don't have .vimrc file... (check the vim man page).

  2. By Lawrence Teo (lteo) lteo.openbsd1 ! calyptix.com on http://www.calyptix.com/

    Another one...

    I never thought I could do it, but I have moved completely to using ksh as my shell for about two years now. I thought I could've never migrated away from bash, but have come to love ksh's simplicity. It's nice not to have to install a large package like bash every time I build a new OpenBSD box, which is very often. :)

    Comments
    1. By CODOR (CODOR) on

      > I never thought I could do it, but I have moved completely to using ksh as my shell for about two years now.

      I like OpenBSD's ksh so much that I ported it to my Linux boxes, too. All the features I need in a shell and only a quarter of bash's memory usage...

      Comments
      1. By tmclaugh (24.91.51.169) on

        > > I never thought I could do it, but I have moved completely to using ksh as my shell for about two years now.
        >
        > I like OpenBSD's ksh so much that I ported it to my Linux boxes, too. All the features I need in a shell and only a quarter of bash's memory usage...

        Do you have it available anywhere? I have an autoconfed version here:

        http://people.freebsd.org/~tmclaugh/files/openksh/openksh-4.2p1-beta2.tar.gz

        It has a bug on Linux that dates back to the last release of pdksh and a failed test on Darwin I need to look at.

        tom

        Comments
        1. By CODOR (CODOR) on

          > Do you have it available anywhere?

          No, it was a quick port based upon the version released with OpenBSD 3.8 or 3.9, and included the required compat files (I see your version does, too) and some build stuff brought back from pdksh that wasn't needed in OpenBSD.

          What was the linux bug? I don't think I've run into it yet...

          Comments
          1. By Anonymous Coward (206.57.89.141) on

            > > Do you have it available anywhere?
            >
            > No, it was a quick port based upon the version released with OpenBSD 3.8 or 3.9, and included the required compat files (I see your version does, too) and some build stuff brought back from pdksh that wasn't needed in OpenBSD.
            >
            > What was the linux bug? I don't think I've run into it yet...

            why not just use mksh on your linux boxen? It's in apt on debian. http://www.mirbsd.org/mksh.htm

    2. By Anonymous Coward (68.29.8.48) on

      > Another one...
      >
      > I never thought I could do it, but I have moved completely to using ksh as my shell for about two years now. I thought I could've never migrated away from bash, but have come to love ksh's simplicity. It's nice not to have to install a large package like bash every time I build a new OpenBSD box, which is very often. :)

      ya. its nice to have a shell that doesn't segfault

  3. By Anonymous Coward (97.118.98.1) on

    Thanks for the write-up Peter. With all the different operating systems/distributions, and each having slightly different ways of doing things, itís always nice to know/be reminded about all the things that can readily be done out-of-the-box with OpenBSD.

  4. By kj (142.179.156.134) on

    One bash feature I missed was the notion of pushd, popd.

    dugsong wrote these up one year, and they've been living in my .profile since:

    
    # bash/zsh compatibility
    set -o markdirs
    bind '^I'=complete-list
    bind '^V'=quote
    
    pushd () {
            SAVE=`pwd`
            if [ "$1" = "" ] 
            then    if [ "$DSTACK" = "" ]
                    then    echo "pushd: directory stack empty."
                            return 1
                    fi
                    set $DSTACK
                    cd $1 || return
                    shift 1
                    DSTACK="$*"
            else    cd $1 > /dev/null || return
            fi
            DSTACK="$SAVE $DSTACK"
            dirs
    }
    
    alias pd=pushd 
    
    popd () {
            if [ "$DSTACK" = "" ] 
            then    echo "popd: directory stack empty."
                    return 1
            fi
            set $DSTACK
            cd $1
            shift
            DSTACK=$*
            dirs
    }
    
    alias pp=popd
    
    dirs () {
            echo "`pwd` $DSTACK"
            return 0
    }
    

    Comments
    1. By MKULTRA (91.121.26.150) on

      Someone actually downmodded you for posting this. Incredible!

      Comments
      1. By Anonymous Coward (68.29.8.48) on

        > Someone actually downmodded you for posting this. Incredible!
        >
        >

        probably because he mentioned the incredibly obnoxious dugsong

        Comments
        1. By Anonymous Coward (124.81.154.177) on

          > > Someone actually downmodded you for posting this. Incredible!
          > >
          > >
          >
          > probably because he mentioned the incredibly obnoxious dugsong

          Where is dugsong nowadays?

          Comments
          1. By Anonymous Coward (68.29.8.48) on

            > > > Someone actually downmodded you for posting this. Incredible!
            > > >
            > > >
            > >
            > > probably because he mentioned the incredibly obnoxious dugsong
            >
            > Where is dugsong nowadays?

            ann arbor, MI selling snake oil security products and hiding from hackers who keep harassing him

          2. By Anonymous Coward (203.169.184.37) on

            > Where is dugsong nowadays?

            According to his LinkedIn profile he's currently working with Zattoo which has nothing to do with any BSDs. I think he has moved on/ moved away from OpenBSD although his site monkey.org is still up and running.

      2. By kj (142.244.160.32) on

        > Someone actually downmodded you for posting this. Incredible!

        That'll teach me to add value to a conversation.

    2. By Anonymous Coward (2001:6f8:94d:4:2c0:9fff:fe1a:6a01) on http://mirbsd.de/mksh

      > DSTACK="$*"

      Mmh. mksh's "dot.mkshrc" sample configuration file
      has a much nicer, more ksh-ish, version of pushd,
      popd and dirs, using arrays, and with semantics as
      in OpenBSD's csh, even the error message strings
      are the same to stay compatible.

      Comments
      1. By kj (142.244.160.32) on


        > Mmh. mksh's "dot.mkshrc" sample configuration file
        > has a much nicer, more ksh-ish, version of pushd,
        > popd and dirs, using arrays, and with semantics as
        > in OpenBSD's csh, even the error message strings
        > are the same to stay compatible.

        Well, don't bother posting details. I'm sure nobody is interested in them.

    3. By Anonymous Coward (64.65.195.19) on

      >
      > One bash feature I missed was the notion of pushd, popd.
      >

      Me too, until I found

      $ cd -
      $

      Comments
      1. By Anonymous Coward (132.170.50.54) on

        > >
        > > One bash feature I missed was the notion of pushd, popd.
        > >
        >
        > Me too, until I found
        >
        > $ cd -
        > $

        which is really the same thing as doing
        myPrompt$ cd $OLDPWD

  5. By Anonymous Coward (66.171.103.5) on

    OpenBSD has greatly simplified my life, after I took the path you describe. I don't find myself constantly looking for new "cool" stuff to install and tweak. I also like the fact that the base system is mostly static, unlike packages on Linux distros which can vary greatly from release to release, and then you end up having to tweak your configs to make the program work the way you had it before (or worse yet, they deprecated the package and now you have to go find it and compile it yourself).
    That said, I always install some packages like Vim, Screen, and Ratpoison even though there is similar stuff in base. I use way too many Vim plugins (plus syntax highlighting, vimdiff, etc.) to consider /usr/bin/vi for anything but the most simple tasks (it's great for editing config files on servers though). The "window" program in base is okay, but I basically live in a Screen environment, and would miss a lot of functionality. And I did try to make twm work like Ratpoison (do everything with the keyboard and auto-maximize every window) but never got that to work right. Maybe fvwm can do it, but I'm not sure. I see that they added some new WMs in base lately, so perhaps I'll have to try those and see...

    Comments
    1. By Sean Cody (24.77.212.94) sean@tinfoilhat.ca on

      > The "window" program in base is okay,

      I didn't even know that program existed!
      Neat, a bit spartan with respect to screen but could be helpful in a pinch.

    2. By Brynet (Brynet) on

      I recently submitted a port, misc/tmux, it was accepted and the original author even volunteered to be the port maintainer.

      It's like GNU screen, but without the bloat.. and BSD licenced. :-)

  6. By Patrick (24.22.135.100) on http://haller.ws/logs

    Reducing to base works, but leaves a little to be desired. Minimalism has great benefits, however I've not been able to part with the following:

    Xterm + screen = tabbed terminal
    homedir + svn = flip the developer bit in your head for your dotfiles
    make = place for all the commands you will forget AND a build system

    So, install subversion and make on a vanilla install, checkout your homedir's ~/etc, then let make handle the rest of the work.... ;)

    Comments
    1. By Anonymous Coward (77.9.168.188) on

      > Reducing to base works, but leaves a little to be desired. Minimalism has great benefits, however I've not been able to part with the following:
      >
      > Xterm + screen = tabbed terminal

      Tabs come from my wm (fluxbox) and i love it this way :D

      > homedir + svn = flip the developer bit in your head for your dotfiles
      > make = place for all the commands you will forget AND a build system
      >
      > So, install subversion and make on a vanilla install, checkout your homedir's ~/etc, then let make handle the rest of the work.... ;)
      >

    2. By Anonymous Coward (68.29.8.48) on

      > Reducing to base works, but leaves a little to be desired. Minimalism has great benefits, however I've not been able to part with the following:
      >
      > Xterm + screen = tabbed terminal

      use dtach. screen is for pussies.

      really, are you so busy you need to dynamically create and destroy multiple sessions a day?

      You'd be amazed how much focus and work you can get done if you just sit your ass down on a real 9600 baud serial terminal someday. You'll soon see the ridiculousness of using gnu/screen so heavily.

  7. By Anonymous Coward (190.166.96.5) on

    :) sure with a poor package management like *bsd has its a pain to manage packages. In debian i dont care about package management. apt-get doing its job itself. So i just use software i like.

    Comments
    1. By Lennie (82.75.29.106) leen@consolejunkie.net on

      > :) sure with a poor package management like *bsd has its a pain to manage packages. In debian i dont care about package management. apt-get doing its job itself. So i just use software i like.

      I totally agree.

      If they ever complete an Debian/OpenBSD I would use it instead of plain OpenBSD I think.

      We use Debian on servers, Debian on the desktop, OpenBSD on the firewalls and routers.

      OpenBSD has a very good base install, the base upgrade also works fairly good, but ports/packages isn't for me.

    2. By phessler (phessler) on first undead, then not, then undead again.

      > :) sure with a poor package management like *bsd has its a pain to manage packages. In debian i dont care about package management. apt-get doing its job itself. So i just use software i like.

      its not a pain in using packages, its a desire to not require them.

      and apt-get has tons of hilarious bugs. please, find me the package that installs all of ruby. and no fair fixing their package.

    3. By Anonymous Coward (87.212.177.223) on

      > :) sure with a poor package management like *bsd has its a pain to manage packages. In debian i dont care about package management. apt-get doing its job itself. So i just use software i like.

      Drugz are bad dude!

    4. By Paul 'WEiRD' de Weerd (weerd) on http://www.weirdnet.nl/

      > :) sure with a poor package management like *bsd has its a pain to manage packages. In debian i dont care about package management. apt-get doing its job itself. So i just use software i like.

      That's funny - I tend to use software I like too. That's the reason I use OpenBSD. I like its security track record, its focus on correctness, the no-nonsense attitude of the developers, the repeated security audits of whatever is in base, etc. Why use something 3rd party when there is a perfectly fine, audited alternative in base ?

      Sure, there's lots of very useful ports, I do not wish to downplay the tremendous effort by the porting team. I use quite a few ports myself. The OpenBSD package management is in many ways (and the number of ways is growing) superior to all others. No, it's not 100% perfect yet, but there is steady progress and it just keeps improving, just like the rest of the system.

      It's not the pain of using packages (IMO there is no pain), it's just that there's no reason for me to use package X when base supplies the same functionality.

    5. By Anonymous Coward (89.102.94.11) on

      > :) sure with a poor package management like *bsd has its a pain to manage packages. In debian i dont care about package management. apt-get doing its job itself. So i just use software i like.

      I have OpenBSD just as a second OS (:-/),but I totally disagree with you.I'm in touch with Mandriva and Ubuntu desktops (and some Debians) so I can say :

      There is NOT alternative for pkg system from OpenBSD in Linux world.

      Package system of OpenBSD is very easy even for noobs (you need just a little english).Every install,uninstall,update or info is well documented including dependencies and needed modification of setup files.

      I had base install of OpenBSD this morning(takes <= 10 minutes on free partion !).Now I have full multimedia desktop with Xfce,Kaffeine,Pidgin,OpenOffice,Firefox,Python,Xmms,TVtime,.....Commands and setup for this take about 5 minutes only !!!!!! Other was just download.Man pages are excellent -> Linux must learn so many things from OpenBSD how make things easy,small,secure and fast.

      Comments
      1. By Anonymous Coward (2001:9b0:1:1017:a00:20ff:fefe:9a37) on

        > Package system of OpenBSD is very easy even for noobs (you need just a little english).Every install,uninstall,update or info is well documented including dependencies and needed modification of setup files.

        I've yet to meet a single *BSD person who doesn't bow his head in shame when packages and ports are being mentioned.

        It's one thing to claim on the Internet that it's good, but man... it's just broken and you all know it. Unless you aren't keeping your systems up to date.

        Comments
        1. By CODOR (CODOR) on

          > I've yet to meet a single *BSD person who doesn't bow his head in shame when packages and ports are being mentioned.

          Translation: "I've never met a single *BSD person."

          Comments
          1. By Anonymous Coward (2001:9b0:1:1017:a00:20ff:fefe:9a37) on

            > > I've yet to meet a single *BSD person who doesn't bow his head in shame when packages and ports are being mentioned.
            >
            > Translation: "I've never met a single *BSD person."

            Not true. I've met lots of *BSD guys.

    6. By CODOR (CODOR) on

      > In debian i dont care about package management. apt-get doing its job itself.

      Yeah, why would I use pkg_add to add packages when I can use apt-get to... uh... get apartments... or something.

    7. By Nicolas Legrand (82.226.231.236) unred@ethelred.fr on

      > :) sure with a poor package management like *bsd has its a pain to manage packages. In debian i dont care about package management. apt-get doing its job itself. So i just use software i like.

      It's funny, I'm moving from Debian to OpenBSD, I don't regret apt-get, aptitude, debconf and automagic. They have nice features, but it doesn't match comfort of simplicity. pkg_* tools are simple and fast. I've updated from 4.1 to 4.2 to 4.3 or stick to -current easily. In fact I think OpenBSD' pkg_* tools are the best package manager I've used, thought I try too to use Base first, and third party packages if needed.

    8. By Anonymous Coward (206.248.190.11) on

      > :) sure with a poor package management like *bsd has its a pain to manage packages. In debian i dont care about package management. apt-get doing its job itself. So i just use software i like.

      Having do manage several debian servers for work, I REALLY miss openbsd's ports/pkg_tools. apt is a pain in the ass, and frequently messes up and leaves you with uninstallable packages, random bits of old packages are left scattered across the system, upgrading packages tends to result in horrible brokeness, and they patch the packages to be broken so often its horrible. Apart from the obvious breaking of openssl, they also broke bind 9 and pike just that I have run in to in the last couple weeks.

    9. By kj (142.244.160.32) on

      > :) sure with a poor package management like *bsd has its a pain to manage packages. In debian i dont care about package management. apt-get doing its job itself. So i just use software i like.

      run away troll. Come back when you have learned to type "pkg_..."

      -kj

  8. By Anonymous Coward (66.230.230.230) on

    Thanks for the great article. What is the recommendation for mail client (MUA)? I use mutt but I don't think it's in the package list; I know someone is going to recommend mail(1) here. I also couldn't find fetchmail and procmail in the base. Some people would also have to install a GUI browser (especially people who do online banking, manage their stocks and investments online and also web application developers.)

    I think we all should aim to have a minimalistic environment but I think the only people who can come close to that are the systems developers. I remember while setting up a system monitoring box, I needed to install a lot of useful tools from the package list. This is also true to a certain extent to web application development using PHP, Ruby with some backend SQL database engine.

    Anyhow, the goal should be 'as minimalistic as possible' and we all should aim to achieve that goal.

    Comments
    1. By Matthew Dempsky (98.210.157.213) on

      > I use mutt but I don't think it's in the package list;<br><br><a href="http://www.openbsd.org/cgi-bin/cvsweb/ports/mail/mutt/">Guess again.</a>

    2. By phessler (phessler) on first undead, then not, then undead again.

      > Thanks for the great article. What is the recommendation for mail client (MUA)? I use mutt but I don't think it's in the package list; I know someone is going to recommend mail(1) here. I also couldn't find fetchmail and procmail in the base. Some people would also have to install a GUI browser (especially people who do online banking, manage their stocks and investments online and also web application developers.)
      >
      > I think we all should aim to have a minimalistic environment but I think the only people who can come close to that are the systems developers. I remember while setting up a system monitoring box, I needed to install a lot of useful tools from the package list. This is also true to a certain extent to web application development using PHP, Ruby with some backend SQL database engine.
      >
      > Anyhow, the goal should be 'as minimalistic as possible' and we all should aim to achieve that goal.


      Personally, I use mutt. mail isn't fancy enough for me.

    3. By Matthew Szudzik (mszudzik) on

      > Thanks for the great article. What is the recommendation for mail client (MUA)? I use mutt but I don't think it's in the package list; I know someone is going to recommend mail(1) here.

      When I first starting working with OpenBSD, I tried to use programs from the base install exclusively (and I assumed that all hard-core OpenBSD users did the same). So, it came as quite a surprise that there is no MIME-capable mail client in the base install, and almost all of the OpenBSD developers use one package or another for their mail client. See

       http://marc.info/?t=115393347400001

      I think that Darren Spruell explained it best in one of his contributions to that thread:

       "Email support as configured in the base install serves one purpose - delivering system notifications to the admin. Since the base install won't be delivering MIME messages, what purpose does it serve?"

      Comments
      1. By Anonymous Coward (76.250.126.209) on

        Us developers exclusively use non MIME email. MIME sucks balls and should be avoided as much as possible. In fact if you send a MIME email yelling will likely ensue. The only purpose MIME serves is to send grandma pictures of the baby.

        Comments
        1. By Anonymous Coward (2001:6f8:94d:4:202:b3ff:feb7:54e8) on

          Or sending binary acpidump(8) output to the
          developer. I used uuencode at first, but he
          was unable to cope with that ;-)

  9. By Anonymous Coward (70.173.62.25) on

    My desire to use only what is in base FORCED me to learn vi and ksh. I now find myself frustrated using vim and bash in Linux; I say this even though I only use a tiny percentage of all the features in bash/ksh and vi/vim.

    This has also forced me to learn sendmail. When I read documents where the authors usually replaces sendmail with postfix or qmail, it amazes me how much extra work they put on themselves. Then I laugh when I think of all the extra maintenance they will have. Yes sendmail is hard to learn. As a matter of fact, you don't even have to learn it. Just search google, the mailing lists, and man pages and you will find you only need to make a few small changes in 3 or 4 files to have a email server up and running.

    Comments
    1. By Anonymous Coward (66.171.103.5) on

      > This has also forced me to learn sendmail. When I read documents where the authors usually replaces sendmail with postfix or qmail, it amazes me how much extra work they put on themselves. Then I laugh when I think of all the extra maintenance they will have. Yes sendmail is hard to learn. As a matter of fact, you don't even have to learn it. Just search google, the mailing lists, and man pages and you will find you only need to make a few small changes in 3 or 4 files to have a email server up and running.

      Well I guess sendmail is easy if you're a typical user. But I had a lot of trouble a few years ago when I was trying to set it up to work with Verizon (DSL @home) to make use of their non-standard authenticated SMTP relay server. For some reason it wasn't good enough for them that you were coming in from their own network... no their smarthost would only forward mail if you authenticated and the authentication protocol wasn't supported out-of-the-box by OpenBSD's sendmail. Yes, I did spend hours pouring through man pages, config files, mailing list archives and google before I finally found that out. Ultimately, to make it work, I would have needed to recompile sendmail myself. Well that's when I said "forget it" and used some other MTA which did support their crazy protocol out-of-the-box. Mind you, if this had been an actual server box I was setting up the MTA on, I would have pressed on, but this was just my laptop and I wanted to get the matter over with.
      So to this day, sendmail only runs to deliver cron's emails on my laptop. I've been through a couple MTA's since then, mainly because I wanted something simple that works on all the platforms I have to work on, including Cygwin. Currently I'm using msmtp + maildrop + mutt + fetchmail, and at home all my mail goes to/from google (using their SSL port 465 to get around ISP port 25 blockage). I don't have my own personal shell server, so can't setup an ssh tunnel for that stuff.
      Re: Debian... I used that for many years. It's pretty good as far as Linux distros go, but the package system is not foolproof, and I've had it blow up on me several times. It's also quite out-of-date unless you run their equivalent of CURRENT, and since I prefer my servers to run stable releases, I was always having to make my own packages. I quicky became an expert at it! But I also lost interest in the project because it seemed like so much of the mailing lists were taken up with non-technical discussions (politics, like those recent RMS threads on openbsd-misc), and also I was getting tired of patching Linux to make it somewhat secure, using whatever kernel patches and hardening tools I could find (I became an expert at that too, to the detriment of the rest of my work that needed to be done).

      Comments
      1. By jared spiegel (70.101.0.7) jrrs@ice-nine.org on

        > Well I guess sendmail is easy if you're a typical user. But I had a lot of trouble a few years ago when I was trying to set it up to work with Verizon (DSL @home) to make use of their non-standard authenticated SMTP relay server. For some reason it wasn't good enough for them that you were coming in from their own network... no their smarthost would only forward mail if you authenticated and the authentication protocol wasn't supported out-of-the-box by OpenBSD's sendmail.

        the reason may be other customers with rooted windows boxes spewing boatloads of spam who are also coming in from their own network. smtp authentication is one of the ways to help relieve the burden of this problem.

      2. By Anonymous Coward (70.173.62.25) on

        > ...set it up to work with Verizon (DSL @home) to make use of their non-standard authenticated SMTP relay server.... no their smarthost would only forward mail if you authenticated and the authentication protocol wasn't supported out-of-the-box by OpenBSD's sendmail.

        Out of curiosity, did you try installing cyrus-sasl to get sendmail to work with Verizon? If not, that one package was probably all you needed to go along with the base install. Keep in mind that it's been along time since I messed with sendmail so I'm probably suggesting out of my butt.

        I had a colo I was renting (and thus my own IP address), all I needed from OpenBSD base was sendmail, popa3d, and spamd. This met all my needs for my desktops and laptops. Very little configuration. I only added OpenVPN to encrypt my email to the server but once it left the server it was in the clear anyway, so some would say what was the point. Well, at least my boss couldn't see my emails.

        With my OpenBSD colo, I found the simplest email setup was to just install mutt. After configuring sendmail, I could read my emails from anywhere with ssh security. The only negative to that was viewing assorted types of attachments.

    2. By Anonymous Coward (68.29.8.48) on

      > My desire to use only what is in base FORCED me to learn vi and ksh. I now find myself frustrated using vim and bash in Linux; I say this even though I only use a tiny percentage of all the features in bash/ksh and vi/vim.
      >
      > This has also forced me to learn sendmail. (...) make a few small changes in 3 or 4 files to have a email server up and running.

      I was dissapointed that netbsd moved away from sendmail. I spent many more hours configuring postfix to perform the activities I had previously done with sendmail.

      I'm currently annoyed with admins who switch to tinydns from bind because they won't even give bind a decent chance.

      Comments
      1. By Anonymous Coward (61.125.130.82) on

        > I'm currently annoyed with admins who switch to tinydns from bind because they won't even give bind a decent chance.

        I'm surprised anyone still uses DJB's abandonware at all.

  10. By Chas (147.154.235.53) on

    I find that the "mv" and "cp" commands from the GNU coreutils to be tremendously useful.

    They include an option which lets me easily work with directories containing many files where a command like "mv * ../target" fails with "The parameter list is too long." This lets me easily and efficiently handle thousands of Oracle archived logs on older platforms with ksh88:

    --target-directory=DIRECTORY Specify the destination DIRECTORY.

    The `--target-directory' option allows the `cp', `install', `ln',
    and `mv' programs to be used conveniently with `xargs'. For
    example, you can move the files from the current directory to a
    sibling directory, `d' like this: (However, this doesn't move
    files whose names begin with `.'.)

    ls |xargs mv --target-directory=../d

    Comments
    1. By Matthias Kilian (91.3.40.97) on

      > The `--target-directory' option allows the `cp', `install', `ln',
      > and `mv' programs to be used conveniently with `xargs'. For
      > example, you can move the files from the current directory to a
      > sibling directory, `d' like this: (However, this doesn't move
      > files whose names begin with `.'.)
      >
      > ls |xargs mv --target-directory=../d

      You may want to look at the -J option of xargs(1).

  11. By Anonymous Coward (206.57.89.141) on

    I tried out mg after reading this article, especially since last semester I had to use emacs for a class where we did Oz programming using mozart-oz. It's a pretty nice small program for writing src code, but it lacks syntax highlighting. That feature, alone, is the main reason I've never used vi (or nvi) and have been a strong vim user. Emacs has global-font-lock mode for "syntax highlighting" but mg doesn't have this. Emacs is a kitchen-sink application with bells and whistles everywhere. Yet, it doesn't even have multiple syntax highlighting schemes - just one. Though AquaMacs (Emacs for OS X) does have multiple 'themes', and you can configure emacs foreground/background and text colors.

    The main advantage in having syntax highlighting is that it lets you quickly identify certain pieces of source code, and everything doesn't just mesh together like one big 'blob' of text. It's similar to the matching-parenthesis 'hack' that's been implmented in mg (which is really nice).

    Another issue with mg is the lack of documentation. There is really no good documentation on mg (that I could find, anyway) on how exactly to configure the .mg file. You're kind of expected to know emacs, it seems in order to be able to configure it. If I really want to know how mg works I'll have to look at the source code it seems.

    Hence until mg gets syntax highlighting, I'll probably stick with vim for development unless the system doesn't have it for some reason.

    Comments
    1. By Anonymous Coward (142.244.224.44) on

      Syntax highlighting is a crutch for people who don't know how to read code. mg will never get colors or syntax highlighting or autoindentation or any other bullshit like that.

      Comments
      1. By Anonymous Coward (71.240.175.185) on

        > Syntax highlighting is a crutch for people who don't know how to read code. mg will never get colors or syntax highlighting or autoindentation or any other bullshit like that.

        Quit trying to be so hardcore about text editing. syntax highlighting is clearly useful.

        Comments
        1. By art (142.244.224.44) on

          > Quit trying to be so hardcore about text editing. syntax highlighting is clearly useful.

          No it's not. It destroys your ability to read code properly.

          Comments
          1. By Anonymous Coward (12.184.20.186) on

            > > Quit trying to be so hardcore about text editing. syntax highlighting is clearly useful.
            >
            > No it's not. It destroys your ability to read code properly.

            Maybe "your" ability to read code. I'm not so distracted by pretty colors that I become mesmerized and confused. Just use them for clarity.

            Thanks for your opinion though.

          2. By Anonymous Coward (66.171.103.5) on

            > > Quit trying to be so hardcore about text editing. syntax highlighting is clearly useful.
            >
            > No it's not. It destroys your ability to read code properly.

            I'm skeptical. Have there been studies done on this? Or are you just making this stuff up as you go along?

      2. By kj (142.244.160.32) on

        > Syntax highlighting is a crutch for people who don't know how to read code. mg will never get colors or syntax highlighting or autoindentation or any other bullshit like that.

        Re: "mg will never get..."

        Now I have to laugh. Have you ever contributed a line of code to mg?

        mg will get precisely what its users find important.

        -kj

      3. By Anonymous Coward (140.126.19.179) on

        > Syntax highlighting is a crutch for people who don't know how to read
        > code. mg will never get colors or syntax highlighting or
        > autoindentation or any other bullshit like that.

        I think this is coming from Bob Beck (beck@) and beck is always right :)

  12. By Dennis Decker Jensen (85.83.52.4) dennis@cyg.dk on

    Thanks for the tips!

    I too discovered many things that an OpenBSD box could do with all the "batteries included". I had forgotten about cdio and mkhybrid! I used window for a while until I discovered I could manage with just the pseudo-terminals.

    I used mailx/Mail for a couple of years, before I finally surrended to some MIME-client (sylpheed). PDF's are also so abundant that I cannot really manage effectively enough (it's doable yes, but not comfortable) anymore without xpdf on X.org (using 9wm, cwm); which is really sad, because just about everything else can be effeciently done from the command line.

    I'm currently writing this from an iMac, which is good as far as the multimedia stuff concerns, and there is a BSD underneath, but it sure doesn't beat the base system of OpenBSD. I can only remember one other system having a comparable, robust, effecient simplicity, namely plan 9, which improves upon Unix in many ways. I have to admit, I like the simplicity of NextStep as well as far as a GUI concerns. All the advantages of the command line are integrated nicely into the latest version of Mac OS X. O... O dear, all this spiked my memory of the BeOS of olden days... Ahem, sorry for getting off topic here!

    Anyway, ksh is a bliss compared to the other gross shells.

    BTW. Vim's compatible mode has never been particularly compatible. I can easily live without the syntax highlighting if given a stable editor that doesn't change every half year -- or decade for that matter.

    Fortunately OpenBSD covers everybody's needs splendidly. I'm impressed with the new ports/package system. I've even considered using mostly packages, but it easier to report bugs with the sources around. The whole thing: It just works.

  13. By Anonymous Coward (88.67.38.82) on

    I recently replaced 'wget' with 'ftp' and next I'm probably going to replace 'screen' by 'window'.

    Just a question: Is there any tool in the base which handles somewhat (in the Unix environment) uncommon compression archives like .zip, .7z and some others? Currently I use p7zip for everything which is not tar/gz, but if there's already something in the base I'd be glad to switch to that one.


  14. By Oko (128.196.224.24) on

    I liked the article very much. I wanted to bring to attention of your readers lost art of using X applications. Namely X window system comes not just with Xterm and Xclock. It comes with slue of other application that are useful for the typical desktop user. Let us name a few.
    xsetroot for instance enables you to set the color of your root window (that sounds very much like a wall-paper thing). How about xwd which
    enables you to take a screen shoots or xwud which is image manipulating program for X. I do not know what is wrong with xload utility for monitoring system. Do you? There are lot more of these. Why don't you check xman pages:-)

    OpenBSD comes with command line CD player. (cdio play).
    Wav files can be directly sent to /dev/audio and listen to.
    One doesn't need any tools to record audio on OpenBSD. It is all part
    of the base system

    I wish there was a base utility for playing with DVDs although thing like OGLE will never be in the base due to the kind of libraries needed for playing DVDs. At least burning ISO DVDs utility should be available so that we do not have to install dvd+rw-tools

    How about LPD spooling system for printing. Most Linux distros come with
    CUPS nonsense.

    For editing most documents troff is unsurpassed and is in the base of the system. I wish there were still journals that would accept mathematics written with troff instead of TeX but that is another matter.

    On the more serious note about networking stuff we should mention that
    even the OS like FreeBSD doesn't include things like DHCP server in its base. Most of networking stuff just works on OpenBSD. Who else has chroot Apache server in its base:-)

    And lets not forget. OpenBSD is Unix so one has immediately available awk, sed even perl.

    Actually, OpenBSD includes far more pre-configured software in its base than any of so called "user friendly" Linux distros like Ubunut or even FreeBSD distros like PC-BSD.

    Comments
    1. By Anonymous Coward (132.170.54.215) on

      > Wav files can be directly sent to /dev/audio and listen to.
      > One doesn't need any tools to record audio on OpenBSD. It is all part
      > of the base system

      What can be used in base to record audio?

      Comments
      1. By Pierre Riteau (131.254.100.94) on

        > > Wav files can be directly sent to /dev/audio and listen to.
        > > One doesn't need any tools to record audio on OpenBSD. It is all part
        > > of the base system
        >
        > What can be used in base to record audio?

        aucat(1) on -current

  15. By Anonymous Coward (92.225.67.2) on

    Update! "window" has been retired and "tmux" has been imported in its stead.

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]