definitely interested.

Posts Tagged ‘linux’

Bootable

In learning, linux on May 26, 2010 at 3:28 pm

Next task: make a bootable USB thumb/stick/drive/thing to rescue a busted machine (In this case, little old Brahms). dkg, as ever, knows what’s what and gave me great advice:

Bootable USB sticks are just like bootable hard drives for modern computers. Partition them with parted, use mkfs to create a filesystem on them, use grub-install to give them a bootloader, put a kernel and an initial ramfs on them, configure the bootloader to load them, and away you go.

He even offered me his filesystem rescue debirf image with the latest 686 kernel from debian unstable. Read the rest of this entry »

Blargh, Blimey (continued)

In various on December 15, 2009 at 3:00 pm

Okay: so I can play DVDs now, but they’re choppy.

Meanwhile, Ubuntu’s System Monitor shows 2.9 GiB of available memory, though I ought to have 4. The bios shows 4. What gives?

Blargh, Blimey, RAM, DVD

In linux on December 13, 2009 at 6:34 pm

Okay, lazyweb:

Why can’t I play DVDs and why, when I have installed in my computer two RAM modules of 2GiB each, does my computer have 2.9 GiB of the RAMS? Why?

On the DVD end, I have installed one million things and gotten from an error in Totem (“no uri handler implemented for dvd”) to Totem quietly crashing when I try to play a DVD. VLC spins the disk and then stops. /var/log/messages shows this after trying to run VLC:

Dec 13 13:10:02 luna kernel: [10853.901791] sr 1:0:0:0: [sr0] Add. Sense: Media region code is mismatched to logical unit region
Dec 13 13:10:02 luna kernel: [10853.906376] sr 1:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Dec 13 13:10:02 luna kernel: [10853.906386] sr 1:0:0:0: [sr0] Sense Key : Illegal Request [current]
Dec 13 13:10:02 luna kernel: [10853.906397] Info fld=0x98d0
Dec 13 13:10:02 luna kernel: [10853.906402] sr 1:0:0:0: [sr0] Add. Sense: Media region code is mismatched to logical unit region
Read the rest of this entry »

Lesson Learned

In learning, linux on May 19, 2009 at 4:12 pm

We’ve got two packages running, OpenX and Phorum, that seem to make a lot of database connections. Sometimes so many that the whole database runs out of connections. Phorum gets hammered by bots looking to exploit vulnerabilities in the code (and sometimes finds them). OpenX is just greedy. Or needy.

So I got smart. I limited the database users that those tools connect as to just a handful of connections. Which solved one problem: we stopped getting errors complaining that there were too many users connected to the database. But we started finding that the site would slow to an absolute crawl from time to time.

Talking it through with a friend, he pointed out that what I was probably doing was causing all the rejected database connections to queue up and wait. Kind of not the ideal solution, though I bet I could further fine tune things to prevent that as well. A better idea, since the Phorum forums are entirely archival at this point, was to restrict any and all post requests in the directories where Phorum is running. In htaccess you’d say something like:

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(POST) [NC]
RewriteRule ^(.*)$ – [F]
</IfModule>

So that’s where I’ve left things for the moment. We’ll see how we fair.

PS. How much do I love that you can make a firefox search bar out of anything?

This Time I Mean It

In learning, linux on May 13, 2009 at 8:13 pm

The Frankenserver must go. Today we were having a little bit of woah with the old Phorum installation. Does seem to get derailed, that one. More on that later: the net result was that Apache was choking to the point where I couldn’t even ssh into the machine. I phoned Ye Olde Rackspace, who confirmed Franken’s unresponsiveness and had the data center reboot it.

And for a split second I was able to get in and run top, which showed me a whole lot of apache processes. More than I’ve ever seen before. I quit top and tried to stop apache:

sudo /etc/init.d/httpd stop

That failed the first time but being a persistent sort of woman I tried it again. And then I called Rackspace to find out what they were doing. We have a support contract with them, you see, and I realized that … 1) I don’t want to work at cross purposes with their esteemed technical whiz-kids, and 2) I don’t want to do work someone else is already doing. I’ve got other things to do. Blogs to read. That was a joke, by the way. I don’t read blogs at work. Ever.

So I get them on the phone and whiz kid one says to me “well, I’m just going to restart apache here and see what that tells us.” What restarting apache tells us. And before I could say “hang on” he did. Just in time to snarl my request for the tail of apache’s error logs. It just went down hill from there, the upshot being that I mostly resolved the problem despite Rackspace. I’m done paying $350+/month for Rackspace. They aren’t earning it.

I’ve been moaning about this server for eons. When last we left off I was contemplating life without a service contract. I can see now that I don’t need this service contract. Liberating revelation, that one.

Elastic clouds scare me because I don’t understand them. Also because I don’t think I can have a static IP on a cloud. VPS I understand. So now I’m sketching my new server and workplan. Here’s what I think I’m installing: Read the rest of this entry »

PDF -> XML -> Calc

In various on April 15, 2009 at 10:43 pm

Forget for a moment that I’m trying to play like I’m more than a tech. Or recall Joanne this morning in the rain in the garden after Lucia and I collected coconut shells to mark out an area to plant her onions in, “so funny, computers seem like the last thing I’d imagine you working on. You’re someone who should be working outside! I can’t imagine you not working with plants!”

If only she knew.

So I have a PDF. PDFedit will convert it to a pretty crappy XML document. A round of non-greedy vim searches:

:%s:<font .\{-}>::g
:%s:</font>::g
:%s: bbox=”.\{-}”::g

Followed by some attention to the numbers:

:%s:period:. :g
:%s:comma:,:g
:%s:zero:0:g
:%s:one:8:g
:%s:two:2:g
:%s:three:3:g
:%s:four:4:g
:%s:five:5:g
:%s:six:6:g
:%s:seven:7:g
:%s:eight:8:g
:%s:nine:9:g

(and a bonus to anyone who can tell me how I totally borked my data with the series above …) got me a really, really simple XML file of “lines” and “words”. Read the rest of this entry »

Filesystem Loop Detected

In various on December 5, 2008 at 1:19 am

Someone (Hsuan, to be precise, but that isn’t the point really) came to me recently with a corrupted SD card. Normally, I don’t do corrupted SD cards. I so do not want to be that guy that sits there and fixes what is broke. That doesn’t appeal to me at all. But when there is a command line involved, or a real mystery … I can find it hard to resist. You can see why my career as something other than a widget twiddler is not really taking off.

The answer, if you like to skip the narrative (hmph) is photorec. Which actually does amazing things for all manner of data recovery.

Here’s what I had before me:


[0 amanda@stillwell CANON_DC]$ find . -type f
find: Filesystem loop detected; `./DCIM/101CANON/101CANON' has the same device number and inode as a directory which is 1 level higher in the filesystem hierarchy.

So whatever, PhotoRec. Great. But people always want to know why. I do. So why? Why? David Henry, who I do not know, and yet kind of do know (the internet is sneaky that way) had a pretty good explanation, which I can’t really improve on:

I was long puzzled by filesystem stuff, until I realized much is done by elves!

Read the rest of this entry »

Watching Server Loads

In various on December 2, 2008 at 9:12 pm

Worth trying: sar -q for a rundown of queue lengths and load averages. Also pstree and I need to sort out what this:

I reniced the gzip process with a low priority level to reduce the load it’s putting on your server. I’d recommend running these scripts with a +19 niceness during periods low traffic to reduce the impact they’re having on your server.

means.

OOo Base

In various on August 26, 2008 at 7:05 pm

OpenOffice has a database app. It has come a long (long, long) way over the last few years but uff is it ever just not there yet. I do need the query browser. Things you can’t do with OOo Base include add a fulltext index. Not with the gui because the gui doesn’t know that much, and not with the query browser because it balks. CREATE FULLTEXT INDEX `FILER_NAME` ON `commcand` (`FILER_NAME`); gets me an error (“syntax error, unexpected $end, expecting BETWEEN or IN or SQL_TOKEN_LIK”) in Base’s interface (“Run Query”) but worked just fine at the mysql command line. Same for “SHOW INDEX FROM tablename“. Works fine at the command line, OOo balks.

So OOo Base isn’t just translating between the two.

I’ll probably update this post as I come up with more new and different things to complain about.

Sweet Spots in MySQL and OOoBase

In various on August 22, 2008 at 10:53 pm

Observation: OpenOffice’s native database format is a pain. It is impossible to work with, impossible it import data into. A pain.

People keep telling me that OOo will talk to MySQL, but I haven’t ever bothered to sort it out. Lately, though, some guy at NYPIRG has been working magic with campaign finance data and I wanted a piece of the action. I turns out that the state Board of Elections does publish filing data regularly. Comma delimited no less. Or, rather, comma delimited data stored in a MS Windows only proprietary compression format.

I know I’m famous for saying that PHPmyAdmin makes you weak, but sometimes some weakness is called for. Especially when you’ve got a monstrosity of data and you want to be able to look around at it in a halfway useful way.

I’ve looked at the instructions before a few times over and never felt quite inspired to actually follow them, but with inspiration in hand I went for it this week. It took all week, but that had a lot more to do with trying to sort out a seamless way to modify the date formats for import into MySQL than with the OOo Base / MySQL connection.

To start with, I followed these instructions for installing Connector/ODBC. Or rather, I ran sudo aptitude install unixodbc libmyodbc unixodbc-bin and took it from there.

Most of the process you only need to do once. Then comes the fussy part. With Connector/ODBC in place, adding an existing MySQL database as a data source available to OOo Base requires you to:

  • run sudo ODBCConfig
  • look under the System DSN tab for the add button
  • select the MySQL ODBC Driver you configured the first time around and say OK
  • manually add the name of your database (it might not be in the pulldown)
  • Only then, can you use OOo Base’s New -> Database wizard to

  • connect to an existing MySQL database;
  • connect using ODBC;
  • and then select the database and supply a username and password for it.

    It is a little crazy making to plod through the ODBC Config screens, but it does work.

    Ask Cherry Crush: What is this “google analytics”?

    In various on August 21, 2008 at 8:26 pm

    Alyosha Dubinskaya, do you have any idea how much I love to get questions like this? I mean like this:

    Amanda, what is google analytics?
    i read this

    http://www.google.com/analytics

    and it doesn’t explain anything to me.

    i just installed no-script for firefox today

    and am shocked at how many places there is a script from google analytics!

    Read the rest of this entry »

    Limits, to the Limits (evolving)

    In various on July 15, 2008 at 10:12 pm

    I’m monkeying around with OpenOffice and VLOOKUP and HLOOKUP and just LOOKUP. I have a spreadsheet with a column of values like:

    FRIENDS OF REESE BERMAN
    COMMITTEE TO ELECT MIKE FLYNN COUNTY CLERK
    LIMA DEMOCRATIC PARTY
    FRIENDS OF ANDY TORRES
    COMMITTEE TO ELECT PETER A TULIN
    COMMITTEE TO ELECT PETER TRIPODI
    FRIENDS OF ROBERT H. GIZA
    FRIENDS OF BRANCATI
    ALPAC (ALCAS POLITICAL ACTION COMMITTEE)
    FRIENDS OF YONEL LETELLIER

    And a spreadsheet with columns of values like …

    Reese Berman
    Ed Brancati
    Mike Flynn
    Robert Giza
    Yonel Letellier
    Andy Torres
    Peter Tripodi
    Peter Tulin

    And I want to connect “COMMITTEE TO ELECT PETER TRIPODI” to “Tripodi, Peter”. MATCH will take regular expressions but I can’t quite figure out how to combine a cell reference with a regular expression.

    Actually this works: =MATCH(CONCATENATE(".*";C2;".*");$A$2:$A$11;0)

    Where C2 is the candidate’s last name and A2:A11 is the array of committee names. So I’m getting somewhere.

    Giving up, am I. This helps:

    IF(ISNA(INDEX(Sheet1.$B$1:$B$788;MATCH(CONCATENATE(".*";C24;" ";B24;".*");Sheet1.$B$1:$B$788;0);Sheet1.$B$1:$B$788));INDEX(Sheet1.$B$1:$B$788;MATCH(CONCATENATE(".*";B24;".*");Sheet1.$B$1:$B$788;0);Sheet1.$B$1:$B$788);INDEX(Sheet1.$B$1:$B$788;MATCH(CONCATENATE(".*";C24;" ";B24;".*");Sheet1.$B$1:$B$788;0);Sheet1.$B$1:$B$788))

    I See You

    In various on June 13, 2008 at 1:39 pm

    I got all worked up about Many Eyes until I discovered that I couldn’t quite load any of the visualizations because my Java setup isn’t what it should be. Then I actually met someone from Many Eyes and got inspired to ask for advice. I got some:

    One of our developers uses Ubuntu and here’s his Java set up: Sun-java6-plugin on Hardy in the multiverse. It can be installed via the package manager directly (sudo aptitude install sun-java6-plugin) or via Add/Remove Applications (“Sun Java 6 Runtime”). The info page on the package is here.

    So now you can check out Many Eyes, too. Except that nothing is so simple. That plugin for Gutsy? It doesn’t exist.

    Or it might. I’m really not sure.

    http://packages.ubuntu.com/gutsy/i386/sun-java6-plugin/filelist

    Silly Server, That’s Not Your Mail

    In various on June 5, 2008 at 4:53 pm

    The Frankenserver walks again …

    I finally figured out that the frankenserver, which serves web service for example.com and examplefoundation.org doesn’t know that it is not the mail server for these domains. The whole rest of the world knows it, but not the frankenserver.

    I’m trying to figure out the right way to tell ye olde frankenserver (or perhaps postfix) that mail must leave the house. To be more precise: if WordPress (or OpenX or Urchin) generates mail for amanda@example.com, that mail can be delivered to some other address as defined in /etc/aliases, but it can’t be delivered to amanda’s actual mailbox off on Dreamhost.

    If /etc/aliases sayeth “amanda amanda@gmail.com” then mail generated on the server for amanda will be punted to gmail, no problem. But if amanda isn’t defined the mail evaporates into the ether (or something). I want postfix, locally, to know that it should treat mail for example.com like any other mail–look up its MX record and send it there.

    I’m not sure how to convey that to Postfix, however.

    Ruby on Rails for People Like Me

    In various on April 22, 2008 at 1:56 pm

    This is about programming, which only a programmer would know. Ruby is a programming language, rails is … rails. It is a library of code written in Ruby that you can hook all together in a row and make do things, quickly. So they say. Like so many things, most Ruby on Rails sites for beginners assume we all begin at the same place. I’m beginning at a place where this particular tip sheet is useful.

    Our project is this: the Clinton Hill CSA has a database that works. It does things people need for it to do. I want to move it from its old host to our Dreamhost account, but since it won’t just launch, I need to understand what I’m looking at a lot better.

    Soooo… Read the rest of this entry »

    Defining Subdomains

    In various on April 21, 2008 at 3:33 pm

    Assuming you’re using Apache. I’m using Apache2, so I can’t even promise this will work on 1.x. Assuming you’ve got a BSD or Linux system. I keep coming back to this and my own archives are so scattered it isn’t a lot of help.

    You need two things:
    1) A virtual host definition. Somewhere in the directory where your virtual hosts are stored, make another one. /etc/httpd/conf.d and /etc/apache2/sites-available are likely candidates.

    2) A domain name defined. Here is where things get sneaky. You can put definitions in /etc/hosts, which I like to do for local domains. On our Rackspace account, I hafta head into Rackspace’s domain name manager to add a subdomain. I don’t know where that gets written to. There are probably another dozen ways to define domain names. These are the two I’ve been using that I keep trying to look up.

    Rails (finally)

    In various on April 7, 2008 at 1:08 pm

    While back, Scott loaned me some Rails books. They’ve been holding up my bookshelf ever since. I have, however, inherited a working Rails app that I need to migrate to Dreamhost, so it is time for me to learn this beast, at least a little bit. Rabble made it look so easy, but I have no idea what I’m doing.

    Here is what I’m slowly figuring out:

    rails someapp will generate a stack of basic files that form the foundation of a rails application.

    dispatch ./public/dispatch.fcgi and ./scripts/server seem to do about the same thing. In my case, they seem to generate the same run of errors:

    [0 chcsa@karnov ourCSA]$ ./public/dispatch.fcgi
    /usr/local/lib/site_ruby/1.8/rubygems.rb:317:in `activate’: can’t activate actionpack (= 1.13.6), already activated actionpack-2.0.2] (Gem::Exception)
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:335:in `activate’
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:334:in `each’
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:334:in `activate’
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require’
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in’
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require’
    from ./public/../config/environment.rb:54
    from ./public/dispatch.fcgi:21:in `require’
    from ./public/dispatch.fcgi:21

    I think what the machine is trying to tell me is that my app is expecting a different version of a Gem called actionpack. Or (maybe?) my app is trying to activate gems but on Dreamhost they’re already active? Dreamhost has a list of installed gems that includes actionpack (2.0.2, 1.13.6). So the next concept I have to grasp is “activating” “gems.” I’ll be sure to let you know how it goes.

    update Line 54 of config/environment.rb does say require 'action_web_service', while the list of installed gems shows only an actionwebservice. See what I mean about having no idea what I’m doing?

    Actually, I think the next thing I have to wrap my head around is test, development and production environments. Am I supposed to setup three databases?

    Fun with Calc Part 2

    In various on March 25, 2008 at 1:50 am

    =IF(AND(EXACT(E491;E490);EXACT(F491;F490));D490;SUM(D490;1))

    You (we) are in column D with our formula. If column E matches the line above, and column F matches the line above, then use the value in D, above. If they don’t match, iterate up one.

    That took me way too long to figure out.

    Fun with Calc

    In various on February 21, 2008 at 6:02 pm

    Say someone gives you a spreadsheet full of names and addresses and you want to import them into a database that needs first name separate from last names. In Excel, one option is to split the cells along a delimiter. I forget how you do that, but it is a not-so-obvious option in the tools menu. Kind of cool, but if you have extra delimiters, you might end up with a million columns when maybe all you really want to do is take the last word as one column and the rest as another column. So Mary Lou Retton and Shannon Miller will come out as “Mary Lou” and “Retton”; “Shannon” and “Miller”. If that is what you want.

    Not only does OOo Calc not have that particular cell splitting function anywhere that I can find, it isn’t actually quite what I was looking for anyway. Not yesterday at least. I had before me a list that went something like:

    Quiroz, Alfonso (ID:1092-UN)
    Recchia, Domenic (ID:LW-UN)
    Rivera, Joel (ID:361-UN)
    Sears, Helen (ID:SH-UN)
    Simon, Brian (ID:1155-UN)

    Bonus points if you can figure out where I got my data from. Here is what I did to get a column of IDs, where B92 is a cell that reads, say, Rivera, Joel (ID:361-UN):

    =SUBSTITUTE(RIGHT(B92;SUM(LEN(B92);-FIND("(";B92)));")";" ")

    Cool, huh? Oh wait, you probably think this makes no sense. How about this:

  • FIND("(";B92) — find the position of the opening parens.
  • LEN(B92) — get the length of the whole field.
  • SUM(LEN(B92);-FIND("(";B92)) — get a count of characters after the opening parens.
  • RIGHT(B92;SUM(LEN(B92);-FIND("(";B92))) — grab that many characters (grab all the characters after the opening parens)
  • SUBSTITUTE(RIGHT(B92;SUM(LEN(B92);-FIND("(";B92)));")";" ") — and then trim off that closing parens by substituting it with an empty space.
  • I got lazy after that and used a similar bit of function wizardry to pull out the names:

    Quiroz, Alfonso
    Recchia, Domenic
    Rivera, Joel
    Sears, Helen
    Simon, Brian

    And then I just used a simple little function to make last name and first name columns. The last names were:
    =LEFT(B3;SUM(FIND(",";B3);-1)) — find the comma, paste everything to the right of it (or rather, find the position of the comma, subtract 1 to get the position before the comma, and then pull that many characters starting at the left.)

    And for first names: =RIGHT(B3;SUM(LEN(B3);-LEN(D3);-2)) — D3 was my new last name column: get the character count of the last name and calculate the number of characters that are not consumed by the last name LEN(D3), the comma and space after it -2. We’re pulling from the right this time.

    I realize that I haven’t documented this extraordinarily well, but I’m hoping it will at least help me in the future. Sorry if your poor eyes have gone and glazed over.

    ps, is parens a word?

    pps, why would I write something so useful and never once use the words OpenOffice or OpenOffice.org or even just OOo? I can’t search my own blog for posts about OpenOffice if I never say such things are here.

    Lost at VNC

    In various on February 21, 2008 at 1:52 pm

    I need a VNC client for Ubuntu.

    The Ubuntu repository has 5 or 6, and I really have no idea how to distinguish them. Normally I’d hit up Social Source Commons, but I don’t see any Linux VNC clients there.

    It looks like the difference between the options has to do with the display protocol. DirectVNC uses the “remote framebuffer protocol” while xVNC4Viewer uses X and sVNC “provides a client for SVGA.”

    I’m lost. The package descriptions aren’t really helping: Read the rest of this entry »

    An Update on Postfix Troubleshooting

    In various on February 7, 2008 at 10:45 pm

    Still kind of wondering if I could/should just close off smtp connections in an xinetd config, but tail /var/log/maillog seems to be saying that my little friend at 81.189.52.37 is having less success connecting of late:

    Feb 7 17:35:59 s47822 postfix/smtpd[6537]: disconnect from unknown[81.189.52.37]
    Feb 7 17:35:59 s47822 postfix/smtpd[6544]: disconnect from unknown[81.189.52.37]
    Feb 7 17:36:00 s42782 postfix/smtpd[6523]: lost connection after CONNECT from unknown[81.189.52.37]
    Feb 7 17:36:00 s42782 postfix/smtpd[6523]: disconnect from unknown[81.189.52.37]
    Feb 7 17:36:00 s42782 postfix/smtpd[6538]: lost connection after EHLO from unknown[81.189.52.37]
    Feb 7 17:36:00 s42782 postfix/smtpd[6538]: disconnect from unknown[81.189.52.37]
    Feb 7 17:36:00 s42782 postfix/smtpd[6522]: lost connection after CONNECT from unknown[81.189.52.37]
    Feb 7 17:36:00 s42782 postfix/smtpd[6522]: disconnect from unknown[81.189.52.37]
    Feb 7 17:36:01 s42782 postfix/smtpd[6506]: lost connection after EHLO from unknown[81.189.52.37]
    Feb 7 17:36:01 s47s42782822 postfix/smtpd[6506]: disconnect from unknown[81.189.52.37]

    Or am I missing something? This is an interesting list of main.cf settings to investigate. And this is a rundown of what they actually mean. Does adding reject_invalid_hostname or reject_non_fqdn_hostname do anything for me?

    $script

    In various on February 5, 2008 at 11:28 pm

    From the kid brother files …

    Forgive me if you already know this command but if you don’t it is really handy. script will allow you to record every keystroke in terminal until you type “exit” (I think it object if you try to enter vi or pico or stuff like that). This is handy if you are trying to solve some problem or download some packages in the terminal and want a record of what you have done. (just type $script filename.lst and it will record your activities – I’m sure that if you don’t already know about the command you are smart enough to figure out the rest)

    Right off the bat, some observations: are you really using vi and not vim? Did you know that you can usually look up the manual page of any command line linux goodness with $ man {command}?

    And, if you’re using bash as your shell, your command history is stored in .bash_history. Try typing history at the command line.

    My problem is this: in the shell you can hit the up arrow to scroll through your last dozen commands (sis note: that is the history I speak of above.) but script records all these up arrows and makes lines on the final document that are hundreds of chars long. So, is there a command that escapes this recording and just records the final command you settled on rather than the dozen you scrolled through to get to it?

    It doesn’t look like script will let you do much besides log your keystrokes. What kind of packages are you downloading? I’ve been using aptitude over apt precisely because it does a much better job of showing you what you installed. Not that I remember off the top of my head how I did that or anything. But I did once. See such a list.

    Are you downloading with wget? Try history | grep wget when you’re done downloading things. That ought to give you a good list of what you wgot.

    Other fun facts? ctrl-r will search your history for you, so if you say ctrl-r and then start typing a command, it will offer you recent command history that matches what you are typing. Play with it. You can customize the number of lines that are stored in your bash history. Here’s that section of my .bashrc file:

    # don't put duplicate lines in the history
    export HISTCONTROL=ignoredups
    export HISTCONTROL=erasedups
    export HISTCONTROL=ignoreboth

    # store more lines in history
    export HISTFILESIZE=5000

    # and don't store dumb stuff
    export HISTIGNORE=pwd:exit:cd:ls:history

    I think I drifted before I ever got the part about not logging duplicate commands to work as expected, but you get the idea.

    Key based authentication

    In various on January 30, 2008 at 10:27 pm

    Another good reason to use ssh keys? My key is still on the server of a group I haven’t worked with in three years. I have no idea where I’d start looking for a password, but when the called me in a panic because their site had been “oWneD bY soM3 dw33b” I had no trouble getting onto their server. That might not be what you want, for me to be leaving keys under mats on servers the world over, but it is surely convenient. Passwords are tiresome.

    Since I always end up having to look this up, here is a fun secret: for key based authentication to work, your .ssh directory usually needs to be owner only access:

    chmod 700 .ssh

    If you don’t know, now you know.

    Vim Scripting

    In various on December 21, 2007 at 12:39 am

    One rule among many: whether or not it is more time-efficient, it is always more rewarding to write a script than it is to repeat just about anything.

    If only I could script cleaning the toilet (oh wait, I never actually …)

    Seriously, though. I want, specifically, to write a vim script, one that ought to be wildly simple. I want a script that kind of does this:


    :%s/\([a-z]*\)[ ]*\n[ ]*\([a-z]*\)/\1 \2/g
    :%s/[“”]/"/g
    :%s/’/'/g
    :%s/\n\n/< \/p>&<p>/g
    :%s:http\://[-A-Za-z0-9.%?&$_\/=]* :<a href="&">:g
    :%s/ ">/">/g</a></p>

    Because that is what I keep doing. Maybe if I write that script, I’ll show you how.

    Updated
    As it turns out, this works just fine:


    :%s/[“”]/"/g
    :%s/’/'/g
    :%s/…/.../g
    :%s/–/--/g
    :%s/\n[ ]*\n/< \/p>&<p>/g
    :%s:http\://[-A-Za-z0-9.%?&$_\/=]* :<a href="&">:g
    :%s/ ">/">/g

    # :%s/\([a-z]\)[ ]*\n[ ]*\([a-z]\)/\1 \2/g</a></p>

    That last line is commented out because it isn’t part of the regular routine, but I do need to have it handy.

    Find This

    In various on December 15, 2007 at 4:18 am

    Kaiser’s rehab hospital goes by the acronym KFRC. If you grew up in San Francisco you know why that cracks me up. The rehab hospital has a farmers market out front with amazing tamales and enchiladas. This is something I miss about the Bay Area, in general, tamales at the farmers’ market. On that note, the Union City Raizes do Brasil batizado had a potluck afterwards with papusas, which are something else that just are not as easy to come by in New York City. He’ll be fine, that is becoming more and more clear.

    If you, dear reader, ever find yourself or a loved one in a hospital, and you find yourself feeling disempowered or overwhelmed (or if you find you are feeling “just fine” which is actually a clear sign that you are in over your head) I have got loads of advice for you, because I am an expert in patient advocacy. I might know eff all about medicine, but I know from insisting that someone be cared for adequately. I have loads of suggestions about articulating your own needs (“Well, I could use a massage and here are three places that I know for a fact sell gift certificates”) and about the importance of getting a calendar set up to regulate visitor so that you don’t wind up mobbed one day and all sad and lonely the next.

    Meanwhile, I am really taking a shine to sed -i -e 's/foo/bar/g' ./* except that I need it to recurse through directories not balk at the first directory it hits and then sit there. Since I also don’t want to search through .svn files, and since for bonus fun a lot of files that make up our site are sans file extension, I’m reading this and contemplating something with -exec.

    I was kind of hoping that I could use a little bit of find ./ -not \( -name "*.svn-base"" -o -name "foo" \) '{}' \; -print but as it turns out what I really need to do is more like find ./ -wholename '*/.svn/*' -prune -o -exec grep "somestring" {} \;.

    UPDATE (5 Mar 2008)
    Here is what works: find ./ -wholename '*/.svn/*' -prune -o -type f -exec sed -i -e 's/free software/free free software/g' {} \;

    Another UPDATE (3 Apr 2008)
    Another search that works similarly (but without sed) grep -ir --exclude='*.svn*' "software freedom" /srv/apache2/

    Addressbooks in Order

    In various on December 12, 2007 at 7:28 pm

    Sitting here thinking “gahh. It blows that I can’t just pick two entries from my Thunderbird address book and consolidate them.” when it occurred to me to make sure I was right about that. There is a plug in for that. Go figure.

    Other things there are plugins for?

    * Toggling word wrap (which dkg is sometimes on my case to do, and which you need if you’re trying to send error messages to people who can help you decipher them.)

    * Syncing .mab files (which is basically all I want from LDAP, and probably closer to the “right” way to go about it.) Or a variation on that theme.

    * Managing identities better. Actually, there are a few addons for that one. One that seems like it might make me insane and one that looks about right.

    I may or may not think to let you know if any of these work out for me.

    Still on my wishlist? Thunderbird needs an offline state. I’ve moved to IMAP almost exclusively, which is working nicely in many ways, but which means that my drafts are always stored on the server. I want to be able to say to Thunderbird “I know that I am offline. Could you store my drafts in a local folder until I get back online (or forever)? That’d be swell, thanks.” Read the rest of this entry »

    Why doesn’t this work?

    In various on December 5, 2007 at 1:37 am

    Sometimes, especially in website work, you want to make a lot of changes to a lot of files, all at once.

    If you use Textpad this is a fairly straightforward proposition. If you use BBedit, same story. If you’re a linux user, though, you are kind of up a creek. KFileReplace is just plain weird. It can’t do multi-line searches. You can’t actually store or edit search patterns. You can store parts of them but then you can’t really retrieve those in any kind of logical way.

    What I want to know is not why KFileReplace stinks. It is okay, it just doesn’t really do enough. Their help files contain the rather mind boggling dismissal of regular expressions:

    If you want search for every string that starts with “x”, “ht” or “u” and ends with “ml”, you can write a regular expression like this: (x|ht|u)ml. Insert this expression in the search editor, click OK, and enable regular expressions by toggling the Regular Expression button. Please note that using regular expressions lets you to make very complicated searches, but the cost could be a performance degradation. Regular expression can be very tricky, and it is often the case that “if you want to solve a problem with a regular expression, you have two problems”.

    So I get where they’re coming from. What I don’t understand is how it is possible that people using GNU/Linux don’t need to do batch, multi-line, regular expression replacements. Is this just a web developer thing, and web developers haven’t historically used Linux? Is this a sign that I’m not a real programmer, my desperate need to find and replace across 44,000 documents?

    Am I missing something?

    Technical Moany Pants (subversion)

    In various on November 26, 2007 at 4:10 am

    I haven’t posted about wrangling with computers in a while because I haven’t really been wrangling with computers lately and people seem to take offense when you go and post about how infuriating they can be (at least as infuriating as software) so I’ve been mostly keeping my mouth shut.

    Now, though, subversion is trying to kill me and causing me a headache and I find that when I post about these headaches here, one of two things happens. Either I figure out the problem in the course of posting and maybe post it anyway, maybe don’t. Or someone else reads my whining and offers me some fruitful suggestions. Or nothing happens, which would be three things.

    I did something screwy and then tried to undo it and that didn’t work so I tried to redo that and undo something else and I didn’t really keep an especially careful accounting and now I’m basically screwed. That is kind of an overstatement but at the present moment my repository is all busted up and I don’t know how to fix it.

    First off (not first off, but I think this is the small thing so I’m starting here) I’ve got a directory (/html/games/incs) that seems not to have a .svn/tmp directory. I don’t see one, and when I do …

    [somebody@someplace incs]$ svn cleanup
    svn: Can’t open directory ‘.svn/tmp’: No such file or directory
    [somebody@someplace incs]$ mkdir .svn/tmp
    [somebody@someplace incs]$ svn cleanup

    I was going to say that I know I have permission to create .svn/tmp but then I went to check and lo and behold, not only can I create the dang directory but that problem looks solved. Sweet. Okay, onto the next one.

    PS, In case it is eating at you, I know that my whole tag situation is all busted up. I don’t have any plans to fix it because I just don’t. I think about it. I know I ought to, but you can assume that I’ll be mailing my mother’s birthday present first and since that is sitting on my desk more than a week post-due … you do the math.

    So, um, huh?

    Lazy web, lazy web, color my vim.

    In various on October 24, 2007 at 6:01 pm

    I manage some servers with a small group of guys here in En Why See. We just built a new server and so far, the version of Vim we are running doesn’t support color coding. I found some How To that actually makes the whole process sound redunkulously complicated when I’m about 100% sure there is an easier way. A package, I’m guessing.

    I don’t really want a teachable moment here. I want someone to say “I think that you’re looking for vim-full. The vim package doesn’t include any of the color syntax files.” That is all. If you know, maybe you could fill me in. If you don’t know, no big thing. I don’t know either. Just thought I’d ask.
    Read the rest of this entry »

    Woah! How’d my computer get full?

    In various on October 17, 2007 at 8:57 pm

    Hypothetically, lets say your (GNU/linux) computer is choking. Sending errors about disk space, perhaps. Maybe a message from the mail server about /var/mail being full up, maybe a little pop up on your desktop that says “warning. 100% full”

    Since Stillwell is the second machine in so many weeks to fill up on me, I’m going to rehash what I learned from Ignatz’s overload finally. And I won’t get surly, promise.

    First question: is it really full?

    [0 amanda@stillwell ~]$ df -h

    Filesystem Size Used Avail Use% Mounted on
    /dev/sda2 2.9G 2.7G 0 100% /
    varrun 189M 128K 189M 1% /var/run
    varlock 189M 0 189M 0% /var/lock
    procbususb 189M 108K 189M 1% /proc/bus/usb
    udev 189M 108K 189M 1% /dev
    devshm 189M 0 189M 0% /dev/shm
    lrm 189M 33M 156M 18% /lib/modules/2.6.20-16-generic/volatile
    /dev/sda1 99M 5.6M 89M 6% /media/sda1

    /dev/sda5 30G 8.3G 20G 30% /home
    /dev/sda6 30G 1.2G 27G 5% /mnt/vartemp

    That would be a yes. If you want to talk about my freakadoo setup with /mnt/vartemp, you can, but in my book that is a story for another day.

    Assuming I haven’t been paying attention to my computer, here is what I know from this report on my file system disk space usage: /home is on its own partition. So that isn’t the problem.

    Also, I happen to know that /mnt/vartemp is where /var and /tmp live, though I had to place them there and then use symlinks to overcome a quirk of Ubuntu that creates trouble if /var isn’t on the root partition (grammar check anyone? better link?)

    So I’ve confirmed the sensation of fullness. Now what? Maybe I want to see just what is filling things up.

    [0 amanda@stillwell ~]$ sudo du -kx | sort -n

    Ahoy, but that shows files in my home directory. Riiiight.

    [0 amanda@stillwell ~]$ cd /
    [0 amanda@stillwell /]$ sudo du -kx | sort -n

    69188 ./lib/linux-restricted-modules
    93636 ./usr/share/icons
    103192 ./usr/lib/jvm/java-6-sun-1.6.0.02/jre/lib
    104748 ./usr/lib/jvm/java-6-sun-1.6.0.02/jre
    104784 ./usr/lib/jvm/java-6-sun-1.6.0.02
    104792 ./usr/lib/jvm
    114764 ./usr/share/fonts/truetype
    127596 ./usr/src
    131012 ./usr/share/gnome/help
    131432 ./usr/share/gnome
    134208 ./lib/modules
    139804 ./usr/share/fonts
    145572 ./usr/share/doc
    153164 ./usr/lib/openoffice/program
    190152 ./usr/bin
    220580 ./usr/lib/openoffice
    225204 ./lib
    1019328 ./usr/lib
    1066040 ./usr/share
    2438632 ./usr
    2720781 .

    Nothing special there. I suspect that I just set the partition too small (‘specially since I was installing Amarok when it choked.) Next question? Was I smart enough to use LVM when I built this machine?

    Algernon

    In various on October 12, 2007 at 3:40 pm

    Dear readers, I want you to know that you fall in two discreet and vociferous categories. Some of you sit on front porches and share your beers with me and tell me that you do read this notebook, but that you do not understand so much of it. Or do not want to. Others of you, you also share your beers with me, but you tell me that I do not document enough. That I should document more.

    This one is for the second set. Read the rest of this entry »

    More on SVG. Less on whining.

    In various on September 19, 2007 at 4:45 pm

    I realized that I do have a smallish file that I’ve been tinkering with that would do for these purposes: We’ll call it SVG Sample.

    I’m still annoyed that there isn’t any documentation of how Dia handles SVGs, but I’ll get over that. Or I won’t, but either way it is my problem, this inability to let go of small, small things.

    Dia’s diagram tree shows exactly one thing (object? Is it an object?), “Standard Image” — it displays the various nodes all assembled together as a single image. It doesn’t recognize this as a group of images.

    Inkscape recognizes the individual objects (nodes? are they nodes?) but fails to recognize the edges as connectors.

    Kivio asks me to “select a filter” from the options “Kivio Document” and “XML Document.” The first (not surprisingly) fails with an error along the lines of “this isn’t a Kivio document” which is cool. We’re all on the same page so far. The latter filter then wants me to import an XSLT configuration but doesn’t show me any I can import. Not exactly a brick wall, but it isn’t getting me anywhere, either.

    close to giving up (dia, svg, inkscape)

    In various on September 18, 2007 at 6:31 pm

    I do these things to make myself crazy. I use command line tools and free software and I call it cool. From time to time, however, I hit against these walls where there is something I cannot do and cannot find my way around doing and I spent an eternity trying to do them or find documentation on them and still …

    This is bordering on one of those rants where I’m all “I will punish you by not using your tools anymore if you don’t help me, dammit.” except that there is no one to punish and no one to yell at. Still, I may file this one under “Free Software Doesn’t Work” for the next time someone tells me that there is nothing (nothing!) that Windows can do that Linux doesn’t do better.

    And then I wind up being scolded by some free software zealot as though I’m saying I can’t be bothered to figure out why my OOo Spellchecker uses british spelling. I want to edit a flowchart. I have it in graphml format and in svg format and both Inkscape and Dia will open the svg at least, but I can’t find anything like reliable information about how to get DIa to do more than show a single snapshot of the whole svg. I can’t muck with the individual nodes, which sort of defeats the point.

    usb installs and little breakthroughs

    In various on September 14, 2007 at 4:26 pm

    Tinkering with creating a bootable USB disk with which to install Feisty on Brahms. Tried on round of effort and got to a boot error.

    One how-to at my disposal suggests repartitioning the stick with cfdisk /dev/sdb

    That got me to this fine error FATAL ERROR: Bad primary partition 0: Partition begins after end-of-disk Press any key to exit cfdisk, which I’m going to call helpful. Something didn’t work as planned.

    Meanwhile, Oates can’t chop up a PDF in Acrobat Reader, but I can, because I’ve got pdftk. Which he could get, but I digress.

    I got started, but realized I wasn’t naming things the way I ought and (of course) got to wondering why I don’t know how to use regular expressions in mv. If you want to take everything named *.pdf and rename it ABBR_{originalname}.pdf … how often do you want to do that? At least once every six months, right? So it is worth spending twenty minutes looking for a regular expression syntax that will save you a half a second. Right? (Please agree with me. I don’t know how I’ll handle it if you don’t …)

    [0 amanda@stillwell ~]$ for f in *.pdf; do mv "$f" "ny_${f%}";done

    It is a good starting point for doing more interesting things. Fortunately, I’ve done what I needed to do and I might never come back to this wee bit of shell scripting.

    for me, a favor (any dreamhost users out there)

    In various on September 13, 2007 at 7:59 pm

    As long as I’m suffering, puzzling through trac installation, I may as well lobby for some votes.

    Look here, friends. If you use Dreamhost, you know you can vote for things you want them to do. I don’t really know whether they count votes or just do this to make the likes of me feel better, but on the off chance that our votes are counted, maybe you’d consider doing me the immense favor of casting your vote for one-click installs of Trac?

    What do you say?

    Here are a couple of other suggestions presently in the box that I think could be helpful to the likes of me who’d like to be using Trac on Dreamhost:

    humbled by trac

    In various on September 12, 2007 at 6:58 pm

    I’m trying to get Trac running, halfheartedly following some instructions for installing Trac on Dreamhost, but they don’t make any sense, so I tried some script thing that seemed to work, generally, but leaves me a foot short of the finish line. My installation doesn’t quite work, and I’m not sure where to go from here. Phooey.

    I want to be able to manage (or at least view) a few different repositories and I’m hoping that when I get this all sorted out I’ll be able to do that. It would be nice if I could do that from within one Trac site, though I’m having doubts galore.

    key me in

    In various on September 12, 2007 at 6:32 pm

    I’ve managed to avoid encrypting my email thus far because encryption isn’t secure, it is silly. Or I can make it sound silly if I talk about it enough. Plus I don’t do anything interesting. Now, though, I want help from this developer and he wants to communicate entirely in GnuPG form. He gets to decide that — I’m the one asking him for help.

    Since I’m stuck doing this, I’ve gone ahead and posted my public key.

    If you start using it, don’t expect miracles, since I check my email via IMAP from all kinds of places an my decoder ring doesn’t travel with me.

    I’m secretly kind of confused, too. I can’t really explain what confuses me, which is never a good sign. I know that dkg wants a bit more from me, before he’s willing to trust that email really did come from yours truly. I am supposed to sign messages, but then you all’d have to get my public key (same key? different?) from a key server, or from me directly, to confirm my signature. I sort of understand some of this, you see, but there are layers of enough and I am not really sure how many I’ve peeled back.

    on the subject of magic wands

    In various on September 11, 2007 at 8:16 pm

    I’m puzzling madly over this.

    How to get a chart to move over, then down. And over. Then down. It should be straightforward, but I can’t work it out. I’ve tried a lot of things. Read the rest of this entry »

    and if you don’t have a magic wand?

    In various on September 7, 2007 at 8:19 pm

    Without getting too deep into why I can’t use Visio (I don’t have MS Office) or OmniGraffle (They don’t make that for Ubuntu) or Dia (I’m fussy), I settled on Graph::Easy because I am a dork and thus anything that you install via CPAN …

    So you have a million manuals and even a cool demo site, so I know that my text works fine. Yay. Read the rest of this entry »

    a thing I’d like to do with grep

    In various on August 3, 2007 at 8:50 pm

    I use grep a lot to backtrace through the layers of includes that make up the site I manage, and since I’ve now got that site halfway into version control, I’m finding that I’m a wee bit frustrated because grep -r recurses through every directory, including the .svn folders. So I get a lot of extra responses. I want to tell grep not to look anywhere down the .svn path.

    Or, perhaps, is there another tool I ought to try?

    Puzzles du Jour

    In various on August 1, 2007 at 3:16 pm

    Now, with updates!

    Stillwell, for the uninitiated, is my new computer. A Dell with an unfancy screen (I wanted a fancy screen. I won’t deny it.) and 100G hard drive.

    I’m settling in okay and ready to upgrade ole Brahms to Feisty Fawn. Thankfully, a search for “codecs” in my very own archives got me to a rundown of how to install the bundles I need to listen to WNYC at work (note to self: get a DC adapter for your radio already. Streaming radio is silly when you’ve got an actual Aiwa with its very own antenna sitting right there.

    A few things are still making me batty about Stillwell, or Fiesty Fawn or computers in general, though:

    Bashing my head in

    In various on July 30, 2007 at 5:53 pm

    I know, I know. I promised about the puns. I’m not even frustrated.

    Project du jour: version control with dreamhost one-click installs. When you update an installation using the Dreamhost control panel, Dreamhost moves your old files from directory to directory.old, and installs the update in directory. If you want these new files in subversion, you have to scoot all the existing .svn directories back into directory.I’ve never (really) written a shell script from scratch before and this seemed like a good place to start.

    With the help of an indispensable overview of advanced bash scripting published by the Linux Documentation Project, I got this far:


    #!/bin/bash

    path=/home/username/staging/blogs/
    oldblog=someblog.old
    newblog=${oldblog/.old/}

    directory=$path$oldblog

    for file in $(find $directory -type d -name '.svn')
    do
    echo mv $file ${file/$oldblog/$newblog}
    done

    exit 0

    I find all the .svn directories and print out a close approximation of the command that I want. A close approximation. What I still need to do is strip off the last .svn so that the result will look more like:

    mv /home/username/staging/blogs/someblog.old/.svn /home/username/staging/blogs/someblog.old/

    Once I’ve got that down I can actually execute the command itself instead of just writing it out. I think I’m missing something syntax-wise (I know it is in the manual someplace …) and while I puzzle over it, I need to move on to other things.

    Still, if you’ve got feedback or a better way (more elegant? more right?) I’m all ears.

    For bonus fun, my bash environment on Dreamhost insists on writing long commands to a single line. Why? I can’t read that shit.

    SVN and mySQL Networking

    In various on July 13, 2007 at 10:07 pm

    Two projects I’m stuck on as Friday draws to a close…

    First off, importing the GG site into my new subversion repository craps out when it gets to a particular folder:


    Adding /some/path/parks/index.shtml
    Adding /some/path/parks/learn.html
    Adding /some/path/parks/flash
    svn: Valid UTF-8 data
    (hex: 2e 5f 50 6c 61 74 65 6c 65 74)
    followed by invalid UTF-8 sequence
    (hex: 99)

    flash is a directory that contains one .fla file, one .swf file and a font directory called Platelet? (yup, with a question mark. I have some ideas about why it is crapping out, but nothing solid. I’d really like me some version control.

    [update:] I couldn’t post this without trying a few more tidbits. There was a hidden file (some OSX detritus) that contained an extended character. So that is solved.

    Also, (perhaps I’ll fix this before I finish blogging, too) I’m puzzling over the right way to enable remote access to mysql. Along with my fancy pants version control, I’d really like to periodically make a copy of the live database. Or to periodically update my local copy of the database with newer data. Something like that. It is a one way transaction. My options, as I see it, are: mysqldump, mysqlhotcopy and replication

    Replication seems excessive, but I could be missing something.

    I think hot copy is all I need, but I’m now confronted with the secret truth: I’ve never setup a mysql server before. Not properly anyhow. I don’t know where the settings hide that I need to make mysql accessible over the big bad internets, via a domain name. I don’t know exactly how to do that securely (limit connections by originating IP address?).

    I know that I need to change the bind-address setting, but …
    * I only want to allow connections from a finite number of IP addresses, and
    * I’d like to limit the users who can connect remotely.

    [update]: that was actually really easy, too. As it turns out, mysql was already accepting some external connections. The rest is just a matter of GRANT syntax.

    Back that *** up (and a plug for Mikey’s Hookup)

    In linux on June 15, 2007 at 1:31 am

    N’s got a super-sketch-spyware-adware-trojan beast on his computer (that is what you get for browsing with IE, says I) — the kind of thing that you get from clicking the wrong button and launching some kind of ActiveX installer. It won’t go away. No amount of Spybot Search and Destroy or Spyware Doctor will make it go away (speaking of Spyware Doctor, later we can talk about how I feel that the Google Pack is all or nothing. What if I don’t want Google to take over my screen saver? Sure, I can uninstall it later, but why not let me choose in the beginning?).

    We’ve given up trying to eradicate it, so I took a field trip to Mikey’s Hook Up where knowledgeable people took a break from their ping-pong game to ask me a few questions and point me towards a reasonably priced external hard drive so we can back up our home drives from his computer and start over. Got that? Knowledgeable people, enjoying their workday. I can’t tell J&R and Best Buy apart, but I am pretty sure that no one really tries to help you at either one. They sure don’t at Radio Shack. And you don’t get to play ping pong on your breaks at Best Buy. It is okay to shop someplace where the staff aren’t being forcibly crushed into a homogeneous model of “Perfect Customer Service” that involves no service whatsoever.

    Back to the hard drive, though. I know that we could bring the malware with us, but, having evaluated the risk, we’re not that stressed out about it. Moreover, since the option is to just erase everything, we may as well try.

    Since our fancy new LaCie (designed by Porsche, ooh la lah) drive has a gazillion gigs available, I get to back Brahms up, too.

    Here’s what I did. I’d love to know if you’ve got a better idea:


    [0 amanda@brahms ~]$ cd /media/LACIE/Brahms/
    [0 amanda@brahms Brahms]$ sudo tar cvpfz backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/sys --exclude=/dev --exclude=/media --exclude=.Trash /

    Note that Ubuntu mounted the drive of its own accord. It is not inconcievable that a person could have to mount a drive themselves if it doesn’t just automagically appear. If you don’t like my only relevant archive, you could try searching the internets.

    I made up the “.Trash” part because I couldn’t find any documentation of how the tar --exclude option handles regular expressions. If I backed up the trash, okay, I backed up the trash. Worse things have happened.

    Still, I’m wondering. Did I do the right thing? I created separate (duplicate) backups of a couple of directories where I store working documents (my home directory and /var/www/html but those were a little more straightforward.

    PS, can i just tell you how much it warms my heart that Princess Oh-my-god-she-saw-me-without-makeup Melissa also is totally over ga-ga weddings. It isn’t just because I’m a difficult and belligerent punk, it is because people go out of their heads and they need to just not.

    Samba forever

    In various on May 16, 2007 at 4:07 pm

    Once, these links helped.
    windows clients can’t see workgroup (a post I made to a samba list) and Chapter 38. The Samba Checklist; Part V. Troubleshooting (a diagnostic walk through).

    If you’re setting up a SMB network and hitting walls, start with Chapter 38, Part V.

    Deskutoppo

    In various on May 10, 2007 at 7:09 pm

    Used to be, I worked for Mainichi Shimbun, where I learned odd things, including that the Japanese term for “desktop” in the digital sense is “deskutoppo.”

    I also don’t really understand why my computer crashes so much and I wish I knew more about command line WPA. It seems wrong to install things willy nilly. Read the rest of this entry »

    MySQL Overhead

    In various on May 5, 2007 at 2:08 am

    I’m still getting the hang of managing a high traffic webserver, but learning that MySQL has some good administration statements. So do other databases (programmers do like to say that MySQL is lacking in all sorts of ways that I am only slowly learning to appreciate) but if you’ve got MySQL, SHOW TABLE STATUS is an incredibly useful tool. If you’re not sure whether a database (or table) is still in active use, for instance. The data_free column offers a clue to which tables are wanting optimizing (meaning that a large number of rows have been deleted).

    [tags]whining, technology, linux[/tags]

    argdo!

    In various on April 23, 2007 at 2:13 am

    Used to be, I’d moan and groan a lot about how nothing since HomeSite has had a halfway decent regular expression editor. Made me cuckoo. Quanta only handles one line at a time, and don’t get me started about KFileReplace or I might have to tell you about how the helpfiles for regular expressions in KFileReplace, rather than actually explaining their RegEx syntax, basically just says that you shouldn’t use regular expressions. Wha?

    But today, I learned about :arg and :argdo and I’m in vim heaven. See for yourself: http://www.vim.org/htmldoc/usr_26.html

    [tags]ubuntu, linux, command-line, learning, technology[/tags]

    Sorry, I Don’t Audition

    In various on March 29, 2007 at 2:01 pm

    I’m sniffing around for ideas on how to mount an OSX Disk image (a .dmg file) in Ubuntu, and I stumbled on this thread which has some other good Ubuntu ideas. I was tempted to ask there for advice, but apparently, before I’ll be allowed to comment I have to try out:

    Audition to become a commenter. To become a registered commenter on this site, you first need to be approved by our team. We’re looking for comments that are interesting, substantial or highly amusing. So write a comment, polish up your words and choose a username and password below. Your comment will only appear once (or if) you’re approved.

    I call bullshit on that, but it could be for the best. I think I can live without Lifehacker and they can live without me. Hmph.

    So I’ll post my question here, where I’ve already passed the try-outs:

    I want to mount an old OSX Disk Image, but it won’t just mount. I’m not really sure how to begin deciphering the missing piece. Is there a filesystem doodad to install? (speaking of which, what is the technically correct way to refer to a package like smbfs? It isn’t a file system, it is a thing that lets you read a file system. Not a utility either. So what?) OSX is based in FreeBSD so it can’t be impossible to mount .dmg files, but it sure isn’t obvious to me how to make it happen.
    [tags]technology, whining, linux, learning[/tags]

    Brahms dot Local

    In various on March 16, 2007 at 3:10 pm

    Used to be, I had a Mac. I complained some, I liked it some. Whoopee.

    One thing it did that I liked, was it streamlined local name based virtual hosting. If you do any kind of web development, that can be pretty helpful, name based virtual hosts on your local computer. Now that I don’t have a Mac anymore, I have to do these things for myself.

    Without a super full understanding of how Apache interacts with, um, other stuff, I got about as far as making a virtual host entry, knowing full well that I was missing something but not having the first idea what I was missing.

    I finally buckled and talked to dkg who, of course, explained the fifteen different ways that I could get name based virtual hosts working locally. I opted for the /etc/hosts option, and added a line to my hosts file that maps “http://thisproject.local” to the loop back IP address 127.0.1.2.

    The text of each file is below, but I’m still secretly stumped. I’m missing something about how this all works, as I never defined that IP address anyplace else, and while http://thisproject.local works just fine, http://127.0.1.2 still maps straight to /var/www/index.php.

    Here is my /etc/hosts file (part of it, anyhow)

    127.0.0.1 localhost brahms
    127.0.1.1 brahms
    127.0.1.2 thisproject.local

    And here is the Virtual Host definition that I enabled (note that I store the actual website files in a way that I find useful, first by project, then by URL. Some projects have a few URLs.)
    NameVirtualHost *
    <virtualhost *>
    ServerAdmin webmaster@localhost
    ServerName thisproject.local
    DocumentRoot /var/www/thisproject/www.thisproject.com
    <directory /var/www/thisproject>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </directory>
    ErrorLog /var/log/apache2/thisproject_error.log
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
    CustomLog /var/log/apache2/thisproject_access.log combined
    ServerSignature On
    </virtualhost>

    I’d love some help figuring out how to make this entry more accurate. I’m definitely still missing some things, but I like to writeup what I get working.

    (While we’re on the subject of puzzles, Ultimate Tag Warrior seems to be choking somehow. Not sure what the deal is, but I did tag this article with “command-line, technology, learning, linux, ubuntu” and I bet those tags are going to get swallowed. I’ve upgraded WordPress a few times, so I suspect I broke something. )

    Redhat Repositories

    In various on March 14, 2007 at 3:48 pm

    Continuing with my purely hypothetical project, taking over a server that I didn’t build …

    I’m wondering about Yum. Say you’ve got a RHEL4 server, and there aren’t any functional package managers running (up2date is there, but that only looks for kernel upgrades) and you want some package management. I installed Yum from RPMs, but now that it is installed, I don’t have any kind of handle on who to trust for packages. There is no debian stable for RedHat.

    I found good instructions on adding repositories to yum.comf, but no reliable advice on which repositories to add.

    Finding Large Files (for the command line novice)

    In linux on February 24, 2007 at 9:02 pm

    This isn’t the first time that I’ve spend a wee bit too long trying to figure out how to search for large files on a file system. I think if I were a trained computer type person, I’d intuitively know what printf means and how to slice and dice the find command. I don’t, and I’ve been struggling with this for a bit. I’ve got a file system that is in a state of deep disrepair (it is full) and I need to figure out, among other things, whether there are really big files somewhere that I should know about. As usual, I inherited this file system from someone who inherited it from someone who was pretty smart and clever but not necessarily an expert or someone who took the time to do things the right way. So I’ve got a lot of puzzles before me. du and find shouldn’t be among them.

    For starters, if you are just getting the hang of the command line, man, the manual command is your friend — it will describe all of the options available to a particular command. Usually, a web search for “man somecommand” will also point you to a manual page somewhere on the great interwebs. Even “man find” points you to a few manual pages before the flurry of links to advice on finding yourself a man. For bonus starters, get the O’Reilly Linux in a Nutshell book, because it is fantastic for puzzling through this stuff.

    Read the rest of this entry »

    Rest In Peace Linux

    In various on January 8, 2007 at 4:24 pm

    Or was that Recovery Is Possible? For a bit more on using a live CD to rescue a machine, see my notes from January.

    I had this fantasy (oh, what a fantasy) that puzzles like this were behind me, but I found myself, once again, staring at a wackadoo screen that was decidedly not Windows launching. Something about a boot disk and not being able to find one. Read the rest of this entry »

    Plone to Drupal

    In various on November 27, 2006 at 6:46 pm

    I have good reasons for making this move and I don’t want to get pounced on for my decision, so let us just start there. My reasons include hosting costs and the fact that our Plone host hasn’t been a good fit. I recently completed the process of migrating Recycle-A-Bicycle to a new web host and CMS. I moved almost all of our content from Plone into Drupal, and learned a few things along the way. Read the rest of this entry »

    Linux doesn’t suck, but it sure isn’t a silver bullet

    In various on November 22, 2006 at 2:23 pm

    I keep thinking that I’ll eventually figure SMB out and use my deep and thorough understanding of it to write a clear post that will make legions of people just like me say “ahhh, I wish I’d read this before I tore all my hair out trying to make … work!”

    It hasn’t happened yet, though. Read the rest of this entry »

    sounds like i need to understand

    In various on November 6, 2006 at 4:56 pm

    I am continually mystified by sound and my laptop. It is one of the small handful of things that doesn’t just work and that drives me somewhat nuts. For the most part I can’t get any sound in Flash. That means I can’t watch YouTube. YouTube is primarily a distraction, I tell myself. I do not need YouTube, I tell myslf. But Arif just posted a piece about organizing videos online and I’d like to watch the KFTC video that he talks about. I’d like to hear the narrative while I watch it. I think that might be a good use of my time.

    UPDATE: I forgot that half of what got me started on this is that I recently tried to explain to someone that I don’t get sound out of Flash and I did get sound at that moment. That really flumoxed me. And made me look silly.

    I have more interesting audio projects that I thought I’d be working on, but if I don’t fundamentally understand how to control the audio on my laptop, I don’t know how much audio I’m supposed to do.

    So that is a project for the coming weeks. I’m going to tackle the sound system and try my very best to understand it. If you already do, I could use some guidance.

    Won’t you at least try? (OpenOffice Calc)

    In various on November 2, 2006 at 5:02 am

    A break from Brad. I’m learning a new thing, denial. It works wonders for getting other things done.

    (Other new things I’ve learned include that you can say things like “fuck you, you are so fucking rich, I want more than that” if you are rich and famous yourself. You can be as crass as you want at your own gala. I guess I knew that, but I still got to learn it all over again.)

    Read the rest of this entry »

    Handy, This Blog Thing

    In various on June 9, 2006 at 1:41 pm

    This blog thing is handy, I tell you. Seems like I just put up a list of things on my mind and then total strangers (and some old friends, but it is the total strangers that get me) they tell me the answer.

    So this week, on my mind, besides for “where can I have a massively large wedding ceremony in New York City without spending an arm and a leg?” is …

    rss aggregator I want a free standing, pretty (yes, pretty) RSS aggregator for Gnome. I don’t want a mozilla plugin, I have one of those.

    sendmail I foolishly installed sendmail because I was testing out Evolution, which I am here to tell you sucks, and it kept crashing (see what I mean? sucks.) and so I kept setting out to use bug buddy, which wants you to have send mail installed, or else it leaves this totally useless text file on your desktop and you still have to go through the bug reporting system, you can’t just upload the bug buddy report. So I was thinking “sendmail.” Also, since my ISP is touchy about ole port 25, I was having trouble with SMTP. In Evolution. Not in Thunderbird, which does not suck, and which works just fine. Okay, so I started installing sendmail and realized that I could spend a lot of time for no reason and I instead went about migrating to Thunderbird (below). Now, however, when I start up Brhams hits a few sendmail snags, launching sendmail (which was never configured). That annoys me, because it means Brahms takes longer to boot. So, do I just apt-get remove sendmail, do I configure it properly, or do I take it out of init.d (and what is the right way to do that?).

    Thunderbird Fun fact: if you are handy with a command line, migrating to Thunderbird from Evolution is easy as pie, even if you are a person with many folders. You have to use the internets to find your Evolution mail folders, but then you just have to copy everything over to where Thunderbird wants your mail stored, and do a lot of deleting. (If you’ve already got Thunderbird running, you might want to be careful about this, you can definitely screw things up here at the Velo, Rapido school of hacking.) But what I did, was I moved all the mail files/folders from my Evolution folder .evolution/mail/local/ to my Thunderbird folder .mozilla-thunderbird/330inone.default/Mail/Local Folders/
    and then went through and deleted everything with “ev-summary” or “ibex” or “cmeta” in the title (you can construct a nice “find” statement for that) When I was done, all my mail was where I expected it. Like I said, I am aces when it comes to trashing things, so take all my advice with a grain of salt. But most folks said it couldn’t be done, the Thunderbird migration. The only catch was that when I next downloaded my email, I got every message in my inbox anew.

    wireless support in Ubuntu is weak I have a wireless network at home. It is password protected. The key is not somehting I can remember off the top of my head. I want to store it in my computer and come back to it, but basically everytime I leave Kohlrabi (our network) Brahms forgets the password. I don’t really understand why Gnome or Ubuntu can’t save network passwords. It should. It is freaking annoying that it doesn’t.

    Ouch, that was Loud I need to figure out the sound stuffs on this computer. Partly, I just want it to stop beeping all the dang time, though I like the “you have mail” beep. What I really want, though, is to tell it *not* to pester me while I’m on Skype. Somehow, I want to be allowed to have Skype override all the other sounds on my computer so that I don’t have beeping while I’m on the phone. This one, I haven’t even looked at yet. Just so you know.

    Question of the Week

    In various on June 2, 2006 at 12:53 pm

    I want to advise my readers (all four of you, three with my father out of town), that I, Amanda, am capable of heretofore unheard of digressions. For instance: ever since we announced our engagement, people have been asking us what we want for an engagement gift. We don’t know. The things we want in a more general sense include a large funnel (with maybe an inch opening) that is suited to decanting dry beans or flour. And a house. So we’re good on the 75 cent gifts and the $750,000 gifts, but that middle range, we don’t want much. We’re both working adults. We have a colander, a very nice one. We have a full set of All Clad pans and an iron skillet and two nice ladles and six teapots (yes. six.) and a nearly complete set of china.

    So I’m trying to make a list of things we want, and thanks to Carrie McClaren I found this site, FindGift.com, which will let you register for gifts in a general way (we need a cutting board. you can buy a sustainably harvested bamboo one that was made by some radical collective in Chiapas where they don’t even grow bamboo and it is probably an invasive species, or you can buy one at Crate and Barrel or Target or you can make one in shop class. I care a little, but since I can’t register at the “radical Chiapas collectives boutique” I don’t see why I need to tell someone where to buy a cutting board from.) FindGift.com wants to know what our wedding website is and we don’t have one yet, and I’m trying to make one but I’m still finding my bearings on this new computer, so I don’t have a favorite text editor with syntax color coding yet, with which to write simple HTML “Later this will be our wedding website. It isn’t yet.” for now.

    I have Quanta, but it is written for KDE, and I’m realizing I don’t really know what that means. Leaving aside the fact that what really interests me about getting married is the implications of running KDE applications on Gnome, what are those implications?

    I know it has something to do with libraries, graphical something maybe? Programming libraries? Qt vs GTK+. They are, um, different.

    I think that what it means to run Quanta on Gnome is that I’ve got to add and run a whole separate library (what does that mean, in English, though?) to support Quanta. That Library’d be there already in KDE. Which is perhaps why Knotes takes so long to load? (I like it better than Gnome’s stickies app).

    Aye Karamba

    In various on May 21, 2006 at 6:55 pm

    More tinkering.

    There are people who feel strongly about Gnome vs. KDE. I feel strongly that SuperKaramba has a better weather widget than Gnome’s (which as far as I can tell just doesn’t exist).

    I also got attached to knotes and haven’t found something I like in Gnome, though Knotes works just fine in Gnome so far, so maybe I don’t know what it means for software to be explicitly “for KDE”.

    [UPDATE:] I’ve been through this with Gnome before. Right click on the panels (top or bottom) and use the “add to panel” option to add a weather widget, sticky notes (i still like knotes better) and whatever the hell else you want to the panels. I looked high and low for the weather widget and it wasn’t until I was bored on a transcontinental flight that I stumbled upon the dang weather widget.

    Say Hello to Brahms

    In various on May 18, 2006 at 2:33 pm

    I think I might (sorry jack) eventually change the name of my wee x40, but I’m still settling in. Currently named Brahms, but I really did adore Sweet Pam and Lao Aviation. Naming a device should not be taken lightly. But that isn’t really the point. The point is that it is here and, so far so good. I had to kill the whole XP install, probably for the best. I’ve got dapper drake running and except for the part where it seems like I have to set the wireless password four or five times before I can get online, it seems to be entirely functional. The battery croaked after 30 minutes of use and a few hours of sleeping in my bag, so one thing I definitely need to figure out is whether the problem is the battery or that the Dapper Drake isn’t suspending properly.

    Next step: audio.

    The Apodio Project has put together a list of tools, but NGO in a Box is also working on an A/V box and I might look at what they’re putting in that box.

    Procrastination Station

    In various on May 8, 2006 at 9:41 pm

    I’m working on a deadline, which means that I really am doing some hard core procrastinating. For starters, I am testing out forward track — it is sort of cool, but there is no way to tell whether or not someone actually followed through on their pledge to write to the mayor.

    If you want to know the admin login, let me know.

    If you are a flash expert, and you want to help me make it NYC specific, ditto. Let me know!

    Hardware

    In various on March 31, 2006 at 4:23 pm

    It is finally clear that I have to get a laptop, I can’t put it off much longer. I want to run Ubuntu (or generally speaking, Linux) which means I need an intel processor and a keyboard with a right mouse button. I need a portable thing, I’ll probably invest in a dock and a KVM switch so I can use Noah’s keyboard and flat screen when I’m home.

    I want to use it for audio editing, but I think that just means an external sound card.

    Folks I met in Istanbul this week were all big fans of their ThinkPads, Thomas Krag raved emphatically about his ThinkPad x31 and recommended the x40 highly. I know that Jamie and Josue have matching Dells. I could read hardware reviews and make myself crazy but while I’m doing that I wonder if any one has any sage advice on new laptops and the purchase thereof?

    In addition, I am wanting to take the skype plunge, which means I need some kind of headset type thing. Right? How does skype work? That is question two, what is the cheapest way to start talking over skype?

    Good question, Mon Cherie

    In various on March 27, 2006 at 12:50 pm

    I sat next to a very nice lady (I was going to call her chatty, but I think I started the chatting and I want to be sure I’m being fair, not painting her as some flighty bee.) on the flight to Istanbul and of course she was very curious about this “meeting” I was on my way to. “What is it about?” (good question.) “Will you be speaking?” (I don’t think so, but you never know) “And what exactly do you do again?” (mmm. I would also love to know.) She was on her way to view the 4 minute total solar eclipse that is approaching. March 29, I think. I think I’d have to be in Southern Turkey to see it myself.

    And then I got here and people were asking roughly the same questions, in a sociable, get-to-know-you kind of way, but I still didn’t have an answer. “You know, I was in Simon’s Town, chilling with the penguins and it was really nice out and I didn’t ask a lot of questions,” didn’t seem like a very professional answer.

    I’ve asked around and finally landed on someone who knows more than I about where I fit. So now it is all clear. I am an invited guest (it says so on the agenda) at the OSI Information Programs Meeting. National Coordinators of OSI Foundations in former Soviet countries and a few other places (Western Africa–the region, South Africa–the country) are here to talk about their Information Program work. Intellectual Property, access to knowledge, digital divide. Access to ICT (Information and Communications Technology) tools — open source software, challenging telco monopolies; as well as access to information. They are here, these foundation directors and program coordinators, to talk about their work and compare notes and learn about tools that they or their grantees could be using or could be using better. Tools like eIFL–Electronic Information for Libraries– which is actually an organization, but also a tool, in that “how could we be supporting your work” sort of a way. Tools like CiviCRM, a membership/online advocacy database project. Other tools, too, but those are on the radar. It is (secretly) sort of political to trumpet CiviCRM and not talk about what else is out there–there is a lot else out there– but one thing about civiCRM being open source and based in open source software is that it is highly localizable (meaning you can translate it) and there is already a Polish version.

    Okay, okay. I knew it was the OSI Information Program National Coordinators Meeting. But I hadn’t really asked any meaningful questions about what that actually means. That was what I learned when I got here, what the Information Program does, what the National Coordinators coordinate. That sort of thing. I was being cute, but I don’t want to give the impression that these guys are a bunch of free wheeling flakes. They aren’t at all.

    What am I doing here? Listening and meeting people, mostly. I am going to demo CiviCRM, but I didn’t know that until last night at dinner. Trying to steer clear of Dirk’s egregious inability to pronounce anyone’s name.

    Read the rest of this entry »

    Password Recovery in Single User Mode

    In learning, linux, various on February 27, 2006 at 8:07 pm

    I just realized that Jack was looking around for this, which isn’t live yet. Wasn’t. Is now or you wouldn’t be reading it …

    Got a Linux server but you don’t know your password? It happens. Usually it happens because someone set it up two years ago and since then it has just worked.

    And then one day, for some reason, you couldn’t connect to the file share. One thing you can do is try booting with a live CD but if you just need to reset the password, you’ll need to first boot into single user mode. Because Linux is Linux, nothing is ever simple, starting with the fact that just knowing that you are running Linux doesn’t tell me what boot loader you are running. The boot loader is the program that loads when your computer starts up–this program, in turn, loads your operating system (er. actually it loads the kernel, which loads the operating system, but I don’t want to get ahead of myself). Windows comes with a boot loader, the Mac OS comes with a boot loader. Linux comes with a choice. The odds are good that your boot loader is either Lilo or Grub.

    Briefly, from there, here is how you do it if your boot loader be grub and if your boot loader be lilo this’ll help, though I think that’s got directions for Grub, too.

    LDAP

    In learning, linux, various on January 21, 2006 at 12:24 pm

    I am still puzzling through this LDAP question. The question is roughly this: what is the right way to store my own phone book on a server so that I can access it via whatever address book is available to me on whatever computer I’ve managed to land in front of?

    Most organizations I work with would use their databases more and better if they didn’t have to also maintain their email based address book in Thunderbird or Eudora or Outlook. Address changes would make it into the database and be shared across the organization if it were that easy. A database that needs a lot of other data about a person and what they’ve been involved in, that you’d have to access through a database interface, but the addresses alone could be LDAPish and that would be handy.

    Catch is, I just don’t get it. I will, I just don’t yet.

    For instance, it sort of seems like a webhost with a lot of LDAP libraries installed ought to be able to support an LDAP server. Seems like. Seems like if I knew where to start, I could start, but I don’t.

    Slowly, over a very, very long stretch of time, I’ll get there. Hopefully when I do, I an leave a trail that will make a ton more sense to the next person than the crumbs I’ve been able to find.

    Just use a live CD

    In learning, linux, various on January 19, 2006 at 2:01 pm

    File under famous last words … sure, boot it from CD. Great. And then? What?

    This, is what:
    http://arainyday.se/notebook/windowsrescue.php
    http://www.ubuntuguide.org/
    More specifically:
    The live CD boots its own operating system. If you want to access files on an existing hard drive, you need to find and mount that hard drive. fdisk -l will show you any attached disks (such as an internal hard drive) that can be mounted. sudo mkdir /media/windows will create a mount point or a place to find the hard drive in your linux file system and then sudo mount /dev/hda1 /media/windows/ -t ntfs -o nls=utf8,umask=0222 will actually mount the drive to be readable in that directory. If your old hard drive is FAT not NTFS, you’ll need a different command: sudo mount /dev/hda1 /media/windows/ -t vfat -o iocharset=utf8,umask=000 (fdisk -l should tell you how the drive is formatted)

    Now you have to decide whether you are going to start by backing everything up. A bit of advice if you are actually trying to restore a fried system: you want to start by backing everything up. So, to back things up you need some kind of external drive. Probably a USB type of something, which you’ll need this handy command for: lsusb.

    Which tells you that it can see that USB DVD-RW, but doesn’t tell you how to mount and write to it. I got tired of trying to figure that out, though I’m sure that some sequence of four commands would have gotten me up and running toot sweet.

    Instead I went back over to the spanking new eMachine they’d bought, enabled a share drive (actually someone else had already done that part) and looked up its IP address (open a DOS prompt and give the ifconfig command). Then I enabled the ethernet interface (system > preferences > networking) and connected to it as a windows share (places > connect to server ... ; the service type is windows share, use the IP address of the destination computer in the server field.) and started copying things over and burning them to CD from the working computer. Not ideal since some kind of trojan horse is likely what brought down the old machine, but it works, and the new computer doesn’t have anything on it yet so this was safe enough.

    Question for the kids at home: how could I have actually mounted the DVD writer?

    Samba Blisters

    In various on November 23, 2005 at 3:21 pm

    It is the little things, you know?

    Something, somewhere in this beastly machine ought to be able to tell me that a file is currently being edited by someone else. Instead, OpenOffice just crashes each time I try to save the document. That is bogus. It should know better.

    ubuntu, fuse and samba

    In learning, linux, various on November 21, 2005 at 11:31 am

    Slowly, and also quickly:

    I was trying to mount a samba share so that I could access it from the command line. That is straightforward if you know what you are doing, but if you don’t, well. Welcome to the fog.

    This is a useful thing that was hard to find: http://packages.debian.org — you can search for packages. If you can find fuse, and then you can get down to business:


    sudo apt-get update
    sudo apt-get install fuse-utils
    sudo apt-get install smbfs

    That was one of those things that everyone just seemed to assume I would know. “Just install it with apt-get” … install what? fuse? It isn’t there. smbmount? nada.

    Now I know. Now you know, too.
    sudo mount -t smbfs //downtown/Users /mnt/downtown -o username=[username],password=[pass]

    Now downtown is in my path!

    Oy, but I still can’t play MP3 files!

    Back to the drawing board: I need gstreamer to play restricted file formats but just un-commenting the “multiverse” line in my /etc/apt/soures.list wasn’t enough to enable it. I was getting all kinds of errors so shamelessly followed this advice which helped me update my sources so that the gstreamer utilities would install.

    Mmm. Food. Now I can listen to doom at work. Some people don’t even have to think about it, but look at all they miss out on!

    Oy, and they said Linux could do anything …

    In linux on November 11, 2005 at 1:55 pm

    It is really the little things, like there isn’t a flash player for Linux on PPC. Ask too many questions and they’ll tell you that you don’t really need flash. Who needs flash? Well, me. For one thing. I like it. With a lot of searching the Ubuntu forums I finally confirmed that it really is a PPC issue. Nice to know I am not crazy, would have been nicer to know that without so much work.

    So there’s two things you can do with Ubuntu on a PowerBook: skype and flash. Alas.

    I’m hoping these fine gentlemen can get me situated: UbuntuPPC.info

    Samba Samba

    In learning, linux on November 8, 2005 at 1:54 pm

    We have a lovely, relatively new SuSE Linux server in our office and a SMB share that gets backed up regularly. I like to use it. You know, for sharing things. I had no trouble creating shortcuts to the shared directories that I use, but my head is going to explode if I can’t figure out how to get OpenOffice to show me what is in a shared directory before I save to it. Some times I can work around this and it isn’t so bad. I know where the file should go. Sometimes I am trying to save a grant proposal and I want to see if this is really the directory that it is supposed to end up in. I can see that by seeing what else is in the directory. I am not asking for the sky here.

    On a related note, (related because I can’t just point to anything in my directory structure when it is really a smb share) I like vim (and I have to use it because I don’t like the text editors I’ve found so far for vim like things) and I want to be able to open some text files from the shared drive in Vim. I can open them in open office, but vim smb://server/Users/amanda doesn’t get me anywhere.

    I heard a rumor that …

    with older versions of samba servers, you can mount them in your fstab. there’s also something called FUSE (a userland file system space thing) there’s a lot of discussion as to whether or not user-space filesystems belong in the kernel. (ie, Linus says “no”) but I’d look for FUSE, and also I’d try the mount / umount method of attaching them (the later is what OS X does)

    I’ll be doing some investigation. I also have this to go on.

    This: sudo mount -t smbfs //downtown/Users /mnt/downtown -o username=username,password=password ought to work, but doesn’t. Here is what the system log has to say:

    [1324145.366237] eth1: New link status: AP In Range (0005)
    [1324457.264963] eth1: New link status: AP Out of Range (0004)
    [1324457.359436] eth1: New link status: AP In Range (0005)
    [1324552.947574] eth1: New link status: AP Out of Range (0004)
    [1324553.665238] eth1: New link status: AP In Range (0005)
    [1324613.083440] eth1: New link status: AP Out of Range (0004)
    [1324613.168185] eth1: New link status: AP In Range (0005)
    [1324876.140151] eth1: New link status: AP Out of Range (0004)
    [1324876.230793] eth1: New link status: AP In Range (0005)
    [1324914.600323] smbfs: mount_data version 1970496882 is not supported

    I know it is off topic, but what is up with the link status bouncing in and out of range like that?

    PS. I am really sorry if I somehow gave you the impression that my blog is interesting to anyone but me.

    Dang Linux

    In linux on November 8, 2005 at 9:15 am

    I wish had some journal entries from adjusting to OSX. I hated it. H-a-t-e-d it. Now I miss it so. Quanta does not do multi-line searches, which is helping my perl syntax immeasurably, but that isn’t why I switched OSs.

    Today, special, I am trying to figure out package management, Quanta, CVS, Cervesia and Kompare.


    amanda@tamari:~$ sudo apt-get install cervisia
    Password:
    Reading package lists... Done
    Building dependency tree... Done
    Package cervisia is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    However the following packages replace it:
    libcvsservice0 libcvsservice-dev kdesdk-doc-html
    E: Package cervisia has no installation candidate
    amanda@tamari:~$

    I have a few questions: is this a repository issue? Am I calling it wrong?

    Is this going to be an issue anyhow since I am using primarily Gnome and I think all the good stuff is wanting KDE? Does Quanta work better in KDE? The whole window manager thing secretly confuses me a little bit.

    PS, on an unrelated note, I would really love if my input here was color coded and stuff. I miss using a nice, rich, text editor. Vim, quanta, bbedit, textpad — I’ll take any of them over this dang textarea.

    Living with Linux

    In learning, linux, various on October 21, 2005 at 2:43 pm

    Tags: , , ,

    I installed Ubuntu on my (a) PowerBook g4, for all the wrong reasons (neooffice is so slow on OSX, Linux is kewl) and I am trying to adapt, but I have hit the following walls:

    * IMAP: I finally decided to go the IMAP route since I am forever failing at syncing my various laptops and checking email efficiently. I set up some folders and things are going fine, but I am confused: if I create filters locally, on one computer and/or move files into folders, will that stick on the server? Also, if I make a folder locally, will THAT stick on the server?

    * Plain Text: How the heck to I make the text formatting disappear in the Thunderbird compose view? Grrr. Also, how do I force everything to plain text, coming and going? I know I worked this out on my Mac, but I don’t remember how. I think it was tricky.

    Thunderbird is also ignoring my quote messages inline settings for the account in the Local Folders, which peeves me.

    http://kb.mozillazine.org/Plain_text_e-mail_%28Thunderbird%29
    Never give up: the Thunderbird Knowledge Base set me on the path to the answer for this one, It is a combination of edit > preferences and edit > account settings ... that you are looking for here. Settings are sprinkled all over but it is at least possible to turn off all inline quoting and RTF emailing and force all messages, incoming and outgoing, into Unicode. Whew.

    * Threading how do I get a “threading” button to appear on my toolbar? How do I make Thunderbird always thread all folders by default?

    * Key Mapping: I don’t have an “alt” key, I only have one control key and suddenly my fabulous open apple keys are moot. To right click without an external mouse I have to mouse over and press f12 which is just weird. I want to do some basic keymapping along the lines of “the open apple is the control key” not map this function and map that function.

    * Repositories: I don’t have a command line mysql client, and there isn’t anything listed under Add Programs that fits the bill. I don’t really know how to look at that gui interface and understand how to edit my repository list and I don’t know how find that in a text file, though I know it is there to be found.

    * Music: I can’t get Rythmbox to play music off of the network. My music is on the network, is that so hard?

    * Saving Files did I already gripe about not being able to navigate to an smb share in the open office save dialog?