Linux Desktop Rebuild Checklist 2 – Web Dev Tools

Following Linux Desktop Rebuild Checklist 1

Sublime Text

I’m a Sublime Text convert. Official docs are sparse, but there are great unofficial (community) docs for Sublime Text.

It’s quite easy to install on Ubuntu/Kubuntu via webupd8.

sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get install sublime-text

LiveReload

Change a file in your project and LiveReload automatically refreshes the browser via an extension (Chrome, Firefox, Safari, Mobile Safari, and Opera with a config change).  Check out “LiveReload” in the Chrome Web Store.  Best out-of-the-box support for the filesystem piece is on Mac (and $$), but the Ruby project Guard and its various plugins allow for even more functionality for no charge (except the effort to figure it out).

On Linux, it’s quite simple, even for someone (like me) who knows very little about Ruby.

Install RVM and Ruby.

$ curl -L https://get.rvm.io | bash -s stable --ruby
$ source ~/.rvm/scripts/rvm
$ rvm use

Install Guard and Guard-livereload

$ gem install guard
$ gem install guard-livereload

Create a sample Guardfile (do this in your project dir).

$ guard init livereload

Then, edit the file for the filenames/patterns to watch. Here’s my simplest Guardfile.

guard 'livereload' do
  watch(%r{.+\.(css|js|html)$})
end

Finally, run guard from your project dir.

$ guard
19:16:14 - INFO - Guard uses NotifySend to send notifications.
19:16:14 - INFO - Guard uses TerminalTitle to send notifications.
19:16:14 - INFO - LiveReload 1.6 is waiting for a browser to connect.
19:16:14 - INFO - Guard is now watching at '/home/mghicks/...'

I haven’t tried Ruby on Windows, but there is a tutorial for using RVM with Cygwin. Git for Windows also has the option to work with Cygwin (selected during installation). I’ve tried Git on Windows with the Git shell, but not with the Cygwin option.

JSHint and JSONLint via NodeJS

Never sweat a missing comma or semi-colon again!  JSHint and JSONLint are the two biggest time-savers I’ve added to my toolset.  Thanks to the NodeJS community, NPM, and NVM, it’s trivial to install and use them.

Install NVM and the latest Node.

curl https://raw.github.com/creationix/nvm/master/install.sh | sh
echo "\n. ~/.nvm/nvm.sh" >> ~/.bashrc
source ~/.bashrc
nvm ls-remote
nvm install 0.x.x (use version from ls-remote)

Install JSHint and JSONLint.

npm install -g jshint jsonlint

Configuring Sublime Text next…

Posted in computers, linux, opensource, programming, web | Tagged , , , , , , | Leave a comment

Linux Desktop Rebuild Checklist 1 – Base System

  1. Install via Unetbootin (I’m using Kubuntu these days)
  2. Fix monitors (important to do before next step)
  3. Install synergy
    sudo apt-get install synergy
  4. Add synergy to startup (see http://askubuntu.com/questions/15212/start-synergy-on-boot)
  5. Connect to NAS
    sudo apt-get install nfs-common
    sudo vi /etc/fstab
    
    10.1.1.3:/volume2/data	/home/mghicks/Data  nfs rsize=8192,wsize=8192,timeo=14,intr
    10.1.1.3:/volume2/media /home/mghicks/Media nfs rsize=8192,wsize=8192,timeo=14,intr
    
    mkdir /home/mghicks/Data /home/mghicks/Media
    sudo mount -a
  6. Additional repositories
    sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
    sudo wget http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list --output-document=/etc/apt/sources.list.d/medibuntu.list
    sudo apt-get update
    sudo apt-get install medibuntu-keyring
    sudo apt-get install linuxmint-keyring
    sudo apt-get update</span>
    
  7. Additional codecs, fonts, tools, etc.
    sudo apt-get install ttf-mscorefonts-installer non-free-codecs flac libdvdcss2 vlc* mplayer dvdrip
    sudo apt-get install build-essential curl git-core
    
  8. Install Chromium
    sudo apt-get install chromium-browser

    and extensions: Adblock Plus, Reddit Enhancement Suite, LiveReload, Personal Blocklist

  9. Install Banshee (not the best, but the only one I’ve found that *easily* syncs my ratings between players–suggestions welcome)
    sudo apt-get install banshee
  10. Install Shotwell
    sudo apt-get install shotwell
Posted in computers, linux | Tagged , | Leave a comment

This week’s (Xmas) music finds

It’s just about that time of year…

Continue reading

Posted in music | Tagged , , | Leave a comment

This week’s music finds

Going to see whether I can jumpstart more blogging with posts about music I like found on sites like ex.fm, FMA, Soundcloud, and so on…

Continue reading

Posted in creativecommons, music | Tagged , , | Leave a comment

Network Traffic on Ubuntu 12.04 vs Fedora 17

Recently, I started obsessing over network traffic on my (recently upgraded) Ubuntu 12.04 system.  This is what it looked like, with only a few user processes (just chromium and synergyc).

Ubuntu system monitor network history

Screenshot of Ubuntu’s System Monitor Network Traffic

I could never pin down a process that was causing the traffic; netstat -p and nethogs reported the bulk of traffic from an unknown PID.  It may have been malicious, or simply a weird Ubuntu issue.

So, naturally I did what I do when I’m paranoid.  I wiped and reinstalled.  Since I didn’t want the Unity desktop, anyway, I figured it was time to try something new.  Fedora 17, with Cinnamon.

Contrast the Ubuntu traffic above with the Fedora traffic here.

Fedora's System Monitor Network History

Screenshot of Fedora’s System Monitor Network History

That one blip is Banshee pulling the next song from my NAS.  And where I had no user processes running in Ubuntu, this Fedora traffic includes a torrent trickle (10kB/s limits), my media player, and synergy.  Nethogs shows very little traffic from sources it can’t determine.

Nethogs output on Fedora 17

Screenshot of nethogs on Fedora 17

I also have ntop running now. More on that, later.

And finding Cinnamon was a big silver-lining in this whole process.

Posted in computers, linux, ubuntu | Tagged , , , , , | 1 Comment

What’s Causing that Network Traffic on Linux?

I noticed some periodic network traffic on my Ubuntu 12.04 box.

System monitor network history

Screenshot of Ubuntu’s System Monitor Network Traffic

Naturally, I wonder what was polling like that…

Then I realized netstat -ap  will tell me the process using a port, but just doesn’t provide enough info to figure out which is responsible for the traffic.

sudo apt-get-install iftop
sudo iftop -Pp

Iftop is closer to what I wanted, showing traffic, but it didn’t connect the ports with traffic to the PID.  At least it showed me all the traffic was local or to google’s 1e100.net, rather than to any of the other connections netstat showed. But I still didn’t know which process was responsible.

A little googling turned up Nethogs. Much closer to what I needed and easy to install.

sudo apt-get install nethogs
sudo nethogs

Nethogs console output

Nethogs console output

But here I get stuck.  I killed the synergy client and chromium, but the traffic pattern is still there.  Nethogs lumps all the packets it can’t associate with a PID in the ‘?’ row.

To sum up…

  • netstat connect ip-port to pid
  • iftop connects port to traffic
  • nethogs connects pid to traffic, but most traffic is lumped into ‘unknown’

Then, there’s ntop, which runs as a daemon, has a web interface, and produces incredibly detailed reports.  I installed it. We’ll see what it comes up with after it’s run for a while.

sudo apt-get install ntop

You have to create an admin password during the install.

Posted in computers, linux, security, systemtools, ubuntu | Tagged , , , , , , , | Leave a comment

Raleigh Crabtree Greenway Walk

This is the flat side (north) of the Raleigh greenway trial I normally walk.  It’s about 2.8 miles and mostly shaded, with one sunny stretch. Takes me about 45 minutes for the round trip. You can still see the impressive tree damage from the 2011 tornadoes.

Posted in me, walks | Leave a comment