Saturday, March 24, 2007

Post install adventures with BSD

Changing the shell:
I like the bash shell. I'm used to it. I run it with Linux. BSD uses a different shell by default. It might be csh or just plain sh. I'm not sure.

I tried the chsh (change shell) command and it wouldn't let me change any information. I did a "man chsh" to see what was up. It looks as though it was deprecated in favour of the chpass command. It's a more powerful command and potentially more dangerous. To change the shell the following command is used.

$ chpass -s bash username

Like the sudo command this needs to be followed up by entering the user password.

Changing the monitor resolution:
Thanks go out to the folks at http://www.bsdforums.org for having this tip on their web page.

As root, perform the following steps. Remember it is case sensitive.

$ Xorg -configure
$ cp /root/xorg.conf.new /etc/X11/xorg.conf
$ xorgcfg -textmode

This was all I needed to convince it my monitor ran at 1024x768. Read the web page and heed the warnings about messing with the card.

Update:
The Screen section of the xorg.conf file needs to be updated so there is a DefaultDepth section and a mode line for the appropriate depth. The modes are the resolutions enclosed in quotes. For example:

mode "1024x768" "800x600" "640x480"

Pressing the Ctrl and Alt keys and the "+" or "-" on the keypad should switch resolutions.

Setting KDE as the default window manager:
The default window manager is (I think) twm. It is really bare bones. To run any kind of application the user needs to type it into one of the three shell windows provided. If one is going to use a gui then why not use a powerful one. The tip for this one can be found on http://www.freebsd.org under the desktop environments page. Enter the following command from a shell prompt.

$ echo "exec startkde" > ~/.xinitrc

Setting up the panel:
This is a little more tricky. Once KDE is running use the right mouse button to select "Configure Desktop". From there hunt around for the location to change the function of the right mouse button. Change it to "Application Menu". From there it is possible to go in and change the settings for the panel to make it visible. Once visible, change the function of the left mouse button back to the way it was.

Misc:
Some applications normally visible with Linux need to be started from the command line. It is possible to add these to the application menu with a bit of effort. Firefox is a good example.

Labels: , ,