06.20.07
Posted in Error Messages, Intermediate, Linux at 2:20 pm by Techie
After recent updates, I started getting errors like the following:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
This occurred on both Dapper Drake as well as Feisty Fawn versions of Ubuntu. It was really annoying to see this whenever running apt-get. Fortunately, the solution is pretty simple. As noted above, this is a locale error, so the trick here is to install the language pack for my language. In this case, that would be English, so I ran the following:
sudo apt-get install language-pack-en
This added a dependency for language-pack-en-base, but after installation, the error went away.
Permalink
06.11.07
Posted in How To, Intermediate, Linux, Mac, Windows at 11:24 am by Techie
What’s your favorite editor? Oh, I’m sorry, the correct answer should be emacs. Actually, you should use whatever editor you feel most comfortable with; I’ve just found the ability to record keyboard macros in emacs to be indispensable, all the more so since I’ve been using it for almost ten years. Be I writing on Linux, Windows, or Mac OS X, my preferred text editor is still emacs.
However, once I get on a new machine, I need to customize .emacs, which is the startup configuration file. There are a series of changes that I find quite useful, and often find myself looking up again and again. Without further ado, here are the customizations:
;; Emacs usually has a slash screen on startup. Let's get rid of that and start with a blank buffer.
(setq inhibit-startup-message t)
;; I like to see what is selected in the buffer. This turns on visual feedback on selections.
(setq transient-mark-mode t)
;; Activate font-lock mode (syntax coloring).
(global-font-lock-mode t)
;; Line numbers are good. Getting column numbering as well is better.
(column-number-mode t)
;; Scrollbars go on the right. Who puts these on the left?
(set-scroll-bar-mode 'right)
;; Enable mouse wheel scrolling.
(if (load "mwheel" t)
(mwheel-install))
;; Always end files in anewline.
(setq require-final-newline 't)
;; ...or ask to end in newline if needed
; (setq require-final-newline 'query)
;; Match parentheses. Useful to be sure you've closed everything up.
(show-paren-mode t)
; Display settings
; default size and color options for all frames.
(setq default-frame-alist
'(
; frame width and height
(width . 80)
(height . 40)
;;;; foreground, background, and cursor colors
;;; (foreground-color . "grey8")
;;; (background-color . "grey92")
;;; (cursor-color . "red3")
)
)
; places top left corner of initial frame at location (25,25) on screen
(setq initial-frame-alist
'(
(top . 25)
(left . 25)
)
)
; Temporary files cluttering up the space are annoying. Here's how we
; can deal with them -- create a directory in your home directory, and
; save to there instead! No more random ~ files.
(defvar user-temporary-file-directory
"~/.emacs-autosaves/")
(make-directory user-temporary-file-directory t)
(setq backup-by-copying t)
(setq backup-directory-alist
`(("." . ,user-temporary-file-directory)
(tramp-file-name-regexp nil)))
(setq auto-save-list-file-prefix
(concat user-temporary-file-directory ".auto-saves-"))
(setq auto-save-file-name-transforms
`((".*" ,user-temporary-file-directory t)))
I additionally have some macros that aren’t generally useful. There’s a million things to tweak in the customization, and if you’re fancy, you can even write your own hacks — better brush up on that lisp! Here are a few more resources of interest:
Permalink
06.01.07
Posted in Intermediate, Linux, Review, Windows at 8:12 am by Techie
I have two PCs right next to each other, each with their own display. One runs Windows XP Professional, and the other runs Ubuntu Feisty Fawn. I have one keyboard between the two of them. KVM? Nah, that’s too passe. Far better to be able to switch between computers just by moving the mouse.
Synergy describes itself like so:
Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems, each with its own display, without special hardware. It’s intended for users with multiple computers on their desk since each system uses its own monitor(s).
This is actually really cool. It’s almost like having a really large display, as the mouse flows between all windows. I type on my Ubuntu desktop, then switch over to a Windows application on a different monitor by moving the mouse. The two computers share an “edge”, so my mouse moves seamlessly between them. To type on Windows, I mouse to the Windows side; to type on Ubuntu, I mouse to the Ubuntu side. Simple and effective. What’s even cooler is that the machines share the clipboard buffer! I can copy text on one side, mouse over to the right side, and paste it.
Configuration
Configuration is simple. Select one machine as your “server”, which has the actual keyboard and mouse you want to use. Other machines are “clients”, and connect to the server. In my case, I set up my Ubuntu PC as my server, and set up my Windows machine as a client. It could have been the other way.
Interestingly enough, it’s slightly easier to configure the “server” on Linux, if you use “quicksynergy”. This allows you to just specify where the other client computers are. Just fire it up, tell it that a client’s display is left / right / above / below your existing display, hit Start, and you’re off to the races. You can also manually configure it, but that just doesn’t seem fun.
Configuring the server on Windows is a bit more complicated, but quite a bit more extensible as a result. You specify which clients share an edge, but have to specify it both ways — e.g., if you say a computer A’s display is to the right of computer B’s display, you must also say computer B’s display is to the left of computer A’s display, or you’ll end up with a one way transport.
As far as client configuration goes, all you need to know is the hostname or IP address of the server. Provide the client names to the server to allow connection, and you’re all set.
Compatibility
Mac has something similar, called Teleport, which actually works better, but only works on Macs. I don’t think Teleport and Synergy are compatible. While there is a Mac version of Synergy available, it’s not fully supported yet. Synergy works on most modern versions of Linux, as well as most versions of Windows, though it has this caveat for Vista: “…when an application running with elevated [privileges] is focused Synergy stops working.”
Conclusion
If you use multiple PCs on one desk, Synergy is a no brainer. Get it, install it, and simplify your keyboard and mouse situation. Also, since most modern keyboards and mice are now shipping as USB, you may find that KVM switches don’t work, as they are often powered off PS/2 devices. Synergy sidesteps that issue completely. Besides which, having a shared copy / paste buffer between PCs is amazing — try doing that with a KVM switch!
Permalink
02.09.07
Posted in How To, Intermediate, Linux at 2:33 pm by Techie
Do you have an ssh login to a server? How would you like to access that on your Linux desktop as if it were local? As it turns out, this isn’t hard to do, thanks to the power of FUSE (Filesystem in Userspace). Here’s the quick and dirty way to set this up on Fedora Core 6.
Install FUSE
First, you need FUSE, as well as the sshfs module. To do so, open up a command prompt, and do the following:
su -
yum install fuse
yum install fuse-sshfs
usermod -G fuse youraccount
Replace youraccount in the above with your user account. The last line adds you to the group fuse, although if you are in other groups, it’ll remove you from them. You’d want to specify all additional groups you’d want to be in, e.g. usermod -G fuse group1 group2 youraccount. If you’re logged in under your account, then you should log out and back in, so the group change takes effect.
Mount a Folder
Let’s say you want to create a mount point on your desktop so you can browse it. Do the following:
cd ~/Desktop
mkdir remote_folder
sshfs yourserver.someplace.not:/home/yourusername remote_folder
Replace yourserver.someplace.not with the ssh server you want to mount. Replace /home/yourusername with the remote folder you want to mount. If your local username differs from your remote username, you’ll have to specify it, e.g. sshfs remoteusername@yourserver.someplace.not:/home/yourremoteusername remote_folder
Once you do this, it should be all set — you can browse it from the desktop, and browse it from the command line, as if it were local.
Unmount a Folder
Unmounting is pretty simple; use fusermount -u mountpoint. For instance, in the above, you mounted an ssh share to ~/Desktop/remote_folder. To unmount this, just issue:
fusermount -u ~/Desktop/remote_folder
That’s all there is to it!
Permalink
12.12.06
Posted in Intermediate, Mac, Windows at 4:50 pm by Techie
I’m not sure of the legality of this one, but Lifehacker pointed to an article about authorizing iTunes on more than five computers. The basic idea is that the authorization for a computer is stored on your local machine. This is a good thing, because otherwise you would need to be constantly connected to the Internet to play your music — not exactly ideal if you have a laptop. What you do is copy this folder, de-authorize your computer, then restore the folder. Voila — re-authorized, without connecting to the music store!
For Mac, the above link points to an Applescript that handles this for you: iTude.zip
LifeHacker notes that for Windows, the directory is stored in C:\Documents and Settings\All Users\Application Data\Apple Computer\iTunes\SC Info. Copy this folder, de-authorize your machine, then restore it, and your music should play.
A caveat to this is that any music bought thereafter will not work, because the authorization key will change on each new song purchased. However, if you just need a quick additional computer for your music and aren’t buying new music, then this will do the trick. Let’s see how long before Apple patches this!
Permalink
11.10.06
Posted in How To, Intermediate, Linux at 7:22 pm by Techie
I decided to take the plunge and start playing around with dual core technology, so I went down to the local store and picked up a new CPU, RAM, and motherboard. However, what I discovered was that it can actually be quite difficult actually installing Linux to what I had purchased, due to the newness of the technology. While support for dual core CPUs has been around for a while, support for some of the more recent motherboards has not, and mine was one of them. So, I could wait for broader support in a few months, or see what I could do now.
First, the reference information — the hardware I used.
* Intel Core 2 Duo Processor E6600
* Intel Classic Series Desktop Board DG965SS
* Kingston KVR533D2N4K2/1G (2x 512 MB)
* Western Digital 74 GB SATA Raptor WD740ADFD
* Antec TruePower 2.0 TPII-430
* JVC XJ-HD166S ATAPI DVD-ROM
Live isn’t so live, after all.
My plan was to battle-test this system with a few different Linux distributions, and then transition to testing Windows, but alas — my plans were not to be. I couldn’t even successfully boot up the live CDs I had! I’ve reproduced the error messages below, for the people searching for an answer.
If I tried to boot up Knoppix 5.0 DVD (2006-06-01-EN), I would get this error:
Can't find KNOPPIX filesystem, sorry.
Dropping you to a (very limited) shell.
Press the reset button to quit.
If I tried to boot the Ubuntu 6.10 “Edgy Eft” live CD, I would get this error:
BusyBox v1.1.3 (Debian 1.1.1.3-2ubuntu3) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
/bin/sh: can't access tty; job control turned off
If I tried to boot the CentOS 4.4 live CD, I wouldn’t even get an error message — it would just reboot when I tried to select an option.
The interesting thing about the above is that the file system for live CDs largely lives on the CD itself. Hence, if it couldn’t read it as in the above, then for some reason, the DVD drive wasn’t accessible. After doing a little research online, I discovered that the motherboard was relatively new, and did some rather funky things with the handling of the IDE devices. Hence, the computer would start to boot off the optical drive, but when it came time to load up a kernel and actually boot the system, the computer no longer knew how to access the drive! This all resulted from a lack of Linux support for the new motherboard architecture from Intel. Haven’t Linux developers built that time machine yet to get future architectures into old kernels? (Note that Windows would have similar problems; if I didn’t have an up to date Windows install CD or the driver disk, I would be out of luck.)
New hardware? Please stand by, support will be added momentarily…
Linux developers have a reasonably quick turnaround time on these things, and have, in fact, added support to the kernel. Unfortunately, they added it to the most recent kernel — 2.6.18. In CentOS 4.4 (as well as Red Hat Enterprise 4.4), this is 2.6.9-39. In Knoppix 5.0 is 2.6.17. In Ubuntu Edgy Eft, it’s 2.6.17. I would need to wait for the next release before getting support for the 965 chipset. Fortunately for me, Fedora Core 6 was released with the 2.6.18 kernel, meaning that I could use that instead. Being that I didn’t really feel like re-authoring my own custom live CD, I went with that, and will just have to wait for future releases on the others.
The devil is in the details.
I downloaded Fedora Core 6 for x86_64. I’m fairly certain that the i386 version would install in much the same manner, but decided that I might as well use the 64-bit version. I put in the DVD and booted up the computer.
However, it brought up a text-mode window to select language, keyboard, and installation method: something had gone wrong, because in a normal install, the full graphical environment would have been displayed. Upon selecting an installation method of “Local CDROM”, the installer reported the error “No driver found” — looks like I had some work to do.
First, I rebooted and struck F2 to get into the BIOS. Under the “Advanced” tab, “Drive Configuration”, I set “Configure SATA as” to “AHCI”. I then exited, saving changes.
Next, I rebooted with the the install DVD in the drive. When the message came up “To install or upgrade in graphical mode, press the <enter> key.”, I didn’t just hit enter — instead, I typed the following line:
linux all-generic-ide pci=nommconf
This is the magic trick. After skipping the media check, the full graphical environment came up at that point, and I could install as per normal. I did so, and the computer rebooted after installation.
So close, I can taste it!
The computer boots up, and the Internet connection was recognized straight away. The resolution was set to 800×600, so I went to System->Administration->Display, and clicked on the Hardware tab. I changed the monitor to “Generic CRT Display/Monitor 1280×1024″, and then I could set the resolution to (naturally) 1280×1024. System updates worked fine, and programs launched correctly. I could surf the web without issue (except for flash support, which is a whole other problem I won’t address here).
However, there was something wrong…the optical drive no longer worked! I could put in a CD or DVD, and they wouldn’t be recognized by the operating system, despite having worked fine for the install process. The problem here is in GRUB, the Linux bootloader. While the install had correctly added pci=nommconf to the loader, it had neglected to include the all-generic-ide tag.
I edited /etc/grub.conf as root, and changed the line…
kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=/dev/VolGroup00/LogVol00 pci=nommconf rhgb quiet
…to…
kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=/dev/VolGroup00/LogVol00 all-generic-ide pci=nommconf rhgb quiet
I needed to re-install GRUB, with grub-install /dev/sda1. A reboot later, and things worked fine.
Success!
So yes, Virginia, it is possible to install Linux on this wonky motherboard. What’s more, since the support is in the kernel (and far better people than myself are slavishly hacking away at it), it’s quite likely that distributions will support this out of the box in the future without special handling. I haven’t had any issues with this set up yet, and it runs in 64-bit mode to boot.
Some closing thoughts…
* The problems I experienced were largely a result of the IDE channel handling of the chipset. If I had an SATA optical drive, I could probably have gotten up and running on Fedora Core 6 without any extra futzing. This also may have gotten Ubuntu to install as well.
* This also means that if you have, say, ATA drives (not SATA), you may experience a whole host of other problems.
* Ubuntu “Edgy Eft” should have some backports built into it to handle the Intel 965 chipset, however, I couldn’t get them to work. It’s feasible that this CD could boot on an ATAPI optical drive, if given the right options.
* While these problems will probably go away in new releases, it’s not guaranteed. The chipset will at least be better supported.
* I’m not looking forward to the Windows installation. The chipset claims that I should be fine with Windows XP SP2 or Windows Media Center Edition. Only time will tell.
Permalink
09.13.06
Posted in Error Messages, Intermediate, Windows at 5:05 pm by Techie
I figured a good thing for this site would be to post up error messages I receive, as well as how I solved them. After all, I’m not the only one to get random errors, and if I add to useful results in Google, why not?
After installing iTunes 7, I tried launching it, and got this error:
The iTunes application could not be opened. An unknown error occurred (0x666D743F).
That’s awful cryptic. With a little digging, I found that the reason was because I was using Remote Desktop to access my PC remotely while trying to launch iTunes. Apparently, iTunes 7 doesn’t like it when you redirect sound, which is what Remote Desktop Connection tries to do by default. In the Remote Desktop Connection settings, I went to the Local Resources tab, and changed “Remote computer sound” to “Leave at remote computer” and things worked fine.
This error may also occur if you have third party sound plugins, or are otherwise redirecting the audio. For example, if you were using the Volume Logic plugin, you may get this error, or find that the plugin mysteriously stops working (uninstallation of this plugin is recommended until Volume Logic can release a new version). Total Recorder is another program that was causing problems. Also check is in Control Panel, Sounds and Audio Devices; make sure that in the Audio tab that your sound card is selected. Under the Volume tab Speaker settings, click Advanced, and play around with the Speaker setup drop down — try setting it to headphones, for instance, and see if that fixes the problem.
Permalink
« Previous Page « Previous Page Next entries »