DotNetNuke TextEditor Tips

I’ve started a new Visual Studio 2010 DotNetNuke Module project recently. After spending weeks on the SQL and Data Access Layer I began working on the User Controls.

The first control was the DNNTabStrip and it worked flawlessly. Next I added a TextEditor control and then strange things happened.

  1. There was no intellisence in the HTML or in the Code Behind.
  2. Everytime I changed the HTML the *.designer.cs file would change my TextEditor declaration to a “System.*.*” name space which breaks the Control until I put it back.

The solution to #1 was EASY… I had forgotten to setup the project properties. (Under Properties -> Web -> Servers, set it to use Local IIS and set the Project URL to the full URL of your project (*/DesktopModules/Project) and then override the applocation root to be the DNN Install.

Once I had done this, intellisense worked nicely =D

For #2, I surfed the web searching and found temporary solutions and then I just tried another…

Both the Code.ascx.designer.cs and Code.ascx.cs both implement the same class so why not just move the control from the designer file to the code behind.

After I have done this, it quit attempting to change it since it was already declared.

I doubt it’s the proper fix but it beats changing it on EVERY edit of the HTML.

How-to VPN for Mac OS X 10.4 Tiger

Creating a VPN connection for Mac OS X 10.4 Tiger

  1. Open your Applications folder.
  2. Click on Internet Connect.
  3. Click on the VPN icon. A small option window will open.
  4. Select the L2TP over IPsec or PPTP option and click Continue. The small option window will close.
  5. Select Edit configurations in the Configurations drop down menu.
  6. When the large option window opens, type in the following:
    • Description: (a connection name)
      Note: It is recommended to use a memorable name, such as <location name> VPN.
    • Server Address: <VPN Server DNS name or IP Address>
    • Account Name: Your Account name
  7. Select the Password option for User Authentication.
  8. Click OK and then Connect. A small window will open.
  9. Type your Banner password in the Please enter your password field and click OK.

When connected you will see “Status: Connected to <ip address of location>”

Another VPN how-to with screenshots: https://www.publicvpn.com/support/MacOS10.4pptp.php

Fresh GENTOO on old hardware

I’ve been trying to build a cross-compiler for x86, x86_64, PPC, PPC64 and ARM so I can built a DISTCC cluster… This hasn’t been going so well…

I tested on Gentoo and found the cross compiler there worked so I figured I’d spend a day and install Gentoo on a couple of older PCs… Spent a week on it =/

Machine #1: PowerMac G4 [PPC 1GHz, 384 MiB Ram, 80GB Disk]
Machine #2: PowerEdge 6450 [Quad Pentium 3 700MHz XEON, 1GiB Ram, 16GB Disk]

First Problem: The new minimal install CDs don’t seem to work on these so I use the old 2008 minimal CDs which boot fine.

Second Problem:
* ERROR: sys-apps/portage-2.1.9.25 failed:
* IO Failure -- Failed 'touch .unpacked' in /var/tmp/portage/sys-apps/portage-2.1.9.25
*
* Call stack:
* ebuild.sh, line 2320: Called ebuild_main
* ebuild.sh, line 2227: Called dyn_unpack
* ebuild.sh, line 746: Called die
* The specific snippet of code:
* touch "${PORTAGE_BUILDDIR}/.unpacked" || die "IO Failure -- Failed 'touch .unpacked' in ${PORTAGE_BUILDDIR}"
*

Imagine that… /bin/touch is broke?!

The fix: http://forums.gentoo.org/viewtopic-p-6521257.html
Copied from external site:

mv /bin/touch /bin/oldtouch
echo '#!/bin/sh' > /bin/touch
echo 'echo -n >> "$1"' >> /bin/touch
chmod +x /bin/touch

After you get the system going, move the old touch back – It’s an issue with the old kernel on the boot cd and coreutils (i think)… the new kernel works fine.

Third Problem:

After a reboot, neither machine will finish the init process and the process is extremly slow. Then I noticed they kept repeating this message:
“caching service dependencies…”
There was also notices about the time being newer than it should be… So my time was in the future when I was setting up the Gentoo servers…

The fix:

find . -print0 | xargs -0 touch

(I had to undo my touch fix above to make this work.)

Fourth Problem:

The PPC Machine wouldn’t boot – it couldn’t find it’s root. Come to find out, in /dev I had no hdX or sdX devices…

> e2fsck_check_if_mount: Can't check if filesystem is mounted due to
> missing mtab file
> fsck.ext3: Device or resource busy while trying to open /dev/hda4
> Filesystem mounted or opened exclusively by another program?

I left this line in on the kernel setup:

General setup  --->    �
[ ] enable deprecated sysfs features to support old userspace tools 

After I unchecked that, the machine ran with no probelm. The udev package creates these devices, but becuase the kernel was trying too… well, noone got along until I fixed the kernel. http://forums.gentoo.org/viewtopic-t-841573-start-0.html, http://forums.gentoo.org/viewtopic-t-854350-start-0.html

Fith Problem:

When I isntalled yaboot, it wouldn’t run… again it was because the new yaboot doesn’t like the old kernel… The fix was simple… Run the yaboot from the live cd specifying the –chroot /mnt/gentoo or –config /mnt/gentoo/etc/yaboot.conf

Sixth Problem:

On the PowerEdge 6450 server, after I installed Gentoo, the kernel would freeze on “BIOS data check”. After some google’ing I found that if I added “nobd” to lilo then it would auto skip the BIOS data check… Within lilo.conf you can set ‘suppress-boot-time-BIOS-data‘ in the global options. There maybe a kernel setting in make menuconfig but I haven’t looked hard enough. (This machine takes several minutes to boot so I REALLY don’t want to mess with this.)

Now both machines have Gentoo installed and are running a system update with modified CFLAGS (to take advantage of altivec, mmx, sse and so forth.)

Reason of post: So next time I do this I can quickly see how to fix these errors =P

QEMU PPC and slackware – part 2

Now I have Slackintosh 12.1 installed… I reboot to find it can’t boot. It just has the OpenFirmware header and stalls. I have no clue if yaboot even works on QEMU for PPC… =/

In the meantime I am using this to boot the Slackintosh image:

qemu-system-ppc.exe -cpu G4 -M mac99 -m 512M
 
-hda IMAGEslack.qcow2
  -cdrom ISOslackintosh-12.1-dvd-install.iso
  -kernel KERNELSLACKKERN
  -initrd KERNELSLACKINITRD
  -append "root=/dev/hda3 ro video=ofonly"
  -net nic,vlan=0,macaddr=52-54-00-EA-B0-9A,model=pcnet
  -net user,vlan=0,restrict=no,hostfwd=tcp:127.0.0.1:2222-:22

This lets me boot with no problems and I can ssh into 127.0.0.1:2222 and get access to the emulated Slackintosh. (Using -net user... doesn't allow internal network access, but allows internet access which is what I need at the moment. With SSH being open on the local box I can move files in an out with no issues.)

Next: recompile Slackware 13.1 sources...
Todo: attempt to use QUIK instead of YABOOT for booting the image

QEMU PPC and slackware – part 1

So, I got bored one weekend and got my PowerPC 1GHz custom built Mac out… It currently has Gentoo installed and I prefer Slackware so I got the idea: “Let’s port Slackware over to PowerPC!”… Of course it’s been done before with the Slackintosh project but it hasn’t been updated in a year and I want Slackware 13.1 to have my linux pcs to be in sync.

Idea 0: Install Slackintosh 12.1 then update the sources… I can’t get the CD to boot =/ no go…

Idea 1: Compile Slackware 13.1 Sources on Gentoo (this does require manually installing pkgtools.) — Well this is NOT straight forward as Gentoo does some things differently. (ex. GNAT, LTO, and other packages can’t be found when comipiling GCC… They do exist on Gentoo though.) – That is put aside for the moment…

Idea 3: Install Slackintosh in QEMU and copy packages via SSH to the PowerPC box and then upgrade (after recompiling the upgrades…) — This is in progress…

QEMU and Slackintosh: Well, the CD doesn’t boot here either BUT I extracted vmlinux and initrd from the ISO and I can boot QEMU that way so I can install Slackintosh in QEMU.

QEMU Command:

qemu-system-ppc -cpu G4 -M mac99 -m 512M
  -kernel KERNELVMLINUX
  -initrd KERNELINITRD
  -append "cdroot root=/dev/ram0 ramdisk_size=25600 rw"
  -net nic,model=pcnet,macaddr=52:54:00:12:34:58
  -net user,restrict=no,hostfwd=tcp:127.0.0.1:2222-:22
  -boot order=ncd -hda IMAGEslack.qcow2
  -cdrom ISOslackintosh-12.1-dvd-install.iso

This forces QEMU to run as a NewWorld PowerMac – not my exact model, but close enough.

PS – the normal command with a good CD Image is this:
qemu-system-ppc -boot order=d -cdrom ./iso/image.iso

This is slow to install but o-well… It is emulated =D

Updated: 2/19/2011 – removed -net tap… as -net user… is all i need for network access currently.

To Mom, From Bailey and Dad

After Thanksgiving both my wife and I began to have sleeping difficulties. After a week or two I came to the conclusion that I was having problems sleeping because I needed to deal with something. That something I believe is the fact that my daughter is no longer here and it’s Christmas.

I’ve been thinking of how and what to do for Christmas since Bailey isn’t here. My wife and I have already decided that we aren’t decorating so we don’t have a tree or any lights outside the house. Something is missing and we don’t know how to fill the void. My first thought was to buy Bailey a toy but there is no logical reason to do so. But then…

This past week I figured out what I can do… If Bailey were here we would go Christmas shopping for Danae and she would pick out something for her. Because she couldn’t make it, I decided to go and pick something out as if she were there to help.

I went to Zales and picked out a nice necklace that has a heart that is part pink as I think Bailey would like pink. After that Bailey needed a card to go with it; after all it is her first Christmas. So we went over to Hallmark and began looking for cards… After looking at several cards and watery eyes I found just the right one.

I spent all of my available money on this one gift so let’s hope I did a good thing for Bailey.

Hyper-V Server 2008 R2 – Adding a SHELL

I installed Hyper-V Server 2008 R2 and of course there is no windows explorer… Being a free OS it was worth looking at but I’d like to be able to login and do things like surf the web, move files and such…

First we install Hyper-V Server and then…

I ran “net use G: \remotepcshare” and then run the FireFox Installer. After that I downloaded CubicExplorer and SharpEnvironment… After installing those I just ran the installer…

Oops, no worky… SharpEnvironment fails to launch until I go and download oledlg.dll and put it in C:Windows… Worky Worky…

One last thing:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTFoldershell]
@=”cubic”
[HKEY_CLASSES_ROOTFoldershellcubic]
@=”cubic”
[HKEY_CLASSES_ROOTFoldershellcubiccommand]
@=”"C:\Program Files\CubicExplorer\CubicExplorer.exe” /idlist,%I,%L”
[HKEY_CLASSES_ROOTDriveshell]
@=”cubic”
[HKEY_CLASSES_ROOTDriveshellcubic]
[HKEY_CLASSES_ROOTDriveshellcubiccommand]
@=”"C:\Program Files\CubicExplorer\CubicExplorer.exe” /idlist,%I,%L”
[HKEY_CLASSES_ROOTDirectoryshell]
@=”cubic”
[HKEY_CLASSES_ROOTDirectoryshellcubic]
[HKEY_CLASSES_ROOTDirectoryshellcubiccommand]
@=”"C:\Program Files\CubicExplorer\CubicExplorer.exe” /idlist,%I,%L”

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTFoldershell]@=”cubic”[HKEY_CLASSES_ROOTFoldershellcubic]@=”cubic”[HKEY_CLASSES_ROOTFoldershellcubiccommand]@=”"C:\Program Files\CubicExplorer\CubicExplorer.exe” /idlist,%I,%L”
[HKEY_CLASSES_ROOTDriveshell]@=”cubic”[HKEY_CLASSES_ROOTDriveshellcubic][HKEY_CLASSES_ROOTDriveshellcubiccommand]@=”"C:\Program Files\CubicExplorer\CubicExplorer.exe” /idlist,%I,%L”
[HKEY_CLASSES_ROOTDirectoryshell]@=”cubic”[HKEY_CLASSES_ROOTDirectoryshellcubic][HKEY_CLASSES_ROOTDirectoryshellcubiccommand]@=”"C:\Program Files\CubicExplorer\CubicExplorer.exe” /idlist,%I,%L”

Note: The path needed adjusted… Also, this reg file was found in the CubicExplorer Forums.

After putting this in a reg file and executing it, Cubic Explorer opens when I try and open folders…

IceCast2, ices0, ices, darkice, JACK, PulseAudio

This started out as just testing IceCast2 with ices… I quickly found that this didn’t work for me…

My goals:

  1. Able to stream audio to Windows, Mac OS X, Linux using default applications
  2. Able to stream my 5 (five) MP3s (yes, I only have 5…)
  3. Able to stream audio from my sound card
  4. Able to stream audio from my tv card AND record it to file at the same time

Goal 1:

ices didn’t work like I wanted… I even have MPlayer on my Mac and couldn’t get ices + IceCast in a format I could use. (It uses OGG only from everything I’ve research…)  I know that iTune and Windows Media Player can can stream MP3 streams so I found ices0 which does send the audio stream as MP3

Goal 2:

This is how I tested goal one. I figured it’d be simpler to make it work with a playlist of MP3s instead of streaming the audio ports directly… It was slow to figure out why it didn’t work, but now I can stream MP3s with ease.

Goal 3:

Next I wanted to change from a playlist to an audio device… Wow… ices0 doesn’t do that… ices does but thats only in OGG… After a bit of research I found DarkIce. After a little tinkering I have DarkIce + IceCast2 streaming /dev/dsp1 which is my TV Card’s audio… Unfortunately the audio level is too low… (Still working on this problem.)

Goal 4:

The last important thing is that I’d like to be able to stream audio over the LAN or NET and also record it locally… It seams that once I use the audio device that it gets locked and I can’t attach another application to the same device… This fix is to use JACK to listen on the device and then let DarkIce and MPlayer (to record the stream locally) to use JACK as the audio source. (This requires recompiling DarkIce and MPlayer for full functionality.

Other:

In Goal 3 I noted that my sound is very low and that is with making the volume 100% on the source and clients. It looks as the fix is with PulseAudio in conjunction with JACK… I’m still testing this but it looks promising.

With any luck, I might be able to stream AM Radio, TV Audio (Weather), and MP3 collection (of 5 songs)!

Update – 8/12/2010 – Usage Notes

It appears MPlayer/mencoder can only output to JACK and PulseAudio. I haven’t seen anything in the docs or online that even suggests that it can record from JACK or PulseAudio…

Also, it appears that if something uses the same device that JACK is using then it quits working until you restart JACK…

My hope was that I could stream a Video and Audio feed as well as an Audio feed by itself… Maybe I can with ffmpeg or such…

Part 2…. I found a few things out…

  1. My TV Card doesn’t support ALSA nicely so OSS is required to use it
  2. JACK, after a while of running (10 min+) causes the sound to get corrupted and it gets worse over time… I tried several options with the same results…
  3. For whatever reason, I have /dev/audio1 and /dev/dsp1 – both are the same – but I can only use 1 at a time…
  4. I found oss2jack… It lets you take a JACK stream and pipe it to a device like /dev/dsp8. – It would be nice to be able to ‘clone’ or ‘fork’ 1 device to multiple devices; I just haven’t found any besides this one which also requires a modified version of fusd.

Update – 8/12/2010 – Usage Commands

# icecast -c /etc/icecast.xml -b
# jackd -R -d oss -r 11025 -C /dev/dsp1 -p 256 -b &
# darkice -c /etc/darkice.cfg &

Update -8/15/2010 – PulseAudio

Apparently, PulseAudio doesn’t work on my TV Card… My TV Card doesn’t support ALSA so I am forced to use OSS. Jack Audio Connection Kit works but PulseAudio breaks even with OSS support.

Next I’ll add another sound card and see if I can pipe to audio to it via ALSA.

Video Streaming in Linux

Listed below are the different applications/projects for steaming video and audio.

  • MythTV – untested
  • FreeVo – untested
  • VLC – untested
  • ffserver (ffmpeg) – untested
  • Darwin Streaming Server – untested
  • mpeg4-ip – untested (does it still exist?)
  • IceCast – Audio Only
  • ShoutCast – probably won’t test, but may if I get bored… – Audio Only
  • fuppes – untested – to play videos on PS3 and such

As I test, I’ll do a review or something…