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