Archive for the 'Linuxing for everyone.' Category

Linux tips and guides.

Friday, August 20th, 2010

1. How do you change your login shell? My remote Ubuntu shell was sh, not helpful compared with bash. First see what are the available shells: cat /etc/shells. Then change your login shell using the command chsh -s {/your_favored_shell} {user_name} The user_name is optional, and is useful if you are root. Added August 20, 2010. [...]

  • Share/Bookmark

New kernel updates for Ubuntu.

Friday, August 6th, 2010

It is good that one always have the latest stable version of Ubuntu. The kernel is always updated to the latest version as in this morning. After the update, I now have the following: lsb_release -a LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch Distributor ID: Ubuntu Description: Ubuntu 10.04.1 LTS Release: 10.04 Codename: lucid toto@toto-laptop:~$ uname -a Linux toto-laptop [...]

  • Share/Bookmark

Upgrading End of Life Ubuntu Releases: Gutsy to Hardy

Monday, August 2nd, 2010

I was perplexed when I could not do apt-get install [packagename] anymore in the server. The Ubuntu server was at version 7.10 and I read that the EOL was in April 2009. So time for an upgrade! I can jump from Gutsy to the newest Lucid Lynx but that is not recommended. For those who [...]

  • Share/Bookmark

Crontab file problem:why is the last command not executed?

Tuesday, July 27th, 2010

I got weather pages displayed in my blogs which are updated at the adorio-research.org site. The data is obtained automatically by a cronjob and the command to get the Japan Meteorological Agency (JMA) analysis chart has the line entry in the cron list as 5 0,6,12,18 * * * getjmachart.py meaning every 5 minutes after [...]

  • Share/Bookmark

Why does Emacs choose not to display the column number?

Monday, June 21st, 2010

Why? This misfeature might turn off potential Emacs users. Perhaps the Emacs developers think that only Emacs lovers should use Emacs! Damn. but it is easy actually. In your /home/user/.emacs directory (the dot normally turns off display of filename in ls ordinary command), insert the line (setq column-number-mode t). But really the default should be [...]

  • Share/Bookmark

LInux error messages: Bash has no sense of humor.

Friday, March 19th, 2010

Linux which may stand for the recursive acronym Linux is not uNIx, is said to be inspired by Unix. Here is proof that Linux is not a clone of Unix. Here we show jokes from the command line from the Unix console. (Not copyrighted, so we can quote them verbatim). Visit the original source : [...]

  • Share/Bookmark

A problem with commands.getoutput

Friday, March 12th, 2010

I am wondering why I see the following error when running a Python script with the following contents: import commands s = commands.getstatusoutput(“uptime”) The error is $ sh: -c: line 0: syntax error near unexpected token `2′ sh: -c: line 0: `{ uptime; } 2>&1′ Test on my 2.6.4 does not emit the error. Maybe [...]

  • Share/Bookmark

Sending a file as an attachment via email in Python

Thursday, February 11th, 2010

I needed a simple Python routine to send a file as an attachment to my gmail account. I found one that works for a single file and tried to make it more modular. It took me one almost one day inspite of my teaching duties to make it work. Only I realized later that in [...]

  • Share/Bookmark

Cron jobs in Ubuntu

Monday, February 8th, 2010

It is actually easy to set up to run a script file written in bash, python, or C (compiled to executible!) at periodic intervals in Ubuntu. First of all, if you are the most important user of the computer, specify first your editor of choice when working with visudo and crontab -e. Put in your [...]

  • Share/Bookmark

Linux tips and techniques.

Saturday, January 23rd, 2010

We are starting to collect Linux tips and techniques. Q1. To connect to a network, one has to specify a dns address. How do you do this in Ubuntu? A1. Append the line, nameserver dns-address to the file resolv.conf. Usually you have to be a root or administrator to do this.

  • Share/Bookmark

Digital explorations is Digg proof thanks to caching by WP Super Cache