Chris Jean
Linux, WordPress, programming, anime, and other stuff
  • Home
  • Linux
  • Development
  • Random Ramblings

Archive for November 2009

Great Tutorial on Merging with Git

by Chris Jean
November 12th, 2009

One of the functions of Git that I still struggle with is merging. Recently, I found a post that shows a number of very helpful merging examples. If you work with Git and don’t fully understand merging, I recommend that you check it out.

Git merging by example

My thanks to Jonathan Rockway on providing this great guide.

Originally, I wanted to duplicate the content on my site in case the content on the linked to site ceased to exist. Ironically, just days after publishing this, the site has crashed. So, I’ve recovered the content from the crash and have duplicated it here. The remaining content is from the site I linked to and not my own. If the content stays down for long, I’ll clean up my duplicate of it.

Read More→

Categories Tips 'n Tricks
Comments (0)

VirtualBox Audio Driver for Windows 7

by Chris Jean
November 12th, 2009

I recently installed Windows 7 in VirtualBox, and unlike other OSes I’ve installed in VirtualBox, the sound driver wasn’t automatically recognized. I found a driver that works with both 32-bit and 64-bit versions.

VirtualBox Windows 7 Driver

I installed this both before and after installing the Guest Additions, but it didn’t matter what order the driver and Guest Additions were installed in.

Enjoy. :)

Categories Tips 'n Tricks
Comments (5)

Sony VAIO Laptop BIOS and System Restore

by Chris Jean
November 11th, 2009

Earlier tonight I had to work on a friends new Sony VAIO system. The model is VGN-NS330J, but the information I found seems to apply to all Sony VAIO laptops.

Anyways, this machine was seriously messed up, and he just bought it. Since the system doesn’t ship with disks for recovering the Windows installation, I figured that there had to be a hotkey combination that brought up the appropriate menu. Interestingly, this was put into the F8 Advanced Boot Options screen that is built into Windows.

If you want to recover the system back to factory defaults, reboot the system, wait for the VAIO logo to appear, and then start pressing F8. The Advanced Boot Options screen will appear shortly. Use the arrow keys to highlight the “Repair Your Computer” option and press Enter. From here, follow the instructions to accomplish what you want.

I did this, but it seems that even the recovery partition was hosed. This meant that his system was essentially worthless at this point. Fortunately, I had some Vista installation disks that could be used to reinstall the OS with the Windows serial key found on the bottom of the laptop.

When I rebooted with the installation disk, the disk didn’t boot. Come to find out, the primary boot option was the harddrive, which, frankly, is the worst boot option to be set as the primary boot method since there’s no way to bypass the hard disk boot without modifying the BIOS. How many computer users would know how to modify the boot priorities in BIOS? A better question: How many computer users even know what the BIOS is?

Unfortunately, Sony decided that having a pretty boot splash screen was more important than providing information on how to access the BIOS. Pressing the usual suspects of Esc and Del did nothing. At least they could have the courtesy of removing the splash screen when I hit a button so that I could see the options, but no.

After much too much searching around, I found out that F2 is the magic key. As soon as you boot, start pressing F2 about once a second until the BIOS screen shows.

I hope this helps you, the random person who found this information, and I hope that system developers see this and realize the following:

  1. Here’s the smart boot order to set up in the BIOS defaults of new systems: optical drive, external media, internal hard drive(s). This way, any bootable media works as expected without requiring users to go through BIOS first.
  2. Sacrificing screens that instruct users on how to use basic functionality of the machine for aesthetics is not the right decision, it simply makes your hardware a pain to use. If you must have the pretty splash screens, have them go away when a key is pressed so that the user can see valuable information, such as keys to access BIOS and the POST information. Having a splash screen that requires a change in the BIOS to make it go away in order to see the information on how to access the BIOS is self-defeating.
  3. Please bring back installation media or make a way for people to easily and cheaply acquire it. It would be fantastic if OEM system manufacturers would offer the ability to download the appropriate installation media directly from the manufacturer website. You could require a registered system complete with the serial information of the system in order to authenticate the download. This way there isn’t the increased cost of disk inventory and shipping. It would also allow customers to have quick resolution of problems since the customer could go to any location with internet access to quickly and easily get the necessary disk to use for recovery.

    This has the added benefit of ending the ridiculous permanent waste of space on computers in order to have a long-term storage of data that may never be used and may be corrupt by the time it is needed.

Categories Tips 'n Tricks
Comments (8)

Move Gnome Panels to a Different Monitor in Ubuntu

by Chris Jean
November 3rd, 2009

My dual monitor setup didn’t work properly in Ubuntu 9.04, Jaunty Jackalope. Fortunately, it does work properly in 9.10, Karmic Kaola. However, this newfound dual monitor setup has given me a new problem: how do I move my panels to the secondary monitor?

My office machine is a laptop. When I get in the office, I hook it up to a 24″ LCD. I’d like to use this external monitor as the primary, which means that I definitely want to have my panels display on it. However, as much as I tried to drag the panels around or play around with settings, there just didn’t seem to be a way to get them over there. However, I just figured it out.

By default, panels are set to expand. This means that the panels will span the entire width or height of the section of the window they occupy. If the expand option is disabled, they turn into self-sizing bar that can be dragged to different edges or centered.

Having the expand option disabled also allows you to grab and edge of the panel and drag it to another screen. Once on the screen you want it on, simply re-enable the expand option and you now have the panel on another screen.

Here’s a step-by-step way of moving a panel to another screen:

  1. Right-click the panel you wish to move and select “Properties”.
  2. Uncheck the “Expand” option under the “General” tab.
  3. Grab one of the edges of the panel by clicking on the left or right end (top or bottom end for vertical panels).
  4. Drag the bar to the desired screen and position.
  5. Check the “Expand” option in the “Panel Properties” window and click “Close”.
Categories Linux, Tips 'n Tricks
Comments (44)

Use PHP Pear with Ubuntu

by Chris Jean
November 2nd, 2009

PEAR is PHP’s equivalent of Perl’s CPAN. It offers hundreds of ready-to-use code modules that can make projects go much more quickly than having to hand code everything. However, it never seems like PEAR is easy to get running.

Installing the Needed Software

In Ubuntu, installing the following packages will quickly get you started with PEAR: php5-cli, php5-dev, and php-pear.

Make sure that you read the next section about problems with using PEAR to install PEAR packages if you are running 9.10, Karmic Kaola.

Here’s an example of how to quickly install those packages from the terminal.

[chris@rommie ~]$ sudo apt-get install php5-cli php5-dev php-pear
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
autoconf autoconf2.13 automake automake1.4 autotools-dev libltdl-dev libssl-dev libtool m4 php5-common shtool zlib1g-dev
Suggested packages:
autobook autoconf-archive gnu-standards autoconf-doc gettext libtool-doc automaken gfortran fortran95-compiler gcj php5-suhosin
The following NEW packages will be installed:
autoconf autoconf2.13 automake automake1.4 autotools-dev libltdl-dev libssl-dev libtool m4 php-pear php5-cli php5-common php5-dev shtool zlib1g-dev
0 upgraded, 15 newly installed, 0 to remove and 5 not upgraded.
Need to get 0B/8,690kB of archives.
After this operation, 27.7MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Selecting previously deselected package m4.
(Reading database ... 127272 files and directories currently installed.)
Unpacking m4 (from .../archives/m4_1.4.13-2_i386.deb) ...
...

With these packages, you are ready to roll with PHP and PEAR in Ubuntu.

Problem with Ubuntu 9.10 Karmic Kaola

A great thing about PEAR is that you can quickly install packages with a simple command. For example, “sudo pear install PHP_Parser-0.2.1″ will install the PHP_Parser package. However, this doesn’t work properly in Ubuntu 9.10, Karmic Kaola.

Output of the standard PEAR install command can be seen below:

[chris@rommie ~]$ sudo pear install PHP_Parser-0.2.1
downloading PHP_Parser-0.2.1.tgz ...
Starting to download PHP_Parser-0.2.1.tgz (70,782 bytes)
.................done: 70,782 bytes

While this doesn’t look wrong, it has actually failed. Rather than installing the package, it has simply downloaded the archive, encountered an unchecked error, and crashed. A successful installation has a message saying that the installation is successful.

This problem can be easily fixed by giving the install command the “-Z” option. For example:

[chris@rommie ~]$ sudo pear install -Z PHP_Parser-0.2.1
downloading PHP_Parser-0.2.1.tar ...
Starting to download PHP_Parser-0.2.1.tar (Unknown size)
.............................................................................done: 533,504 bytes
install ok: channel://pear.php.net/PHP_Parser-0.2.1

Notice the “install ok: …” portion of the message. That’s what you should see at the end of a successful installation.

For more details on this bug, please check out Bug #451314 on the Ubuntu bug tracker.

Categories Linux, Tips 'n Tricks
Comments (0)

Fix Volume not Working in Ubuntu 9.10 Karmic Kaola

by Chris Jean
November 2nd, 2009

I just encountered an odd issue with Ubuntu 9.10, Karmic Kaola. I had music playing in the background, I adjusted the volume, and I noticed that there wasn’t any change in the volume level. Even maxing out the volume and muting it had no effect.

After wondering if the problem was that I went insane, I looked in Sound Preferences (right-click the volume icon and select Sound Preferences) and found that “RV635 Audio device [Radeon HD 3600 Series] Digital Stereo (HDMI)” was selected under the device output. This means that Ubuntu was trying to send audio over my HDMI connection rather than through my headphone jacks.

This wasn’t a problem last night, so it might be due to the fact that my external monitor at the office runs over the HDMI connection, so it automatically switched to the HDMI audio output. In one way, this is nice, in another way, it will frustrate me to no end if it does this every time I’m at the office. If I’m right that it automatically switched upon detecting an active HDMI connection, then wouldn’t it be better to make it easier to provide a notification on where to switch the audio output rather than just switching it and causing confusion?

HDMI selected in sound output in Ubuntu Karmic Kaola

Switching the option to “Internal Audio Analog Stereo” instantly fixed the problem.

Oddly enough, when I manually selected the HDMI output again, it muted the analog output. So, it seems that it may not be a complete switchover or possibly just a bug. I’ll continue to see how the situation plays out and make a Ubuntu bug report if necessary.

Categories Linux, Tips 'n Tricks
Comments (0)
Chris Jean
Copyright © 2012 All Rights Reserved
iThemes Builder by iThemes
Powered by WordPress