Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Thursday, October 06, 2011

Beginning of the End

I finally took the plunge.  I downloaded a password manager.

Until now, I've either remembered my passwords, used some algorithm to determine them on a per-website basis, or tracked them in my emails.  All of those had shortcomings, so I decided to try a password manager.

Using no particular criteria, I devided to try Revelation.  Simple, to the point, and for the handful of days I've used it, it's gotten the job done.  Using a password manager has its own shortcomings, but having to look up a password in a single application beats trying to find passwords in my email or guess until my account is locked.

Thursday, April 14, 2011

Port Forwarding

The post is more for my own remembering than anything else, although I'm posting it here just in case someone stumbles across it and finds it useful

The goal: allow a remote computer to view a website hosted on my local computer.
Steps:
  1. Set up an account with dyndns.org
  2. Install ddclient on my Ubuntu machine to periodically notify dyndns.org what my IP address is
    1. Don't prepend "http://" to your domain name in the ddclient setup!
  3. On my router, assign my computer a static IP address
  4. On my router, forward incoming traffic on port 8080 to the new static IP address
  5. On my computer, port-forward port 8080 to port 80, where my apache webserver is listening
    1. sudo iptables -t nat -A PREROUTING -p tcp --dport 8080 -j REDIRECT --to-port 80 (add the port forwarding rule)
    2. sudo iptables -F (flush the rule)
    3. sudo iptables -t nat --list (view the rule)
    4. sudo bash -c "iptables-save < /etc/iptables.rules" (save the rule to a file)
    5. sudo echo -e '#!/bin/sh\niptables-restore < /etc/iptables.rules\nexit 0' > /etc/network/if-pre-up.d/iptablesload (to create a script to restore the iptable rules every time the network interface comes up)
    6. sudo chmod +x /etc/network/if-pre-up.d/iptablesload (to make the script executable)
  6. Visit my site in a browser at http://subdomain.dyndns.org:8080
iptables: https://help.ubuntu.com/community/IptablesHowTo

Sunday, July 11, 2010

Open Source Software

I love Ubuntu and open-source software. I love that I can download and install an entire operating system and a comprehensive suite of software...in half an hour. For absolutely free.

Thursday, April 29, 2010

So...who wins?

Recently I was reading a forum thread that was talking about Linux distributions. Three comments in a row went thus (paraphrased):

Person 1: After 10 years of Ubuntu, I'm running Fedora.
Person 2: I gave up on Fedora back in 2003 and went with Gentoo.
Person 3: I used Gentoo for almost 3 years, but personally, I dumped it for Ubuntu.

Thursday, February 19, 2009

PulseAudio fix for Ubuntu

On my laptop running Ubuntu (Intrepid Ibex), I've had difficulties getting audio to work simultaneously in both Firefox (Flash, to be exact) and my music players. I can play music in RhythmBox or Movie Player, but if Flash, running in Firefox, manages to grab audio, then the music players can't get it back.

The following steps from here fixed the problem. (As usual, the most time-consuming part was identifying exactly what the problem was. Fixing took a few seconds.)

$ echo "default_driver=pulse" >~/.libao
$ rm -r ~/.pulse ~/.asoundrc*
$ sudo apt-get update && sudo apt-get dist-upgrade
$ sudo apt-get remove libflashsupport
$ sudo apt-get install libasound2-plugins padevchooser libao-pulse libsdl1.2debian-pulseaudio

Reboot.

The instructions on the webpage were more detailed, described the purpose of each step, and included other things to check along the way, but in the end it came down to the above steps for me.

Friday, July 18, 2008

Recover Deleted Ubuntu File

While working on a Firefox extension, Firefox deleted a file I was using, "overlay.js". It was gone, but fortunately, a few minutes previous, I had manually deleted a temporary backup file that my text editor was using, "overlay.js~".

Since I had manually deleted it, it should have been in my Trash Can, but it wasn't, probably due to the "~" at the end of the filename which indicated that it was a temporary file. Even "Show Hidden Files" didn't make it appear.

However, by going to a command prompt and viewing my trash folder there, it appeared:

ls: ~/.local/share/Trash/files

So I'm not sure why the Trash Bin didn't show it, but it was there.

Thursday, May 22, 2008

Remap Keys in Ubuntu 8.04 (Hardy Heron)

My new Dell Inspiron 1520 keyboard is a little different from my old laptop, and now there's a "menu" key where I'm used to the "delete" key being.

http://www.terminally-incoherent.com/blog/2007/08/02/remapping-the-caps-lock-key/ had a good explanation of how to remap a key, but my case was a little different. Here's what I did:

1. Get the proper key codes

First, I had to find the key-code for my Menu key and my Delete key. At a terminal, type (thanks to Tom for the "| grep keysym" addition to make the output more succint):
> xev | grep keysym

This lets you press keys and get the codes for them. Pressing my Menu and Delete keys, I got a lot of data. Buried in it were the following lines:
keycode 117 (keysym 0xff67, Menu)
keycode 107 (keysym 0xffff, Delete)

Okay, pretty simple. "Menu" and "Delete" are the pertinent bits of data.

2. Make the change

Next, I used VI from a terminal to open ~/.Xmodmap (which didn't exist--I had to create it).
> vi ~/.Xmodmap

(If you don't know VI, I'm sure the regular Text Editor would work just as well.)

In ~/.Xmodmap, I put a single line:
keysym Menu = Delete

Then save the file.

3. Apply the change

Finally, from a terminal, run the following command:
> xmodmap ~/.Xmodmap