En bra gratis blogg
Lista bloggar Om Bloggis
Skapa konto Logga in

Senaste inläggen som handlar om linux


I wasted a couple of hours trying to install Ubuntu 11.04 (natty) on my new Macbook Air mid 2011. Eventually got it to work:

  • In OSX, avoid turning on File Vault, shrink OSX partition and prepare a new partition for Ubuntu using the disk tool.
  • Install rEFIt (http://refit.sourceforge.net/)
  • dd this file to a usb stick, it is a version of the standard Ubuntu Desktop ISO modified using mkisohybrid.
  • Reboot with the USB stick plugged in and choose it in the rEFIt boot menu.
  • At the first Ubuntu boot screen press F6 (or any key?) to see boot options, tick nomodeset.
  • Go through the installation process
  • Reboot and in grub, edit kernel command line to contain nomodeset. (Can be done permanently by editing /etc/default/grub and then running update-grub).
  • apt-get install grub-efi (I have this, maybe grub-pc is fine too?)

Enjoy your new toy!

(2 kommentarer, senast 2011-09-23 11:33)

Nästa inlägg

I like a little (functional) bling with my computer. Not a lot, because, you know, I don't really want to sacrifice processing to crap like transparency when I could be using it for what I'm actually doing. This is why a netbook is completely sufficient for all my computing needs.

So I do this thing with my login screen, whatever Ubuntu version I'm running, I change my login screen to that animal. Because honestly, I can never remember what fucking animal they are on. And it is so much more helpful to google shit that is broken if you can remember the animal.

Method One:

From the login screen, press Ctrl + ALT + F1

Login to the terminal. At the promt, do:

export DISPLAY=:0.0

sudo -u gdm gnome-control-center

Press Ctrl + ALT + F7

When the control panel opens, you can change the background from the "Appearance" button.

Method Two:

(this won't work if you've already changed the background using method one, because, duh, you are no longer using the default background file)

Just replace the default wallpaper with your own by renaming the file. It goes here:


#ubuntu #linux

(Inga kommentarer än)

Nästa inlägg


Elinks. Text based browsing. Awesome. Sorry about all that time you spent on your fancy blog theme, I'm sure it's very nice, but I'll just take the stripped down content, thanks. Also, I was gonna comment but that would have meant opening the captcha in another app. It seemed like a lot of work just to post a droll anecdote. (Anyway, a comment spam filter plugin + moderation of first time posters is the way to go. These captchas are getting harder and harder for my tired old eyes to read.)

Right, this is actually a note to myself about elinks commands.

Elinks command reference

browser navigation

  • g -- opens blank address bar, goes to page (in current window)
  • t -- opens blank address bar, goes to page in a new tab
  • G -- opens url box prefilled with URL of current page
  • T -- opens currently highlighted link in a background tab
  • d -- downloads currently highlighted link
  • c -- closes current tab
  • left arrow -- back to previous page

window navigation

  • < and > -- move between tabs
  • Alt + < and Alt + > -- rearrange tabs

page navigation

  • up arrow -- previous link
  • down arrow -- next link
  • . -- toggles link numbers on and off; when link numbers are on, just begin typing the number to jump to the link
  • / -- search
  • n -- jump to the next occurrence of the current search term
  • ctrl R -- refresh page
  • a -- bookmark page
  • space -- page down
  • page up and page down -- do exactly what you'd expect them to
  • ins and del -- scroll page up and down, respectively, line by line
  • [ and ] -- scroll page left and right
  • home and end -- jump to top and bottom of page, respectively

other commands

  • esc -- access menu bar
  • q -- quit elinks
  • o -- options dialog
  • s -- bookmarks manager
  • h -- history dialog

that thing the kids are all doing these days, the one with the shortcuts in the URL bar

  • elinks has a bunch of built in shortcuts; these are relevant to my interests
    • g -- google; with an argument, searches google; without an argument, goes to google homepage
    • gn -- searches google news
    • e2 -- searches everything2
    • imdb -- search imdb
    • wiki -- search wikipedia (hey, it has its uses--mostly entertainment)
    • arc -- search the wayback machine
    • dpkg -- search debian packages
    • documentation goes to the elinks documentation
    • elinks goes to the elinks homepage
  • url shortcuts can also be customized: o -> protocols -> URI rewriting -- dumb prefixes just go to a page, smart prefixes can take an argument

cutting and pasting

  • to highlight text and store in the buffer, hold down the shift key while selecting text with the mouse
  • to paste, hold down shift key and middle click (on 2 button touchpad, click both buttons simultaneously
  • elinks has no built-in keyboard cut/paste functionality--to c-n-p using only the keyboard, run elinks inside screen (along with other apps like IM, IRC, or Twitter, that you may want to copy and paste from/to the browser)
  • more here


  • adjust document color scheme here: o -> document -> default color settings -- this adjusts default color scheme for web pages
  • set o -> document -> default color settings -> use document-specified colors to 0 to always use default colors (every page looks the same)
  • adjust interface colors: o -> user interface -> color settings -> color terminals
  • elinks automagically uses system variables to determine what kind of terminal it's running in; to adjust the color setting for the current terminal type: esc -> S -> T and select the desired color range (useful when elinks defaults to mono when running in screen)

enable password saving

  • o -> document -> browsing -> forms -> show form history dialog -- set to 1 (disable by setting to 0)

more on using elinks

Deep breath. It's nowhere near as complicated as it seems. And anyway, learning new stuff is good for my brain.

And wouldn't you know... all this, and my internet is mostly out. Fiber break in the south.

(Inga kommentarer än)

Nästa inlägg


Copying and pasting in Elinks using only the keyboard, no mouse

  1. Launch elinks in screen
  2. Use screen cnp commands (more on that below)
  3. Possibly the functionality is built in now--haven't found a resource w/ directions though.
  4. Note: keybindings (from 2005)

bind "main" "Ctrl-W" = "move-cursor-up"
bind "main" "Ctrl-S" = "move-cursor-down"
bind "main" "Ctrl-A" = "move-cursor-left"
bind "main" "Ctrl-D" = "move-cursor-right"
or similar in ~/.elinks/elinks.conf

  • Copy and paste in elinks w/ mouse requires holding down the SHIFT key.

Elinks in Screen - 256 color

  • assuming that screen is set up for 256 colors
  • ESC --> Setup --> Terminal options
  • Select 256 color
  • save and close

256 colors in screen

  1. add the following to .screenrc (if there is no .screenrc, copy /etc/screenrc to ~/.screenrc)

# terminfo and termcap for nice 256 color terminal
# allow bold colors - necessary for some reason
attrcolor b ".I"
# tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
# erase background with current bg color
defbce "on"
# terminfo and termcap for nice 256 color terminal
# set TERM
term screen-256color-bce

Copy and paste in screen

(Inga kommentarer än)

Nästa inlägg

#xterm #linux #notetoself

Added to ~/.Xdefaults:
xterm*saveLines: 2000

Also, for some reason (Ubuntu Lucid, Asus Eee), plain old page up does not scroll up. I gotta do it Sun-style, with shift+page up.

I say so that the next time I get pissed off because I can't scroll up, I will know that I have already solved this problem.

(Inga kommentarer än)

Nästa inlägg

To change the host name, launch your favorite text editor like so:

$ sudo gedit

Open /etc/hostname and /etc/hosts and replace instances of the current hostname with the new one. Save the files and restart the computer.

A post in the Ubuntu forums indicated that if you don't change both files from the same instance of sudo that you won't be able to sudo to change the second file. I don't know if that's still a problem, since I launched the editor using sudo and opened both files from within it.

Tagged: Linux, Note to Self, Ubuntu

(Inga kommentarer än)

Nästa inlägg

2009-03-05 08:19 - alphanum3r1c
Finch Quick Reference

Esc-a actions menu
F10 window menu
F11 widget context menu

Esc-n next window
Esc-p previous window
Esc-N (1-9) go directly to windows 1-9
Esc-c close a window

Ctrl-C quit Finch

Note: In some installs, it may be the alt, meta, or edit key, instead of escape.

More on Finch.

Tagged: Linux, Note to Self, Ubuntu

(Inga kommentarer än)

Nästa inlägg

Ctrl-a c Create a window
Ctrl-a A Name a window
Ctrl-a :number (0-9) Number a window

Ctrl-a n Next window
Ctrl-a p Previous window
Ctrl-a (0-9) Switch to window by number
Ctrl-a Ctrl-a Toggle between most recent windows

Ctrl-a " Window menu
Ctrl-a w Window list

Ctrl-a [ Copy mode
Ctrl-a ] Paste

Ctrl-a d Detach the screen
$ screen -r Reattach the screen

Working with nested screen sessions

  • Top level responds to Ctrl-a etc.
  • Next level responds to Ctrl-a a etc.
  • Third level responds to Ctrl-a a a etc.
  • And so on.

SSH to terminal on non-256 system

  • Using 256 colors and connecting to a host where it creates errors, use: $ TERM=screen ssh user@example.com

(Inga kommentarer än)

Nästa inlägg

From the Ubuntu forums (hopefully I'm smart enough to remember I copied it here, and save myself some googling, if I need to install the printer again):

$ sudo apt-get install remove foo2zjs

(You can skip this if you've previously installed build-essential.)
$ sudo apt-get install build-essential

$ wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz
$ tar zxf foo2zjs.tar.gz
$ cd foo2zjs
$ sudo make uninstall
$ make
$ ./getweb 1018
$ sudo make install install-hotplug cups

At this point, I needed to reboot. You can probably get away with just starting or restarting a service, but I'm not sure what, and it was faster to reboot than figure it out.

$ sudo system-config-printer

Tagged: Linux, Note to Self, Ubuntu

(Inga kommentarer än)

Nästa inlägg

2009-02-27 14:14 - alphanum3r1c
Finishing the setup

I set up my xterm with fonts I can read without a microscope. Now I'm running Alpine and irssi in screen. I've been meaning to do that for a while, with the idea that I could keep them running and just ssh from the laptop when I wanted email or IRC. Probably not as necessary, since whatever replaces the dead laptop should have more than 256 MB RAM.

Added Twitter support to irssi, via Twirssi. It's a little confusing, but I think I've got it beat.

Tagged: Linux, Ubuntu

(Inga kommentarer än)

Nästa inlägg

I woke up this morning and took a shower and made some coffee and fished the Thinkpad out from underneath the bed. It was on, not suspended, because I was lazy about setting up the power management stuff, and at some point during the night, the cord had been pulled out. Probably due to New Cat, but we'll never know for sure. It was off, the battery was completely dead.

I took it out to the kitchen, plugged it in, and powered it up while I got my coffee and fed the cats. When I came back to the table, it had hung loading the Xserver. So I did what all former Windows users do, and power cycled. I always have a ghost of worry power cycling Linux like that. Back when I started out, with Mandrake 8.0, that kind of thing was a last resort and required a good fscking before it would come up again. But it's been years since a machine has complained to me about it, so I've developed wanton power cycling habits.

Coming back up, it didn't make it even as far as attempting to start X. The poor little thing stopped flat with a message about not being able to access /bin/sh. We decided it was the hard drive.

I handled myself with laudatory calm. Especially since I hadn't run my backup script manually in a couple of weeks and the last time I remembered doing anything with it, the cronjob was failing, and I had determined it was a file permission thing and decided to sort it out later, adding an entry to my menu that said BACKUP so I'd remember to do it manually until I got around to it.

As luck would have it, either I'm smarter than I think I am, or the Backup Fairy came a couple days ago, because with the exception of a couple changes I made yesterday and some files that hadn't been added to the script yet, my stuff is all on the server. I love the Backup Fairy.

So now I'm setting up on the desktop (which mostly chugs along as our server, when I haven't just had a laptop fatality). I've discovered that all my saved Kmail settings aren't compatible between the 3.3 version I was running on the 32 bit laptop and the older version from the 64 bit Ubuntu repositories that is on the server, so now I'm in the process of setting up my many and various email accounts in Alpine. (These directions work for Google apps email accounts too.)

I got a sendmail error trying to send with my new roles. I fixed it by editing .pinerc and adding the gmail smtp servers to the list.


After some test sending (sorry everyone who got emails from "Girl"--that was me) I also discovered the need to verify what my From: header is saying. Basic directions here and the whole shebang here.

I also set Alpine up to save my passwords, since entering them every time I restarted got old fast.

I think I'm going to migrate all my messaging into irssi too, since it supports Jabber and Twitter via plugins. (Though I could use Finch, I guess.) I've been meaning to set those things up in screen so I can ssh to them anyway.

It's been a bad week for electronics. My Skype phone quit booting for no apparent reason a couple days ago, but that should still be under warranty since I've had it less than a year.

Tagged: Linux, My Life, Ubuntu

(Inga kommentarer än)

Nästa inlägg

Too much time.

Like today, I've spent three hours looking for a Linux application that will tell me how long I've been surfing the web. You know, because some little desktop widget is really going to help plug up that time sink.

All I really want is a little timer that:

  1. tracks how long, cumulatively, my browser window has focus,
  2. that I can set semi-transparent and always-on-top (so I can watch it while I'm surfing),
  3. that will pop up an alert when I reach a user-set threshold for how long I want to be online.

You'd think that with all the people into productivity and time management--you know, the audience of Lifehacker would be easy to find. Apparently not.

The best I was able to locate is gFocusTimer, which does the first (and most important) thing on my list, but not the second two. (To be fair, those are outside of the scope of the project.)

The always-on-top I can set in my window manager, but Fluxbox doesn't provide the ability to set the transparency of a window so you can see the window beneath. It can be done, according to the docs, with xcompmgr, but they caution about the resources it requires and my poor old Thinkpad T23 is hardly up to it.

While installing gFocusTimer, I was reminded again of an annoying feature in Ubuntu: the assumption that users won't be compiling their own software. Ever. I'm not a hardcore Linux user, and I really don't want to compile stuff myself. I'd much rather apt-get install. But sometimes that's just not possible. Seriously, people, things like build-essentials should be installed by default, and common libraries and configuration files that ./configure and make look for.

On the bright side, I did discover that Linus Torvalds is blogging now. I enjoyed reading some of his posts, even though tracker wasn't quite what I was looking for. It's a good project, parents really need a solution for controlling the amount of time kids spend online, something with a little more weight behind it than "just talking to them." Nothing wrong with talking, but there's nothing wrong with setting limits either. Hell, here I am, an adult, looking for a tool to help me do the same thing. (And the number of people leaving comments suggesting Windows software made me giggle.)

Leave me a comment if you know of software for Linux that does what I'm looking for.

Tagged: The Internet, Linux, Software (other), Ubuntu

(Inga kommentarer än)

Nästa inlägg

2008-06-05 11:53 - alphanum3r1c
Convert RPM to DEB

and install on Ubuntu.

$ sudo alien -k --scripts example.rpm
Converts RPM to DEB

$ sudo dpkg -i example.deb
Installs the DEB package.

Tagged: Linux, Note to Self, Ubuntu

(Inga kommentarer än)

Nästa inlägg