10.20.07
Posted in Advanced, How To, Linux at 4:35 pm by Techie
Compiz Fusion on a Radeon Mobility X1400 graphics card? Hell yeah!
Oh, driver hell. Proprietary drivers are the bane of Linux’s existence, as any Linux user with a current ATI graphics card can tell you. I have a Lenovo Z61m on which I’d like to install Ubuntu Gutsy Gibbon, but good luck — the ATI Radeon Mobility X1400 will wreak havoc on your installation procedure. This is not new; Feisty Fawn had the same problem. Fortunately, you can in fact work around it.
Installing From the Live CD
First, there’s getting the live CD to work. You can download the alternate install CD and work from text mode, but I’d much rather use the regular live CD. Fortunately, you can! Boot up the live CD, and it’ll eventually die at some point, because the X server can’t launch properly. Hit Cntrl + Alt + F2 to jump to a virtual console. Type clear to clear the screen, then type the following:
sudo apt-get update
sudo apt-get install xorg-driver-fglrx
sudo depmod -a
sudo aticonfig --initial
sudo aticonfig --overlay-type=Xv
startx
You’ll obviously need a working Internet connection to make this work. Congratulations, you can now use the live CD! Run the installer as per normal.
Special note for Lenovo users: Do not delete the FAT32 service partition! You can use this to restore your Windows partition or run other diagnostics. I found it worked well to resize the existing Windows partition and dual boot.
After installation, you’ll reboot your system and — surprise! It doesn’t work. It’ll die at loading the X server again. Hit Cntrl + Alt + F2, and enter the following:
sudo apt-get update
sudo apt-get install xorg-driver-fglrx
sudo apt-get install xgl
sudo apt-get install xserver-xorg-video-radeonhd
sudo depmod -a
sudo aticonfig --initial
sudo aticonfig --overlay-type=Xv
startx
This is slightly different than before. Why? Well, no doubt you want to use those fancy Compiz Fusion effects, right? You didn’t need them to do the installation, but installation is done now. You’ll need to get the right drivers, as well as install xgl. Once you’ve done that, you might also need to edit /etc/X11/xorg.conf to change Option "Composite" "0" to Option "Composite" "1". After that, you should be able to enable Visual Effects through System->Preferences->Appearance, Visual Effects tab.
Permalink
10.04.07
Posted in Intermediate, Linux at 5:55 pm by Techie
If you’re a debian user (this includes all of you Ubuntu folks!), then you may be familiar with the strangeness of status codes for dpkg -l. For example, let’s say you install postfix:
sudo apt-get install postfix
We can look at the package list with dpkg -l. Let’s take a look at postfix:
$ dpkg -l | grep postfix
ii postfix 2.2.10-1ubuntu0.1 A high-performance mail transport agent
The ii at the start is some sort of status. Let’s remove the package:
sudo apt-get remove postfix
All fine and good, until we take a look at dpkg again:
$ dpkg -l | grep postfix
rc postfix 2.2.10-1ubuntu0.1 A high-performance mail transport agent
Hmm. Instead of removing it from the list, we see this peculiar rc status. What the heck does that mean?
The answer lies in the dpkg listing itself.
$ dpkg -l | head -3
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
There are three columns here, though y ou usually don’t see the third.
- Desired: what state we wanted the package to be in. (Unknown/Install/Remove/Purge/Hold)
- Status: what state the package is in now. (Not/Installed/Config-files/Unpacked/Failed-config/Half-installed)
- Err: special errors. (none/Hold/Reinst-required/X=both-problems)
So, if you take the first letter of each potential state for each of those, you get your status code for dpkg. Let’s look at the some of these status codes again:
ii: Desired: (I)nstall; Status: (I)nstalled; Err: none.
rc: Desired: (R)emove; Status: (C)onfig-files; Err: none.
pi: Desired: (P)urge; Status: (I)nstalled; Err: none.
Mystery solved!
Permalink
07.11.07
Posted in Error Messages, How To, Intermediate, Windows at 4:06 pm by Techie
I have a Lenovo X41 Tablet PC that I had installed Ubuntu onto. I recently decided to re-install the original Windows software, so I ordered the CDs from Lenovo and broke out an external CD drive. However, when I put in the Rescue and Recovery CD and booted the machine, I ended up with a blank black screen and nothing else. What gives? I updated the BIOS and the embedded controller firmwares, but to no avail. The computer would boot up the CD, a brief message about examining the setup would fly by, then a blank screen. I figured this was a problem with the recovery CDs, because my Ubuntu live CD booted right up.
As it turns out, Lenovo recovery CDs are very picky about their hard drive setup. They need to copy files to disk for a variety of tasks, so if you’re using up all the partitions, then the CDs will stop booting, but give you no other errors.
I had previously installed Linux on the machine, so my partition tables were in a state the machine didn’t really understand. What I needed to do was trash the existing partitions, and flush out the boot record.
Easy enough — I fired up the Ubuntu live CD, and launched the partition editor in System -> Administration. I had to turn off the swap space, by right-clicking on it in the partition editor, and selecting “swapoff”. By default, Ubuntu live CDs will scan your drives for partitions marked as swap space, and use it, so you have to turn off this usage to delete the partitions. I ran through and deleted all the partitions, and applied the changes.
I next had to clear out the master boot record, but I could do that right from the live CD. After doing that, I rebooted with the Lenovo Rescue and Recovery CD and said a little prayer.
Once I had done these steps, the recovery CD started right up. I’m surprised Lenovo doesn’t give more details on this in their support knowledge base.
Permalink
07.10.07
Posted in How To, Intermediate, Linux at 9:35 pm by Techie
In the old days, a techie might install Windows on a computer, then install Linux. Later, the techie might decide to trash the Linux partitions for some reason, but on reboot — oops! LILO was still there. These days, GRUB has taken the place of LILO, but the old problem is still there: how do you clear out the master boot record completely?
If you had a Windows 98 boot disk lying around, you probably remember the old magic of fdisk /mbr. This simple command did just what you wanted — flashed out the master boot record, and things worked like you expected.
However, in this day and age of Linux live CDs, there must be a way to do so without breaking out the floppies. As it turns out, there is, through a simple program known as dd.
The beginning of a hard drive is where you keep both the master boot record, as well as the partition table. What you want to do is write zeroes to the master boot record, but not the partition table. Many folks recommend writing zeroes to the first 512 bytes of the drive — this is wrong.
The truth is, the first 446 bytes of the drive are dedicated to the master boot record executable. The remaining 66 bytes are used to hold the partition table. Hence, what we need to do is read in a source of zeroes, and output it to the first 446 bytes of the drive. Simple! Let’s take a look at the command:
dd if=/dev/zero of=/dev/hda bs=446 count=1
This says to do just that — use as an input file the special device /dev/zero, an output file of the drive (substitute the drive identifier in question here!), with a block size of 446 bytes. Oh, and do it just once. No nonsense, quick, and effective. So, put away those MS DOS disks — that Linux live CD works just fine.
Permalink
06.22.07
Posted in Intermediate, Linux at 8:50 am by Techie
Are you running Beryl on Ubuntu? Do you have the problem where dialog boxes or new windows open under your existing window? This is most noticeable when web browsing, and coming across password-protected pages. I’ve been annoyed by this bug for about a month now.
It turns out, this is not a bug, it’s a feature. Beryl has a setting called “Focus Stealing Prevention”, designed to keep windows from stealing your focus. This is great if you really need to concentrate; it’s annoying if you need to find the password dialog box before proceeding.
To fix, open up the Beryl Settings Manager, and click on General Options. In here on the Main tab, you should find an option for “Level of Focus Stealing Prevention”. This is probably set to “Extreme”. Switch this to normal and voila — your windows should behave normally again.
Reference: LinuxQuestions.org: Beryl window preference problem
Permalink
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
01.08.07
Posted in Article at 9:48 pm by Techie
Jon Pogue, a technical writer for the New York Times, recently discovered how very insecure Wi-Fi connections can be (via Lifehacker). This is nothing new. However, it can be a jarring shock to those of you who hop on free Wi-Fi connections down at the local coffee shop. Your email messages, web surfing, instant messaging, and insecure web logins are all out there, zipping over the airwaves. Scary. I hope you didn’t send that email regarding inside information at a public company over a hot spot — you might be in hot water if you did. If you logged onto that message board you like, you might watch for posts you didn’t write.
However, Jon Pogue is just discovering what techies have known all along: networks are insecure. When you’re down at the local hot spot, you could be sharing a connection with a hacker, it’s true. It doesn’t even have to be a good hacker — lots of freely available software can do the trick without much fuss. However, you’re just as vulnerable on wired networks, depending on who else can get on it. Do you really trust everyone in your office?
Nonetheless, you should always consider wireless hotspots untrusted. If you need to do work, see if IT staff will set up a VPN for you. While you’re at it, see if they’ll set up a web surfing proxy for you. If you need to send email, try using SSL. Avoid logging into unsecured logins, such as most message boards. Otherwise, just be aware that someone might be listening.
Permalink
« Previous Page — « Previous entries « Previous Page · Next Page » Next entries » — Next Page »