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!

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 ...