I’ll preface this post with a quote from one of our local users, findlay:

11:15 < findlay-w> I can edit google's homepage from within vim?!
11:15 < findlay-w> now that's a powerful editor!

That’s right vim is a powerful editor! Now, of course, you can’t publicly change Google’s homepage with vim but you can edit it directly to be saved elsewhere. Same with any other web-based file or file on a remote machine. Here are some examples:

vim scp://user@hostname/path/to/file (remotely edit a file via scp)

vim ftp://user@hostname/path/to/file remotely edit a file via ftp)

vim scp://user@hostname/path/to/dir (remotely show directory contents with the ability to select and edit a file)

And from within vim, if you’d like to open a remote file or create a remote file.

:e http://google.com/ (remotely see/edit the contents of Google's homepage)

:e http://yourwebsitehere.tld/ (remotely see/edit the contents of your homepage)

:e scp://user@host.tld//etc/apt/sources.list (remotely edit the sources.list file on another machine via scp)

:e ftp://user@host.tld//pub/somefile (remotely edit somefile on another machine via ftp)

...or the examples above prefixed with :e

I’m sure that is enough to get you in trouble–err, I man, started. Enjoy. For more information on how all of this works and additional options, please see the help for netrw within vim (:help netrw).

And that has been this weeks “Vim Tip of the Week!”

I post tutorials very regularly on this site. You may want to consider subscribing to the RSS feed. Or if you'd prefer these tips sent to your inbox you can use Email Subscriptions.

More and more I’ve been using ssh tunneling, encrypted emails or privacy networks while I’m online. Between (US) government sponsored wiretaps, to identity theft there are plenty of people out there that want to know what you’re doing and get your information. This is one of the reasons I recently looked into donating some bandwidth to the Tor network.

If you’re not familiar with the Tor network it is “The Onion Router”, basically meaning that between your machine and the machines you end up connecting to there are layers. Layers of encryption and anonymity that can help ensure your privacy.

Now this system (just like any system) can be abused. There are some people out there that feel the Tor network is simply for crackers and terrorists trying to do bad things. On the contrary, its for real people like you and me that don’t care for our personal information to be so freely available just by casual browsing.

I used the Tor network fairly early on and it was great. Eventually more and more people started using it and the limited donated bandwidth was running short and therefore your Tor-enabled private connections were slower. This became a common complaint about using Tor–it was too slow.

Well, we can help change that by donating a throttled section of our bandwidth to the Tor network. If one-hundred more people donated a bit of their bandwidth it would open the network quite a bit.

In any event, lets get to the details. (note: This was tested on Ubuntu 6.06.1 but should function on later versions)

Downloading the Tor software

The first thing we need to do is install the latest Tor software for handling the private connections. While the tor package is available it is not the latest version (with 6.06.1 backports) and not compatible with the latest network. We’ll need to add the latest package by adding this to our sources.list: The version we need is >=0.1.2.15

deb http://mirror.noreply.org/pub/tor dapper main

(replace dapper, of course, with the distribution version you are running)

You may also want to add the GPG key the package was signed with to validate it:

gpg --keyserver subkeys.pgp.net --recv 94C09C7F

gpg --export 94C09C7F | sudo apt-key add -

Once you have added that line to your /etc/sources.list file you’ll need to run these commands: (or use your favorite package manager front-end)

sudo aptitude update

sudo aptitude install tor

Config Preparation

We’ll now prepare the machine to run as a Tor server. Two things need to be done here.

  1. Make sure your time clock is up to date
  2. Make sure your machine can resolve DNS properly

We can do this via these two commands:

sudo ntpdate pool.ntp.org

(this will synchronize the clock unless you are already running the ntd daemon. If so you're probably synched)

host google.com / host ubuntu.com / host some-random-domain.com

(the host tool will resolve names to IPs using DNS lookups. If your machine is able to resolve domains quickly and easily you're set. If not, consider configuring OpenDNS on your machine)

Configure the Tor Server

Three last things to do and your machine will join the Tor network. We’ll need to set a Tor unique server ID and the ports to use. If you are behind a router you’ll need to configure NAT for the second step.

Edit your /etc/tor/torrc file:

sudo vim/nano/gedit /etc/tor/torrc

  1. Find the line that says “Nickname” and define a nickname for your server. It’ll need to be something unique.
  2. Find the line that says “ORPort” and define the port number. You can use the defaults (uncomment existing lines) or define an alternate port.
  3. You’ll also probably want to define the bandwidth limitations that will be donated to the network. Look for “BandwidthRate” for the minimum long-term bandwidth rate. The minimum to join the network is 20K. Also find “BandwidthBurstRate” for occasional burst speeds across the network. The overall average, even with the burst rate will stay to the lower value. You may also want to look at the Hibernation value which lets you put a total cap on a timeline basis on shared bandwidth.

Running the Server

You’re now ready to start running the server and donating to the Tor privacy network. You’ll simply need to start the service and quickly watch a log file to see that everything functions as it should. If it does not please see the Tor FAQ for help.

sudo /etc/init.d/tor start

tail -f /var/log/tor/log

If you see a message like “Self-testing indicates your ORPort is reachable from the outside. Excellent” then you are ready to go. You can close the log (ctrl-c) and just let it go.

You’ll probably want to watch your bandwidth for the next day or two and find the best limit for your connection.

Thank you for donating to the Tor network. Thousands of privacy-concerned citizens around the world appreciate it!

As I mentioned nearly a month ago I have decided to donate a portion of the earnings from this site to a Free Software or related project each month.  The first month I pledged to donate 25% of the monies earned, and that I have done.  The first donation has gone to help the EFF help protect our digital rights, and I actually did just a bit over 25%… just to make it a nice round number.

While this was a difficult decision–there are so many projects to donate to–I felt it was a good choice.  I will continue to donate into the future so if you have a project that you feel would benefit please leave a comment.

Also, in an effort to be transparent, and also considering this money was generated by many of you by visiting the site, here are the details:

$100 went to the EFF as a one-time donation.

I will receive the awesome EFF "swat" hat as a gift.   (I'll see about posting a picture when it arrives).

I want to thank everyone for continuing to support this site.  I hope you’ll continue to do so and I hope you agree with the donation decisions.  I know the money comes from many of you taking time to visit the site and I appreciate it.

I’m sure many of you have seen this “Best Ubuntu Blogs” post.  I just wanted to brag that over here at Ubuntu Tutorials we’re (read: me) are number 6.  You know, I’ve always liked the number 6.

*FTW : geek-speak, meaning “For the Win!”

I’m back on another phase of “all email clients suck” and back to Mutt again.  I *almost* have it configured to all of my (needy) specs, except for one thing.  I can’t seem to open encrypted email.  I can sign fine, I can encrypt fine, but when I try to open an encrypted email sent to me I get:

"Could not copy message"

Can any of you other Mutt gurus take a stab at what I might be missing?  A link to my .mutt_gpg here.

So as you read earlier I’ve rebuilt my laptop today using Ubuntu 7.10 “Gutsy” Tribe 5.  I’ve been on a bug-rampage today (I need to get my LP karma up!), one of the bugs being that I have no wireless out of the box.

Now, I want to present you all with the options and see which is less evil.

Option 1: ndiswrapper + windows driver

Option 2: madwifi and the non-free binaries

I asked around in IRC today and the closest answer I heard so far is:

“[Use] madwifi, because ndiswrapper makes baby Jesus cry”

…that may be true, but what do the rest of you think?  Non-free ndiswrapper or non-free madwifi?

I recently re-installed my machine using the latest Ubuntu 7.10 alpha “Tribe 5″. There are some things that I thought the public would like to hear about, and also a few bugs I found and submitted. If you are able to duplicate the bugs please follow the links and offer any additional information you can.

Points of interest:

  • Resolution detected and setup properly out-of-the-box (1280×800, intel graphics chipset - macbook)
  • Compiz “normal effects” enabled by default out-of-the-box
  • Fast-user switching enabled and applet applied out-of-the-box
  • 2.6.22-10-generic kernel (w00t!)
  • Appears to have main restricted universe and multiverse enabled by default, also the commercial repo is listed but de-activated (easy activation via radio-button click)
  • System-config-printer replacing old printer utility. Zero configuration required for supported printers. Connect and Print.
  • Partition table recognized as gpt on my macbook. Minor but its getting smarter :)

Bugs of interest: (bugs I submitted or appended today)

None of these were show stopping bugs. Some minor annoyances, some things that need to be polished a bit.

For those wondering I am running this on a C2D macbook (early 2007 release). I am using LVM (for those hoping for LVM improvements), and running the 64bit release.

Again, I invite you to help improve the next release of Ubuntu by testing the alpha within a VM or spare machine. The more bugs we can squash previous to the final release the more polished Ubuntu 7.10 will be!

This tip will be a quick one, and I want to thank one of the commentors on a previous post for pointing this out to me.  The vim that comes installed on your base machine is not the full vim, for some reason.  I guess its the basic “this’ll get the job done”-vim, but not the “this has all the cool features”-vim.

To install the full vim use your favorite package manager or install the package using this command:

sudo aptitude install vim-full

From the package description:

Vim is an almost compatible version of the UNIX editor Vi.

Many new features have been added: multi level undo, syntax highlighting, command line history, on-line help, filename completion, block operations, folding, Unicode support, etc.

This package contains a version of vim compiled with support for the GNOME2 GUI and scripting support for Perl, Python, Ruby, and TCL.

This package provides the full vim command line editor and also the gvim GUI front-end of the same.

If you use vim and you haven’t installed the vim-full package you don’t know what you’re missing!

Please consider downloading the latest version of folding instead.

Well according to my records it has been nearly a month since I last updated my folding project. I don’t know if that means it was written well, or if I’ve been neglecting it. In any event I have updated the script based on a user submission and am releasing v0.4, aptly codenamed “Kickstart”. New in this release:

  • Instructions on how to deploy this as part of a kickstart file (often used with RHEL or Fedora).
  • The installer is now ‘aware’ of the kickstart instructions and will cleanup after itself.
  • Code Cleanup (often used to pad any changelog)
  • Cleaned up README
  • Changed naming format from FAH-* to folding.

If you have already used my folding script there is no need to update. For anyone else that would like to deploy Stanfords Folding Client you may want to check this out.

I know its too late to get into Gutsy at this point but I have been very interested in getting this packaged for Ubuntu. I would *love* to be able to ’sudo aptitude install folding’. Can any of you package gurus email me about this? Thank You.

Downloads available here:

folding-0.4.tar.gz

folding-0.4.zip

folding-0.4.tar.bz2

Update: Visit Save The Internet and let your voice be heard!

Sunday afternoon I finished setting up a dedicated rtorrent server for seeding Ubuntu .iso images. I do my best to hand out all the CDs I can, but I also figured I could make use of the bandwidth I have to do the same. Once I got on that idea I realized I had access to two Comcast connections (family) where I could drop in two more of these “rtorrent appliances”. So, I got to work setting a second one up and dropped it on the network at my Dad’s house.

Wasn’t I surprised to find that my seeds weren’t taking off. After some quick Google searching I found that Comcast is cutting torrent connections nearly across the board. All across the internet people are complaining about Comcast not letting them seed anymore–and many of these for completely legal material!

I know bittorrent is associated with a lot of pirating. Hell, so was ftp and whatever other protocol you want to drop in here. This doesn’t mean that it is *only* used for pirating. This doesn’t mean that there aren’t legit reasons to use the efficient protocol. Apparently Comcast doesn’t see it this way.

The way I see it this is the first step toward a Tiered Internet, whether or not any such thing is approved in Legislation or by the consumers. Comcast doesn’t care. They are simply cutting off access to part of the Internet, plain and simple.

I would not be surprised at all to soon hear that Comcast will allow bittorrent traffic, for an additional fee. If you *really* want to use that protocol you can pay us more, but otherwise we don’t deem it as part of “normal internet usage”. Once that starts what is to stop the avalanche that will happen next?

“You want access to YouTube? It really uses a lot of bandwidth and we weren’t expecting most people to use more than casual browsing and email. That’ll be $5/mo additional.”

If Comcast is able to start cutting off access to internet protocols they are already to the Tiered Internet that will only become grounds for corruption and extortion. Who will be next?

The telecoms like the idea of a Tiered Internet because they can then extort both sides of the product. Since they are the middle-man they can charge more to the consumers for access to “the whole internet” and charge more to large domains and take pay-outs from big online powerhouses to provide “better or preferred” access to them.

What do I mean by that? We all know Google pwns the internet. We start getting into the Tiered Internet setup and Microsoft gives a big payout to Comcast, requiring them to limit access to Google, while preferring access to Windows Live Search (or whatever the hell its called). They’ll make up some reason why its more efficient for bandwidth or some BS and you’ll have to pay more to get to Google. They would be in the perfect position to rake in huge piles of money from both ends, with nothing to stop them.

The internet needs to stay open. The *whole* internet. Not the convenient internet. Not the bandwidth friendly internet. Not the bribed-into-becoming-the-new internet. The whole internet. All protocols. All sites. All networks.

If Comcast is allowed to continue cutting off even one protocol we’ve already lost. Voice your opinion. Contact your local office. Complain. Make some noise. Switch providers.

Until then I’ll be getting these two Comcast connections switched to a competitor. It may be a slower internet (in my area) on DSL, but at least its the whole internet.

Update: Visit Save The Internet and let your voice be heard!

Next Page →

    Subscribe to the RSS feed!


    subscribe to the ubuntu tutorials RSS feed

    Get Ubuntu!



  • Blogroll

  • Ads by Google