Archive

Posts Tagged ‘linux’

New Computer (and its woes)

May 26th, 2009

After a long time coming, I finally took the plunge and bought a new computer, mostly for the occasion of graduating from college. So after a bunch of looking around, I went and bought this computer. In any case, I received it after a couple of days of intense waiting, and now I’ve got it and am very pleased with it (and the 23″ monitor I got with it).

However, after spending a day on it, I felt the need to get started with Linux. However, Vista isn’t that bad when you have a quad-core processor and 8 gigs of RAM. My problem is as follows:

  • I need to be able to play games
  • I want my games to run well
  • I need a Linux environment
  • Ideally, I’d run Linux natively

This leaves me with the obvious option of dual-booting, but I’d really rather not. I find it so… traumatic, if you will, to have to reboot my computer every time I want to change what I’m doing. And since I tend to fire up Team Fortress 2 rather frequently, I’m afraid I’d sit in Vista most of the time because of it, and only go to Linux when I need to. And that’s exactly the opposite of what I’d want. So what to do?

I don’t know what I’m going to do. In addition, while I’ve always had fun with Gentoo, the new installation I started has been proving challenging. The basic system was easy, but the framebuffered console and a desktop (with Compiz-Fusion) has proven difficult. This is in large part, I believe, because of the now-scattered documentation due to the data loss of our beloved Gentoo Wiki. And then I pop in an… an… Ubuntu (sorry, it just feels dirty to me) CD, and everything works. But it’s not quite right. It’s not perfect, and I don’t have portage, and I can’t use my shiny new computer to compile things all the time! (that was part of the reason I wanted such power :) ).

So I’m left with a dilemma. And because of my tendency to get paralyzed by indecision, I’ll probably stick with Vista for a while, until I figure out my solution, which will still probably involve dual-booting, since Wine doesn’t seem to be up to the task. If anyone’s got a similar situation/setup/solution, I’d love to hear about it. I love my Linux, but I also love my games.

miscellaneous , , , ,

Follow-up on mplayer’s tab-completion

March 23rd, 2009

So after a big of Googling and finding this bug (after several others), I was made aware of three things (in response to my previous post):

  1. mplayer’s tab-completion support does in fact come from bashcomp
  2. this support is covered in the “base” module
  3. the appropriate file uses strange regular expressions

At the time this bug was filed, the appropriate file to edit was (or was in) /etc/bash_completion. Since bash-completion-20081218, the bug was fixed, but the package also underwent some changes that seemingly caused locations of config files to change. (Apologies if this is incorrect, but I never went diving into the configs of bashcomp before now!)

In any case, the bashcomp configuration files are now in /usr/share/bash-completion. Since mplayer’s support is in base, the file that handles mplayer is “base” in that directory.

Now as for the “strange” regular expressions, that deserves some qualification. I’ve already seen lots of regular expressions on my (albeit rather short) day, but the reason I consider these ones strange is because they seem both unnecessary and redundant. The line in question is currently 5983 on my version 20081219-r1:

_filedir '@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|ASF|...|fl[iv]|FL[IV]...'

The two ellipses are my own adding, since the actual expression is one humongous line that ends up looking rather horrible here. My problems with this are both the explicit writing out of upper and lower case alternatives and the the bothering to do things like fl[iv]. Actually, I don’t have a problem with the latter except in the presence of the former. And to be fair, I probably wouldn’t have ever cared or noticed if I hadn’t been able to find “flv” when grepping numerous files. Not that “greppability” is necessarily a goal for configuration files, but it’s certainly annoying when it’s specifically hindered by regular expressions that save negligible space like the ones in this file.

As a final note, I’m going to disclaim that I’m no expert on bash scripting and the various intricacies of handling regular expressions therein, so I’d be happy to hear from anyone who knows better about why I should lay off the poor bash-completion folks. :-P

External Links

linux ,

.flv files finally tab-complete with mplayer

March 17th, 2009

After a long time of playing .flv files in mplayer on the command line in Gentoo, I noticed recently that they now tab-complete. I’m not quite sure how recently this change occurred or what caused it, but I’m very pleased with the update.

I’m not quite sure how the tab-completion infrastructure works, but I know it’s got a lot of “packages” for different programs. A surprising amount, actually. For the uninitiated, on my system, I’m looking at:

dfego@antica ~ $ eselect bashcomp list
Available completions:
[1] _subversion
[2] apache2ctl
[3] base *
[4] bitkeeper
[5] bittorrent
[6] cksfv
[7] clisp
[8] dsniff
[9] eselect *
[10] freeciv
[11] gcl
[12] gentoo *
[13] git *
[14] gkrellm
[15] gnatmake
[16] gpg2
[17] gvim
[18] harbour
[19] isql
[20] larch
[21] lilypond
[22] lisp
[23] mailman
[24] mcrypt
[25] mercurial *
[26] modules
[27] monodevelop
[28] mpc *
[29] mtx
[30] p4
[31] povray
[32] qdbus
[33] ri
[34] sbcl
[35] sitecopy
[36] snownews
[37] ssh *
[38] subversion *
[39] tig *
[40] tree *
[41] unace
[42] unrar *
[43] vim *
[44] xxd

The ones with the asterisks are ones I currently have enabled for my main user. As you can see, there are a lot of options to choose from, and for some weird reason, my git functionality died after a recent update. But wait… mplayer isn’t there… Interesting…

Interesting…

So where does mplayer’s tab-completion come from? It’s not just the normal one provided by the shell, because it before excluded certain file types.

Interesting. This must be investigated.

linux ,