Tuesday, December 23, 2008

Blank screen on startup after installing Ubuntu 8.10? Try this fix

Compiz (a fancy window manager for Linux) is probably causing the problem.

Reboot your computer. When GRUB pops up, it may say "Press ESC to enter menu", or alternatley you may be kicked to the menu if you have multiple OS's installed. Either way, when you get to the OS selection menu, select the menu option (kernel choice) that has the word "Recovery" in it.

Once that's loaded, choose the "drop to root terminal" option (to that effect, the exact wording may be different) from the imtimidating blue menu that pops up.

From there, type the following command.

Code:
sudo apt-get purge compiz compiz-core
Now reboot your computer just in case.

Hope that works...

Tuesday, August 19, 2008

Download a YouTube video using C#

I've posted the code to download a YouTube video using C# at PasteBin -

http://pastebin.com/f396257b6

Original credit goes here - http://krishnan.co.in/blog/post/download-videos-from-youtube-(C).aspx

Saturday, August 9, 2008

Visual C# 2008 Express Edition Setup Error - Setup has encountered a problem while trying to copy...

Recently, I was attempting to install Visual C# Express 2008 Edition on my Windows XP computer and got this error message after downloading the "Web Installer: -

Screenshot -








Error Text -

Setup has encountered a problem while trying to copy:
m:\\$shtdwn$.req
Press Retry to attempt the copy again. Press Cancel to cancel setup.


After reading some forum (can't find the web page again!), I determined that it was probably related to the fact that Windows had decided to use my ext3 formatted hard disk drive (mounted locally using Ext2 IFS) to extract temporary files to, and this was causing some issues with the installer. The easy solution is to simply download the Visual Studio Express Editions DVD ISO (link here should work, if not Google for "Offline Install), and either burn it to a DVD and run the installer that way, or use a ISO mounting utility like Daemon Tools to mount it in a virtual DVD Drive.

Hope this saves someone a little time.

Wednesday, July 2, 2008

Fixing rdp MIME type in Ubuntu Linux

If you've ever been presented with the problem of downloading a dynamically generated (or even static) rdp (Remote Desktop) file from within Firefox in Linux and you were optimistically expecting Firefox to recognize it and open it in some graphical interface like tsclient, you were probably sorely disappointed - you might have gotten a message like -

You have chosen to open
example.rdp
Which is a: BIN file

In this instance, you are only granted the option to Save the file to your computer.

To fix this, you need to configure Linux to automatically recognize this MIME type so that Firefox recognizes the file type as something besides binary (for some reason you can't directly add the recognition in Firefox without extensions).

To do this, you need to add the rdp MIME info into the file /etc/mime.types. Run the following two commands to quickly achieve this -

sudo -i
echo "application/x-rdp rdp" >> /etc/mime.types

This simply appends the rdp MIME info to the file.

Trying download a rdp file from Firefox now (you don't need to restart it). When the Save dialog pops up (and actually recongnizes the file type!), press the "Browse..." button to open the Application Helper selection dialog.

In the resulting window, locate the "Location" bar and type /usr/bin/tsclient (for example, if you have this installed). Press "Open" to continue. Firefox should now associate .rdp files with tsclient. Press "OK" on the open dialog to proceed.

The Terminal Services Client GUI will open. You may wish to change the various options using the tabular interface provided. This application is richer than the built in Windows Terminal Services client itself!

The next time you click on a n RDP file, Firefox should remember the association and ask you if you want to open the file in tsclient. If the "Open with" field in Firefox's Open dialog on attempts subsequent to this tutorial is blank, press "OK" regardless. tsclient should still launch.

Side note: to use tsclient, you need the packages

* tsclient
* rdesktop

So just

sudo apt-get install rdesktop tsclient

Sunday, April 20, 2008

Ubuntu 8.04 Notes and Tips

I currently run Ubuntu 8.04 on an old eMachines desktop, and on my Toshiba A215-4767 laptop.

Here I will update the Linux community with my experiences installing and maintaining this crazy operating system on two machines.

Getting VirtualBox set up

For getting VirtualBox properly set up and configured, this guide will point you in the right direction. The steps are pretty much the same for 8.04 (Hardy Heron).

The highlights of the guide are these -

(1) Two versions to choose from - OSE vs Non-Free

"There are two versions of VirtualBox, the OSE (opensource edition) and the closed source, binary one. The OSE edition is the one you will find in the Ubuntu repositories (add/remove programs), but it lacks some features of the binary one, most notably, USB support. For this reason, I would advice using the binary. For Hardy, download it here (link many change eventually)

(2) Add yourself to vboxusers group

After installing, you will get a warning that you need to add users to the vboxusers group. Let's do so now:

System menu > administration > users and groups > manage groups

Select the “vboxusers” group > properties > check any users you want to be able to use VB.

Now log out, and log in again for these changes to become effective.

(3) Fix USB error #1 - VERR_FILE_NOT_FOUND

You may at some point get the error - "Could not load the Host USB Proxy Service (VERR_FILE_NOT_FOUND)":

To fix it, we need to enable usbfs. Open a terminal and type:

sudo gedit /etc/init.d/mountdevsubfs.sh

Find this part:

# Magic to make /proc/bus/usb work
#
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount --rbind /dev/bus/usb /proc/bus/usb


remove the # sign in front of the last 4 lines so it looks like this:

# Magic to make /proc/bus/usb work
#
mkdir -p /dev/bus/usb/.usbfs
domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount --rbind /dev/bus/usb /proc/bus/usb

Reboot Ubuntu.

Restart virtualbox, select your VM, then click settings. You should have no error messages now.

(4) Fix USB Error #2 - Permissions

You might also encounter a USB permissions problem with VirtualBox. (see here)

The fix? Open up a terminal and type in the following -

sudo gedit /etc/fstab

Add the following to the bottom of the text file -

 none  /proc/bus/usb  usbfs  devgid=46,devmode=664  0  0

(This assumes the group plugdev is group ID 46 on your machine - that's the default group ID for pulgdev anyway, so it shoulden't be a problem)

Now, plugdev, which handles plugable devices, can interact correctly with VirtualBox (after a reboot, probably)


Toshiba A215-4767 Specific Notes

Installing Ubuntu 8.04 on the Toshiba A215-4767 is a fairly simple process. There are only two components that take any real configuration - the wireless and sound setup.

Be sure to attach an Etherent wired connection to your laptop before the install or directly after it. You need to do this because you need to install ndiswrapper to get wireless access, and the simplest way to get it is from the online repositories. (You can install it from the installer CD, but I have been unable to determine how to set that up properly)

(1) Wireless setup (per this site)

Instructions for Atheros wireless card:

Download drivers:

XP 32-bit
XP 64-bit

Extract the drivers and take note of where you extracted them.
Open a terminal a type in the following -

Code:
sudo -i
echo "blacklist ath_pci" >> /etc/modprobe.d/blacklist
rmmod ath_pci

apt-get install ndiswrapper-utils-1.9 ndiswrapper-common

ndiswrapper -i net5211.inf

ndiswrapper -l
look for something like this:
net5211 : driver installed
device (168C:001C) present (alternate driver: ath_pci)


modprobe ndiswrapper
echo "ndiswrapper" >> /etc/modules

After a reboot wireless should work. You should see available wireless networks in the network manager. Note: every few bootups, Ubuntu doesn't get the MAC Address for the wireless card correctly. (Andrew's note - haven't noticed this problem yet) So far it looks like the easiest way to correct this is to go into /etc/ndiswrapper/net5211 and look for the file with a symbolic link. Edit it and replace the line that says
mac_address|XX:XX:XX:XX:XX:XX
and replace the X's with your MAC address.


(2) Sound setup (per this site)

After the inital boot and some updates, but you notice that the sound stops working after a reboot.

To fix this issue, you need to upgrade to the cutting edge version of Alsa. The easiest way to do this is to just use the backports modules.

1) Enable backports in software sources (System Menu> Administration> Software Sources--> Updates--> check "Enable Backports")

2)Then open a terminal and type in uname -r (this will tell you what kernel you're running (eg 386 or generic)

2) In a terminal, type -

sudo aptitude install linux-backports-modules-hardy-generic

OR

sudo aptitude install linux-backports-modules-hardy-386

depending on what kernel you have.

4) In a terminal
sudo gedit /etc/modprobe.d/alsa-base
this will open a file in gedit(the text editor). scroll down the page and
add this as the last line
options snd-hda-intel model=toshiba

(5) Reboot. This will upgrade your alsa to the 1.0.15RC3 and your sound will be fixed.


Friday, June 22, 2007

O' Reilly cuts off Swanson... my thoughts

Watch this (if you want) to see the "incident"...

http://www.youtube.com/watch?v=IHC3MOFb_lg

(1) O’ Rilley : Why do you think the far left is disenchanted with Mrs. Clinton?
(1) Swanson : I think that actually Hilary Clinton is articulating a position that most Democrats agree with to get out of Iraq.
(2) O’ Rilley : OK, Mrs. Swanson, it’s very simple, why do you think the far left is disenchanted with her, why?
(2) Swanson : Well, I think that she’s put herself in a position to explain a little too much in terms of her past votes. I think John Edwards, by apologizing, has been able to move on a little easier than Hilary has. It’s easier to move on …
(2) O’ Rilley : …I don’t know what your saying
(2) Swanson : … It’s easier to move on after apologizing, and election are about the future.
(Medea Benjamin clarifies to Bill that the people were booing at Hiliary because that believe that we can’t put the blame on the Iraqi government… we need to have a withdraw plan and timeframe, get the intl community involved, etc. Therefore they were mad at Hilary’s statement that the Iraqi government has failed)
(3) O’ Rilley : Do you agree, Mrs. Swanson, that that is why the far left was disenchanted with Hilary Clinton?
(3) Swanson : I think you’re creating a division that doesn’t exist. I think that the real division exists in the Republican party, when you’ve got no Republican candidates (except for John Meccain) who don’t agree with the President’s policy in Iraq.

**************************************************************

(1) The main issue stemmed from the fact that she answered the question about why the Democrats in the crowd were disenchanted, by telling O ‘Riley that the Democrats actually agreed with Hilary’s position to get out of Iraq. No, she said, the Democrats weren’t disenchanted, they were very agreeable with Hilary’s war withdraw plan!!! Unfortunately for Swanson, the fact that the Democrats in the crowd agree with her plan to get out of Iraq has little or nothing to do with their rationale for being audibly disenchanted with her statement that particular day about the Iraqi government being at blame for the entire mess of the war. Swanson (apparently) didn’t realize that Bill was talking about the crowd’s disenchantment with Hilary’s statement at the particular conference, not their level of enchantment with a withdraw plan. This is where she went terribly wrong – wake up Swanson; O’ Riley was talking about something unrelated, that is, the reason why the Democrats were booing at Hilary that day? There had to be some reason, and saying that they agreed with the war plan isn’t going to justify anything at all. The more I think about her statement the more unrelated it appears.

How can you blame O’ Rilley when Swanson wasn’t answering the questing at all? Swanson obviously thought that Bill was talking about the general disapproval with Hilary’s war plan, which she (Swanson) believed didn’t exist. Yet, it was more than clear to viewers that Bill was referring to the disenchantment evident in the audible disapproval of Hilary’s statement in which she blamed the Iraqi government. Swanson must have been sleeping during the playing of that clip, because everybody else knew that Bill was referring to the disenchantment with the video.

(2) No excuse for Swanson on this one. Bill is simply trying to get her another chance to answer a simple question about why the crowd was disenchanted with Hilary that day after she said that damming statement about the Iraqi government, yet, she goes off into a completely unrelated tangent about how Hilary is generally evoking sentiment of disenchantment in people because of her questionable past voting record, and that John Edwards saved himself from this by coming out clean. She is once again blowing Bill’s question out of proportion and thinking big picture. She still hasn’t caught on that Bill is STILL referring to the particular disenchantment sentiments that were evident at the conference in which Hilary was booed! Bill clarifies what he was talking about in (3), only because Swanson is incredibly slow to realize that were talking about once instance here, not the general disapproval with Hilary.

(3) She still doesn’t answer the question here at all. Bill was referring to the DIVISION IN THE DEMOCRATS PRESENT AT THIS ONE CONCFERENCE in which Hilary made the audacious statement about the role of the Iraqi government in the war. There was a division, but only on that one statement (there was clearly a separation in the crowd that day, because some were cheering at Hilary’s statement and some were doing the polar opposite – they were booing her.) Because she still hasn’t caught on, Swanson decided that O’ Rilley is talking about a division in the Democratic party in general, when O’ Rilley is still referring to the disenchantment in the crowd that once day and only on that once statement.

Summary – Swanson was thinking way too big picture the entire time. She was probably stressed or embarrassed about being on National TV, causing her to misinterpret was Bill was referring to.

Thursday, June 21, 2007

Defining a human

Every person within humanity can be distinguished and classified by several *relatively* indicative (but nonetheless non-unique) signs, but the truley 100% unique indicator that I find the most appealing is the ability to think abstractly. Instead of defining this term itself, I'll give you a few examples of abstract thinking. One is introspection. Humans alone are capable of introspection, which is essentially the physiological process of self reflection and examining one thoughts and feelings. Regardless of whether we can visibly notice this quality in a person, or it is extremely inconspicuous, all humans are introspective at most points in their life, and this is, as I said before, an entirely unique quality in our species. No other species examines their thoughts. Anyway, even the select individuals within our species that are considered different for one reason or another can be identified by this, if prompted correctly. Some other abstract process we demonstrate very uniquely to our species are self awareness/consciousness. However, these tie in closely with introspection. To clarify on their definitions, though, self awareness is simply our cognizance that we exist, and consciousness is more or less the same thing (I just threw in the word because it might clarify to you more what I'm talking about exactly). This is also unique to all humans and identifies them easily.

It is my duty to note, however, that as I was writing this, I realized that babies might not demonstrate some of these qualities, and after looking that up, I was right. To explicitly label a baby (under the age of 2, specifically) as human would be somewhat harder, then, in my opinion.

There are a few other thing relatively unique to our species, but not everybody shares these qualities. For example, not every human possesses the capabilities to construct complex grammatical sentences using our upper level and highly developed form of communication, or to speak with the aforementioned language, for that matter. Additionally, not everyone is part of the complex human social networks that are so evident to us. Because these qualities are exhibited in either a large number of other species or a minority of species that are decidedly non-human, they cannot be used as crystal clear, lucid signs of the humanness of an animal - although some signs can give us 99% assurance that an individual is human.

So there you go - my opinion is that humans, ALL humans (except babies under the age of two) can be identified, whether it is a difficult process or not, by determining if they have a sense of introspection, self awareness, and consciousness (all under the umbrella of abstract thought). How once can check for the existence of such abstract thought processes is another issue entirely.