OpenSUSE – You suck

This semester at school we have a class called “Second Operating System”. Just like you would expect, we are learning Linux. Unfortunately, the teachers have opted to go with OpenSUSE as the primary OS to teach. First day was to do the setup on either our laptops or the desktop machines the school provides. I opted to install OpenSUSE in Sun’s VirtualBox.

VirtualBox is a great desktop test environment mostly used by programmers to test programs in. It supports Linux and Windows as a gust operating system allowing you to install operating systems on a base Windows install. This means that I don’t have to dual boot 2 operating systems.

After installing openSUSE, first thing I wanted to do was install the Addition tools that come with VirtualBox. This will allows the mouse to flow between the virtual machine and the actual machines desktop freely. It also allows the display to run in “Seamless mode”. Seamless mode run the guest OS right on top of the desktop of the machine seamlessly.

The problem with this is you need to install the kernel source headers. Not a big deal with most OS’s but with OpenSUSE, she wasn’t going to go willing. In Ubuntu when you go to install the kernel source headers it asks you if you really want to do this then enables the correct repositories. OpenSUSE says it doesn’t exist then you have to go hunting for how to do it. So I did what ever n00b does and went to Google and tryed finding a site that shows how to install the files that were required.

Turns out that if you go in about 5 menus deep in the crap thing they call a control panel, there is a spot where you can add the repos. It gives you a nice list of about 20 repos that if you didn’t have any prior Linux knowledge you would have no idea what one to add. So I added all of them.

I ran a repo update using there crappy application manager. It took 30 minutes to check all the repos and 6 of them failed. Explain that to me. :S So after using the search feature found exactly what I was looking for. After that everything installed and ran fine, accept a few things:

  1. Seamless mode doesn’t work
  2. Internet is up and down (no other VM does this)
  3. Installing any application is the biggest pain in the but ever

To conclude, I hate OpenSUSE. I don’t recommend using it at all. They make doing anything twice as difficult as it should be. Why make it so hard?

Linux vs Windows

As most of you know I am fluent in both Windows and Linux. Yesterday in the #mybb IRC channel, tension was tight between us Linux people and the Windows fan boy Matt (owner of msubuntu who will be sued when the site is launched) A good friend of myn, DrPoodle had had it with Matt. So with the help of MiNT we started to produce a list of all the reasons why Linux was better then windows. For any of you Windows fan boys… eat this…

1) Linux is free.
2) Linux is faster (another IRC user, tmhai, was astounded earlier today at how his laptop booted in under 30 seconds with Ubuntu, compared to the 30 minutes it took Windows to boot on it).
3) Linux is Open Source (which means bugs and security holes are found and fixed quicker).
4) With Linux, you own your Operating System. With Microsoft Windows, you don’t actually “own” the Operating System, you simply have a license that says you can use it. Every installation of Windows is owned by Microsoft.
5) Linux has better support. This is debatable, but there are a lot of community forums out there, and usually errors in Linux are much more readable than Windows errors, which leads to quicker solutions.
6) Linux has package managers. Most distros come with some form of package manager, a utility that installs safe and secure programs, and then updates them automatically.
7) Linux has daily updates. Most distros release daily updates of core files, as well as updates for programs.
8) Linux has releases every 6 months. Most distros release their next version every 6 months without fail. So instead of waiting an uncertain amount of time for the next Windows release, you know exactly when the next version of your OS will be out.
.. To read all the reasons, click Here.

If any of you Windows people have anything that could possibly have a case against Linux. I ask you to sign up on my forums and post your reasoning.

Windows XP Pro Upgrade

Yesterday I upgraded my Desktop and Laptop PC’s to Windows XP Pro. I wanted to have them join my domain here at home so I wouldn’t have to type my username and password in all the time.

First one I did was my Desktop. I ran a fresh install after the upgrade failed very badly. (Video card wouldn’t recognize) So with a fresh install of XP Pro I joined it to the Domain which is served by my Ubuntu Linux server. Joining it was no problem. This is how I did it

Start -> Right Click on My Computer -> Properties

Then under “Computer Name” tab, click on “Change…”

Where you see “Member Of” click the “Domain:” button then type in your domain. In my case it was “miller”.

Now you need to restart your computer. Now here where I had another problem. All Domain Controllers have a logon.bat script witch is run every time any user logs on to a computer within the network. Now in my home, we have never had Windows XP Pro so this is the steps I had to go through to get it working. On the server there is a Samba server that basically talk on the windows protocol. I followed this tutorial on how to setup the server.

Ok now I’ll get to the good part. In the /etc/samba/smb.conf file there is few lines that read this…

# Default logon
logon drive = Z:
logon script = logon.bat
logon path = \\server1\profile\$U

So that worked fine when I was connecting manually to the shares but now that I want permissions and such working I need this logon.bat to work. After going through a few Google Search pages I figured out how to get this to work. All I had to do was add the line “path = /home/netlogon” So when I was done though’s few lines, it looked like this…

# Default logon
logon drive = Z:
logon script = logon.bat
path = /home/netlogon
logon path = \\server1\profile\$U

Ok now I created a logon.bat in the /home/netlogon folder. My logon.bat mounts three shared drives I have created. (The How To Forge link will show you how to make other shared folders.)

net use Y: \\server1\shared
net use X: \\server1\programs
net use W: \\server1\pictures

So now your asking your self “Why didn’t he use Z:?” Will I didn’t because I specified Z: as the mounting point for the users home directory in the smb.conf. So now I can logon and off my computer with ease. My dad and sister can logon my computer and have access to all there files and none of myna.

Next I’m going to talk about upgrading my laptop. Now I ran the upgrade from XP Home to Pro. Every thing went well till I started using certain things. First thing I notices was Windows Updates would not run. It said there was 34 to install, but when I would run them they would all fail. The second thing I noticed was Internet Explore 6 was installed. So again I went to my good friend Google and started searching. A few people have had this problem and the easiest way to fix it was to make a simple batch file. I will go through this step by step.

  1. Open up Notepad (Start -> All Programs -> Accessories -> Notepad
  2. Copy the following lines into the file
  3. regsvr32 /s wuapi.dll
    regsvr32 /s wuaueng1.dll
    regsvr32 /s wuaueng.dll
    regsvr32 /s wucltui.dll
    regsvr32 /s wups2.dll
    regsvr32 /s wups.dll
    regsvr32 /s wuweb.dll
  4. Now save the file as update.bat onto your desktop
  5. Close the file then open it from the desktop.

Or Download the Batch file from Here

windows-update-fix.bat

A command prompt window should pop-up then disappear. Now if I run Windows Updates all install will work. Basically XP Pro Upgrade took out all the patches that XP Home had. But XP Pro didn’t know what was already there. So by running “regsvr32” we tolled windows that, Hey these files are here. Windows Updates is now fully functional.

Well hope this helps you in your indevers of Windows and Linux. If you have any questions or comments please post them on the Forums.

Ubuntu Studio

May 11th, 2007 Ubuntu Studio was released and I finally decided to get my hands on it. Downloading and installing just like all the other Ubuntu Alternate installs. After installation was complete I immediate started messing around with many audio packages included. First one I started with was JACK.

JACK is used to change sound routes through your computer. In my case I first had ZynAddSubFX Software Synthesizer open and was messing around with the many different sounds it comes with. I then opened another cool app called JACK Rack and Patchage. JACK Rack allows you to add thousands of diffrent effects into the main mix. Then through the Patchage i connected the out put of the Synthesizer into JACK Rack then took the output of JACK Rack and connected it with the audio out put of my sound card. Heres a screen shot of what was going on.

Audio Equipment

I can now also take the input from the sound card and patch it through to the JACK Rack and guitar effects.

The one thing I didn’t like was not having control on volume with Audacity. So I went out on the net and found a package called Ardour. Ardour is a multi track recorder. Through JACK I can connect diffrent audio devises to Ardour. This means that if I have 4 USB Mic’s and 2 Guitars I could plug them into my box and connect the devices to Ardour. Then Ardour can record all 4 Mic’s and 2 Guitars individual. This is very nice for editing later on. You can ajust levels for certen Mic’s or guitars. Very cool.

Audio Recording

Now of cores this all uses a fair amount of CPU. But if your using digital inputs (ie. FireWire recording devices, USB preamps, etc) it takes allot of the stress off your CPU. If you are looking into making a small or large audio editing studio I would strongly consider a Digital Mixer with FireWire out. I would also buy a high end motherboard and processor.

I have a bunch of broken USB PS2 head sets that I’m hopping to use for Guitar and Mic digitizers. I will make sure to document the hole experience.

The one thing I found about Ubuntu Studio is there is no good video editing apps. They all suck. I went out on the net and found A good one, but really it sucks to. I will get back to you if I find any good ones.

All-in-all I enjoy Ubuntu Studio. If your into audio editing or doing podcast I would strongly recommender Ubuntu Studio for you.

C++, C and a Parallel port

About a month ago I went out and purchased a book on C++. I went through it and learned the basics. Yesterday I began work on a program to control inputs and outputs on the LPT port. The interesting part about this is I plan to wire some relays to control back yarded lighting, a few pond pumps and mabey even pool pump and heater.

In this testing stage I just wired some resisters and LED’s onto pins 0 to 7 on the parallel connector. The LED’s I used were 1.5V so I used some resisters to bring down the 5V. If you need any more detail on this feel free to e-mail me.

It’s fairly simple to make the program to run the parallel port. You just have to do some math to figure what values you send out to make certen LED’s light up. The following code is what I used to make sure all 8 outputs are working. It justs randomly flashes the LED’s wired to the parallel plug.

#include <stdio.h>
#include <stdlib.h>
#include <sys/io.h>

#define PORT 0x378 /* use your port address here */

int main(int argc, char *argv[])
{
	int r;
	double l;

	if (iopl(3)) /* you could also use ioperm(PORT, 1, 1) */
	{
		fprintf(stderr, "couldn't get ports,\ntry running as root\n");
		exit(1);
	}

	srand(time(NULL));
	while(1) /*use Ctrl+C to exit */
	{
		l = (double)rand()/(double)RAND_MAX*256;
		r = (int)l;
		outb(r, PORT);
		usleep(500000);
	}

	return 0;
}

I saved the following as test_lpt.c. The compiled the file with the fowloing command.

gcc -O test.c -o test_lpt

Then I executed the new test_lpt that I just compiled and made into a program.

sudo ./test_lpt

Now I had to use sudo because the parallel port only works if your logged in as root in the terminal. The program is a continues loop so to escape out of the loop just press Ctrl + C to shut down the program.

The next program shows how to light up LED’s one and two. We will be sending out a value of 3 to do this.

#define PORT 0x378 /* use your port address here */

int main(int argc, char *argv[])
{
if (iopl(3)) /* you could also use ioperm(PORT, 1, 1) */
{
fprintf(stderr, "couldn't get ports,\ntry running as root\n");
exit(1);
}
outb(3, PORT);
usleep(500000);
return 0;
}

The one peace of code we will be looking at is outb(). The first value, 3, is what value we are sending out to the parallel port. Now this value will tern the LED on Pin 0 and Pin 1. I recommend learning about binary if you plan on building this your self. The second part, PORT, is just specifying what parallel port to use. This was defined at the beginning of the code.

#define PORT 0x378 /* use your port address here */

Once compiled this program should execute then bring you back to the command line. Your LED’s should have changed.

To conclude, I plan on eventually building a board that will hold 8 relay that will let me control multiple devices executed via cronjobs in Ubuntu Linux. I will update this as the project continues.