Ubuntu / GRUB2 bootloader on Asus N90s

The system won’t boot with the normal default configuration that GRUB assigns. The APIC or something related causes the system to go to a blank screen and stay there. Manually change these settings at boot time, or permanently change them in /etc/default/grub

GRUB_CMDLINE_LINUX=”nolapic nohz=off”

Posted under Linux, Operating System

This post was written by Content Curator on September 16, 2012

Tags: , , , , , , , , , , , ,

How to Find Large Files in Ubuntu Linux

If you want to find files above a certain size, or find files between certain sizes, then you may use the +size x and -size x switches to the find command.

For example:

find /etc -size +100k -size -150k

This command will find all files inside the /etc directory that are between 100k and 150k in size.

Source: http://www.unixtutorial.org/2008/03/find-large-files-and-directories/

Posted under Linux

This post was written by Content Curator on May 25, 2011

Tags: , , , , , , , , ,

How To Install Picasa on Ubuntu or Debian

Google makes the really neat program Picasa 3 for managing and editing photo/image collections. Since Microsoft Windows it a travesty and I therefore use Linux as much as possible, I was in need of a better and more stable photo management software to replace the buggy unstable F-Spot program. To my glee I found that Google releases a Debian version suitable for using under Ubuntu’s flavor of Debian Linux. I love you Google. Anyway, it was still a 2-step process, which would frighten most Windows users, but this bit of work in the beginning assures that I am using reputable sources for software that can be installed without visiting a website or downloading anything from a web server, as I would have to do if using Windows. Not to mention that by being forced to the wild web in order to download all applications and software just opens up a computer to problems because the user must decide which software makers to trust, not a good situation for casual users who aren’t in touch enough with the current “scene” to be able to make an educated decision about which company’s software is trustworthy and which are not. Alas, I digress…

To install Picasa on Ubuntu:

  1. Create a backup copy of your file: /etc/apt/sources.list
  2. Edit /etc/apt/sources.list using “sudo” and the editor of your choice e.g. vi, vim, gedit.
  3. Add the following line:
    deb http://dl.google.com/linux/deb/ testing non-free
  4. Save the file.
  5. Update apt-get’s repository list using: sudo apt-get update
  6. Try to install Picasa now: sudo apt-get install picasa
  7. If it installs, then Hooray! You’re done! However, if you get an error like the following, then proceed to the next steps:
    W: GPG error: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 1234567890123456
    W: There is no public key available for the following key IDs:  1234567890123456
  8. The long number will be different for you, and you’ll need it for the next step.
  9. Run the following commands, substituting 1234567890123456 with the number from your error messages:
    gpg –keyserver pgpkeys.mit.edu –recv-key  1234567890123456
    gpg -a –export 1234567890123456 | sudo apt-key add –
  10. Assuming that you get success, and you should as long as there’s no typos, try again to install Picasa directly with Ubuntu apt-get:
    sudo apt-get install picasa
  11. Picasa will download and install, you may be required to verify that process before it proceeds, though.

Check put these for a bit more info, and the source of the steps needed for this process:
[Debian] Apt-get : NO_PUBKEY / GPG error
Howto Install Picasa 3.5 in ubuntu

Google makes the really neat program Picasa 3 for managing and editing photo/image collections. Since Microsoft Windows it a travesty and I therefore use Linux as much as possible, I was in need of a better and more stable photo management software to replace the buggy unstable F-Spot program. To by glee I found that Google releases a Debian version suitable for using under Ubuntu’s flavor of Debian *nix. I love you Google. Anyway, it was still a 2-step process, which would frighten most Windows users, but this bit of work in the beginning assures that I am using reputable sources for software that can be installed without visiting a website or downloading anything from a web server, as I would have to do if using Windows. Not to mention that by being forced to the wild web in order to download all applications and software just opens up a computer to problems because the user must decide which software makers to trust, not a good situation for casual users who aren’t in touch enough with the current “scene” to be able to make an educated decision about which company’s software is trustworthy and which are not. Alas, I digress…  To install Picasa on Ubuntu:     1. Create a backup copy of your file: /etc/apt/sources.list    2. Edit /etc/apt/sources.list using “sudo” and the editor of your choice e.g. vi, vim, gedit.    3. Add the following line:       deb http://dl.google.com/linux/deb/ testing non-free    4. Save the file.    5. Update apt-get’s repository list using: sudo apt-get update    6. Try to install Picasa now: sudo apt-get install picasa    7.        If it installs, then Hooray! You’re done! However, if you get an error like the following, then proceed to the next steps:   The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 010908312D230C5F

Posted under Freeware, Graphic, Linux, Software

How to Make a Backup Script for Shell in Linux

For those who hack a lot of Linux at the command line interface, backing up files such as config files before editing is a good habit to have. IMHO anyway. So to save time, a little script can be written, chmod +x, and placed into /usr/local/bin or some other that users have in their executable shell PATH. I name mine “bu” to make it easy, and it takes one command line argument which is the filename of the file you want to make a backup copy of. It is called by running something like $ bu myfile

Here’s the code. Comments welcome ;) The code creates a timecode based on today’s date and the current time to the second, and appends that to the original filename. The a copy is saved with this new “timestamped” backup filename, right in the same directory. Easy-peasy! 

#!/bin/bash
OLDFILENAME=$1
DATECODE=$(date +%Y%m%d)
TIMECODE=$(date +%H%M%S)
NEWFILENAME="${OLDFILENAME}_backup${DATECODE}-$TIMECODE"
cp $OLDFILENAME $NEWFILENAME
SUCCESS=$?
if [ $SUCCESS -eq 0 ];then
 echo "OK! Copied \"$OLDFILENAME\" to \"$NEWFILENAME\""
else
 echo "FAIL! You'll need to try again!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
fi

Posted under Linux

How To Make puTTY Automatically Load a Session

The most awesome emulator of all time, puTTY.exe, just got even easier to use. Along with loggiong automatically into a SSH session add the Windows shortcut that loads a saved session and launches it, now you have one click shell access to your Linux host from your Windows PC.

Here’s how:

  1. Download puTTY.exe
  2. Save it to the folder  C:\puTTY\
  3. Open a Windows Explorer window in C:\puTTY\
  4. Run puTTY.exe once, and create a “saved session”, making note of what you name it. My example below uses the name my neatly named Saved Session
  5. Right-click-drag puTTY.exe and drop it next to itself, this creates a shortcut to the .exe file.
  6. Right-click the shortcut you just created, on the popup menu click Properties.
  7. In the Target box, add -load “your-saved-session-name” after C:\putty\putty.exe
  8. The final content in the target box should look like:
    C:\putty\putty.exe -load "my neatly named Saved Session"
  9. Save the shortcut. Viola! Move or copy this shortcut anywhere you like (e.g. your Desktop, your QuickLaunch toolbar, your custom explorer toolbar, etc.) and you have 1-click access to a command prompt on your Linux / Unix host.

Enjoy!

Posted under Apple, Freeware, Linux, Microsoft, Network, Software, WebDev, ZyXel

This post was written by Content Curator on December 5, 2009

Tags: , , , , , , , , ,

Use puTTY to automatically login a SSH session

Many thanks to Jon Lee at jonlee.ca for this excellent procedure allowing for the automtic login of a session using SSH and puTTY.exe terminal emulator. You da man!

——————————-

From his site:

As many web developers can attest to, logging into your server through SSH (Secure Shell) is one of the more common day-to-day tasks (you can even use it as a secure tunnel for your traffic). It only makes sense to automate this process which in turn can save many many keystrokes.

This how-to is written with PuTTY and Windows in mind and requires several other tools that are available from PuTTY’s website. So from their download page, make sure you have these files:

  • PuTTY (putty.exe)
  • PuTTYgen (puttygen.exe)

Then to automate SSH login, do the following:

  1. Run PuTTYgen.
  2. Select SSH-2 DSA as the Type of Key to generate.
  3. Click generate and move your mouse around to generate randomness.
  4. Click “Save Private Key” and save it somewhere on your computer.
  5. Copy the entire content inside the box to your clipboard (this is your generated public key).
  6. Login to your SSH server.
  7. Create the file ~/.ssh/authorized_keys containing the generated public key (from step 3) on a single line.
  8. Make this file readable (chmod 755).
  9. Then open up PuTTY and navigate to Connection->Data and fill in the auto-login username.
  10. Navigate to Connection->SSH->Auth and under Private-key, browse to the file you had saved earlier on your computer.

That’s it! Now you can try logging in to your SSH server and it should login automatically. If it works, make sure you save your session so you don’t have to repeat these steps every time!

Hopefully these steps work for everyone! Let me know if there are any problems.

——————————-

Had some problems with a CentOS5 server not accepting keys… found that this server was being finicky for some reason, and used this article on how to generate the keys on the Linux server, and then import the public key to the client Windows box. To make it automatically login simply do not enter any passphrase. This is probably a huge security risk or something like that, but if you’re using it on a secured LAN then perhaps it’s ok.

Posted under Linux, Network

This post was written by Content Curator on November 27, 2009

Tags: , , , , , , , , , , , , , , , , , ,

Alternate Time Servers for Automatic Clock Set

In modern Microsoft Windows operating systems and all Unix / Linux systems the system clock time can be set automatically. The computer will connect to a special server on the Internet called a Network Time Protocol server, and get the current universal time, and then adjust it according to the local time zone on the computer. It keeps the computer clock very accurate and corrects drift before it can become much of a problem.

We recommend using a reliable server: pool.ntp.org

A wonderful group of generous folks provide this extremely reliable cluster of computers for us all to use, free of charge. Thank you NTP Pool Project and all the participants!

Posted under Freeware, Linux, WebDev

How To Copy Directories and Subdirectories Recursively With FTP (scp)

When transferring file directory structures between linux / Unix hosts, usinf FTP was what came to mind.  FTP has been used for many transfers in the past, but when forced (read:allowed) to use the command line to transfer files, the MGET and other FTP related commands were useless. So google to the rescue, and up pops this great simple writeup about how to copy host-to-host using the SCP command. Sweetness defined.

In essence:

scp -vr -P 2222 ./* REMOTEUSERNAME@REMOTEHOSTNAME.TLD:/FULL/UNIX/PATH/TO/DESTINATION/FOLDER/(OR/FILENAMES.ABC)

This command will Verbosely and Recirsively do it’s thang. It will contact the remote host on port 2222 instead of the default port 22 used for SSH. The remote username is the unix username, and the remote hostname is the full DNS name or IP address of the remote unix box. The destination path is reltive to the root of the system, NOT relative to the user’s home dirtectory.

Have fun, and leave FTP for transferring single files or batches of files inside a single directory container only.

Posted under Freeware, Linux, Network

How to CHMOD on files but not directories (inodes)

From Linuxquestions.org:

“There are probably several methods, but one is to use find to produce a list of all files (not directories) and then execute chmod on each of them. For example

Code:
find /my/directory -type f -exec chmod 644 '{}' +

Change the red parts to fit your needs. If you wonder what that ‘{}’ is..well, you may have guessed that it’s where the filelist is being put when exec’ing the given command on each file.

You can also first try the command without chmod’ing to see that it affects the right files:

Code:
find /my/directory -type f

The above would find all regular files (not directories, for example) from within /my/directory.

If the command happens to throw you an error about the exec part, chances are it’s because of the plus sign (+) that ends the exec part. In this case try replacing the plus (+) with an escaped semicolon (\;) so it becomes

Code:
find /my/directory -type f -exec chmod 644 '{}' \;

On some machines I remember that it worked with semicolon (which needs a backslash in front of it, to protect it from being interpreted by your shell), but on my current installation it’s the plus sign (without a backslash).

Another way would probably be to list all regular files on the directory (using either find or any tool that can just list all files without directories) and then pipe the output to xargs with which the chmod was run.”

and from http://movabletripe.com/archive/recursively-chmod-directories-only/

June 19th, 2006

find . -type d -exec chmod 755 {} \;

This will recursively search your directory tree (starting at dir ‘dot’) and chmod 755 all directories only.

Similarly, the following will chmod all files only (and ignore the directories):

find . -type f -exec chmod 644 {} \;

Posted under Linux

This post was written by Content Curator on October 17, 2009

Tags: , , , , , , , , , , , , , , , ,

Fedora 9 connect: Network is unreachable error

Ran across this installing Red Hat’s free Linux distribution Fedora Core 9 code named Suplhur. Installed totally vanilla install with the GUI anaconda front end. The box sees the NIC, and can ping within the local subnet of the LAN network, but can’t ping out. BTW, it holds a static IP on the network interface card (NIC). Gets the error:

connect: Network is unreachable error

We need to set a default route. Here’s how:

Looked in /etc/sysconfig/network-scripts for the file route-eth0 but it wasn’t there.

Using vi (you can use whichever text editor you prefer) I created that file route-eth0, and put in this one line:

defult via 192.168.0.1

(note: 192.168.0.1 is the LAN IP address of my router. Your router IP address may differ. So you should put in whatever the IP addres of your router is, instead. Most Netgear routers and Qwest DSL boradband modems use 192.168.0.1 and Linksys uses 192.168.1.1 and Belkin uses 192.168.2.1 just to name some common ones.)

Then a simple task of restarting the network and testing:

# service network restart
# ping yahoo.com

Success!

Also, I found that the ethernet adapters weren’t starting automatically. Using the GUI taskbar/ Start Menu, I went into System Administration, then into Services, and enabled the “network” service. Then change runlevel to 3. Ping works so eth0 is up, and that happened at the runlevel change. Change to runlevel 5, test, and… yeppers, it works.

Posted under Freeware, Linux, Network