Archive for the ‘computers’ Category

Automatic updates

Thursday, October 25th, 2007

This has got to be one of the coolest things I’ve ever seen about Mozilla as a platform.

Software Update - Sunbird

Today I learned (2007-08-25)

Saturday, August 25th, 2007

Today I learned that sort -R (random) will place two (or more) identical lines together in the output, even though the order will change each time it’s run (even with identical input). I wonder how they do this. Maybe they put everything in a hash, but with a random salt?

Getting rid of “Clear scrollback” in Pidgin (changing keybindings in GTK applications)

Wednesday, August 1st, 2007

For some reason, Ctrl+L in Pidgin is “Clear scrollback”, which is something I almost never want to do, whereas Ctrl+L in Firefox is the incredibly useful “Focus location bar”, the type of thing I hit hundreds of times per day. Obviously, this leads to a problem: I clear my pidgin window accidentally over and over again.

Luckily, the answer for how to fix this was in the pidgin FAQ—not this problem in particular, but changing keybindings in general. Just open up gconf-editor (Applications -> System Tools -> Configuration Editor from gnome, or gconf-editor from the command line) and set /desktop/gnome/interface/can_change_accels to true, then hover over the menu item you want to change the keybinding of and type what you want it to change to. I couldn’t figure out how to make it blank that way, but if you type one that already exists, that one gets overwritten, so I just changed “clear scrollback” to ctrl-f (which was Find) and then changed Find back to that and clear scrollback was cleared.

So problem solved. It was pretty darn easy for me, although I wonder how easily other people could have found the solution. In any case, the best solution would be to have it removed for everyone, so I’m going to report it and hope they agree it’s unneeded.

Making Baldur’s Gate II run in a non-admin account on Windows

Saturday, May 26th, 2007

Today I had the fun experience of dealing with Windows, and the also-fun experience of dealing with poorly-written Windows programs.

The reason for this, and the reason I didn’t just say “not my problem” and give up, was that I wanted to play Baldur’s Gate II. Specifically, I wanted to play it multiplayer, and my dad only lets my siblings use his computer under a limited account (the right thing to do), so I had to find a way to make it play. Installing could be done under an admin account, of course, but playing had to be done under a limited.

This is where the poorly-written bit became a problem. You see, Baldur’s Gate II, like about 97% of windows programs, violates the standards of what things go where in windows. This of course was not a surprise to me, just an annoyance. So I was determined to find a way around it.

The first, most obvious problem, was that it needed to write to files in the program files directory (like, e.g., save files. They’re not supposed to go there! They’re supposed to go in the Application Data folder in the user’s account! I’m not even a windows developer user and I know that!), which limited accounts aren’t allowed to do. Easy fix: Change the permissions on all those files to let anyone write to them. Roadblock to the easy fix: XP home doesn’t have the advanced security tab that lets you control the access control lists. Doh. So with about 10 minutes searching online, I finally found out about the cacls command, which can be run from the command line even in home edition. I got the funness of finding out by trial and error that without the /E switch, it will remove the entire list when you do /P, even though it says it’ll “replace the user’s” permissions. Luckily I’d listed them all out before and still had them on screen. Final command for that: cd installdir; cacls “BGII - SoA” /T /E /P Users:F

Then, it still didn’t run. When you started up the game in the limited account, it still, for some reason, thought it needed to be installed. I had thought (from reading support things on the official website) that making baldur.ini writable would fix that, but I was wrong. So: It must be a registry issue. Long story short, because I’m getting tired of writing about Windows: It was. /HKLM/SOFTWARE/Microsoft/Currentversion/App Paths/BG2Main.exe was readable by the limited user, but apparently, no, it needed to be writable as well, because the programmers were stupid and used the wrong registry call. (Thanks to regmon for helping me find that out). Fix: go in as admin, right click on that key, and there’s some properties that let you make it writable by all. Problem fixed, everything works now.

This all is just one of the many reasons I hate windows.

piping standard error

Wednesday, May 16th, 2007

I’ve often wished I could pipe only standard error to a command, leaving standard out to display on the screen as is. One place this would be useful, the one that finally got me to act, is to make compiler warnings show up in a different color, to make them more noticeable.

I decided grep ".*" would work quite well for coloring things, since I have --color=AUTO on by default. The problem, though, was how could I get standard error to go to grep instead of standard out? (I have green text on a black background, and grep turns what it matches red. If I piped standard out to grep ".*", I’d get red text with green errors, and that’s just backwards :P)

The internet wasn’t very helpful. It gave me a bunch of things halfway there, like redirecting standard error to standard out, and even saving standard out as a file and redirecting standard error to standard out and piping that, but I wanted standard error to stay standard error, standard out to stay standard out, and them both displayed on screen like normal, only with stderr having been run through a command.

So, of course, I had to do it myself.

Here’s what I came up with: (command 2>&1 1>&3 | grep “.*” 1>&2) 3>&1

So how’s this work? Well, first stdout (file handle 1) is redirected to file handle 3. Yes, that’s first. Apparently they’re evaluated in backwards order. Took me a while to figure that out. Then stderr (file handle 2) is redirected to stdout (file handle 1). Then it’s piped to grep (or whatever command you want, I could see useful things being done with sed here) and the output sent back to stderr, and then finally file handle 3, the original stdout, is sent back to stdout.

I hope someone finds this useful. I know I will!

What distro to install on my laptop?

Friday, March 23rd, 2007

I recently got a new* laptop that I’d like to put linux on. I already run a gentoo box that I’ve had no problems with, but I’d like to try something different so I can get more experience. Current thoughts include some random other stock distro, some random other stock distro that runs KDE or XFCE, something running SELinux, or trying out OLPC’s Sugar interface (though that would probably be impossible).

Does anyone have any recommendations, from that list or otherwise? Keep in mind this is entirely to be used as a learning experience, so I can put as much work as I need into it. The only criteria is that it should be something I’ll find useful in the future.

* Not new, but new-to-me. Exactly how not new? It has a sticker on it that says “Designed for Windows 95″.

Ogg Flac

Tuesday, November 14th, 2006

Whee! Both mplayer and gstreamer (which rhythmbox uses) both had their ogg flac decoding bugs fixed recently, and it should be fixed in the next release of both. I can finally stop decoding my music to wav before playing it!

Software Freedom Day

Sunday, September 17th, 2006

Today was Software Freedom Day, and while I certainly could have done more to publicize it, I did take it to heart for myself and my computer.

Today I finally uninstalled the last bit of proprietary software I was using, Flash, and am compiling gnash to replace it. This will certainly be a bit of a drop in functionality—there’s a long list of things unimplemented—but it’s worth it to finally have my computer clean. Macromedia/Adobe hadn’t released any version of flash for linux since 7 anyway, so I was already starting to get locked out of sites. I just hope my game site doesn’t accidentally detect it as me cheating—I’ll probably be the first person ever to use it on their site. :P

(I also got rid of a few old (unused) java plugins that were lying around. I still have some games installed that I can’t see the source for; I treat those as media, the same as music, and while I don’t listen to music from companies I don’t like (read: any RIAA member), I don’t restrict myself to only openly licensed music if the money’s going somewhere decent. Feel free to try to convince me that I’m wrong (or right) about that.)

Enabling encryption in vsftpd

Tuesday, September 12th, 2006

For the past few days I’ve been struggling with enabling SSL (actually TLS) encryption in vsftpd. I followed the directions, but every time I try to connect it gives the message

Connected to xx.xx.xx.xx:21
220 (vsFTPd 2.0.4)
USER anonymous

530 Anonymous sessions must use encryption.
Disconnecting from site xx.xx.xx.xx

(Several hours later)

Apparently it’s not a problem with vsftpd. ftp -z ssl xx.xx.xx.xx works fine. It’s just the ftp clients I tried (gFTP and Filezilla) don’t encrypt the connection. For gFTP I found an FAQ entry that says

You must add the public key of your self signed CA to your OpenSSL certs directory.

but I’ve done that, because I had to put it there for vsftpd to use it!

Edit: Firefox apparently doesn’t have support. That’s annoying.

Phew! My babies are safe.

Sunday, September 10th, 2006

From Gentoo’s default /etc/conf.d/rc file:

# Set to "yes" if start-stop-daemon should attempt to kill
# any children left in the system.

RC_KILL_CHILDREN="no"

With settings like that, how can you not use Gentoo?

A good font package approaches…

Thursday, July 27th, 2006

The STIX Fonts have all been made, and just need to be packaged now! Wooo!

emerge chucknorris

Monday, July 17th, 2006
# emerge -Dtau world

These are the packages that would be merged, in reverse order:

Calculating world dependencies... done!
...
[ebuild  N    ]  games-misc/fortune-mod-chucknorris-0.1

Hard drive archival

Tuesday, July 4th, 2006

To anyone using hard drives as an archival system: Will you have an IDE motherboard in 20 years? In 100?

Perfect Sound

Saturday, July 1st, 2006
  • There is a master sound volume. Only root can change this.
  • There is a per-user sound volume. A user can only change her/his own.
  • There is a per-application sound volume. This is what applications change with their sound control. Applications do not change the per-user volume unless they are specifically for that purpose, like alsamixer. A dedicated volume control program can control application volumes, in case the application doesn’t have a control.
  • If an application wants to provide more detailed control over its sound (e.g. a music track and a sfx track) it ??. Mixes them itself, and only sends one track to the OS? Sends both, but after changing their volume, and with the same application name so the per-application control affects both? Exposes both to the OS entirely, and requests separate volume controls for them (which it then affects using its own in-app controls)?

All values are, of course, multiplied before affecting the sound. Values greater than 100% are allowed.

This does not specify how it interacts with the actual speakers (perhaps volume control on the speakers changes the master volume?).

Per-application sound volume?

Sunday, April 2nd, 2006

Does anyone know if/how I can (in Linux, of course) control sound volume per application? So I can, e.g., turn down the sound coming from a flash game in Firefox, but let Rhythmbox play my music at normal volume?

You know you’re a geek when…

Sunday, March 5th, 2006

You know you’re a geek when you think “My room’s cold. Perfect time to compile OpenOffice.”.

Microsoft vs. The Web, chapter ?

Sunday, March 5th, 2006

Microsoft is trying to kill OpenGL. The Web is embracing it. Who will win?

Soundcard problems

Monday, February 27th, 2006

For the past few weeks I’ve had no sound coming from my computer. I switched over from having sound support built in to the kernel to loaded as modules, and everything worked fine. Then, just to be sure, I re-ran the configuration… and it broke. Every single step in the guide I was using worked fine, with no errors at all or anything, until the part where you were supposed to hear sound, which I didn’t.

Lack of an error message is a pain to work with, so I couldn’t find any way to fix it. I went through the guide several times, it didn’t get fixed. I upgraded kernels and alsa tools, nothing helped. I asked on forums, no one knew.

So today I tried everything again, and then went and searched the alsa-user mailing list archives. And there I found the solution to my problem: switch a rather buried, nowhere-mentioned pref to change the output from digital to analog, since it can only do one at a time.

So hopefully this post will come up on google for anyone having the same problem as me. If you have a Soundblaster 2 Audigy (ZS (Platinum (Pro))), which uses the emu10k1 driver, and you’re not getting any sound, but you have no error messages either, and you’re sure everything’s turned on and unmuted and turned to a good volume, then scroll way over in your alsamixer preferences, and find the thing labelled “Audigy Analog/Digital Output Jack”, and unmute it.

Processing Units of the Future

Wednesday, June 29th, 2005

I’m sure I’m not the first to think about this, but with multi-core/cell processors, will graphics cards eventually become obsolete? After all, why not put one normal core and one graphics core in? And then, for the people who need specialist stuff, one raytracing core, one physics core, one whatever else.

And with people finding that some non-graphics things go faster on graphics cards, perhaps this will lead to things not being written for a specific CPU/GPU/whatever, but instead being told somewhere along the line to go wherever they’ll run fastest.

On the other hand, this would make it impossible for people to upgrade just their graphics card… bah, what do I know? I’m just a web geek.

Yay Fitt’s Law!

Wednesday, June 15th, 2005

Yay Fitt’s Law!

I don’t know why I didn’t do this before, but I just moved the new terminal window button (easily my most used little launcher thingy) into the very corner of the screen. It’s so much nicer to hit now, even if Gnome is stupid and doesn’t count clicks on the edge 1px (though it does on the bottom 1px). For some reason, I’m even finding the Applications menu (which was in the corner, and I rarely ever use) easier to hit, too (I’ve had to click it a few times to get the screenshot, launch gFTP, etc.).

Coolness.

Not accidentally filed in markup.


Bad Behavior has blocked 328 access attempts in the last 7 days.