sh, bash, dash and Ubuntu

Hi!
I wanted to install a quite old package in my ubuntu computer using the .sh file I downloaded from their website. So, I tried typing in terminal:

sudo ./package_name.sh

and I got:

/bin/sh: 0: Can’t open ./package_name.sh

Briliant! Since you are here, you are probably looking for a fix.

The problem stems from the fact that Ubuntu uses dash as the default shell and your script is written with another shell in mind. The most usual is bash (sh).

So type in a terminal window:

sudo bash ./package_name.sh

This will force ubuntu to run the script using bash.

Enjoy!
Vasilis

Bash script for webpage changes monitoring

I wrote a simple bash script for monitoring changes in a webpage. I was able to find a couple or more such scripts on the web but non of those worked for https websites with non-valid cerfificates. So here is one that does:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

while true; do

if [[ -f new_page.html ]]; then
  mv new_page.html old_page.html
fi
wget --tries=45 --wait=10 $1 -O new_page.html --no-check-certificate > /dev/null 2>&1
diff ./new_page.html ./old_page.html > /dev/null
if [[ $? -ne 0 ]]; then
  echo "The webpage has changed!"
  date
  # mpg123 -q /home/user/latin_rhythm_guitar.mp3
  firefox $1
else
  echo "No change"
  date
fi
# sleep some time
sleep 1800
done

The line mpg123 -q /home/user/latin_rhythm_guitar.mp3 is commented out. If you choose to play a song each time a change in the webpage occurs change the filename and un-comment.

Part of the source code is from the script found here.

Ubuntu Studio

This is not a review or something similar. I simply came across it today and thought it would be great to share with you.
Even though I am an every day linux user and more or less familiar with what is going on with linux, the community continues to surprise me! I present you Ubuntu Studio.

From Ubuntu Studio website:

Ubuntu Studio is a multimedia editing/creation flavor of Ubuntu. It’s built for the GNU/Linux audio, video, and graphic enthusiast or professional.

Our aim is to make it more accessible for new users to get into the tools that GNU/Linux has to offer for multimedia creation and production. We also want to spotlight what’s out there, and show users tools they might not know to exist.

One important detail that I would like to add is that Ubuntu Studio uses real-time kernel which is really important for music producers.

The disto’s website is: http://ubuntustudio.org/
Here is a nice Wiki on the project with plenty of information.

I am going to spare some time installing and testing this ubuntu variant.

Hope you enjoy it,
Vasilis

iptables is not a firewall

A mistake I come across often is confusing iptables with linux kernel firewall.
Even in articles, whose writers appear to have great knowledge on iptables tweaking and rule creation, the same mistake can be found.

OK, it is not a firewall, but what is it?
According to wiki (and me Tongue out):
iptables is a user space application program that allows a system administrator to configure the tables provided by the Linux kernel firewall (implemented as different Netfilter modules) and the chains and rules it stores.

It simply comes pre-installed with most linux/unix distos and requires elevated privilages.