User login

Blogs

×

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in menu_set_active_trail() (line 2405 of /home/steelsmi/public_html/includes/menu.inc).

Linux tip: sudo

At work yesterday, I had to solve a problem with a strange error.

Sorry, user <user> is not allowed to execute '/usr/bin/command' as root on <box>

Reading the work order (which did not include the error message, just that the user could not access a file), I thought it had to be a permissions issue, and in a sense I was right, but not a file permissions issue as I suspected.

Topics: 

Bash: if statements

An if statement in shell scripting looks something like this:


if [ "$VAR" = 1 ]
then
#do something
elif [ "$VAR" = 2 ]
then
#do something else
else
#do something by default
fi

Notice we're quoting the variable to protect from shell expansion.

There are a variety of file tests one can use:


if [ -e /tmp/test.file ]
then
#do something
elif [ -d "$VAR" ]
then
#do something else
else
#another default action
fi

Bash: variables

First in a series of notes in reference to shell scripting as I am just learning it myself. I have started on a script that will configure a bridged network interface for VirtualBox.

Working with variables in the shell is very easy.


#set a variable
VAR="Hello World"

#output the same variable
echo $VAR

#assign a new variable
#the value of our old variable
VAR2="$VAR"

echo $VAR2

Linux conversion: Anonymous

Czzessi has blogged about his co-worker who decided to install Kubuntu on his laptop instead of buying Windows for it, and so far, loves it. =)

"For the record: When someone who is around 45 year old and used the pc only for office and email say: "Wow, it's amazing and so easy", then Riddell, his team did a great job."

I completely agree. Most people who don't play third party games love Linux in my experience. Especially Ubuntu and Kubuntu.

Better web development with Ubuntu 8.04

Ubuntu 8.04 provides many free tools that makes a web developer's job very easy and the tools we use better and moe secure.

First, BlueFish is a very good source editor. It has all the expected features and is very fast. Quanta is a good KDE equivalent, but so far, I believe BlueFish is faster and a bit better.

Second, virtualization is highly supported. Why is this important??

I decided to start over with my home computer. I backed up my home drive, then wiped my system drive and reinstalled. Oops...I forgot to backup mysql.

Back to gnome (Unbuntu 8.04)

Gnome vs KDE

I decided to go back to Ubuntu at home. I was having a tough time deciding which version of Ubuntu I wanted to use when I realized I can just use Ubuntu at home and Kubuntu at work. I had originally installed Ubuntu with Windows and have done quite a bit of work on Ubuntu experimenting and installing from source, so I felt like I needed a clean system.

Topics: 

Fortune and xscreensavers

One of the coolest commands in Linux is fortune. =)

$ fortune

If you don't have fortune installed:

$ sudo apt-get install fortune-mod fortunes

The above command will output a random fortune, quote or saying. This command has been around forever and it's one of my favourites. The better email clients will allow you to use the command to append a random quote at the end of your emails.