Wednesday, November 24, 2010

OpenBSD NC4200: Getting Alpine to work with DavMail.

Firstly, yeah I changed the blog's title. As I'm using ONLY OpenBSD nowadays, I think it's appropriate to change the title as I don't use other type of BSD. Now back to the main story.

So far, this is a brief description of what I (initially) wanted to achieve:

Alpine+LDAP <---> DavMail <---> CompanyEmail@OWA/Exchange

So here's what I'm currently doing. Getting Alpine + DavMail to play nicely together. I have posted earlier that I compiled my Alpine with LDAP support so I can check my company's email address book. Here's the current status of the project:

DavMail <---> CompanyEmail@OWA: Working fine
Thunderbird <---> DavMail: Working fine

As DavMail is working, I can just focus on configuring Alpine. The first time I start Alpine (by typing Alpine in xterm), the program will create ~/.pinerc configuration file. I don't need to blow my head to configure Alpine as it has a great built-in configuration tool.

Chapter 1: Receiving emails.
Inside Alpine's Main menu [M], I just key [S] (Setup), [L] (collectionLists). Then inside Alpine's Setup Collection List page, I hit [A] (Add collection). Here's my configurations:

Nickname: MyCompany
Server: localhost:1143/user=ASIA\karl
Path:
View:


After I save & exit the configuration [Ctrl+X], Alpine requested for my email's password. I keyed in my password and Alpine ask for confirmation to exit the page. No error messages, so it's all good. Now to test it.

I go to Main [M], then hit [L] (Folder List). I can see 2 folders:

MAIL
   Local folders in mail/

MyCompany
   Folders on localhost:1143/user=ASIA\karl in home directory


I choose MyCompany and using the Right Arrow [>] key, Alpine opened up my company email. I can see all the folders I have there and I can read my emails. So far so good.

Chapter 2: Sending emails (Working now!).
I'm still configuring this part as it's not working. I'll just put the steps for revising purpose. If you have a working solution, do comment.

Thanks to Christopher for commenting and posting a usefull link. Surely, I managed to tweak Alpine's setting and managed to get the SMTP portion working for sending emails. Do take note that I'm already running a new version of DavMail so it'll be better for you guys to update too.

Inside Alpine's Main menu, I choose [S] (Setup) and [C] (Config). The mandatory line to be update is this:

SMTP Server (for sending) = localhost:1025/user=ASIA\karl

So here, I don't need to use user=ASIA\\karl because the single \ is not escaped.
As I stated, it's currently not working. I kept getting "Error sending" message if I want to send out email. Previously I tried user=ASIA\karl but the "\" got escaped in ~/.pinerc and I still can't send email.

If I can't sort this out, I might have to go with using Sendmail instead of going thru DavMail. I will post any updates on this. I've also added this line in the same Config's screen:

Inbox Path = {localhost:1143/user=ASIA\karl}inbox

Note that this setting depends on whether you need it or not. As I use Alpine only for 1 OWA account, I set this up. Now press [E] to exit and save the setting. Press [Q] to quit Alpine.

Now vim your .pinerc file, normally in your home folder (~/.pinerc) and change this line:

disable-these-authenticators=GSSAPI,PLAIN

Save the .pinerc file and open Alpine back. I composed [C] an email and wallah! Alpine asked for my OWA password and email is sent! Great!. Again, thanks Christopher!

Chapter 3: Using LDAP.
As I've compiled my Alpine with LDAP support, I can use it to search my company's email address book. Inside Alpine's Main menu, I choose [S] (Setup) and [D] (Directory). Inside Alpine's Setup Directory Servers page, I hit [A] (Add dir) and this is my settings:

ldap-server= localhost
search-base= ou=people
port= 1389
bind-dn= ASIA\karl
nickname= MyCompany


Then I hit [E] (Exit Setup) and [Y] to save changes. [E] to exit the Setup Directory Servers page.

To test out, inside Alpine's Main menu, I hit [A] (Address Book) and select MyCompany. I hit the Right Arrow [>] key and type a name to search. Alpine then requested for my password and after a while, list of matches appears. So this part is working too.

Chapter 4: Offline email reading.
Yes, there's no offline reading for Alpine using IMAP. So now I know. That's one of the most important feature I wanted to use. After searching for solutions, I found the most suitable option. This is the latest description of the (possible) solution:

Alpine+LDAP <---> UW-IMAPD <---> OfflineIMAP <---> DavMail <---> CompanyEmail@OWA

So, instead of getting Alpine to directly access DavMail, Now I need to set up UW-IMAPD and OfflineIMAP. UW-IMAPD is built as dependency for Alpine+LDAP. UW-IMAPD is a local IMAP server and OfflineIMAP is like what the name means, reading emails from IMAP server in offline mode. Now OfflineIMAP will retrieve emails from my company's exchange thru DavMail (OfflineIMAP can't directly retrieve exchange emails), then OfflineIMAP will sync the emails to my local IMAP server which is UW-IMAPD so I will have a local offline copy of my emails that I can use with Alpine. Here's the checklist of needed softwares:

- Alpine+ldap
- UW-IMAPD
- DavMail
- OfflineIMAP

Update 13/04/11: Thanks to Christopher's comment, I got my email sending working! Thank you very much! You guys should read his comment and go to the link posted. I've update this post to reflect the changes. Later then.

Monday, November 22, 2010

OpenBSD NC4200: xterm-color + mp3blaster, no go.

I've been having an issue with mp3blaster recently. Every time I open mp3blaster, I can't use F1 to open folder. In fact, I can't use F1 to F5. F6 (repeat) and F7 (shuffle) works ok. I suspected that my ~/.Xdefaults is the culprit and after testing, it is true. This is my ~/.Xdefaults:

!! Xterm Resources
XTerm*loginShell: true
XTerm*termName: xterm-color
XTerm*faceName: Mono
XTerm*faceSize: 9
XTerm*internalBorder: 10
XTerm*highlightSelection: true
XTerm*cursorBlink: true
XTerm*utf8: 1


The culprit is bolded. So I had to change it to disable it by putting ! in front of it. After saving the file, I closed and open an Xterm, start mp3blaster and it can play my audio files fine now.

As for XTerm*faceName: Mono, you should try it if you haven't. The fonts in xterm is much much prettier and nice with it. Just the way I like it.

Before that, I found that my mp3blaster can't find any mixer device and just put Null0.0 in the mixer's panel. After reading OpenBSD's How do I set up an audio server? section, I edited my /etc/rc.conf.local and put:

aucat_flags=""

Then after next reboot, mp3blaster can happily use a mixer device. Later.

OpenBSD 4.8 @ Compaq NC4200 Laptop: dmesg

OpenBSD 4.8 (GENERIC) #136: Mon Aug 16 09:06:23 MDT 2010
deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Pentium(R) M processor 2.13GHz ("GenuineIntel" 686-class) 2.13 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,SBF,EST,TM2
real mem = 1064726528 (1015MB)
avail mem = 1037348864 (989MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 10/30/07, BIOS32 rev. 0 @ 0xf0000, SMBIOS rev. 2.3 @ 0xf310a (23 entries)
bios0: vendor Hewlett-Packard version "68DTH Ver. F.0F" date 10/30/2007
bios0: Hewlett-Packard HP Compaq nc4200 (EP948EC#UUF)
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG SSDT
acpi0: wakeup devices C067(S5) C0BA(S3) C0C1(S3) C0C2(S3) C0C4(S3) C0CB(S5) C1E1(S5) C0DB(S5) C1E4(S5) C1FD(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfec01000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 133MHz
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 1
acpiprt0 at acpi0: bus 2 (C067)
acpiprt1 at acpi0: bus 16 (C0CB)
acpiprt2 at acpi0: bus 32 (C0DB)
acpiprt3 at acpi0: bus 0 (C002)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2, C1, PSS
acpipwrres0 at acpi0: C1A5
acpipwrres1 at acpi0: C1AD
acpipwrres2 at acpi0: C1B4
acpipwrres3 at acpi0: C1D9
acpipwrres4 at acpi0: C262
acpipwrres5 at acpi0: C263
acpipwrres6 at acpi0: C264
acpipwrres7 at acpi0: C265
acpitz0 at acpi0: critical temperature 100 degC
acpitz1 at acpi0: critical temperature 101 degC
acpitz2 at acpi0: critical temperature 100 degC
acpitz3 at acpi0: critical temperature 110 degC
acpibat0 at acpi0: C173 model "Primary" serial 00794 2009/01/07 type LIon oem "Hewlett-Packard"
acpibat1 at acpi0: C172 not present
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: C1FD
acpibtn1 at acpi0: C1FE
acpivideo0 at acpi0: C054
acpivout0 at acpivideo0: C102
acpivout1 at acpivideo0: C103
acpivout2 at acpivideo0: C104
acpivout3 at acpivideo0: C105
bios0: ROM list: 0xc0000/0x10000!
cpu0: Enhanced SpeedStep 2129 MHz: speeds: 2133, 1867, 1600, 1333, 1067, 800 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82915GM Host" rev 0x03
vga1 at pci0 dev 2 function 0 "Intel 82915GM Video" rev 0x03
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xc0000000, size 0x10000000
inteldrm0 at vga1: apic 1 int 16 (irq 11)
drm0 at inteldrm0
"Intel 82915GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
ppb0 at pci0 dev 28 function 0 "Intel 82801FB PCIE" rev 0x03: apic 1 int 16 (irq 11)
pci1 at ppb0 bus 16
bge0 at pci1 dev 0 function 0 "Broadcom BCM5751M" rev 0x11, BCM5750 B1 (0x4101): apic 1 int 16 (irq 11), address 00:0f:b0:f7:3c:40
brgphy0 at bge0 phy 1: BCM5750 10/100/1000baseT PHY, rev. 0
ppb1 at pci0 dev 28 function 1 "Intel 82801FB PCIE" rev 0x03: apic 1 int 17 (irq 10)
pci2 at ppb1 bus 32
uhci0 at pci0 dev 29 function 0 "Intel 82801FB USB" rev 0x03: apic 1 int 19 (irq 10)
uhci1 at pci0 dev 29 function 1 "Intel 82801FB USB" rev 0x03: apic 1 int 17 (irq 10)
uhci2 at pci0 dev 29 function 2 "Intel 82801FB USB" rev 0x03: apic 1 int 18 (irq 10)
ehci0 at pci0 dev 29 function 7 "Intel 82801FB USB" rev 0x03: apic 1 int 19 (irq 10)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb2 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xd3
pci3 at ppb2 bus 2
iwi0 at pci3 dev 4 function 0 "Intel PRO/Wireless 2200BG" rev 0x05: apic 1 int 21 (irq 11), address 00:16:6f:3d:13:52
cbb0 at pci3 dev 6 function 0 "TI PCI7XX1 CardBus" rev 0x00: apic 1 int 18 (irq 10)
"TI PCI7XX1 Flash" rev 0x00 at pci3 dev 6 function 3 not configured
sdhc0 at pci3 dev 6 function 4 "TI PCI7XX1 Secure Data" rev 0x00: apic 1 int 20 (irq 10)
sdmmc0 at sdhc0
sdmmc1 at sdhc0
sdmmc2 at sdhc0
"TI PCI7XX1 Smart Card" rev 0x00 at pci3 dev 6 function 5 not configured
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 3 device 0 cacheline 0x10, lattimer 0x20
pcmcia0 at cardslot0
auich0 at pci0 dev 30 function 2 "Intel 82801FB AC97" rev 0x03: apic 1 int 17 (irq 10), ICH6 AC97
ac97: codec id 0x41445374 (Analog Devices AD1981B)
ac97: codec features headphone, 20 bit DAC, No 3D Stereo
audio0 at auich0
"Intel 82801FB Modem" rev 0x03 at pci0 dev 30 function 3 not configured
ichpcib0 at pci0 dev 31 function 0 "Intel 82801FBM LPC" rev 0x03: PM disabled
pciide0 at pci0 dev 31 function 1 "Intel 82801FB IDE" rev 0x03: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0:
wd0: 16-sector PIO, LBA48, 76319MB, 156301488 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
pciide0: channel 1 ignored (disabled)
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
mtrr: Pentium Pro MTRR support
"PSCR, SLB REFLEX 20, V1.1, " at pcmcia0 function 0 not configured
uhidev0 at uhub1 port 2 configuration 1 interface 0 "Logitech USB-PS/2 Optical Mouse" rev 2.00/20.00 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse1 at ums0 mux 0
softraid0 at root
root on wd0a swap on wd0b dump on wd0b

Tuesday, November 16, 2010

OpenBSD NC4200: Alpine + DavMail: DavMail configurations.

A bit of personal history. Bear with me as it might get you bored to death as it will be a long one. Ok, my company uses MS Exchange for emails. And, wait, I guess that just sums it up. Company uses MS Exchange, bla bla, I don't want to use Outlook, bla bla, I don't want to use MS Windows, bla bla so here I am. Basically, I just want to use Alpine / Thunderbird to access my company's exchange so I can receive and send emails. Bit of details about my profile and the company's email (this won't be a real one, just to show you how I done it):

Email: karl.bsd@company.com
Username: ASIA\karl
OWA Exchange: https://owa.company.com/exchange/

As you can see, the Username for me to log in to the OWA is different than my email add. To make things a bit more complicated, my internet access is through a http proxy which I will name as http://my.proxy.com at port 8080. Ok enough history class, now on to the good stuff.

For DavMail, it comes zipped with quite some files inside. From DavMail's website, I choose Workstation (personal) mode > Other DavMail release. What contains inside mine is:

lib (folder with lots of *.jar files)
davmail.jar
davmail.sh


I created ~/davmail/ folder and extracted the archive inside it. In basic, I can just use:

$ sh ~/davmail/davmail.sh &

And the familiar DavMail icon will appear in XFCE's taskbar. But that's for XFCE. As wmii's status bar is not a task bar, DavMail will not have the icon. In XFCE, right clicking the DavMail icon and choosing settings, I just put my OWA address in the DavMail url. Then I choose to set the proxy server with the 8080 port. I left all the other setting to default.

XFCE + Thunderbird + DavMail:
This part is quite easy. There's numerous documentations / HOWTOs on this. Even the official DavMail website have tutorial on setting up Thunderbird to work with DavMail. I just follow the documentation and it's working ok. I can send receive emails, do LDAP queries and even sync with the company's calendar using Thunderbird+Lightning+CalDav. Just remember to install lightning using packages as there will be none available in Thunderbird's AddOn website for OpenBSD. As I've stated earlier, sh ~/davmail/davmail.sh & is enough to get you started with DavMail in XFCE.

wmii + Alpine + DavMail:
Now this is THE thing. wmii and normal DavMail don't quite play nicely. By saying "normal" I mean using the command I stated above. There's no taskbar for DavMail to icon-er-ify(?) to. The solution? A quick google and I found something about DavMail configuration file. Shamelessly following the said information, I created davmail.properties file inside ~/davmail/ folder. Here's my davmail.properties file, important bits are bolded for your pleasure:

davmail.url=https://owa.company.com/exchange/
davmail.popPort=1110
davmail.imapPort=1143
davmail.smtpPort=1025
davmail.caldavPort=1080
davmail.ldapPort=1389
davmail.keepDelay=30
davmail.sentKeepDelay=90
davmail.imapIdleDelay=
davmail.useSystemProxies=false
davmail.enableProxy=true
davmail.proxyHost=my.proxy.com
davmail.proxyPort=8080

davmail.proxyUser=
davmail.proxyPassword=
davmail.ssl.keystoreType=JKS
davmail.ssl.keyPass=
davmail.ssl.keystorePass=
davmail.server=true
davmail.server.certificate.hash=
davmail.bindAddress=
davmail.allowRemote=true
davmail.disableUpdateCheck=false
log4j.rootLogger=WARN
log4j.logger.davmail=DEBUG
log4j.logger.org.apache.commons.httpclient=WARN
log4j.logger.httpclient.wire=WARN
davmail.logFilePath=/var/log/davmail.log


For davmail.proxyHost=, previously I was tearing my hairs apart because normal DavMail is working fine but not so when I use the davmail.properties file. When I tried using my.proxy.com instead of http://my.proxy.com, wallah! The earth smiles back at me. davmail.useSystemProxies= is "false" and davmail.enableProxy= is "true" so that instead of using the (currently malfunctioned) System Proxy, DavMail will use the proxy address I specified. Then I need to set the davmail.server= to "true" so that DavMail will not show any icon / GUI and be in daemon mode. I also need to chmod the /var/log/ folder so that DavMail can properly write logs inside there. After all is done, I do testing with:

$ sudo sh ~/davmail/davmail.sh ~/davmail/davmail.properties &

I opened up Thunderbird and all is good. Now to get DavMail started everytime I log in wmii. I mentioned earlier that I use SLiM login manager to replace xdm. SliM can let me choose what window manager / desktop environment I want to log in and that's something xdm currently don't have. I posted my ~/.xinitrc script earlier and this is the changes I need to make to get DavMail started after my login:

# This is for SLiM

case $1 in
wmii)
 xscreensaver &
 nohup sh ~/davmail/davmail.sh ~/davmail/davmail.properties &
 eval `cat ~/.fehbg`
 exec wmii
 ;;


You can follow the rest of the script by searching my previous post. As for the nohup, man nohup will give you great explaination. I log out from wmii and re-login. Open up Thunderbird and it's working alright. Eh, wait.. Thunderbird?! Where's the Alpine's stuff?! Whoa hold yer horses mate. That part will need another post.

Coming up next. Getting Alpine to work with DavMail. Or almost.

OpenBSD NC4200: Alpine + DavMail, ftp_proxy / http_proxy problem again.

Here's the latest update for my Alpine + DavMail project. Installing Alpine via OpenBSD's package doesn't come with LDAP support enabled. I can verify that by using:

$ alpine -supported

So, I read the OpenBSD ports system man pages and Alpine ports man pages and found that I need to specify the ldap flavor when building the Alpine ports. So in /usr/ports/mail/alpine directory, I use this syntax to build Alpine port with ldap built-in.

$ sudo env FLAVOR="ldap" make install
$ sudo env FLAVOR="ldap" make clean


That's when I found out that my ftp_proxy / http_proxy is unusable. Again. Sheesh! I don't know what happened to it and I'm still searching for solution. So, I downloaded the needed dependencies manually and put it inside /usr/ports/distfiles/. After a while the Alpine with ldap support is installed. Oh I need to remove the previous Alpine installation before the new Alpine can be installed. Alpine-ldap is installed and so do DavMail. Now for the good stuff. Making them work (nicely) together. For that, I'll write it in another post.

Coming up next: My DavMail configurations

Monday, November 15, 2010

OpenBSD NC4200: wmiirc, updated status bar script, SLiM login manager & Alpine with Davmail

Using my previous posting as reference, I copied /etc/wmii-3.5/wmiirc to ~/.wmii-3.5/wmiirc then added all the status bar scripts. I also change the following:

# Configuration Variables
MODKEY=Mod4


WMII_TERM="mrxvt"

And then added my status bar script. Surprisingly (or not), I made a few mistakes in my last status bar script I posted previously. You see, I copied the script by typing manually to blogspot, rather than using a text editor's copy/paste function. Furthermore, some of the mistakes are less forgiven in OpenBSD 4.8 than in previous installation. The battery status is not working properly in 4.8. I guess I haven't tested the script thoroughly before although I think previously the script was working ok. Now I've rewritten the battery status script and it seems to be working fine now. So here I'll post the (hopefully) working version of my status bar script. It's still displaying the system cpu usage, free memory, main/extended battery status, a/c adapter status & date time. As for WMII_TERM="mrxvt", that's because I installed mrxvt to replace xterm in wmii.

Here's the updated script for my wmii Status Bar:

# Status Bar info
status() {

 # This is for the main battery, if there's none, just display nothing.
 if [[ $(sysctl -n hw.sensors.acpibat0) != '' ]]; then
  bat0full=$(sysctl -n hw.sensors.acpibat0.amphour0 | sed s/.A.*//)
  bat0warn=$(sysctl -n hw.sensors.acpibat0.amphour1 | sed s/.A.*//)
  bat0low=$(sysctl -n hw.sensors.acpibat0.amphour2 | sed s/.A.*//)
  bat0now=$(sysctl -n hw.sensors.acpibat0.amphour3 | sed s/.A.*//)

  # Get the battery capacity in percentage
  bat0cap=`echo "100 * ${bat0now} / ${bat0full}" | bc`
  bat0p="$bat0cap%"

  # Get the charging status of the battery, replace with symbols
  bat0s=$(sysctl -n hw.sensors.acpibat0.raw0 | sed 's/'0'.*//; s/'1'.*/-/; s/'2'.*/+/; s/'4'.*/!/')
 else
  bat0p=`echo ""`
  bat0s=`echo ""`
 fi

 # This is for extended battery, if it's installed, display the status. Else just display nothing.
 if [[ $(sysctl -n hw.sensors.acpibat1) != '' ]]; then
  bat1full=$(sysctl -n hw.sensors.acpibat1.amphour0 | sed s/.A.*//)
  bat1warn=$(sysctl -n hw.sensors.acpibat1.amphour1 | sed s/.A.*//)
  bat1low=$(sysctl -n hw.sensors.acpibat1.amphour2 | sed s/.A.*//)
  bat1now=$(sysctl -n hw.sensors.acpibat1.amphour3 | sed s/.A.*//)

  # Get the battery capacity in percentage
  bat1cap=`echo "100 * ${bat1now} / ${bat1full}" | bc`
  bat1p="$bat1cap%"

  # Get the charging status of the battery, replace with symbols
  bat1s=$(sysctl -n hw.sensors.acpibat1.raw0 | sed 's/'0'.*//; s/'1'.*/-/; s/'2'.*/+/; s/'4'.*/!/')
 else
  bat1p=`echo ""`
  bat1s=`echo ""`
 fi

 # Get the AC Adapter status
 ac0=$(sysctl -n hw.sensors.acpiac0.indicator0 | sed s/.'('.*//)

 # Get the free memory data using top
 memfree=$(top | grep Memory | sed 's/.*Free:.//; s/.Swap.*//')

 # Get the CPU usage via top
 cpuuse=$(top | grep 'CPU states:' | sed 's/.*nice..//; s/.sys.*//')

 # Display the status bar
 echo CPU: $cpuuse '|' Mem: $memfree '|' Bat: ${bat0p}${bat0s} ${bat1p}${bat1s} '|' AC: $ac0 '|' $(date)

}


Another thing, I changed the X Display Manager to Simple LogIn Manager (SLiM). I would've stick with xdm if not for the fact that xdm (currently) can't let me choose which X session I want to start (wmii or XFCE4). After I installed SLiM, I opened up /etc/rc.local and added:

# Add your local startup actions here.
# This is for SLiM
if [ -x /usr/local/bin/slim ]; then
 echo -n ' slim'; /usr/local/bin/slim -d &
fi

echo '.'


Do make sure that xdm has been disabled in /etc/rc.conf.local or /etc/rc.conf. After that I edited SLiM's config file /etc/slim.conf:

# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
login_cmd exec /bin/ksh -l ~/.xinitrc %session


# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with the slim sources
sessions wmii,xfce4


Unfortunately installing the SLiM from package doesn't provide me with xinitrc.sample stated above. After googling for samples, I managed to edit my ~/.xinitrc for SLiM's use:

# This is for SLiM
DEFAULT_SESSION=wmii

case $1 in
wmii)
 xscreensaver &
 eval `cat ~/.fehbg`
 exec wmii
 ;;
xfce4)
 exec startxfce4
 ;;
*)
 xscreensaver &
 eval `cat ~/.fehbg`
 exec $DEFAULT_SESSION
 ;;
esac


Now at SLiM's login screen, I can choose the window manager I want to use with F1. Currently I'm having problem to reload background wallpaper for wmii using feh and searching for solution. It seems that eval `cat ~/.fehbg` is the correct command for it, not `cat ~/.fehbg` As for SLiM, halt and reboot command doesn't work yet. More on that later.

Oh yeah, I'm back on wmii. Not that I don't like xfce. Well xfce is a great desktop environment. But there's something about wmii that kept getting back at me. Currently I'm still using Thunderbird with DavMail, still trying to set up Alpine with DavMail. Will post something on that later.

Update: I'm back to xterm instead of mrxvt. Using xterm-256color is enough for me.

Update: I was thinking about giving a preview on what will be displayed on the status bar. So here it is. This preview is my machine on extended battery (which is charging), on AC adapter. Sorry no fancy picture or anything:

CPU: 4.5% | Mem: 456M | Bat: 100% 76%+ | AC: On | Fri Dec 10 15:27:10 MYT 2010

Thursday, November 11, 2010

OpenBSD NC4200: Testing video function in VLC.

Starting vlc via vlc -vvv shows that there's main interface error regarding x11-display and option global-key-xxx stuff. But vlc can start just fine. With default setting, I can play *.mp3 files just fine but that's audio. vlc just exited with x11-display when I tried opening video file. So I opened vlc, go to Tools > Preferences > Video > Output and choose Simple DirectMedia Layer video output instead of the default, err, Default. Then I opened an *.avi file and it plays nicely. Great.

Still need to search for the main interface error stuff. Later.

Wednesday, November 10, 2010

OpenBSD NC4200: Printing with CUPS.

As my OpenBSD is now my primary OS for work (not that my office requires it), I really need to be able to print anything. Related CUPS packages that's installed is:

cups-1.4.4p1
gtk+2-cups-2.20.1
xfprint-4.6.1p5

Using tips from http://www.insidesocal.com/click/2009/01/openbsd-tip-speed-up-boot-time.html, I edited /etc/rc.local and put:

# Add your local startup actions here.

if [ -x /usr/local/sbin/cupsd ]; then
echo -n ' cupsd'; /usr/local/sbin/cupsd &
fi

echo '.'


and from XFCE Menu > Settings > Xfce 4 Printing System Setting, I choose CUPS as my Printing System.

Then I go to XFCE Meny > System > Manage Printing which will open up http://localhost:631/, the CUPS Management page. From there, I go to CUPS For Administrators > Adding Printers And Classes. It'll go to another page which then I choose Printer > Add Printer. Then I can see all network printers which has been detected! Great! I choose my printer, click Continue, change the printer's Name/Description/Location and click Continue. Then I choose Generic Make as there's no driver available for my printer. After that I choose Generic PCL Laser Printer (en) for the model. A few more setups and the printer is added. I tried printing the summary page from Firefox and it's successful!. Wow. I never thought that it'll be this easy. Later.

Monday, November 08, 2010

OpenBSD NC4200: Getting vlc-web plugins to be listed in Firefox

I installed vlc-web package but it's not listed in my Firefox's plugin list. After searching fer a while, I found that the plugin's directory is locked to root only. So I chmod the directory:

sudo chmod 774 /usr/local/lib/mozilla

After restarting Firefox, the plugin is now listed. I'll try and find a video to play and see the outcome.

OpenBSD NC4200: DavMail LDAP is working..

Okay. Silly me. I found that instead of putting "localhost" in the Hostname tab, I put "locahost". Yeah. Without a freaking "L". Now it's working fine.

OpenBSD NC4200: Thunderbird + DavMail works ok. Firefox 3.5 + java plugins works ok.

I managed to get DavMail running. Like I've posted earlier, it's a bit tricky as it involves getting Java running. For OpenBSD 4.8, Java 1.7.0 can be installed using package but older versions (1.6.0, 1.5.0) will require ports installation. I installed version 1.6.0 using ports (hurray!) but I can't run the davmail.sh. I found that the correct command to run the script is:

sh davmail.sh

Done that and error displayed telling me that it could not find Java. Sheesh. After playing around, I found a way to make Java work. I've installed jdk 1.7.0 & jre 1.7.0 using packages, jdk 1.5.0 & jdk 1.6.0 using ports. I found that the jdks is installed in /usr/local. So, by using jdk 1.7.0, I create a symlink in /usr/local/bin.

ln -s /usr/local/jdk-1.7.0/bin/java /usr/local/bin/java

Then, inside the DavMail folder, I issued the command:

sudo sh davmail.sh

And then... DavMail's icon appears on my XFCE's taskbar! Yeah! Seems to be working! But as I'm not online right now (yeah I wrote this offline..), I can't test it with Thunderbird yet. If all is well, I'll proceed with daemonising the DavMail so it'll autostart as daemon everytime the machine boots up. Now to think about it, all the hours waiting for jdk 1.6.0 & jdk 1.5.0 to be installed is just a waste of time. I'll uninstall those ports and test DavMail later.

I also have to manually add the Java man page in /etc/man.conf. This might not be the perfectly correct addition but now man java works.

# The whatis/apropos database.
_whatdb /usr/local/jdk-1.7.0/man/whatis.db
_whatdb /usr/local/jre-1.7.0/man/whatis.db
_whatdb /usr/local/kaffe/man/whatis.db


# Other sections that represent complete man subdirectories.
jdk17 /usr/local/jdk-1.7.0/man/
jre17 /usr/local/jre-1.7.0/man/
kaffe /usr/local/kaffe/man/


For the above, I just added those lines to the specific sections. In the # Specific section/directory combination. area, I changed the default line:

1 /usr/{share,X11R6,local}/man/{cat,man}1

to this one:

1 /usr/{share,X11R6,local}/{man,jdk-1.7.0/man,jre-1.7.0/man,kaffe/man}/{cat,man}1

Then doing man java now works.

Update: I need to install jdk-1.6.0 (jdk-1.5.0 will be installed as dependency) as jdk-1.7.0 don't have the Firefox plugins. After installing jdk-1.6.0 from ports, there's a guide on how to create symlink pointing to firefox's plugins directory. Just follow that and Firefox can operate with java sites. Yeah!

For Thunderbird, I just follow the guide in DavMail's Website and I can now access my company's Exchange using IMAP connection. CalDav also works fine (which is not ok previously using XP) but it seems that I still need to make my LDAP address book working. Will be looking out for that later. Autostarting the davmail also is giving me problem. As for now, I can just start davmail using console with this command:

sudo sh davmail.sh &

Daemon mode using /etc/local.conf or ~/.xinitrc won't work. Tu use Lightning (Thunderbird calendar extension), I need to install it from package. There won't be any available installation for that via mozilla's addon site.

As for the ftp_proxy & http_proxy, I've added this lines in my ~/.profile file:

# Set up proxy
export ftp_proxy=http://my.proxy.net:8080/
export http_proxy=http://my.proxy.net:8080/


Update: I've done another ports installation (for opera) and proxy works like a charm now!. Later.

Thursday, November 04, 2010

OpenBSD NC4200: Ports round 2. Java installation. DavMail with Thunderbird.

I've done another installation of OpenBSD. Now I'm using 4.8. I've install XFCE Desktop Environment. Yeah well read good comments about it. Skipped GNome / KDE because it's too bloated.

I managed to get Thunderbird working with DavMail to access my exchange (company) email. But that's in Windows XP. Because DavMail is based on Java, it's stated that the program can run from Linux & *BSD/*NIX. This will be my main project for now.

As DavMail requires JDK, I need to install Java. As stated in the documentation, no package exist for JDK prior to 1.7. So, I was left (again) with the choice to install Java using ports system which if you remember, failed miserably in 4.7 because of my ftp_proxy/http_proxy. As for this round 2, I have a good news. I can now do ports installation behind proxy! Using console, I just type:

export ftp_proxy=http://proxy.address.net:8080/

and I can now do ports installation!. I also do export http_proxy with the same proxy address. To make the proxy setting permanent, I edited ~/.profile and includes:

export ftp_proxy=http://proxy.address.net:8080/
export http_proxy=http://proxy.address.net:8080/


But I haven't rebooted the machine yet so I can test this one. A "'" (single quote) might be needed to enclosed the proxy address. Now on the Java installation (1.6).

First I downloaded the ports.tar.gz file from OpenBSD's mirror and unpacked it following the available howto.

Then I created a /etc/mk/conf file and included:

SUDO=/usr/bin/sudo
ACCEPT_JRL_LICENSE=Yes


As this is my first time installing Java using ports, I use make search name=java inside /usr/ports and run make install inside Java 1.6 folder. Installation exited prematurely as there's a few files In needed to download manually which is:

http://download.java.net/jdk6/6u3/
jdk-6u3-fcs-src-b05-jrl-24_sep_2007.jar
jdk-6u3-fcs-bin-b05-jrl-24_sep_2007.jar
jdk-6u3-fcs-mozilla_headers-b05-unix-24_sep_2007.jar

http://www.eyesbeyond.com/freebsddom/java/JDK16JRLConfirm.html
bsd-jdk16-patches-4.tar.bz2
(Just click the ACCEPT button and the download will begin)

(Java 1.5 seems to be needed too)

http://download.java.net/tiger/tiger_u16/
jdk-1_5_0_16-fcs-src-b02-jrl-28_may_2008.jar
jdk-1_5_0_16-fcs-bin-b02-jrl-20_may_2008.jar
jdk-1_5_0_16-mozilla_headers-b02-unix-28_may_2008.jar (might be optional)

http://www.eyesbeyond.com/freebsddom/java/JDK15JRLConfirm.html
bsd-jdk15-patches-9.tar.bz2
(Just click the ACCEPT button and the download will begin)

http://java.sun.com/products/archive/j2se/5.0_16/index.html
jdk-1_5_0_16-solaris-i586.tar.Z
(Kind of tricky to get this file. Remember to choose Solaris X86)

http://archive.apache.org/dist/xml/xalan-j/
xalan-j_2_7_0-bin.tar.gz

I put all the files inside /usr/ports/distfiles and then I continue the make install process. Wallah! Ports can now download additional files automatically! Hurray! the proxy settings works! Now I let it install. To be continued...

Thursday, January 28, 2010

OpenBSD NC4200: Alpine trough OpenSMTPD went fine.

Ah, done testing Alpine email client with OpenSMTPD and it's working fine. In Alpine, I go to "Setup" to configure Alpine and choose "Config". Then in the "SMTP Server (for sending)" line, I just put localhost as the value and then exit the setting. I composed an email and it went through just fine. Great. Bye bye sendmail.

Saturday, January 23, 2010

OpenBSD NC4200: iwi0 wireless & kismet.

After unsuccessful attempts to get my iwi0 wireless to work with dstumbler, I downloaded and installed kismet.

After installation, I vi /usr/kismet/kismet.conf and add this line to the "source" section:

source=radiotap_bsd_b,iwi0,radiotap_bsd_b

then in term, running "kismet" displays the scan using the iwi0 device. Great! At last!. I'll find something about the dstumbler issue later. I haven't tested the wireless connection as there's no AP that I can test on. Something on that later when I have the opportunity.

OpenBSD NC4200: from SendMail to OpenSMTPD, from GNU/screen to tmux.

Heyya, while seaching for any OpenBSD related goodies, I found a few interesting things. First of all is tmux, a terminal multiplexer a-la GNU/Screen. I used screen a lot if I'm not in wmii and tmux is a BSD-licensed equivalent. Hurrah! In OpenBSD 4.6, tmux is already in default installation so no need to get a package for it. man tmux if you're interested. As fer me, it's time to say goodbye to screen ;).

Then it's the OpenSMTPD. From the official website:

"OpenSMTPD is a FREE implementation of the Simple Mail Transfer Protocol.

The OpenSMTPD project was started as a separate project after a developer suffered from eyes bleeding while trying to slightly alter sendmail configuration. It was imported in the OpenBSD tree in November 2008 to help speed up development."

In OpenBSD 4.6, OpenSMTPD is readily available but not enabled by default. 4.6 still uses Sendmail. I tried finding the way to enabled it using 4.6 man smtpd but there's no installation details. However, using man smtpd (OpenBSD -current, more details than in my default 4.6 manual) is much better. Also, you can read here that OpenSMTPD is still heavily in development. For a personal machine like my laptop, OpenSMTPD will have no issue. I've already enabled the OpenSMTPD using the online manual and so far, it's ok. Haven't tested it yet. Soon OpenSMTPD will replace Sendmail in the base OpenBSD system.

Thursday, January 21, 2010

OpenBSD NC4200: Howto get battery status & put it on wmii's status bar.

Update: My Updated wmiirc Status Bar Script is the recent version, there's a bit of error in the script below so you guys better take a look at the most recent one. I'm keeping this post as an archive.

Hola. After searching for an answer, I finally found out how to get the battery status for my NC4200 laptop. In case you're wondering where to look for more information, this is what I look at:

man acpi
man sysctl


This is the command and output of my primary laptop's battery. If you're using an extended battery pack like me, you'll see hw.sensors.acpibat1 got listed too. Here I just list the primary battery only:

$ sysctl hw.sensors.acpibat0
hw.sensors.acpibat0.volt0=11.10 VDC (voltage)
hw.sensors.acpibat0.volt1=12.40 VDC (current voltage)
hw.sensors.acpibat0.amphour0=4.04 Ah (last full capacity)
hw.sensors.acpibat0.amphour1=0.20 Ah (warning capacity)
hw.sensors.acpibat0.amphour2=0.04 Ah (low capacity)
hw.sensors.acpibat0.amphour3=3.95 Ah (remaining capacity), OK
hw.sensors.acpibat0.raw0=0 (battery idle), OK
hw.sensors.acpibat0.raw1=0 (rate)


Not forgetting that I also need to take a look at the AC Adapter. So I just use:

$ sysctl hw.sensors.acpiac0
hw.sensors.acpiac0.indicator0=On (power supply)


Update: Here's my simple script to display the battery percentage. I shamelessly take bits from here, here (FreeBSD) and a few others. Also, man sed, man bash is also usefull.

Update: I finally got most of the status for the battery that I wanted.

Update: I now includes the cpu usage & free memory using top. Bear in mind this is my first try so I need to clean the script more. Here's the update script:

Update: I tested the script using my extended battery and I saw garbage being display if the extended battery was taken off. So now I have tweak the script and now hopefully it fixed the issue. I done quite some testing and it seems to be ok now.

Here's some information regarding what the status bar will display from left to right:

- Display the CPU usage by system
- Display the Free Physical Memory capacity
- Display the percentage of the primary battery remaining, behind it display "+" if it's charging, "-" if it's discharging, "!" if the battery is critical and nothing if the battery is idle. As I'm using the extended battery, this status bar will also display the extended battery remaining charges the same as the primary one.
- Display the AC Adapter status. "On" if it's on AC or "Off" if not.
- Display the full date.

Ok so I vim ~/.wmii-3.5/wmiirc and insert the script below just before the # Event processing entry.

######### Script starts

# My wmii Status Bar script
status() {
 # This is for the main battery, if there's none, just display nothing.
 bat0=$(sysctl -n hw.sensors.acpibat0)
 if [ "${bat0} != "" ]; then
  bat0full=$(sysctl -n hw.sensors.acpibat0.amphour0 | sed s/.A.*//)
  bat0warn=$(sysctl -n hw.sensors.acpibat0.amphour1 | sed s/.A.*//)
  bat0low=$(sysctl -n hw.sensors.acpibat0.amphour2 | sed s/.A.*//)
  bat0now=$(sysctl -n hw.sensors.acpibat0.amphour3 | sed s/.A.*//)

  # Get the battery capacity in percentage
  bat0cap=`echo "100 * ${bat0now} / ${bat0full}" | bc`
  bat0p="$bat0cap%"

  # Get the charging status of the battery, replace with symbols
  bat0s=$(sysctl -n hw.sensors.acpibat0.raw0 | sed 's/'0'.*//; s/'1'.*/-/; s/'2'.*/+/; s/'4'.*/!/')
 else
  bat0p=`echo ""`
  bat0s=`echo ""`
 fi

 # This is for extended battery, if it's installed, display the status. Else just display nothing.
 bat1=$(sysctl -n hw.sensors.acpibat1)
 if [ "${bat1} != "" ]; then
  bat1full=$(sysctl -n hw.sensors.acpibat1.amphour0 | sed s/.A.*//)
  bat1warn=$(sysctl -n hw.sensors.acpibat1.amphour1 | sed s/.A.*//)
  bat1low=$(sysctl -n hw.sensors.acpibat1.amphour2 | sed s/.A.*//)
  bat1now=$(sysctl -n hw.sensors.acpibat1.amphour3 | sed s/.A.*//)

  # Get the battery capacity in percentage
  bat1cap=`echo "100 * ${bat1now} / ${bat1full}" | bc`
  bat1p="$bat1cap%"

  # Get the charging status of the battery, replace with symbols
  bat1s=$(sysctl -n hw.sensors.acpibat1.raw0 | sed 's/'0'.*//; s/'1'.*/-/; s/'2'.*/+/; s/'4'.*/!/')
 else
  bat1p=`echo ""`
  bat1s=`echo ""`
 fi

 # Get the AC Adapter status
 ac0=$(sysctl -n hw.sensors.acpiac0.indicator0 | sed s/.'('.*//)

 # Get the free memory data using top
 memfree=$(top | grep Memory | sed 's/.*Free:.//; s/.Swap.*//')

 # Get the CPU usage via top
 cpuuse=$(top | grep 'CPU states:' | grep 's/.*nice..//; s/.sys.*//')

 # Display the status bar
 echo CPU: $cpuuse '|' Mem: $memfree '|' Bat: ${bat0p}${bat0s} ${bat1p}${bat1s} '|' AC: $ac0 '|' $(date)
}


######### Scripts ended

So after I refresh the wmiirc ([MOD]+[A], wmiirc), the status bar displays something like:

CPU: 6.5% | Mem: 847M | Bat: 98% 97%+ | AC: On | Fri Jan 22 12:18:28 MYT 2010

The 1st battery doesn't have any "+" or "-" symbol behind it because it's currently idle. The 2nd battery is currently charging as you can see by the "+" symbol behind it. With this script there's no longer junks being displayed if the battery was taken off. Oh yeah I still didn't use the $bat0warn and $bat0low yet. I'll figure out how to manipulate it so low battery will shutdown the machine. Do use the script if you find it interesting. If you has improvement, please share.

- Display the battery percentage with "+" is the battery is charging.
- Display "AC" text if the machine is on AC adapter.
- Auto shutdown the machine if the "low capacity" indicator is reached.
- Display the wireless status (iwi0, still having headache on getting it to work with dstumbler).
- Display the CPU status. (clean this up).
- Display the RAM status (free memory, size).
- Simplifies the script (yeah well I'm no programmer).

Tuesday, January 19, 2010

OpenBSD NC4200: Howto change the web browser for NetBeans 5.5 & other issues.

Hola. NetBeans 5.5 can be installed using OpenBSD's package. I got mine installed and after playing with it, found a few things that might be interesting fer those who're using OpenBSD + NetBeans.

First of all, by default NetBeans have a few web browser listed in Tool > Options > General tab. If you have either Mozilla, Firefox or Netscape installed; there should be no issue but if you're like me, who installed Firefox 3.5 instead, the will be some problem. If you choose Firefox in NetBeans option, you'll get the browser not configured error as Firefox 3.5 will be installed as "firefox35". Well, previously I just create a symbolic link for "firefox" pointing to "firefox35" like this:

# ln -s /usr/local/bin/firefox35 /usr/local/bin/firefox

and wallah! NetBeans can use the web browser feature happily. Then just now I found out another way round. In NetBeans's Tool > Options window, click on the Advanced Options's button. Go to Options > IDE Configuration > Server and External Tool Settings and then expand the Web Browser link. You'll see Mozilla, Firefox, Netscape and Swing HTML Browser listed there. Right-click on the Firefox link and choose "rename". Rename it to Firefox35 (basically this is optional, it's just a name). Then click on the Firefox link, change the "Browser Executable" option in the Properties window to the right from:

firefox -remote "openURL({URL})"

to

firefox35 -remote "openURL({URL})"

so that the "Process" option is changed from "firefox" to "firefox35" and leaving "Arguements" text intact. Then click "Ok" and "Close" the Advanced Options window. Then try selecting the NetBeans "Help" link and it should open the requested page from firefox35. But as the NetBeans version is lagged behind the current NetBeans version, you'll mostly get "Page Not Found" page from NetBeans's website. Oh well.

I also found another issue with NetBeans. I think this is a problem for a wide variety of OpenBSD + NetBeans user regarding of the NetBeans's version. The not-so-famous "garbled output text" issue. In my case, when I build any project, the first few build will display boxes in the Output window instead of readable build results. So I need to hit F11 a few times before the build result will display the correct readable text. But unfortunately the Run (F6) and Debug (F5) function is much worst. The Output's result is ALWAYS displaying boxes instead of readable text. Why is it not so famous? Well I guess there's only a handful of people using NetBeans on OpenBSD. If I managed to get any similar issue from Google, there's no solution whatsoever. There was one person using Ubuntu and NetBeans 5.5 who had the same issue but there seems no follow up on it. Maybe he managed to find a solution? I'm not sure. In OpenBSD's camp, a guy did put the issue in mailing list and then he opted to go for Eclipse instead. So, no luck to find the solution fer now. I downloaded Eclipse and whoa, with so many modules I can choose; I don't think I have the time.

Anyway, in NetBeans's Tools > Options > Miscellaneous > Ant, I noticed that if I change the "Verbosity Level" from "Normal" to "Quiet", building my project will not display any garbled / boxes text. But then any project which will display any result to Output (System.out.println( ) for example), Running / Debugging the project is as useless as Output with unreadable text because "Quiet" level will not display any output result, just a simple "Build Successful (Total time: x seconds)". *Sigh*. If not for this issue, NetBeans will be just perfect. I'm not sure if this is related to Ant or the 5.5 version of NetBeans. But I do know nearly all people who have/had this problem is using OpenBSD.

I read somewhere that a person suggested to another OpenBSD+NetBeans user to install "dejavu" font but there's no follow up after that. So I don't know if that will resolve the issue or not. Maybe I'll find something the more I play with NetBeans. But still, if anyone out there now any info / solution for this problem, please just comment on my blog here so I can test and share it. Any link/workaround/script/module worth trying is, well, worth trying.

That's it fer now. Yeah well I started learning Java programming a few days ago. Still a newbie. Later.

Thursday, January 14, 2010

OpenBSD NC4200: calcurse 2.7 in on -current & freshclam.

Argh! The OpenBSD CVSweb for ports has confirmed it. The version 2.7 is on -current, not -stable. I don't think I'm ready to go for -current yet. So I need to find another calendar software (curse based preferably) and wait for OpenBSD 4.8 then. *sigh*.

In the mean time, I'm updating my ClamAV's virus definition. Well I might need it some day. Later then.

OpenBSD NC4200: Updating ports to -stable. Finally!

I'm currently updating my ports collection to OpenBSD's 4.6-stable. So far it's going ok. Not finished yet. Hopefully I'll get to install the latest version of calcurse so I can finally use the notification feature.

First cd to /usr/ports/. Then I su to gain superuser access. Then after choosing the anoncvs server to use, I issued the command:

# cvs -q -d anoncvs@some.anon.server:/cvs up -r OPENBSD_4_6 -Pd

So far it's updating a few folders and I didn't see the calcurse port is being updated. Uhh. I saw the 2.7 version is already in OpenBSD's port from OpenPorts.se but I'm not sure if it's in -stable or -current. Need to check with that later.

Thursday, January 07, 2010

OpenBSD NC4200: PostgreSQL & pgAdmin3, GIMP too.

I've installed Gimp graphic manipulation program. There was quite a lot of dependencies but luckily I'm using the same machine to manually download each one of it. After installation, I opened a new wmii workspace and hit [Mod]+[P] to open the program list. Then just type "gimp" then hit "Return". Wallah!, Gimp is running fine. Although I don't think I'll be using it anytime soon, but heck, might as well just install it.

Few days back, I installed PostgreSQL RDBMS. never got the chance to test it until now. As there's no other PostgreSQL user (except postgres) added since the installation, I got problem trying to access the database. As I'm currently lazy, I installed pgAdmin3 using OpenBSD package. Installed all the dependencies needed and down to testing.

I opened a new wmii workspace, eg: press [Mod]+[1-0]. Then on the blank workspace, I hit [Mod]+[P] to open the program list. After that I just type "pgadmin3" and the program starts. After I connect to the database, I create another role with my user id: "karl". I set the password and then I try to log in using the new PostgreSQL ID. So far so good. Why bother with psql when I already have pgAdmin3? Well, it's better if I play with both.

Now to re-learn PostgreSQL. Yum!

Wednesday, January 06, 2010

OpenBSD NC4200: Current experience status.

I have to make do with the version 2.5 of Alpine email software. My port system also have the same version, but I read somewhere that OpenBSD have stable version of the port system which includes version 2.7 (latest) of Alpine. As I'm still having problem with the darn proxy connection, I can't do anything with that. So that's my goal fer now, solving the proxy connection issue.

A few things I noticed about running OpenBSD with this Compaq NC4200 laptop:

The quicklaunch button:
- Mute button is working fine, I tried it with mp3blaster and it mutes/unmute the sound perfectly. But there's no light indicating it.
- Increase/Decrease volume button is not working.
- mp3blaster uses the "<" & ">" keys to decrease / increase the sound volume respectively. Somehow the ">" key works fine, but to decrease the sound, I have to press the quicklaunch's decrease volume key THEN the "<" key to decrease the sound volume 1 step. If let say, I want to decrease the volume from 100% to 60%, I need to press the quicklaunch key then the "<" key and repeat that until the volume goes down to 60% or something. Will find out about it later.

WiFi On/Off button:
- Works fine. It can turn on/off my iwi0 device just fine albeit without a functional indicator light. I read somewhere that the button will also turn the Bluetooth module on, but didn't check on that yet.

Others:
- I have problem when using shutdown -hp. Most of the time, the shutdown sequence will stuck at "Synchronizing disk ...." and I have to hit the shutdown key sequence or press the power button. If I use shutdown -r or just shutdown -h, it works just fine. The "power down" option for shutdown sometime will work but most of the time will have problem. I'll find an answer later.

ToDo:
- Find a way to solve the proxy connection issue. Many of my current problem can be solved if my machine (not just Firefox) can properly connect to the internet through proxy.

Later then.

Tuesday, January 05, 2010

OpenBSD NC4200: Ports system up, but still having proxy problem.

Installed the OpenBSD's port system but still having problem to connect via proxy. Darn proxy! So the only thing that can connect to the internet is my Firefox. AHHHH!

OpenBSD NC4200: Problem with calcurse.

Ughh. Found that there's a fatal bug in the installed calcurse. My box hanged after I tried to alter the "Notify" function's configuration. As stated in the program's news section, there's a bug in notification in version prior to 2.6. The version I installed from package is 2.5. Ouch. So now I have to install it from ports now. Hopefully OpenBSD's port system is not that different from FreeBSD's port system. Later

OpenBSD NC4200: Searching for ncurse calendar program.

I installed VLC media player just now. Installation went ok though there's quite a lot of dependencies I had to tackle. Luckily I retrieve the file using my OpenBSD machine so no more transferring packages using 2 machines. Oh well still have issue with my proxy connection, so pkg_add can't be run directly. Have to install stuff using a terminal, while using Firefox to download the data.

Currently I'm searching for calendar / reminder program which uses curse, looking at calcurse and wyrd (which uses remind, a calendar / reminder software). Not sure which is the best so I guess I'll try both and see. I love to know what other OpenBSD user out there use to manage their schedule etc.

Update: Oh, I went for calcurse. No dependencies, small, so it's great. Now to play with it. Later!

Monday, January 04, 2010

OpenBSD NC4200: Email with Alpine & can I have Magic Set Editor in my box?

Hi again.

I've installed Alpine and it's nice! Sent few emails and it's working fine. Haven't set my email add inside it yet but it'll be soon. So far my OpenBSD box is great! Really love the wmii and the other stuff I installed so far.

Oh yeah, I tried installing Magic Set Editor software, a program for Magic: The Gathering player/collector (or newbie, like *cough*me*cough*). There's linux port there but currently I'm having problem installing the darn script. I'll try and find an answer later.

Oh, speaking of Magic: The Gathering (MTG), I was sold to it a few days ago and currently building my Zendikar's set. I know the Comic World (or something) in MidValley sell the stuff so yesterday I went there and the friendly staff there welcomes me to (inofficially) join the club. Yeah!. Still haven't play my 1st game though, needs to build up my deck first. The shop also have single cards for sale (at used price, very cheap) and I got meself quite a bunch yesterday. Later!

Thursday, December 31, 2009

OpenBSD NC4200: Firefox 3.5, mp3blaster, using proxy @ office, xscreensaver installed.

Heyya,

Today I brought my machine to the office, just want to test out the internet connection using proxy. I tried setting up the http_proxy but can't get the connection to work. Tried lynx and pkg_add without any success. I set the proxy server using:

# export http_proxy=http://my.proxy.server:8080/

DHCP is up, my bge0 LAN is working but still can't connect to OpenBSD for surfing or adding packages. Currently I saw people asking the same question so I'm going to search for some answer here.

On the other hand, I installed Firefox and using the Firefox's own connection setting, I can set the same proxy and my Firefox can browse the internet! Yeah! It took me a while to find the way to start Firefox and the program name is firefox35. So in wmii, just hit [MODKey]+[P], find "firefox35" and press [enter].

I've installed mp3blaster and boy I really missed it! Nearly everything is working fine except for decreasing/increasing the volume level. Ughh. Will play with that later as I just installed it a few mins ago. And wow the sound of this laptop is quite loud fer a single speaker! To run mp3blaster, just open a terminal and type "mp3laster".

Oh, I also installed xscreensaver. Been quite a long time since I play with this bugger. I insert "xscreensaver &" (without ") in my .xsession just above "wmii". My .xsession looks like this:

xscreensaver &
wmii


And it's working great! Oh not to mention I need to set the screensaver using "xscreensaver-demo" program.

So far, it's been a blast. The internet if fast (yeah well corporate network..). Later!

Sunday, December 13, 2009

OpenBSD NC4200: Reinstalled 4.6 with new disk layout.

Heyya,

I done reinstallation for 4.6. Actually it's my 2nd installation for today. Hopefully it's the last. Made a mistake in previous installation for not creating a home partition. The root partition got filled up very quickly as it's not big. And not to mentioned I gave usr everything else on the disk. So now my choice for the new partition is:

/ = 1G
swap = 1G
/var = 7G
/usr = 13G
/tmp = 4G
/home = the rest


Previously I installed mrxvt term to replace the default xterm. The transparency support is great as I've put a wallpaper using feh and my now my wmii looks awesome!

Now I'll be using the OpenBSD machine for PostgreSQL, some interaction fictions, maybe PHP. Really missed those things. Maybe I'll post a screenshot later. If I'm not lazy.

Monday, November 30, 2009

OpenBSD NC4200: Up and running, online with Wimax & DHCP.

Done installing OpenBSD 4.6 i386. Seems to be ok. I'm using P1 Wimax at home and here's what I did to get my OpenBSD's box online. I tried using static IP, I can ping the P1's DNS server but can't get through non-ip's url (eg: www.yahoo.com). I'm guessing that nameserver is the culprit. So for the time being, I had to use DHCP. I'm doing this by the book so you can head to OpenBSD Networking FAQ to know about it. My Ethernet device is bge0 so I just type:

# echo dhcp > /etc/hostname.bge0

And then after restarting, my OpenBSD box can surf the net. Well with lynx that is. I'll install Firefox later.

So internet is working, now to install packages. Also shamelessly using OpenBSD Packages & Ports FAQ, I just type:

# export PKG_PATH=ftp://ftp.openbsd.or.id/pub/OpenBSD/4.6/packages/i386/

As you can see, I'm using Indonesian's OpenBSD ftp server to install my packages. I've install wmii and it's working fine. Kinda missed (and forgot) the environment. All the dependencies packages got installed flawlessly. I love it! corewars is also installed but didn't get the chance to play with it. So, later then.

Saturday, November 28, 2009

OpenBSD with HP NC4200

Yeah it's been long. I've given the NC4000 to my wife and now I have another laptop. It's a NC4200. OpenBSD 4.6 is out and I've installed the release to NC4200. Currently I have this notification after it installed and running:

acpitz3: TZ4_: failed to read _TMP
acpitz3: TZ4_: failed to read temp


I'm currently searching for some clues and so far I know that this is related to temperature sensor. There's a person who have the same issue and he's using HP's laptop too. I have to dig deeper. Other than that, 4.6 is running great! X is installed and working. Now to get the wmii installed.

I never managed to set up the networking last time I installed OpenBSD in NC4000. So now I'll try and set it up to my Wimax connection. Unfortunately I don't have WiFi at home so that will be a distant experiment.

I'm still wishing that I get a Panasonic Toughbook CF-18 for my OpenBSD laptop. Yummm..

Thursday, April 16, 2009

OpenBSD NC4000: My uname -a and installed packages.

Here's the uname -a.

OpenBSD vambsd.vampire.org 4.4 GENERIC#1021 i386

Well. Yeah. Unlike FreeBSD's long output, OpenBSD's version is way shorter. I'll post the dmesg output soon hopefully.

Here's the list of currently installed packages:

dmenu-3.7
libiconv-1.12
libixp-0.4p0
screen-4.0.3p1
wmii-3.6p1

So wmii and GNU Screen is working fine. I'm still trying to install Awesome, FluxBox & Corewars and still there's more dependencies I need to resolve. Later then.

Wednesday, April 15, 2009

OpenBSD NC4000: wmii is running fine.

I've done installing wmii window manager. I can say that it's neat and clean. First I created .xinitrc file in my home folder. Easiest way is to type vi .xinitrc inside your home folder. Then just type:

exec wmii

Then save it and close vi. After that type xinit in the shell and wallah! wmii greets me. There's a wmii message displaying the basic of working with wmii. As I know a bit about working with vi and vim, working with wmii is not that hard. It uses [H],[J],[K],[L] keys for direction instead of UP,DOWN,LEFT,RIGHT keys. wmii uses [Alt] as the default mod key. I read that I can change that with other key and even the Windows key. That'll be great. I'll update on that later.

So wmii is ok, now to make my OpenBSD boots directly to X and uses graphical login. I sued to root and vi /etc/rc.conf. All I need is to change this part:

xdm_flags=NO

to

xdm_flags=""

and save it. I do a shutdown -r now in the shell and after the laptop reboots, I'm greeted with graphical login with a picture of Puffy on the side. I logged in and .. fvwm greets me. Uh. Drats. I forgot something.

I then quit X, do vi .xsession (create that file) inside my home folder and add this line:

wmii

That's it. Restarted again, went through the xdm login and wmii initiated. Sweet. More on my learning with wmii later!

Tuesday, April 14, 2009

OpenBSD NC4000: wmii and xmonad, another tiling window manager.

In my search for a tiling x11 window manager, I'm considering to install Awesome window manager which looks good. Since it's GPLv2, I also found wmii (MIT license) and xmonad (3-Clause BSD License). Xmonad have a multi-head display support whereas wmii looks neat. I want to go for wmii first so I downloaded:

wmii-3.6p1

Which I found depends on dmenu-3.7 so I downloaded that too. After reading the official wmii site, I found that it'll be better if I have libixp-0.4p0 so I downloaded that too. For xmonad, I only downloaded xmonad-0.7 and xmonad-lib-0.7.

I wanna go with wmii first (yeah I thought I wanna try awesome first but wmii license seems more attractive). More on that later.

OpenBSD NC4000: Offline packages installation.

So far the 4.4 OpenBSD is running fine with my NC4000. I just learned that my usb thumdrive is labeled as sd0i. So I need to type this command to access it:

mount_msdos /dev/sd0i /mnt/usb

And remember to create the "usb" folder beforehand. It's pretty important because I have to install packages using my usb thumbdrive. When I'm in the office, I download the packages I want and then store it in the thumbdrive and when I got back home, I mount the usb then move the files to my local home folder and install it.

Another thing I've learned. Offline installation (like what I'm currently doing now) of OpenBSD is a bit of an adventure. I'm comparing this to FreeBSD. One is because I can get 3 CDs worth of FreeBSD installation plus all the required packages and more and burn it myself in a DVD. That will cater almost all of my need. If I'm installing a package from the FreeBSD DVD, I can be sure that all the dependencies will be taken care of because that dependency packages is also inside the DVD. But OpenBSD, they'll only provide the installation ISO which is enough for base OpenBSD installation and no more.

I understand it's because they want people to buy official OpenBSD DVD and support the development and it's a great thing. I'm just saying that it'll be quite an adventure to install other packages offline. The main issue is *drums*... dependencies. Yeah. Coming from a a FreeBSD user who's spoilt for details with FreeBSD Packages page, OpenBSD Packages page is scary. OpenBSD's page have a more minimal approach whereas FreeBSD will list the needed dependencies for each packages you need.

I wanted to install Awesome window manager, Corewars and Screen. Screen installation is ok because it depends on nothing else. Awesome installation got stuck because I didn't have libiconv-1.12. Corewars installation also stuck but because of glib2-2.16.4p1. I downloaded the files the next day, went back home and run the pkg_add command. Now both stuck because the gettext-0.17 is not installed. Lucky I googled and found OpenPorts.se. It's not as extensive as FreeBSD's FreshPorts.org but it's surely what I need. Like I've said, it's a bit of an adventure because I need check each individual dependency files to see if it's depended on other file(s) so I can download it too. After all that, this is the files I've downloaded:

gettext-0.17
glib2-2.16.4p1
gperf-3.0.1
libiconv-1.12
libtool-1.5.26p0
metaauto-0.9

I'm not sure if this all is needed to get Corewars and Awesome window manager running but I'll test it out later today. I want to install as minimum as I can get as I want to utilise what's already installed in the base OpenBSD installation (eg: using VI which is already installed instead of installing VIM). More info later.

Friday, April 10, 2009

Awesome window manager. Seriously.

Yeah. I found this tiling X window manager called Awesome. Found out that there's OpenBSD package for it. Great. By the look of it, I'll bet this window manager will be one of my fav. I'll try to install the package later today and will update you guys on it soon hopefully. Later.

OpenBSD NC4000: I received a laptop and on OpenBSD 4.4!

Hi. Long time no blog. Yeah been lotsa thing in between. I was given a Compaq NC400 laptop as it's supposed to be disposed. I tested it and it's working fine. Grabbed OpenBSD 4.4 i386 and installed flawlessly. Didn't get the dmseg / uname -a file here yet but I'll post it soon. I just installed it last night and so far, sweet!. No broadband in my house yet (yeah I moved to a new home months ago) so pretty difficult to update the source / kernel. More on that later.

Monday, July 28, 2008

FreeBSD: Finally! I made a working FreeBSD 7 amd64 DVD! Here's how!

HAHAHA! Finally I got it! I made it woohoo! Ok I've successfully made a working FreeBSD 7.0 AMD64 DVD! But (there's a but..) not just using Nero, I used mkisofs to make an iso image, then burn it with Nero. Here's the important steps.

Step #1: Get the FreeBSD iso.
Fer this I downloaded all 4 isos. I downloaded all AMD64 version. You can get the isos here. Remember to get it from FreeBSD's mirror sites to ease off the load on FreeBSD's main ftp site. I downloaded:
7.0-RELEASE-amd64-disc1.iso
7.0-RELEASE-amd64-disc2.iso
7.0-RELEASE-amd64-disc3.iso
7.0-RELEASE-amd64-docs.iso


After I'm done downloading, I created a folder named FreeBSD in "c:\" so it'll look like c:\FreeBSD. Then I use 7-zip to extract all the isos into c:\FreeBSD starting from bottom up (x-docs.iso -> x-disc3.iso -> x-disc2.iso -> x-disc1.iso). Sure you can extract whichever combination you want but I just want to be sure. Then browse c:\FreeBSD\boot\ to see if there's a file call cdboot. We'll need that later. NOTE: If you found a folder named [BOOT] (not boot, you can safely delete that.

Now inside c:\FreeBSD, edit the file cdrom.inf. I use GVim Portable. You'll find something like:

CD_VERSION = 7.0-RELEASE
CD_VOLUME = 1


You can safely delete all the other line and JUST LEAVE the CD_VERSION = 7.0-RELEASE. Then save the file.

Now browse to c:\FreeBSD\packages\. I use GVim Portable and edit the file INDEX. This part is a bit tricky is you don't read carefully. Using your text editor "replace" function, delete all occurance of the words:

|1
|2
|3


To be sure, using your text editor's "search" function, find the word |1, |2 and |3 to see if there's any left. If there's none, good. We can continue.

Step #2: Get the cdrtool (we need mkisofs):
I downloaded all this tools stated below:

cdrtools-2.01-win32-bin.zip
dlls.zip
cygwin1.dll (version 1.5.25)


Then, using 7-zip, I extracted mkisofs.exe from cdrtools-2.01-win32-bin.zip into c:\WINDOWS folder. Then I extracted the file cygiconv2.dll and cygintl-8.dll from dlls.zip into c:\WINDOWS\system32. Finally I extracted cygwin1.dll into c:\WINDOWS\system32 folder.

Why can't I just extract the files to anywhere I wanted? Well, because I can use command prompt and run mkisofs from any folder I wanted. More on this below.

Step #3: Now the hard part begins. Well not so hard.
Now go open up the command prompt. You can use either "Start > All Programs > Accessories > Command Prompt" or "Start > Run" and type "cmd" then press Enter. Then type in:

cd c:\FreeBSD

to get into the FreeBSD folder. If you're using another folder name, go to that folder instead. Now we need to test out mkisofs. In the same command prompt, just type:

mkisofs

And you'll see something like:

mkisofs: Missing pathspec.
Usage: mkisofs [options] file...


If there's anything about missing cygwin1.dll, that means you didn't read the step #1. Ok now we know mkisofs is working. Let's roll. In the same command prompt, type this command:

mkisofs -o ../FreeBSD7.iso -R -J -V "FreeBSD7" -b boot/cdboot -no-emul-boot .

Remember to type it IN 1 (ONE) LINE. And yes the command ends with a "." (dot). See the -o ../FreeBSD7.iso? It means to create a file name FreeBSD7.iso in top folder, in this case c:\ root folder. Why? because I tried just -o FreeBSD7.iso and in the final iso, I see a file name, well guess what, FreeBSD7.iso in it. Drats. Now you can take a break while mkisofs is doing it's job. It'll take a while. Be sure to have enough hard disk space fer this sort of things but I tried this with only 3Gb empty space left. So fer most of us, it's nothing to worry about.

After a while, the job is done and the command prompt will display:

c:\FreeBSD>

again. So, congratulate yourself. Your iso is ready to be burn with any dvd burner program you have. In my case, Nero. Put in a blank DVD-R in your DVD-RW drive, and burn away the FreeBSD7.iso. Next. Boot and install FreeBSD. Enjoy it. You earn it friends.

Q: Why didn't you use growisofs? Well you're using mkisofs aren't you?
A: Because I don't know how. And heck I'm doing all this in XP x64.

Q: Why didn't you only use Nero to create the bootable dvd? Nero can do that.
A: Done it and the dvd can't boot the kernel. Read my previous post.

Q: Your mkisofs command is different from what I've read on the internet.
A: If you're talking about Dru's tutorial, I used her tutorial as a base, but I just can get her mkisofs command right on my pc. I guess her tutorial is just fer people using *BSD / linux. In my case, it's fer people using windows. Most importantly, this is fer me to remind meself on how I did it.

Q: Have you tested the FreeBSD dvd you've created?
A: Yes I have. I even tested using sysinstall to install some packages. Tested installing links and all the dependencies have no issue whatsoever. And installing from a dvd is great! The speed is awesome. Anyway, that's the only test I've done so far today, didn't do any full installation though but I'm sure it's fine. Just to add a note, I sacrifice 2 dvd-r before I made the final working FreeBSD 7.0 dvd. Quite a loss, in my current state but well worth the effort and knowledge.

Q: I need to know..
A: Go away!

Haha. Later then. Good luck!

p/s: I'm not done with OpenBSD though. I'll be back fer more testing. I MUST have a working OpenBSD installation up a running no matter what.

RDX200: FreeBSD 7.0 AMD64 installation is ok and running.

Latest news. FreeBSD 7.0 AMD64 installation went smoothly. It's been quite some time since I installed FreeBSD so it's like re-living the memories. I found out that I can't use my previous partition scheme because root folder "/" is not big enough. So I learnt something new here. Fer FreeBSD my partition scheme is:

/ = 500M
swap = 512M (Although automatically installation defaulted to more than 800M)
/tmp = 512M
/var = 1Gb
/usr = rest

Fer OpenBSD, I made root "/" with only 128M with no problem. I've adjusted the space so that fer next OpenBSD installation, the "/" will have 256M space. Just in case.

Installation was ok. I installed only the base system, just to test it out. I downloaded 4 iso (you got me right. 4!) and tried to make a bootable dvd using nero but failed miserably. I know there's tutorial out there on how to make FreeBSD dvds, but I can't find one using Nero. Only mkisofs. I can boot the dvd but it can't find the kernel to boot the installation. So it's a failure.

Back to the topic. After the installation, FreeBSD booted flawlessly. No problem whatsoever. So I guess there must be a hardware somewhere making trouble on my OpenBSD installation. My vote is on the faulty NIC. I'll try another OpenBSD shot later.

Sunday, July 27, 2008

OpenBSD RDX200: Installed i386 but still no go. :(

I've installed OpenBSD 4.3 i386 in this pc. Installation went smooth. But still, I stumbled unto the same problem yet again. This mind boggling freeze is really something. Urrgghh! I'm really really eager to get OpenBSD running here. I'm thinking about some hardware stuff faileed here. Maybe my Ethernet card? I have 2 Marvel 1Gb Ethernet card here, both built-in but 1 have some bit or error, it doesn't detect any connection. The device seems to be ok in XP but a few weeks ago, it kept on "Connected" & "Unplugged"-ing fer no reason. So it's no longer usable. Anyway, it might not be relevant with the issue I'm currently having, but a bit of hope is better than nothing at all.

I'm currently downloading FreeBSD 7.0 AMD64. Just to test if this problem only affect OpenBSD or not. I heard that OpenBSD 4.4 will be out anytime soon. Maybe the RELEASE will be different than the snapshot I tried earlier? I'll be looking forward to that too. Later.

Saturday, July 26, 2008

OpenBSD rdx200: Got the dmesg and emailed misc@. Now wait fer some solution.

I've emailed misc@ regarding the problem I currently have with 4.3 AMD64 installation. As it's my 1st post there, I'm a bit nervous. I kept thinking if my email is detailed enough or not, informative enough or not etc. Hopefully it'll be fine. I've also included the dmesg I got with the help of a friend from DaemonForums.org and OpenBSD's 4.3 i386 installation CD.

How I did it? OpenBSD FAQ 4.15 covered the proses. I prepared a msdos-formatted floppy and booted the pc using OpenBSD 4.3 i386 installation cd. Let the booting proses get through until you're presented with something like:

(I)nstall, (U)pgrade or (S)hell?

And choose (S)hell by pressing the "S" key and hitting "Enter" key. On the shell prompt, this is the command you'll need to get the dmesg like stated in FAQ 4.15:

# mount -t msdos /dev/fd0a /mnt
# dmesg >/mnt/dmesg.txt
# umount /mnt


Then reboot the pc. You can then read the dmesg.txt inside your floppy in windows. The file is *NIX formatted so it's quite hard to read as you'll see it like 1 long line of dmesg (if you're using NotePad). I opened it with the built-in text reader of Total Commander. So here's my dmesg.txt. Later then.

OpenBSD 4.3 (RAMDISK_CD) #645: Wed Mar 12 11:31:03 MDT 2008
deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/RAMDISK_CD
cpu0: AMD Athlon(tm) 64 Processor 3500+ ("AuthenticAMD" 686-class, 512KB L2 cache) 2.20 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2
real mem = 1072197632 (1022MB)
avail mem = 1030582272 (982MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 12/23/05, BIOS32 rev. 0 @ 0xfaa60, SMBIOS rev. 2.3 @ 0xf0000 (47 entries)
bios0: vendor Phoenix Technologies, LTD version "6.00 PG" date 12/23/2005
apm0 at bios0: Power Management spec V1.2
acpi at bios0 function 0x0 not configured
pcibios0 at bios0: rev 3.0 @ 0xf0000/0xcf74
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfce00/352 (20 entries)
pcibios0: bad IRQ table checksum
pcibios0: PCI BIOS has 21 Interrupt Routing table entries
pcibios0: PCI Exclusive IRQs: 3 5 10 11
pcibios0: no compatible PCI ICU found
pcibios0: Warning, unable to fix up PCI interrupt routing
pcibios0: PCI bus #3 is the last bus
bios0: ROM list: 0xc0000/0xee00 0xd0000/0x4000! 0xd4000/0x1000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "ATI RS480 Host" rev 0x01
ppb0 at pci0 dev 2 function 0 "ATI RX480 PCIE" rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "ATI Radeon HD 2600" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
"ATI Radeon HD 2600 HD Audio" rev 0x00 at pci1 dev 0 function 1 not configured
ppb1 at pci0 dev 4 function 0 "ATI RS480 PCIE" rev 0x00
pci2 at ppb1 bus 2
mskc0 at pci2 dev 0 function 0 "Marvell Yukon 88E8053" rev 0x19, Yukon-2 EC rev. A2 (0x1): irq 3
msk0 at mskc0 port A: address 00:01:29:d3:79:27
eephy0 at msk0 phy 0: Marvell 88E1111 Gigabit PHY, rev. 2
pciide0 at pci0 dev 17 function 0 "ATI IXP400 SATA" rev 0x80: DMA
pciide0: using irq 11 for native-PCI interrupt
pciide1 at pci0 dev 18 function 0 "ATI IXP400 SATA" rev 0x80: DMA
pciide1: using irq 10 for native-PCI interrupt
ohci0 at pci0 dev 19 function 0 "ATI IXP400 USB" rev 0x80: irq 3, version 1.0, legacy support
ohci1 at pci0 dev 19 function 1 "ATI IXP400 USB" rev 0x80: irq 3, version 1.0, legacy support
ehci0 at pci0 dev 19 function 2 "ATI IXP400 USB2" rev 0x80: irq 3
ehci0: timed out waiting for BIOS
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "ATI EHCI root hub" rev 2.00/1.00 addr 1
"ATI IXP400 SMBus" rev 0x81 at pci0 dev 20 function 0 not configured
pciide2 at pci0 dev 20 function 1 "ATI IXP400 IDE" rev 0x80: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide2 channel 0 drive 0:
wd0: 16-sector PIO, LBA, 38166MB, 78165360 sectors
wd1 at pciide2 channel 0 drive 1:
wd1: 16-sector PIO, LBA, 19092MB, 39102336 sectors
wd0(pciide2:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 5
wd1(pciide2:0:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 5
atapiscsi0 at pciide2 channel 1 drive 1
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: SCSI0 5/cdrom removable
cd0(pciide2:1:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2
"ATI IXP450 HD Audio" rev 0x01 at pci0 dev 20 function 2 not configured
pcib0 at pci0 dev 20 function 3 "ATI IXP400 ISA" rev 0x80
ppb2 at pci0 dev 20 function 4 "ATI IXP400 PCI" rev 0x80
pci3 at ppb2 bus 3
pciide3 at pci3 dev 8 function 0 "CMD Technology SiI3114 SATA" rev 0x02: DMA
pciide3: using irq 11 for native-PCI interrupt
"VIA VT6306 FireWire" rev 0x80 at pci3 dev 9 function 0 not configured
skc0 at pci3 dev 10 function 0 "Marvell Yukon 88E8001/8003/8010" rev 0x13, Yukon Lite (0x9): irq 5
sk0 at skc0 port A: address 00:01:29:d3:78:f5
eephy1 at sk0 phy 0: Marvell 88E1011 Gigabit PHY, rev. 5
pchb1 at pci0 dev 24 function 0 "AMD AMD64 HyperTransport" rev 0x00
pchb2 at pci0 dev 24 function 1 "AMD AMD64 Address Map" rev 0x00
pchb3 at pci0 dev 24 function 2 "AMD AMD64 DRAM Cfg" rev 0x00
pchb4 at pci0 dev 24 function 3 "AMD AMD64 Misc Cfg" rev 0x00
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 "ATI OHCI root hub" rev 1.00/1.00 addr 1
usb2 at ohci1: USB revision 1.0
uhub2 at usb2 "ATI OHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask ffcd netmask ffed ttymask ffef
rd0: fixed, 3800 blocks
uhidev0 at uhub1 port 1 configuration 1 interface 0 "vendor 0x15d9 USB Mouse" rev 1.10/1.00 addr 2
uhidev0: iclass 3/1
uhid at uhidev0 not configured
root on rd0a swap on rd0b dump on rd0b

Friday, July 25, 2008

OpenBSD RDX200: Trying to get the dmesg. Next, change to i386?

Ok. After searching fer answers, jggimi from DaemonForums.org suggested that I should use the i386 version of OpenBSD instead of AMD64 which I've installed.

I was also told that the i386 CD have support fer mounting msdos file system which the AMD64 version didn't have. So now I'm getting the i386's iso. I'll get the dmesg 1st, post it to misc@ first to see if there's any workaround and if there's none, I guess I'll have to settle with an i386 version of OpenBSD fer now. If that is so, it sure is not my lucky day. Hopefully there's something I can do to get this AMD64 version to work. Later on this soon.

Fer FAQ about sending dmesg, please refer to OpenBSD FAQ 4.9. Fer FAQ about getting dmesg to report installation problems, please go to OpenBSD FAQ 4.15 (Take note that the mount -t msdos.. command is referring to i386 CD. I tried it with my AMD64 cd without success.)

p/s: If you didn't know, DaemonForums.org is community-based forum geared towards *BSD user mainly (Although there's even section fer Mac OS X, Linux and even Windows). Many of the users are from the BSDForums.org, the legendary forum which is sadly now severely spam infested. Do visit DaemonForums.org and heck become a member!

Thursday, July 24, 2008

OpenBSD: 4.3 AMD64 can't boot. Found something interesting.

After searching fer some answers / directions, I found out that OpenBSD Man Page is one of the place to go. After reading boot_config part of the man page, I go on and boot to 4.3 again. On the boot prompt I go and type "/bsd -c" to boot to User Kernel Config (UKC). It's something like this:

boot> /bsd -c
UKC>

Then I disabled the ehci by typing:

UKC> disable ehci
UKC> quit

After that 4.3 booted the kernel with ehci disabled. But then the booting problem got worst. My lcd went standby (the LED turned orange) and the HDD LED blinks rapidly. Hard reset AND hard boot didn't work. I had to turn the power off right from the power socket. So the culprit is not ehci (or maybe not JUST ehci?, I'm not sure right now.).

Take note that this UKC will retain the setting you changed per reboot. Means that when you rebooted, you need to change the UKC setting again or else it'll boot the default.

OpenBSD: 4.3 installed, but failed on booting.

Okay. Here's the news. I installed GAG 4.9 as a boot manager, and I've successfully installed OpenBSD 4.3 (AMD64). When the installation is done and the machine rebooted, OpenBSD kernel booted and while it's probing devices, I saw something like:

"ATI EHCI root hub"

And my monitor went blank then the pc restarted back to POST. Weird. I've tried rebooting a few times already but with no success. I've written a new thread on Daemon Forums and hope that somebody will point me to a right direction. Surely I'll google bout this matter later.

As this is my 1st time OpenBSD installation, I'll post a rough walkthrough later. OpenBSD installation is different from FreeBSD and I'm really excited!

DragonFlyBSD 2.0 is out! It's Hammer time!

Ok now head up to DragonFlyBSD and check their latest 2.0 release. Now there's something new to look upon. The DragonFlyBSD team has created a new filesystem named HAMMER (pdf file). From what I read, the filesystem is an innovative new filesystem fer DragonFlyBSD and the developer has stated that they're commited to make the new filesystem as widely accepted by other *BSD siblings and other OSes.

Go and check that out.

Saturday, July 19, 2008

Info: Toshiba IPC5030B LCD information found.

Ok I found a page regarding the information on my Toshiba IPC5030B LCD monitor.

http://www3.toshiba.co.jp/peripheral/products/i5030b.htm

Yes the site is in Japanese so you need to translate the page using any online translation site. I translated the page using my K-Meleon web browser and the information on the LCD is very detailed. Hope this help anyone who's looking fer the same information. Later.

Sunday, July 13, 2008

OpenBSD 4.3: New project, multiboot OpenBSD & XP x64.

Hola. It's been a long while aye. Ok here's the latest project, I'm currently planning to do a multiboot system of OpenBSD and WinXP x64.

Why not FreeBSD? I guess it's time fer me to experiment / try out the other *BSD sibling. I read a lot of user experience / review on OpenBSD and none is negative. People says it's stable and secure. Sure, the port tree maybe not as vast as FreeBSD but it'll be enough I guess. I'm also interested in their encryption.

As my PC is a AMD64 pc, I downloaded OpenBSD's AMD64 installation cd. I heard that OpenBSD never released a full installation cd before to encourage people to buy official CD / DVD but in 4.3, they made it available fer download. My rough hard disk space now is:

1) Western Digital Caviar WD400 40gb: 27gb XP x64, 12gb OpenBSD
2) Western Digital Protege WD200 20Gb: All ntfs

Currently I'm reading references on multibooting OpenBSD with XP. The 1st site I'm looking is http://www.openbsd.org/faq/faq4.html#Multibooting. There's also user experience multibooting OpenBSD with XP but reflecting OpenBSD 3.6: http://www.aleph0.com/computing/openbsd/dualboot/. By reading the links given, I notice that it's a bit different between FreeBSD and OpenBSD on multiboot installation. From a 1st time read, I think OpenBSD will be harder. But as I progress, I might prove meself wrong here. Both articles suggest using Windows's own NTLdr to manage booting to OpenBSD, and it's something I never done in FreeBSD before. So it's interesting.

There's also method using BootPart to look into but unfortunately, I already done fixing my hard disk space. So I have to skip this part. Unless BootPart method can be done without the need to create a small FAT partition. I'll post update on this when I found a way.

Ok, found out another Boot Manager of interest. GAG Boot Manager. It's stated that GAG will not need it's own partition and can be installed to the existing partition. Great. The screenshots is nice too. So I'm downloading it now.

Here's my AMD64 machine:

1. DFI LANParty UT RDX200 CF - DR
2. AMD AthlonÖ 64 3500+ (Winchester) s939
- Cooler Master X Dream K641 low profile CPU heatsink/fan
3. Kingston KVR400X64C3A/512 PC3200 DDR400 512Mb x2
4. GECUBE HD 2600Pro 16x PCIe 512Mb DDR2
5. Primary Master: Western Digital WD400 ATA 40Gb
6. Primary Slave: Western Digital WD200 ATA 20Gb
7. Secondary Master: Samsung WriteMaster DVD-RW ATA
8. Toshiba 15" IPC5030B LCD monitor
9. PS/2 keyboard
10. USB optical mouse

I'll do some researching to prepare fer this multi boot project. In the meantime, I would like to ask fer favor, if anyone have any info on my Toshiba IPC5030B LCD monitor. This Japan-spec LCD is hard to get any info on. Later.

Tuesday, February 05, 2008

RDX200: My new 64bit PC is nearly complete!

Ah. Just a few more items and my new PC will be complete! Currently this is what I have fer my new 64bit PC.

- AMD Athlon64 3500+ Winchester s939
- DFI LanParty UT RDX200 CF-DR
- 2x Kingston 512M KVR PC3200 DDR400
- GeCube Ati Radeon HD2600 Pro 512M PciE

I bought the processor and mobo as used. My boss gave me the twin DDR ram. The GPU is the only thing that's new in box. Yeah I bought a socket 939 pc. You might wonder why as AM2 stuff cost just around the same price. Well, #1: I like the number. #2: As I was starting on buying stuff fer my new pc, I saw the used DFI mobo up fer sale. What caught my attention was the Raid5 capability. Sure it's just SATA 1 but heck I wanted to own a Raid5 PC fer a long time now.

So the mobo was my 1st item fer my new 64Bit PC project. The processor came after that. The 67w TDP (Thermal Design Power) of the 3500+ is just what I needed. I'm not gonna OC my PC and I need it to be cool. The Winchester lack SSE3 instruction but at that time it was the only bargain I could get (less than RM140!). I bought both in the same month (December 2007) and it took me another month before I could buy the GeCube GPU. Luckily my boss upgraded all the PC in our office so there was a bunch of old DDR400 ram around. I wanted to buy 2 pieces from him but he gave me fer free instead.

Funny thing was I can only trust the seller bout all the used items I bought. I didn't manage to test the mobo and processor out because I didn't even have a CPU heatsink!. Not to mention that there's no built-in GPU came with this DFI. Used items have limited guarantee. 1 week mostly.

After I bought my GeCube GPU, early this month; I can't stand it anymore. I bought a no-name heatsink fer RM28 and I used my old 20Gb IDE Harddisk to test the stuff out. The 1st time I assembled the items and turn it on, the mobo lights but indicating error (4 LED lit up. It was supposed to turn off one by one to indicate the mobo startup status). I really thought that I wasted my hard earned money fer nothing there until I noticed that the power connector on the mobo is 24pin and my PSU have only 20pin connected to it. There's another 4pin coming out from the no-name PSU so I connect that one too. After that, I heard the startup beep and there was it, the RDX200 boot screen. Lovely.

So the stuff is all ok. Except fer the no-name CPU heatsink. It was so tight it bent my DFI mobo a bit. I googled around and read bout it happening mostly on intel's mobo. People said it's normal fer the mobo to bend a bit because of the tightness, but it broke my heart to see my mobo tortured like that. And btw, didn't read many of that happening on AMD side. So, after less than 2 weeks testing the new PC out, I disassembled the parts again. This month I'm buying a 250+Gb SATA harddisk AND a new heatsink. My preference is a lightweight heatsink, no more than 360g in weight. Such as:

- Thermalright XP-90 (360g w/0 fan) * Obviously many people gave positive reviews bout this one.
- Scythe Samurai Z Rev. B (355g)

I haven't finalised the heatsink yet. I might add other relevant findings later. I'm also eye-ing on Cooler Master Ammo 533 case. Looks good. I can't wait to try 64Bit FreeBSD! Later.

Saturday, January 19, 2008

FreeBSD 6.3-RELEASE is out!

Yeah you heard it right. A new FreeBSD release is out. Head out to http://www.freebsd.org/releases/6.3R/announce.html to read more about it. Or you can go to http://www.freebsd.org.

I've been waiting fer this release. It's good to know that it's out. I'm sure 7-RELEASE will be out soon too. Can't wait fer my new PC to be built! Later.

Saturday, January 12, 2008

Building new pc for 64bit FreeBSD.

Since my laptop died on me, not much has happened in my FreeBSD world. But now I'm building my new PC, a 64bits PC so I hope I can continue my FreeBSD exploration again soon.

I've been wanting to buy an AMD64 PC, but I only had the financial to do so recently. Currently I only have a few parts with me and I still need to buy a few more before my PC is complete. Currently I have:

DFI LANParty UT RDX200 CF DR motherboard
AMD64 3500+ socket 939 Winchester core

Why 939? Why not AM2? Well, I know AM2 is the standard now but I just like the number '939' :). I went fer DFI LANParty because they have 8 SATA! and 4 can be use with raid 5!. Anyway, this parts is all used, I bought it from lelong.com.my. Haven't tried it all but I believe that it's all working. Hopefully it is because if it's not, it's such a waste.

As you can see, I still have a few more parts to go before my PC is complete. I've been wanting to experience 64 bit FreeBSD fer so long now and hopefully it'll be soon. Later.

6.5 amd64: Modify existing certbot certificates.

Hi, It's been quite some time eh. As you can see, I still upgrade my OpenBSD system regularly but currently I do not have the time to ...