Busy of late and more to come!

oy, what a time the past week has been!

I’ve managed to fix several issues on the website, create a few more,a nd fix them lol. One was a typo, the other was a logic error that slipped by me. In the latter case, it wouldn’t have happened if I wasn’t more worried about *breaking* old code that predates my membership then beign wide awake >_>. I also had to fix a really, really, really old line of code today. That seems to have been broken by one of the site upgrades yesterday.

I’ve been screwing with Services For UNIX, The Korn Shell (various implementations, ranging from SFU to the official ksh93). Shoe horning Windows into a usable system, and trying to keep a steady presence on the RvS servers… but I’m still longing for SWAT !!! It’s been so long since I’ve had a solid game with my teammates (other then in RvS). I’ve also had to update my vimrc file while I was at it, I’ve vastly improve it but still thinkit it could be better. I also tested a few plugins and colo’s as well, the only headache is making sure it works on all of my systems lol. SFU, however seems to be the cause of most problems!

Tomorrow will probably be another monster of a work day, I’m not looking forward to it… There will however be a *lot* of stuff to deal with when I get home, I’m sure of it. At least though, we seem to be moving into a very positive direction for the future (long term). I can’t say that I am happy with some of the things I suspect may have to be done, but I pray it goes well… For the sake of all. I can’t say the same for everyone else in the world, but for me, I only know one thing about myself:


LOYAL TO THE END

Yippie-Kay-Yay Micro$oft SFU !!!

Test one: I wonder if Console is a decent replacement for cmd.exe ‘s terminal emulator — It is

Test two: I wonder if the SFU pdksh can do completion? — It can, just had to find the ‘bind’ commands for it

Test three: I wonder if SFU’s pdksh will work with my %PATH% — it did

Problem one: SFU pdksh seems to require the formal name, e.g. ‘foo.exe’ for programs outside of it’s regular path and runwin32’s search path — That’s ok, I don’t mind much and can alias out stuff like flock.

Problem two: Because SFU follows the unix-style of open it, see if there is a she-bang line (e.g. #!/bin/sh) saying what to run it with, else pass it on to the shell…. It feeds .bat files into it’s pdksh unless they are manually executed, e.g. ‘runwin32 cmd /C foo.bat’ — that is bad, several programs I use wrap themselves in ‘batch’ files on Windows and ‘shell’ scripts on Unix.

Problem three: My universal bourne-based shrc (~/.${USER}_shrc) sets itself to the current Bourne-style shell (e.g. sh, bash, ksh-family, zsh) and Operating System (e.g. BSD, Linux, generic Unix) needs to inspect the $SHELL environment variable to determin what shell to set stuff for. — For some odd reason the SFU pdksh doesn’t seem to set SHELL !!!! To top it off, $USER is not set, but at least the Windows var: %USERNAME% is converted to $USERNAME.

Fix for problem one:

$ mkdir /dev/fs/P/bin      # creates P:bin
$ touch binmaker.sh && chmod +x binmaker.sh
$ vi binmaker.sh
#!/bin/sh
BINDIR=/dev/fs/P/bin

for CMD in `echo $PATH | sed 's/:/ /g' | awk '{ print $0 }'`
do
for EXE in `ls $CMD`; do
echo $EXE | grep -E '.*.exe$' > /dev/null &&
ln -s ${CMD}/${EXE} ${BINDIR}/`echo $EXE | sed 's/.exe$//g'` && echo "made link for: ${CMD}/$EXE"
done
done

$ ./binmaker.sh
.... # symlinks all foo.exe in $PATH to /dev/fs/P/bin/foo

Fix for problem two:

Launch a new session of cmd.exe through windows (e.g. not via SFU; use the run dialog, start menu, or desktop /or quicklaunch icon).

U:Terry> echo %PATH% > mypath.win

Return to SFU korn shell (pdksh):

$ touch batmaker.sh && chmod +x batmaker.sh
$ vi batmaker.sh

#!/bin/sh
BINDIR=/dev/fs/P/bin

make_wrapper() {
[ -e $2 ] && return # file exists, no wrapper needed
local MYFILE=`basename $2`
cd $BINDIR && [ ! -e $MYFILE ] && touch $MYFILE

echo '#/bin/sh' >> $MYFILE
echo 'exec cmd /C "set PATH=`cat ~/mypath.win` && `basename $0`"' >> $MYFILE

echo "${BINDIR}/$MYFILE created"
}

for CMD in `echo $PATH | sed 's/:/ /g' | awk '{ print $0 }'`
do
for EXE in `ls $CMD`; do
echo $EXE | grep -E '.*.bat$' > /dev/null &&
make_wrapper ${CMD}/${EXE} "${BINDIR}/`echo $EXE | sed 's/.bat$//g'`"
done
done

$ ./batmaker.sh
... makes wrapper shell scripts in /dev/fs/P/bin/ for all foo.bat in $PATH

The wrapper scripts this creates look like this:

Terry@SAL1600-$ cat bin/irb
#/bin/sh

exec cmd /C "set PATH=`cat ~/mypath.win` && `basename $0`"

Terry@SAL1600-$

it’s neccessary to set the Windows %PATH% before launch, so it can execute the program — using the path from the invocation environment won’t work, e.g. /dev/fs/P/Devel/Langauges/Ruby/bin/irb in SFU Shells but this woudl translate to CurrentDriveLetter:dev/fs/P/Devel/Langauges/Ruby/bin/irb which won’t work. Note, the program must be executed as P:DevelLanguagesRubybinirb.bat in Windows cmd shell, as that is where it is located on my system.

Fix for problem three:

I modified my ~/.profile from OpenBSD to take care of the $USER and $SHELL issues, which is also nice enough to load my custom initialization file.

$ vi .profile

export TERM HOME
USER=$USERNAME; export USER
SHELL="/dev/fs/P/Utilities/Services_For_UNIX/bin/ksh"; export SHELL

echo "Waiting for screen repaint...."
sleep 2
echo 'Korn power !!!'

ENV=${HOME}/.${USER}_shrc

I set the path to the physical rather then the /bin/ksh ‘shorty’ in SFU, so that if I later find any compatibility issues, I can always work around it ‘specifically’ if necessary.

I’m not sure if it is a problem with the Console2-Devel build I’ve installed or with how SFU’s korn shell expects to run. But a few seconds after startup the prompt disappears as if from a ‘clear’, giving any I/O that results in a line being drawn causes a fix. Since I haven’t figured this part out yet, I’ve just ‘side stepped’ the problem. It takes roughly the amount of time to sleep and echo the message before I am returned to my prompt. A quick parse of my $ENV and we’re ready to rock and all the output on the Console tab is from my ${USER}_shrc file.

I copied an old version of initialization file and made a quick edit. In the file I check for the systems unix name and use it to record the operating system type. The Services For UNIX subsystem still identifies itself as ‘Interix’ even though it’s been under Microsoft’s thumb for a bit.


case `uname -s` in
'FreeBSD') isFreeBSD=1
LSCOLORS='CxGxxxxxBxexExcxdx'; export LSCOLORS
;; # FreeBSD
'OpenBSD') isOpenBSD=1;;
'NetBSD') isNetBSD=1;;
'Linux') isLinux=1;;
'Unix') isUnix=1;;
'Interix') isUnix=1;isSFU=1;;
esac

I want to make a few changes to my shrc, but I don’t think they will work *properly* with SFU. My shrc file also pulls in a local ‘extension’ of itself, called ~/.site_shrc that makes things specific to the current system, for example adding the TexLive binaries to my $PATH on FreeBSD and noting the IP address or doing things that won’t work in the shells/v7sh that I use for testing. It looks like I’m going to have to write a site_shrc for Windows hahaha !!!

There’s more then one way to skin a cat, and this bloody hoge-podge of an operating system ain’t gonna best me !!! I will have a decent CLI interface if I’ve got to invoke a hex editor…

Spiders on a roll

Finally some time to catch up on my LJ, if I can keep my family at bay long enough to type anything meaningful >_>

Got off to a semi-early start, last night I was fairly wasted from the days ops and dropped off to sleep very quickly, all concepts of work largely forgotten until morning. Had to stop off today, Ma decided to upgrade cell phones, her new Motoorola W490 is quite nice. I don’t particularly care much for cell phone though.

So far SAL1600 is 90% of fully operational, I’ve only had minor problems. One, my mic doesn’t work and the sound drivers are pretty shitty, but on the upside seem to be much more stable then the older ones. Maybe my jokes were right after all, WHQL just means it’s certified to suck and help crash your system. I was warned when installing the newest ones from the manufactor, that they weren’t WHQL certified or what not, no biggy for me, because I know what kinda horse shit the company usually passes off for audio drivers lol. I really wish there was something like the Open Sound System for Windows, alas Windows sound technology is probably a good system. The only problem is, drivers!

Another issue is my Flock profile, I think it’s probably a paths issue. On the old box Flock was installed into it’s standard path of %ProgramFiles%Flock (e.g. C:Program FilesFlock) and my profile in %AppData%FlockBrowserProfiles… where %AppData% was formally “C:Documents and SettingsOwnerApplication Data”. On my new install, everything is installed into a ‘category’ folder in P:, e.g. P:GamesRavenShield, P:NetworkBrowsersFlock. And likewise my use profile is in U:Terry. It’s been somewhat problematic getting Windows to agree with me on such, especially the brain dead idea of it trying to copy a huge DVD sized ISO in U:TerryDesktop to C:Documents and SettingsTerryDesktop and bloating my C drive out. Maybe it is just my not knowing the management programs in Windows as well as UNIX or Windows XP is just totally brain damaged by design, I hope the latter but expect it is the former…

The software is willing but Windows is not so cooperative ^_^

The system has however been quite stable of late, pardoning IE7 crashing and a few other paths issues with my profile. I’ve also taken to having a cmd.exe window open on my second monitor most of th day. I find the DOS-inherited commands to be very child like and overly clumsy compared to any BSD or GNU/Linux based system I’ve used. The whole ruckus between copy, xcopy, and robocopy commands/programs on Windows is a nuts, I’ll never understand it… Not after having lived with /bin/cp so long.

I managed to get into TG#1 for some games today, training with Nick, Caern, and Ez. It seems that I’ve taken care of a fair bot of training arrangements lately, all part of an evil plan of course…. Muahuahauah !!! Who knows, maybe this aging war horse will get to see more action soon 😉

Internet Whiteboards

http://www.twiddla.com/ –> no java
http://www.scriblink.com/ –> java but nice ui

Special thanks to [SAS]_Sgt_Medic.

I think I can use these for a few meetings in the future lol.

Crud… After 0400 already and still not finished with everything :

Oh well, at least I had time to inhale a bit of GnuPG hehe.

zzzZzzzzZzzz

So tired…

The [SAS] Killhouse Redux is coming along nicely, haven’t been able to figure out one of the extra’s I wanted… but level 1A is now feature complete, pardoning the stairs. Level 2A is aout 40% done, the second wing, ladies room, and two more hotel rooms need furnishing + a wee bit of work in the hallway (decorations).

So far, the map is coming along pretty nice all things considered. I’ve also got some plans for a few ‘secret’ area’s just to make things interesting. Hehe, if I’m the smoe making the map, why not have a little fun?

The question is how long will it take the membership to find them ^_^

On another note, I’ve been trying to replace Konversation as my IRC client for *nix. Many KDE apps on my laptop seem to suffer greatly on performance when being run under fvwm instead of a full kde session. I tested out tirc, which is nice and handy — even has Vi based key bindings ^_^. The only problem is the bus error when forcing a nick greater then the 9-char standard and doing a call to the nickserv bot.

So far, it looks like it will probably boil down to learning either BitchX or irssi.

The only IRC clients I’ve really liked in the past have been, Konversation (the best!), Chatzilla, and X-Chat. But I’m not really in the mood for needing a web browser to run an IRC client, nor in using X-Chat again. Nice client but eh, kinda boring.

I really need to get some time to focus on KDE4, between family, life, and work. I’m behind schedule on everything these days :

Dang it… I need a vacation !!!!

I never thought we’d be friends — Me & FVWM

Well, I have been looking for a suitable replacement for KDE3 of late on my laptop — tried enlightenment and chucked it. Nice desktop, very elegant feeling but just not my bag :|. Kicked through and finished working with FVWM, I chose to install the unstable 2.5.x build in port.

Normally I’ll only use stable releases unless I’m testing or in need of a ‘sneak peak’ but this time I opted in. I figure, it should be fairly stable with how long FVWM has been around. The original code base of FVWM 1.x was born in 1993 making it about as old as FreeBSD lol. FVWM 2.5 has newer features and I don’t mind a few quirks really, as long as my session doesn’t die or the entire system lock up.

Free Image Hosting at www.ImageShack.us

So far FVWM is really proving it’s possible to have a desktop *your way* without having to kill someone in the process !

I’ve always thought that if I’m ever going to find a window manager I truly love; I probably would have to write my own. I like programs that are powerful, configurable, and extensible — that’s one of the reasons I use Vim in the first place >_>

I have my pager and a useful means of employing my laptops limited screen space. The way The Flibin’ Virtual Window Manager as I call it, handles virtual desktops is actually quite nice. The M by N thing and configuration options have given me a very nice arrangement for working with many programs. Especially in my case, since I need to work with windows that are some times larger then my screen resolution!

Rather then resize the program (scroll bars, ugh) or rescale it as the situation may offer. I can just scroll my screen between the pages and vola! The illusion that the desktop is much bigger then it really is, really fits with the way I use programs.

I installed x11/trayer to get myself a (transparent) system tray, I actually like how FVWM handles iconifing windows but for some apps a system tray is helpful (pidgin). Notice that I do not have a taskbar, desktop icons, or a ‘panel’ — don’t need them nore want them most times.

I like to keep my workspace very thin, it’s for running programs not holding up bells and whistles everywhere. I fI wanted to look at bells and whistles (or unhide them when going to the screen border) I’d run them outright. And covering or autohiding the panel (KDE, Gnome, Windows) is a poor solution for my habits +S.

I have my FVWM configuration launching a program to auto-rotate my wall paper, need to properly daemonize it someday soon. I’m considering giving the X Session Manager (xsm) a whirl as well, worth a try judging by the manual page. I still have some more work to do but so far, I like how it has come out in such a short time.

Why didn’t I ever try the F* Virtual Window Manager before? lol.

Adding MySQL to my OpenBSD machine

My best friend while doing all of this was the MySQL Reference Manual :-).

The hard part was the fact that this and every thing else I want setup should have been done like 6 or 7 hours ago… But that’s my family for ya….

Phase I: Install and Configure the MySQL database service:

My desktop has WAMP installed and a mother load of development tools, my PC-BSD
laptop has the most complete development environment I have access to, and is
where I do all of my real work ^_^.

In order to make some progress in a few bits of playful testing and work that I
do need to tinker with, I’ve elected to setup things on Vectra to avoid the more
transient nature of the Windows machine here…

This is the notes I’ve compiled during the process. Managing to sleep off the
headache and get this done before everyone else wakes up… Grr. The machines an
OpenBSD 4.3-Release system working off an old Pentium 3 500Mhz with 384MB of RAM
— far from ideal for running MySQL but with just me to play with it, it’s no
problemo.

ssh2v
...
su - root
Password:

pkg_add -iv mysql-server
less /usr/local/share/doc/mysql/README.OpenBSD # refer to the instructions
given

vi /etc/login.conf
... # let the login class for _mysql and rebuild the login database
cap_mkdb /etc/login.conf
/usr/local/bin/mysql_install_db
... # initialize the database files
vi /etc/rc.mysql
... # quick script to launch mysql properly, listing 2A
vi /etc/rc.local
... # start it during resource configuration, listing 2B
/etc/rc.mysql
/usr/local/bin/mysql_secure_installation
... # secure the installation := -u root -p (pw=V1p3l2)
mysqladmin -u root -p status
...
mysql -u root -p -h localhost # set up our databases using the mysql client
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 18
Server version: 5.0.51a-log OpenBSD port: mysql-server-5.0.51a

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql> CREATE USER trowa IDENTIFIED BY '*********';
Query OK, 0 rows affected (0.03 sec)

mysql> CREATE DATABASE SpidersWeb
-> ;
Query OK, 1 row affected (0.01 sec)

mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| SpidersWeb |
| mysql |
+--------------------+
3 rows in set (0.00 sec)

mysql> GRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, DELETE, DROP,
-> EXECUTE, INDEX, INSERT, LOCK TABLES, SELECT, CREATE VIEW, SHOW VIEW,
-> UPDATE ON SpidersWeb.* TO 'trowa'@'%';
Query OK, 0 rows affected
mysql> exit
Bye

That basically allows the database user to do just about everything to the
specified database from anywhere. I considered restricting access further but am
not in the mood to screw with changing it later should it become necessary (and
I hate setting up replacement routers, which happens every now and then).

Since every thing in the mysql client ends up in ~/.mysql_history, including the
password used in the CREATE USER statement. I am also rather glad that OpenBSD
keeps everyones nose out of /root by default, I plan on shredding the file:

rm -P /root/.mysql_history

for safety.

Phase II: Verify it works!

To make sure every thing works out properly enough (considering the current
local time!). I opened another urxvt on my laptop and connected to the server
machine.

Terry@dixie$ mysql -h vectra -u trowa -p SpidersWeb                        5:44
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 22
Server version: 5.0.51a-log OpenBSD port: mysql-server-5.0.51a

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql> SHOW TABLES
-> ;
Empty set (0.01 sec)

mysql> exit
Bye
Terry@dixie$ 5:45

Various notes

I found the kern.maxfiles sysctl and standard issue /etc/my.cnf file suitable
for my needs (for now). So no need to screw with them tonight, later on I need
to work on setting up httpd and things… Already 0600Z and work is early
tomorrow so no time to sor that out

Rather then muck about, in case I need to stop and start mysqld I moved the
startup from /etc/rc.local to calling a shell script to run it properly. That
way OpenBSD should allow mysqld sufficant file handles and I can control things
via /etc/my.cnf if I wish to lower it.

Listing 1: /etc/login.conf

#
# This class is used when running MySQL from /etc/rc.local
# XXX: It will *N_O_T* be used when starting/stopping mysqld manually!!
#
_mysql:
:ignorenologin:
:datasize=infinity:
:maxproc=infinity:
:openfiles=3580: # I've set this to sysctl::kern.maxfiles
:stacksize-cur=8M:
:localcipher=blowfish,8:
:tc=daemon:

Listing 2A: /etc/rc.mysql

#!/bin/sh
#
# A simple script to launch mysqld with the proper login privledges
#

su -c _mysql root -c '/usr/local/bin/mysqld_safe >/dev/null 2>&1 &'
echo -n ' mysql

Listing 2B: edits to /etc/rc.local

# launch the MySQL database server
if [ -x /usr/local/bin/mysqld_safe -a -x /etc/rc.mysql ]; then
/etc/rc.mysql
fi

Dails efforts…

Finally a productive day… Because every one else but me slept through most of the afternoon ^_^

I finished adding a summary mode to my script, later I want to put in user agent exclusions among other things; so it can be tuned to more automated traffic hehe.

I also managed to install Ubuntu 8.04 on SAL1600 today, I’m very happy to say that the boot time is a heck of a lot better then 6.06 was when I inertially tested the distribution. The installer is more complex then PC-BSDs but still quite simple, last time I needed to use an ‘alternate’ install CD with a hacked debian installer in order to get GRUB in Ubuntu’s / rather then screwing with GAG. This time, I only had to scratch my head enough to choose the ‘advanced’ button before commiting to the format & install — and select the location to install GRUB to hehe 😉

Got done in about a half hour, counting setting up a few packages (nVidia drivers, g++, JDK, zsh, etc) and I can finish the rest later. I’m not very partial to Ubuntu although I do greatly like the human theme for Gnome they use. While both FreeBSD 6.x and Linux 2.6.x are fully able to support my desktops hardware: FreeBSD works perfectly out of the box other then sound, which is just a driver away. Most Linux distro on the other hand, need me to screw with things. Debian Sarge for example tried to convice me I had no hard drive controller or network interface, for which NetBSD agreed and Slackware concurred about the NIC ^_^.

I want to test CrossOver Games to see if I could get Rvs or SWAT4:TSS working in it… There is a trial for PC-BSD but the Linux version is supposed to work better and is officially supported. I’ve heard that WINE has improved greatly on FreeBSD (and PC-BSD 1.5.x includes patches to aid it afaik). Even with the gripes of WINE working much better on Linux then FreeBSD, I only tested it on FreeBSD two years ago and threw it out as useless for even light duty gaming.

I’d really prefer to be running Slackware or Gentoo if I had to run a GNU/Linux distro off my desktop… But I don’t have time to muck about just for testing this thing, hence the Ubuntu installation lol. I expect it will fail horribly and I’m not expecting much more then being able to get RvS installed but I’ll give it a go. And to be frank, with how poorly done Rvs and SWAT4 are from a software perspective… I’m really supprised people can run then on Vista, hell we have to side-step problems the games have with modern graphics cards (and SWAT4:TSS ain’t that fucking old!)

To be honest, I think I would have to create my own “Linux From Scratch” system to ever truly be happy with a Linux distro, that or just install OpenBSD instead and be perfectly happy hehe xD. But, in terms of having to run a specific OS, I’d be much more happy with GNU/Linux then I am with Windows XP. The only reason I’ve never removed WinXP from my desktop is I need one game box, you could say… If I wasn’t in [SAS] then I would be totally and 100% free of Windows for the rest of my days. But I love my team to damn much to leave, even if it means having to keep one working copy of Windows around.

The thing that really pisses me off, I can run FreeBSD and Linux on my desktop and it is rock solid for all I need it to do (y). Running Windows XP on the same machine, I only *wish* I could say the same hahaha. Between the nVidia drivers, Direct X 9, and Creative Labs + Raven Shield not playing nicely together it loves to get blue screens of death under XP.

At least when a machine has problems with running BSD or Linux, you generally get what you paid for but when Windows has problems, it blows because you got charged by every bastard along the way and his dog too!

1.5->1.5.1 update, dead flock’er

GRRRRRRRRRRRRRRRRRRRRRRR

PC-BSD update for 1.5->1.5.1 went smoothly if slowly but broke flock 🙁

Well, at lest they are starting to figure out you don’t have to nuke every installed port/pkg to do upgrades… They however still don’t seem to have fixed the flib’n syntax error in their sound detection systems XML file, which has been there since the new sound detection system hit.