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

Senaste inläggen som handlar om ubuntu

atte

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
alphanum3r1c

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:

/usr/share/backgrounds/warty-final-ubuntu.png

#ubuntu #linux

(Inga kommentarer än)

Nästa inlägg
alphanum3r1c

#notetoself

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

colors

  • 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
alphanum3r1c

#notetoself

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
atte

Firefox has had some security problems lately and some days ago 3.6.6 was pushed out.

For many of us, this breaks firefox: it will not start up anymore. After some digging I found out that moving away the file ~/.mozilla/firefox/PROFILENAME/secmod.db solves the problem.

Thought I should scribble it down in case you have the same problem... and what fun is a blog post without a picture? :-)

Testing my new Nikon 70-200 VRII...

(16 kommentarer, senast 2010-08-25 10:50)

Nästa inlägg
alphanum3r1c

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
alphanum3r1c

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
alphanum3r1c

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