[OpenBSDsupport]

OpenBSD Desktop For Windows Users By Roy Morris


Purpose
-----------
I am writing this to help those users who are new to OpenBSD become productive
as quickly as possible in the home desktop environment. I encourage those using 
this document to do your homework before asking questions relating to topics in
this document on misc@ [1] as they have been covered in depth. Please check the
archives [2].

Applications
-------------
You will be installing the following list of applications. I have included the
Windows applications you are replacing/emulating for your understanding.

Task			Current Application		Replacement Application
-------------------------------------------------------------------------------
Mail, Address Book	Outlook Express			Thunderbird
Web Browsing		IE				FireFox
Business Documents	MS Word				OpenOffice 2.0
Network Drawings	Visio				Dia
Web Site maintenance	Front Page			vim (syntax color)
Programming Editor	UltraEdit32			Beaver
PDF Reader		Acrobat				Xpdf
System Backup		Direct CD			cdrtools/xcdroast
Listen to CD's		MS Media Player			Xmms (mp3)
Terminal Services 	MS TS Client			rdesktop
Paint Program		Microsoft Paint			Gimp
Desktop			MS Windows 2000			Fluxbox
Printing		Local Epson 600			apsfilter/ghostscript
Play DVD Movies		MS Media Player			Mplayer or Ogle


Tweaking the base OS + Linux Emulation
--------------------------------------
This document assumes some that you have installed a base version of OpenBSD, 
and that you have followed the 'AFTERBOOT' steps. After a base install of 
OpenBSD 3.7, take the time to update the system to '-stable' and tweak the base
environment. If you are not aware of how to do this, please see the excellent 
documentation on the OpenBSD[3] site. Installing or making any of the operating 
system items below are personal choice, and are really just included to be 
complete in my description. I thought I better say this in case you are logging
on as root and not using your own account. DON'T DO IT! Make yourself an 
account right now and always log in as yourself, this will become even more
important when we begin to install and configure your window manager.

System and Shell Tweaks
------------------------
I recommend you make the following system changes.  

1. Edit /etc/rc.conf and modify the ntpd entry to look like this.
			ntpd_flags="" 

2. As yourself and in your home directory, add a .signature file with your
   contact information in it. 

~/.signature
Roy Morris
OpenAlternatives
roy@openalternatives.com
P: 289.259.6321

3. Su'd to root, create /etc/profile and add the content below.

CVSROOT=anoncvs@anoncvs3.usa.openbsd.org:/cvs
PKG_PATH=ftp://ftp3.usa.openbsd.org/pub/OpenBSD/3.7/packages/i386
alias pkg_list='lynx -dump $PKG_PATH/index.txt >$HOME/pkglist.txt'
alias su='su -l'

if [ "$USER" = root ]; then
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin
PS1="\`hostname -s\`:\`pwd\`# "
else
PATH=/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:.
PS1="\`hostname -s\`:\`pwd\`$ "
fi
export PATH PS1 CVSROOT PKG_PATH

4. This change is not specifically required but just so you are aware, you can
add places you may ssh to frequently to in either you hosts file or if your 
logon information changes place to place, you can use the items below in your
home directory.

add $HOME/.ssh/config
	Host	JimsHouse
	HostName	192.168.1.1
	User myusername
	
Now I can simply type 'ssh JimsHouse' and I will be prompted for my password.

Linux Emulation
---------------
We will now enable Linux emulation for use by Open Office.

1. Edit your /etc/sysctl.conf and uncomment the option kern.emul.linux=1
   as root issue the following command. "sysctl -w kern.emul.linux=1"

2. Type pkg_list and wait for it to pick up a current package listing.
   Once it's finished look for the Redhat base package as follows.
   		grep redhat pkglist.txt

   From the output select the most recent rehat_base and install using the
   following command.
   		pkg_add -v redhat_base-8.0p4.tgz

3. When the base finishes installing we will finish the linux emulation by
   running the next to commands.

   echo "/proc /proc procfs rw,linux 00" >> /etc/fstab
   mkdir /proc


This would be a great time to reboot the machine and check for any errors you
might have before we move on to setting up xorg and your window manager.


Starting a Window Manager
--------------------------
On recent OpenBSD systems su to root and issue the following command to begin
setting up a window system.
		
   /usr/X11R6/bin/xorgcfg

This should bring up a window [4] which for now you can simply click the 'quit' 
button and answer yes to save the files. After you accept the default file names
nd paths the configuration system will close and you will be back at the black
screen. You just created a file named /etc/X11/xorg.cfg which you can later 
edit as required.

Installing the Applications
----------------------------
Let's install a very simple light weight window manager, which you can later
change at any time. Find fluxbox in the pkglist.txt  

foobar:/home/rmorris$ grep fluxbox pkglist.txt                                     
fluxbox-0.9.12.tgz

Run the following command su'd to root
pkg_add -v fluxbox-0.9.12.tgz

When the installation is complete run the following command as yourself and in
your home directory.

   echo "exec fluxbox" >.xinitrc

At this point you are ready to run fluxbox, do this by typing startx  from your
home directory. In a second or two the window manager pops up and you are ready
to add some applications [5].

As root (su'd) make the following changes in an xterm to the xorg.conf in the
screen section. Place this entry right below "Monitor0" Assuming you can support
it.

   DefaultDepth 24 

If you wish to have a graphical logon, then also edit /etc/rc.conf and enable
xdm by changing it as below.

   xdm_flags=""


Installing OpenOffice.org 2.0 [6]
--------------------------
The easiest way to get openoffice.org is to have a web browser installed, so 
let's get Firefox up and running now. As root (su'd) find the latest firefox
package in your package list.
 
		grep firefox pkglist.txt

	foobar:/home/rmorris$ grep firefox pkglist.txt
	mozilla-firefox-1.0.1p1.tgz
	mozilla-firefox-1.0.4.tgz
	mozilla-firefox-1.0.6.tgz
	mozilla-firefox-1.0.6p0.tgz
	mozilla-firefox-1.0.6p3.tgz
	mozilla-firefox-1.0.6p4.tgz

Install the most up to date package by running
	
	foobar:/home/rmorris$ pkg_add -v mozilla-firefox-1.0.6p4.tgz

Add FireFox as a menu item and start firefox.
	edit .fluxbox/menu  and add (or change)
	"[exec] (Firefox) {firefox}"

Go to openoffice.org and get the linux version 2.0 file. Download this and 
park it in your /tmp directory. Ooo_2.0.0_LinuxIntel_install.tar.gz Run the
following command su'd to root.

   A. gzip -cd Ooo_2.0.0_LinuxIntel_install.tar.gz |tar -xvf -

   B. cd /tmp/OO*

   C. mkdir /emul/linux/opt

   D. touch /etc/mnttab

   E. alias rpm='/emul/linux/bin/rpm --nodeps --ignoreos --ignorearch --root \
             /emul/linux --dbpath /var/lib/rpm -ivh'

   F. find . -name "*.rpm" -exec rpm {} \;

If it does not work, then just issue the commands one at a time rpm file.rpm.
Otherwise you should now have a working version of OpenOffice installed on your
machine! Try it by running 	

	/emul/linux/opt/openoffice.org2.0/program/soffice


Adding More Applications
------------------------

Add the remaining applications using the pkg_add -v command and add them as
required to your ~/.fluxbox/menu
	
rdesktop
xmms (mp3)
cdrtools
thunderbird
dia
xpdf
beaver
mplayer 
ogle 
vim (no x11)
gimp
xcdroast
apsfilter

Calendar System
----------------
As yourself and in your home directory, create a directory called .calendar and
a file in it called calendar. You should read the calendar man page, it has
of features for sure, but at base minimum you need an entry for a day or more
something like this.

Nov 09	Read New Document
	10:00 -12:00 Pre lunch meeting
	12:30 - 3:00 more stuff here
		
System Backup using cdrecord
----------------------------
Here are two ways to create the backup file that you will write to cdrom,

TAR:
	tar -zpcvf 11.08.2005.tgz /home/rmorris/*
or

ISO: 
	mkisofs -V "11.08.2005.backup" -o /tmp/11.08.2005.iso \ 
	-RJ -v /home/rmorris
	
Burn Your backup to CDROM
--------------------------
/usr/local/bin/cdrecord dev=/dev/cd0c /tmp/11.08.2005.iso

or

/usr/local/bin/cdrecord dev=/dev/cd0c /tmp/11.08.2005.tgz

Terminal Services with Rdesktop
--------------------------------
Just call rdesktop with the size of the viewer you want, in this case 800x600
and the ip or hostname of the server. You can even connect to XP home if the 
user turns off the "enable IEEE 802.1x authentication for the network".
   
   rdesktop -g800x600 192.168.108.1 

Printing with Apsfilter
------------------------
If you have one of the many supported printers or you are really lucky and have 
a postscript printer, setting up printing is a breeze with apsfilter.

1.   foobar:/home/rmorris$ grep apsfilter pkglist.txt
     apsfilter-7.2.5p1.tgz

2.   foobar:pkg_add -v apsfilter-7.2.5p1.tgz

3.   foobar:/home/rmorris$ /usr/local/share/apsfilter/SETUP

Read the man page [7], but it's all pretty straight forward. If you can find 
your printer under the native ghostscript support it's best. 



I hope this document at least gets you headed in the right direction.

Roy Morris
roy@openalternatives.com
www.openalternatvies.com

Appendix
-----------
1. misc@openbsd.org - OpenBSD general mailing list
2. MARC - Mailing list archives - http://marc.theaimsgroup.com/
3. OpenBSD Web site - http://www.openbsd.org   
4. xorg config - http://www.openalternatives.com/OpenBSD/xorg.png
5. fluxbox desktop -http://www.openalternatives.com/OpenBSD/desktop.png
6. Thanks to Frank Denis for OpenOffice.org install thoughts http://www.00f.net/