Showing posts with label NC4200. Show all posts
Showing posts with label NC4200. Show all posts

Tuesday, November 01, 2011

Farewell NC4200, hi Asus K43U. OpenBSD 4.9 AMD64 here I come!

Hey,

I just bought myself a new laptop. It's as Asus K43U Series laptop with AMD Vision E450 processor. I have to admit I'm an AMD fan so that's why I don't buy intel (my NC4200 was given to me, didn't bought it).

And so, I'm saying goodbye to my NC4200. It was a pleasure working with it. I'll put out a brief review of this Asus machine later.

Another good news, I'll proceed with OpenBSD 4.9 AMD64 version next! Yeah! I've been dreaming to try out AMD64 version of OpenBSD so this is the best time for it. Not forgetting to *finally* proceed to install 4.9. So expect me to write something about that soon enough. I've already prepared the installation media for 4.9 so it won't be long now. Later then.

Thursday, September 08, 2011

OpenBSD NC4200: Simple script for audio output swapping for scrotwm.

Heyya,

I've written a simple script to alternate audio out between my laptop speakers and phone out. This script is intended for scrotwm, but also can be used on its own.



As usual, feel free to copy this file and improve it. You can see by the Gist that there's 2 files, the first is .scrotwm.conf and the next one is audioout.sh (see the file name on bottom right of the embed).

The .scrotwm.conf is a snippet of configuration needed to make the script work with scrotwm's key binding. As you can see, I've set the key binding to Mod+Shift+a key. So whenever I press the key binding, the audio output will swap between speaker and phone out. Very simple. All I need to do is add the snippet to ~/.scrotwm.conf.

Then I need to save the 2nd file as audioout.sh and save it in /usr/local/share/scrotwm/. There's a few other default scrotwm's script inside there. Make sure the audioout.sh is executable, if not do chmod 755 or similar which is suitable for your environment. Then enjoy.

Previously I would need to manually mute/unmute both master and phone out as I sometime uses headphone. Now I can simply press Mod+Shift+a to swap between it.

Take note that this script can be used even without scrotwm. You just need to copy the 2nd file to your ~/ (home) and run it by typing ./audioout.sh or use another keybinding if available. Later.

Wednesday, May 25, 2011

OpenBSD NC4200: Burning DVD using USB DVD-RW.

Ahh, My anime is screaming to be put into a DVD as my disk is nearly full. So I have an idea to write an entry for this blog-o-mine. Writing DVDs.

My laptop doesn't have optical drive built in. So I'm using the USB DVD-RW drive. The dmesg for the usb drive is:

umass0 at uhub0 port 3 configuration 1 interface 0 "Hewlett Packard USB Multibay IDE 2.466" rev 2.00/2.46 addr 3
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, initiator 0
cd0 at scsibus0 targ 1 lun 0: SCSI0 5/cdrom removable


As for the software needed, the minimum is:

cdrtools-2.01p1
dvd+rw-tools-7.0p0


cdrtools contains mkisofs for writing CDs and dvd+rw-tools contains growisofs for writing DVDs. To ease my DVD burning project, I also installed:

tkdvd-4.0.9p0

Basically for DVD writing, growisofs is quite the standard for it. It's command line so customization is great. But I'm using TkDVD which is "a GUI for dvd+rw-tools and cdrecord/cdrkit. It allows burning DVD+R/RW, -R/RW, and CD-R/RW discs easily.". But while using the program, you can still see the command line it's using to burn the DVD.

First, I make sure that my user is in the operator group.

In /etc/fstab, mounting the drive would be using /dev/cd0a, but for writing disk it is /dev/rcd0c. By default, the /dev/rcd0c is set to crw------- which is Read/Write for root only. So I need to allow operator group to read/write the device.

# sudo chmod g+rw /dev/rcd0c

So now the operator group can write to the device. Now to perform the burning. I inserted the DVD disc, no need to mount anything. Then fire up TkDVD.

TkDVD's gui will appear, which is very user friendly. I left all of the options intact except for the DVD size. Choosing all the *.mkv and *.ogm files I wanted to burn, I make sure the Burning device: is set to /dev/rcd0c. Then I write the Volume name: to the name of the disc I want it to be known and hit the Burn button. I can also review the command TkDVD is using to burn my DVD in Command: field. Writing initiated and when it's done your DVD disc will be ejected. Easy! Later then.

Wednesday, February 09, 2011

OpenBSD NC4200: Using Plantronics USB Headset.

It's been a while since I last post anything. My OpenBSD box is still running great. Yesterday I got a Plantronics USB Headset and I wanted to see if I can get it to work in my 4.8. When I plugged the headset, here's the dmeg:

uaudio0 at uhub1 port 1 configuration 1 interface 0 "Plantronics Plantronics USB Headset" rev 2.00/1.20 addr 3
uaudio0: audio rev 1.00, 10 mixer controls
audio1 at uaudio0
uhidev1 at uhub1 port 1 configuration 1 interface 3 "Plantronics Plantronics USB Headset" rev 2.00/1.20 addr 3
uhidev1: iclass 3/0
uhid0 at uhidev1: input=1, output=0, feature=0


Seems to be ok. Now to test the headset. For I change the symlinks for these files:

/dev/audio = from /dev/audio0 to /dev/audio1
/dev/sound = from /dev/sound0 to /dev/sound1
/dev/audioctl = from /dev/audioctl0 to /dev/audioctl1
/dev/mixer = from /dev/mixer0 to /dev/mixer1

Normally it can be done manually by using:

$ ln -sf /dev/audio1 /dev/audio

and using the same method for the other 3 devices. I read someone's post on the net and he provided with this simple script which I named chaudio.sh file.

====== chaudio.sh script starts ======
#!/bin/sh

p=$1

ln -sf /dev/audio$p /dev/audio
ln -sf /dev/sound$p /dev/sound
ln -sf /dev/audioctl$p /dev/audioctl
ln -sf /dev/mixer$p /dev/mixer

exit 0

====== chaudio.sh script ends ======

After I created the script, chmod it to executable and then just type:

$ sudo ./chaudio.sh 1

and all 4 symlinks got changed. Doing ./chaudio 0 will change the symlinks back to default sound.

I tried testing the USB headset using:

$ cat /dev/urandon > /dev/audio1

and I can hear sounds on the headset. But, here comes the unsolved (yet) part, using mplayer or mp3blaster will output the sound to the laptop's speaker. Drats. I'm currently trying to figure this out. Got something to do with sndio stuff I guess. Will update on this if I find anything interesting. If you know any tips for this, please share.

Update: I found out that my Plantronics USB Headset is faulty. It's wacko even in XP. Damn. Later then.

Wednesday, December 22, 2010

OpenBSD NC4200: scrotwm + xstatbar & I think I found a bug.

xstatbar is a status bar which can be use in scrotwm to display cpu usage graph, memory usage, battery/AC status, Master Volume and date/time. Informations which is displayed is currently fixed and hacking the source code is the only way to customize the display. I downloaded and installed xstatbar. Then I edited ~/.xsession.

*unrelated bits ignored*
xstatbar -y 753 -w 1024 &
exec scrotwm
*unrelated bits ignored*


It's basically telling xstatbar to appear from pixel 753 with the width of 1024 pixel. My laptop's resolution is 1024x764 so it's the best pick. Displaying xstatbar will take the height of 15 pixel so do the math. Then I edited ~/.scrotwm.

*unrelated bits ignored*
# Region setting for xstatbar use.
region = screen[1]:1024x753+0+0

*unrelated bits ignored*


This one basically tells scrotwm to use only 1024x753 for the window manager and 15pixel is reserved for xstatbar's use. Then after I log in, xstatbar happily resides on the bottom area. Both scrotwm and xstatbar is still under development so there's more features will be added in the future.

A few days using scrotwm, I managed to get scrotwm to crash when using Mozille Thunderbird. It's quite random but replication is possible. In scrotwm, I opened Thunderbird in workspace 3 (my fav workspace for Thunderbird). The main Thunderbird program will be there but I always move email composing dialog in workspace 4. In workspace 3, I will click Write button and the compose dialog will be in workspace 4. Switching to workspace 4 and I will write the recipient's email address. Auto complete's dialog will be displayed and that's when scrotwm will crash, dumping core and returning me to xdm. But like I've stated, it's quite random with most of the time I'm being lucky. Maybe there's something else which made this happened but I'm very sure it has something to do with Thunderbird as I didn't see that when using other program. I've registered with FlySpray but I'm not sure whether to file a bug report yet. Later.

Tuesday, December 21, 2010

OpenBSD NC4200: Playing with scrotwm.

Yes I'm looking for another tiling window manager. Then I saw scrotwm. I installed the scrotwm package and edited my ~/.xsession. Take note that I'm using xdm with dialog to choose window manager to load.

managers=scrotwm,wmii,xfce4,fvwm
*ugly bits ignored*
case $manager in
scrotwm)
xscreensaver -no-splash &
nohup sh ~/davmail/davmail.sh ~/davmail/davmail.properties &
eval `cat ~/.fehbg`
exec scrotwm
;;
*ugly bits ignored*


Then scrotwm loads. My opinion, scrotwm is FAST!. Usually I can notice a bit of lag when switching between workspaces (Mod+Num) in wmii but in scrotwm, the speed is excellent. Not to mention that the configuration is very easy. So, I created my personal scrotwm config file ~/.scrotwm.conf:

# My scrotwm config
# Change modkey to Mod4 (Windows key)
modkey = Mod4

# Programs
program[lock] = xscreensaver-command -activate

# Key Bindings
bind[lock] = Control+Mod1+Delete
bind[swap_main] = MOD+Shift+Return
bind[spawn_term] = MOD+Return


Basically this is the essential stuff I'm used to do with wmii. In scrotwm, pressing Mod+Return will not open xterm but it will swap between open apps. So I changed that one. After I done editing the config file, pressing Mod(windows key)+Q will restart scrotwm and changes got applied. Very nice. The only thing I don't like about scrotwm is that the title bar have eye-bleeding-font but that's not something that cannot be changed. Also by default, there's no indicator on how many active workspace I have opened. In wmii, there will be numerical indicator on the active workspace. I've only been using scrotwm for less than 10 minutes so I know there's much more to discover. I have a feeling this will be my fav wm as speed is essential to me. Not forgetting that scrotwm was coded in OpenBSD by OpenBSD developers. Later.

Friday, December 17, 2010

OpenBSD NC4200: Another rough tweak for xdm with multiple window manager.

After reading Gentoo Wiki I found another way to get xdm to let you choose desired window manager. This is rougher than the previous tweak I posted. For this one, I need to edit 3 files.

Step 1: Edit /etc/X11/xdm/Xresources.
I edited the file with these values:

xlogin*login.translations: #override \
   *default bits ignored*
   <Key>F1: set-session-argument(failsafe) finish-field()\n\
   <Key>F2: set-session-argument(fvwm) finish-field()\n\
   <Key>F3: set-session-argument(xfce4) finish-field()\n\

   *default bits ignore*


The bolded parts are the values I inserted.


Step 2: Edit /etc/X11/xdm/Xsession.
I edited the file with these values:

case $# in
1)
   case $1 in
   *default bits ignored*
   fvwm)
      xscreensaver -no-splash &
      nohup sh ~/davmail/davmail.sh ~/davmail/davmail.properties &
      eval `cat ~/.fehbg`
      exec fvwm
      ;;
   xfce4)
      exec startxfce4
      ;;

   esac
esac


Like Step 1, bolded parts are the values I inserted. Basically these 2 steps will tell xdm to load fvwm if I press F2 after I type my username and password or load xfce4 if I press F3 after I type my username and password. Eh, what about my fav-o-win-manager wmii?. Ahh. For that one I need to go to Step 3.


Step 3: Edit ~/.xsession.
This one is the long one. Trust me if I know a shorter way I would put it here. For this I edit:

xscreensaver -no-splash &
nohup sh ~/davmail/davmail.sh ~/davmail/davmail.properties &
eval `cat ~/.fehbg`
exec wmii


Gotcha! Ho boy I love to do that. Well it's basically very short. So now if I press Return (Enter) key after I type my username & password, wmii will load. Personally, I prefer the previous tweak I posted earlier because I don't need to edit a few files. For previous tweak, I will know which window manager I will choose but for this tweak, I have to memorize which F* key will load which window manager.

Sure, SLiM looks prettier but xdm comes with X11 by default. Later.

Tuesday, December 14, 2010

OpenBSD NC4200: Another info on OpenSMTPD.

I wrote about OpenSMTPD before and the link I gave previously is no longer active. While searching for more info on OpenSMTPD, I found this page http://calomel.org which has informations and tips on many *BSD related stuff (mainly OpenBSD). There's also section on OpenSMTPD How To which is great.

Thursday, December 09, 2010

OpenBSD NC4200: mcabber, console jabber client connect to Google Talk thru proxy.

mcabber is yet another console jabber client. There's a few more console messaging program but I'll get my hands dirty on this one first. I downloaded and installed the mcabber-0.10.0.tgz package.

I edited ~/.mcabber/mcabberrc. This is what I changed:

set jid = me@gmail.com
set server = talk.google.com
set port = 443
set ssl = 1
set proxy_host = "proxy.com"
set proxy_port = 8080


I left all the other options untouched. Then I run mcabber by issuing, uhm, mcabber in xterm. Then mcabber asked for my gmail password and voila!, I'm connected to GTalk. I can see my Google Talk friends listed but haven't had the chance to try and chat with any of them. Anyway I kept getting "feature not implemented" notification but unless I do some chatting, I don't quite sure what's the missing "feature". Maybe I'll update this part later.

Just a note, using the same setting, I can now login to GTalk using pidgin messenger. As pidgin is too much for wmii, I rather stick with mcabber. If you have other (preferably better) console jabber messenger program which can use proxy, do tell me. I'm interested to try out others.

Thursday, November 25, 2010

OpenBSD NC4200: Ctrl + Alt + Del to lock wmii using xscreensaver.

1 thing I like about XFCE is that if I hit [Ctrl]+[Alt]+[Del], XFCE will lock my session using xlock or xscreensaver. By default, wmii can't do that. I've been searching for samples to do that but most samples that I've encountered are either using Ruby or Python. So I tried to just edit the ~/.wmii-3.5/wmiirc. After a few testing and frustrating hanging of wmii, I managed to get the key binding working by inserting this line:

# Key Bindings
   *default lines skipped*
   Key $MODKEY-Shift-$UP
      wmiir xwrite /tag/sel/ctl send sel up
   Key Mod1-Control-Delete
      /usr/local/bin/xscreensaver-command -activate

!
   for i in 0 1 2 3 4 5 6 7 8 9; do
   *default lines skipped*


The bolded lines are the addition to make the key sequence work. So after reloading the config, pressing Ctrl+Alt+Del locks my session using xscreensaver. Great. I read that new version of wmii changed the wmiirc configuration so FYI, this configuration is using wmii 3.6. 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

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.

Monday, November 08, 2010

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.

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.

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