Monthly Archives: March 2009

How-To Session: Open Your mind…err System – Changing Your Ubuntu Software Sources

In today’s short post, I will be describing how to change your software sources. Unless prompted to do so, extra software, that may be proprietary and not “free” as in “freedom” or the other widely used term, “Open Source” (which is not the same according to Richard Stallman), is NOT installed by default when you install Ubuntu, you must tell Ubuntu to allow you to use these

Extras: Changing your software sources / repositories:

  1. Go to System > Administration > Software Sources

sources-config1

  • The first screen above is to edit your Software Sources.
    You Can check all boxes you wish to can access to not just all packages, but source code as well
    Keep the Server on “Server for United States or your Country, this can be changed if you wish, but the most amount of software is on your Countries’ Server I believe

sources-config2

  • Above is where you can add 3rd Party PPA’s or Custom Made Repositories

ppa_example

  • Above is an example of a file from the internet that you would import in the “Third-Party Software” tab, in Software Sources
  • What is important here is , is the “deb” and “deb-src” lines. You must add them independently by clicking “+Add” in the “Third-Party Software” tab of Software Sources.
  • NOTE: take special notice of the entry “This repository is signed with…” under the PPA entries. Following this will be a link like , in this example, ” 1024R/85C2A3C7″ , clicking on that link, will bring you to another page, where you click in the link, “85C2A3C7” This next window contains the “key” you will add to the text file I will explain in a second

sources-config3

  • This screen shot above is where you would add your Private Authentication Key from the PPA or Custom Repository. The key is a file that looks like such:

private_key_example

To add this key:

  1. Open up Terminal
  2. Type “sudo nano /path/you/want/to/key” (sudo necessary if you save in a protected area
  3. Paste in the key from the website, like above, that you got the PPA
  4. Save this file
  5. Type “chmod 400 /path/to/file” into Terminal
  6. In the Software Sources window > Authentication tab, click “Import Key” and find the file you just saved.

Thats it for today. I hope you now know how to manipulate your Software Sources efficiently. Thanks for Reading!

Cheers!

_Nano

How-To Session: (Part 1 of Series) How to Install Any Application: Ubuntu

linux-penguin-big_origpreview

I was thinking the other day, isn’t it annoying when you get into a linux distribution, and you have no idea how to install something? This Tutorial aims to do its absolute best in explaining, in as little words as possible, how to install software in Ubuntu. I am most versed in Debian, so this tutorial is aimed at such. Distributions such as Red Hat, BSD, and others will covered in a later tutorial. I will start out by going over compiling from packages and source in general, then going to specific Terminal Installs, and GUI apps such as Synaptics Package Manager in Ubuntu. We are going to assume an imaginary packages called RUN_ME in all examples. Note:All asterisk symbols are merely “bullets”

install_anything42

Pre-Requisites:

  • (RPM) - Alien: "sudo apt-get install alien"
  • Checkinstall: "sudo apt-get install checkinstall

    Installing In Ubuntu : via the Terminal

  • .deb package
  • sudo dpkg -i RUN_ME.deb

  • .rpm
  • install "alien" for your distribution
    "sudo alien -i -.rpm

  • tar.gz
  • tar -xzvf RUN_ME.tar.gz cd RUN_ME
    make
    make
    sudo make install
    make clean
    To uninstall: sudo make uninstall
    To install via the package manager for easy cleanup later , install checkinstall (sudo apt-get checkinstall) and substitute "sudo checkinstall" instead of the normal methods described above
    A video of this In action

  • Script Files: .sh , .package, .bin
  • chmod +x RUN_ME (.sh, .package, .bin)
    ./RUN_ME

  • Run an .exe file (windows executable)
  • Download Wine for you distribution
    cd /directory/to/.exe
    wine RUN_ME.exe

  • Using apt-get
  • sudo apt-get install RUN_ME
    To Search: sudo apt-cache search RUN_ME
    To Remove/Uninstall : sudo apt-get remove --purge RUN_ME

Installing In Ubuntu : via the GUI

  • Manual Package installation can be found above

Using Add/Remove (Applications > Add / Remove)

install_anything12

  1. First, make sure the Pull Down Menu at the top called "Show" is set to "All available Applications"
  2. Reload Page If necessary
  3. All applications are divided into categories
  4. You may also search via the top right search box
  5. Tick or "enable" any box next to a software you wish to install
  • Synaptic Package Manager:
  • install_anything22

    1. What I like to do here is click anywhere in the package field, and start typing a Package Name
    2. After checking a Package, Synaptic will notify you and prompt you to also install any dependencies
      Accept any to install any dependencies
    3. To Upgrade a Package: Tick or Check any installed package (filled in green) and select "upgrade"
    4. To Uninstall: Tick or Check a already installed package, and select either Remove or Remove Completely to also purge the package data.
    5. Hit "Apply" to apply all changes to packages

    Installing a package via double clicking the package in the GUI:
    install_anything31

    This screen, above, occurs when you click an installable package such as .deb files while in a GUI such as your File Manager, Nautilus

    To check if a package is already installed, In Terminal type:
    dpkg -s RUN_ME

    The Wire: Upcoming Post On Richard Stallmans Visit to Lycoming College, Williamsport, PA, UA

    gnu


    Coming up this Wed. (hopefully), is my notes, thoughts, and reactions to Richard Stallmans speech on Copyright and Free Software at Lycoming College in Williamsport, Pennsylvania, located in the United States. It was quite interesting. I have to sift though about 2 hours of audio before I make my post here about it. Sit tight I should have the entry up by Wed. of this week. I have to wait for the audio file from a friend, hopefully that gets here soon!

    Cheers!

    _Nano

    How-To Session: Using the “chmod” command

    electronic_safe

    Today we are going to go over how to use the chmod command via the Terminal.  Before we go any further we are going to go over the basics.  The Terminal is a CLI (command line interface) shell of the bash environment.  The entire Linux operating system you are on, could be run from the Terminal, minus the graphical apps you run.  With that over with, lets move on to the tutorial…

    Let’s do a “long listing” of our home directory:

    terminal11

    As you can see above, we have ALOT of information.  Let’s explain the columns:

    • First Column : permissions (we will go over this in detail, in just a moment, thats what this tutorial is all about!)
    • Second Column: I believe this is the amount of files inside that folder (if its a directory)
    • Third Column: the user who owns the directory or file
    • Fourth Column: the group that that user is in
    • Fifth Column: the size is bytes
    • Six Column: Time Stamp
    • Seventh Column: the file name / folder name

    Let us go over what the first column means, as this is the focus of this tutorial:
    terminal12

    • In the highlighted area above, each “line” (highlighted in yellow), is a grouping of 3 dashes , like so — , — , — .
    • There is an area is for each group , 3 groups  in total— — —
    • The first grouping of dashes represents The User, the second grouping represents, The Group, and the third group represents everyone else or officially, other.
    • The first group, user, may have a “d” to the left of it.  This mean this is a directory, and is NOT tied to any one of the groups, it simply denotes a this entry is a directory.
    • For example, if that first group is other, in other we have 3 dashes right?  well each “place value” in that represents a permission.

    Lets focus on that one entry in yellow for explanation (sorry for the image quality):
    terminal21

    • Since each “grouping” is a set of permissions, we denote each set as either :
    • D is for Directory. If this is at the far left of you permissions (as it is here), it means it is a directory.
    • R is for READ – read on a directory = permission to list contents
    • W is for Write – write on a directory = permission to create/delete/append files
    • X is for Execute – execute on a directory = permission to enter (but not permission to list contents)

    Now lets go over how we assign each of those to any one of the “groups” discussed Earlier

    • The way each one of the “rwx” permissions are applied, is they added via the chmod command.
    • The syntax for chmod is “chmod 700 /folder/file” , where 700 is the 3 “groups” we talked about earlier.
    • The three digits, 700, together, are an octal representation of a Unix file permission system
    • First digit is user, second digit is group, third digit is other
    • Each one of the letters R,W, or X are represented by a binary number (see link for a detailed explanation)
    • Each dash is represented by a power of 2 (i.e. 2^power)
    • For instance, with the user grouping of 3 dashes (above), – – – , the first dash (starting on the left) would be 2^2, which is 4 , followed by 2^1, which is 2, and 2^0, which is 1.
    • x = 1
    • w =2
    • r = 4
    • You would sum all of the binary values you want included (in this case all) to get your number (i.e. in this case “chmod 700”)

    >So how do I get the “7 in “chmod 700 file” you say?

    • The first digit represents the first group” , which is “user” remember?
    • Because we wanted ALL permission (R,W, and X) we added those binary values together to get “7”
    • Since x =1, w=2, and r=4, that’s how we got 7! (1+2+4 = 7)
    • You essentially choose what permissions you want, what group you want, what place they are in , note which power of “2” they are, and add them together.

    Now for some examples:

    The Easy Way: Using chmod without binary:

    • The easy way to use chmod is as follows:
    • “chmod group_code+permission”
    • Where: group_code can be:
    • u: user
    • g: group
    • o: other
    • And: permission can be:
    • Any combination of r,w, or x.
    • r: read
    • w: write
    • x: execute
    • Example: “chmod u+x /folder/file” This command will give execute permissions to the u group, which is the “user” group

    The CLASSIC Way: Using chmod with binary:

    • Let’s say we want to give read permission to the user.  Since read is a binary value of 4 (2^2), the command would be “chmod 400 /path/to/file”
    • Let’s say we want to give write permission to the user.  Since write is a binary value of 2 (2^1), the command would be “chmod 200 /path/to/file”
    • Let’s say we want to give execute permission to the user.  Since execute is a binary value of 1 (2^0), the command would be “chmod 100 /path/to/file”
    • Let’s say we want to give ALL permissions to the user.  Since we SUM the above 3 binary numbers together (7), the command would be “chmod 700 /path/to/file”

    You would use this SAME method to apply permissions to the other groups

    • In the chmod command, each grouping of dashes without ANY permissions would be 0, so essentially each group of “dashes” or each “group” would be represented by a 0
    • For instance, chmod 000″
    • each zero is a group
    • So, to apply the example above to GROUP , that command would be “chmod 070 /path/to/file”
    • Same idea for OTHER, that command would be “chmod 007 /path/to/file/”
    • To apply ALL permissions for EVERY group (NOTE: be careful with this command! Very unsafe to do this , security wise), the command would be “chmod 777 /path/to/file/”

    That’s it!  Hope you enjoyed this tutorial and learned some valuable knowledge 🙂

    Mount It! Part 2: How to mount a local Server Share

    server


    To mount your drive, first make a directory in “/mnt” , by doing “sudo mkdir /mnt/NEW_FOLDER” where new_folder is your folder you decide to name. Make sure you have SMB installed by doing “sudo apt-get install smbfs” To check if you already have it, do “dpkg -s smbfs”. Follow the basic steps of Part I To add the server share to fstab.

    Now, make a credentials file so no one can see you password over the network do :

    • sudo nano /root/.smbcredentials

    If the above new file, put (user and password are of your Server’s User and Password if you have one, which you should) :

    • username=USER
    • password=PASSWORD

    Now set up an easy script to mount that drive, follow the next part carefully

    • sudo nano /usr/local/bin/Mount_Server_Drive
    • then in this file add the following below :
    • mount -t cifs //server_ip/Share_Name /mnt/NEW_FOLDER/ -o credentials=/root/.smbcredentials;
    • also a “server name” can be substituted for “server ip”

    Then you will want to make it executable:

    • chmod +x /usr/local/bin/Mount_Server_Drive

    Now, you should be able to drop back to root:

    • cd /
    • sudo Mount_Server_Drive

    Cheers!

    _Nano

    Mount it! Part 1: How to manually mount your Local Hard Drive:

    how-to-upgrade-your-playstation-3-hard-drive_1

    NOTE:  This is an old article and remains here for posterity.  The updated article can be found at:

    http://wp.me/ptjWO-dB  (short link)

    http://thelinuxcauldron.com/2013/06/20/core-concepts-understanding-fstab-and-seriously-wtf-is-fstab/

    Read the rest of this entry

    The List: Ten Linux Apps That I Can’t Do Without

    pewter_trophy_lrg

    There are many times when I install or try out a new distro and wonder, hmmm what apps do I need first?  Well the basic needs come first right?  If your a programmer you go for the programming apps, multi-media user you go for the video playing or music playing apps.  Keep in mind, most of these apps are made for debian, and the commands I list are for debian/Ubuntu, but they can be obtained for Red Hat / Slack based systems most likely.  These apps are in no particular order.

    Number 1:  VLC

    • Why install proprietary codecs when one open source player can play anything?  VLC is an amazing media player, designed mainly for video, but it can play anything.  I have rarely had an occasion where VLC could not play something.  The App can be installed via Add/Remove , Synaptic Package Manager, or via terminal by typing “sudo apt-get install vlc

    Number 2: Pidgin/GAIM (old school name)

    • While this app is included with most distros, it is one no Linux user can be without.  If one app can handle so many protocols, what else could you need?  Having all your messaging programs combined into one is great, isn’t it?  This program can also be installed via Add/Remove, Synaptic Package manager, and via terminal by typing “sudo apt-get install pidgin”

    Number 3: Mozilla Firefox

    • Also included with most distros, Firefox is an invaluable browser for Linux users.  With its wealth of add-ons and amazing speed, firefox is a must have app.  This program can also be installed via Add/Remove, Synaptic Package manager, and via terminal by typing “sudo apt-get install firefox

    Number 4: Mozilla Thunderbird

    • Let’s face it, evolution is not the favorite among Linux Users.  So,  Thunderbird is typically the Mail Client of choice.  This program can also be installed via Add/Remove, Synaptic Package manager, and via terminal by typing “sudo apt-get install thunderbird

    Number 5: Audacious

    • For windows users, nothing beat Winamp.  It was the king.  When windows converts started using Linux they craved an app that could deliver the same GUI and features their beloved Winamp.  This program can also be installed via Add/Remove, Synaptic Package manager, and via terminal by typing “sudo apt-get install audacious” See my post about the Audacious EQ

    Number 6:   K3B

    • Your disc burning program of choice for Linux may differ from mine, but for all around burning, you can’t beat K3B, its as close as the non-free Nero Linux 3 as you can get.  This program can also be installed via Add/Remove, Synaptic Package manager, and via terminal by typing “sudo apt-get install k3b”

    Number 7: Open Office

    • Currently in its 3.0 release version, Open Office is the must have office application for Linux.  Its closely following cousin Star Office, may not be around much longer as of 2009.  Reading .doc and .docx, it is a fantastic program.  Be sure to install the Microsoft Core Fonts, that include Times New Roman.  This program can also be installed via Add/Remove, Synaptic Package manager, and via terminal by typing “sudo apt-get install openoffice

    Number 8:  Wine

    • It a solid fact, if you want to get a popular Windows app to possibly 🙂 work on Linux, Wine one of the easier, and best best you have.  While its commercial cousin, Crossover Linux, has better application support, Wine is free and open source, not a paid program such as Crossover Linux.  This program can also be installed via Add/Remove, Synaptic Package manager, and via terminal by typing “sudo apt-get install wine”

    Number 9:  gFTP

    • If you need to grab some files off your SFTP server, you can use many apps.  FireFTP via Firefox, Filezilla, or my personal favorite, gFTP.  While somtimes unstable, I have never had a personal problem with the application.  This program can also be installed via Add/Remove, Synaptic Package manager, and via terminal by typing “sudo apt-get install gftp-common && apt-get install gftpgtk

    Number 10: Bittorrent

    • For nostalgic  reasons, many choose to still run the original Bittorent application for their torrenting pleasures, sure Transmission, and lots of other apps work great, but hey, I get a fuzzy feeling when I use my old pal, Bittorent 🙂  This program can also be installed via Add/Remove, Synaptic Package manager, and via terminal by typing “sudo apt-get install bittorrent

    Thats it!

    Cheers!

    _Nano


    Today In Terminal: Love thy CLI , Basic Terminal Commands for New Users

    terminal

    Today I will be going over the basic Terminal commands a new user should know.  In case you are unaware the Terminal can be accessed via Applications > Accessories > Terminal.  Think of the Terminal as a beefed up and much more robust DOS Prompt or Command Prompt.  The Terminal itself is merely an “emulator” of the BASH shell, or bourne again shell.  It is an app that interprets the parameters of the BASH shell.

    The first and most important thing to know is how to navigate your terminal :

    “cd” 

    • cd will change directory.  For example if we wanted to change to the /home/user directory, or the users “home” directory we would type “cd /home/user”. Also, “cd ..” will change directory up one level. 

    “ls” 

    • ls  will list the available files/folders in any directory you are in.  Good to know options for ls are : “ls -a” , which will show all files (including hidden), and ls -la, which combines the best of both worlds and provides a long listing (easier to read) of all available files.

    “pwd”

    • pwd will output the current directory you are in to the Terminal screen.

    “File FILENAME

    • This command will list the details of any file.

    “cat FILENAME” 

    • This will concatenate a file and output to the screen.  For example if I were to “cat /home/user/file.txt” it would output the contents of that file to the screen.

    “less FILENAME

    • Less is a more powerful command than the “More” command which is very similar in nature.  Does sort of the opposite to cat, where instead of outputting to the Terminal screen, outputs to a blank screen.  Press q to quit here.

    “man COMMAND_NAME” 

    • The man command is especially use full if you do not know how to use a particular  command of application.  For instance “man apt-get” in Ubuntu will display all the relative help and details for that command.

    Piping a command with “|”

    • the vertical line (Ctrl + Backspace) will pipe and output.  For instance, “man grep | less”  will pipe the man page of grep to less

    “find”

    • find will search for files.  For instance, “find temp”while in a users /home/user or “home” directory, will search for anything named “temp.”  You can also specify a path if you want to find  in another directory.  For instance, “find /home/user/programs/VMware” will try to find “VMware.”

    “grep”

    • grep will grab the output you specify.   For instance, “find /home/mikeyd/| grep temp”  will search my home directory , and grep any entries that have temp in the path name

    “clear”

    • This command will clear the screen

    Up or Down on Keyboard

    • Pressing up or down on the keyboard will show the previous or , if you went back a few commands, down will show you the next command.

    “cp” 

    •  cp will copy a file or folder.  You may have to put “sudo” in front of the command if that file or folder is protected.  For a file the syntax would be “cp /path/file.txt /home/user” where the file.txt is being copied to “/home/user”, which is a folder.  For Folder copying, the syntax is “cp -Rv /path/folder /home/user” where R option means recursive (all files and folders underneath that directory if you wish), v option for “verbose” (outputs whats its doing for each file copied), and the folder is being copied again to the “/home/user directory”

    “rm” 

    • rm will remove a file or folder COMPLETELY from the system.  If you wish to recover it later, drag that file he trash on your bottom panel (far right).  Syntax is as follows “rm /home/user/temp.txt” for a file or “rm -Rv”  for a folder.  You may have to put sudoinfront of the command .  Be very* cautious while using rm

    mkdir”

    • mkdir will create a directory.  Syntax is “mkdir /home/user/new_directory” where this creates a “new_directory” in the users’s “/home/user” directory.  If you wish to make a folder in the current directory, simple do “mkdir new_directory”  You may need to put sudo  in front of mkdir if it is a protected directory.

    That’s it for today.  Hope these commands help you in you Linux endeavors.  Take it easy at first, while it may be intimidating to use the terminal, it is your best friend 🙂

    Cheers!

    _Nano

    The Wire: Richard Stallman to visit local Lycoming College in Williamsport, Pa

    richardstallman

    This monday, 3/23/09, Richard Stallman will be speaking at Lycoming College in Williamsport Pa!  This is a great chance to meet the founder of the GNU project, where the Free and Open Source movement was started!  Starting the Free Software movement in 1985, Stallman has since been an active and iconic figure in the Linux world.  He is most known for his support of the GNU General Public Liscense, which many developers in the Linux community use to liscense their software.  Also noted, is his creation of Emacs, the GNU Compiler Collection, and the GNU Debugger.  In his current days , Stallman spends his time advocating Free Software, and speaking on its behalf.

    Details for the even are as follows

    • Lycoming Website
    • Event Location: Williamsport, PA
    • Event Time: 7 p.m. EST
    • Event Room: AC Room D-001
    • Event Cost: FREE

    See you all There!

    Cheers!

    _Nano

    Note: For more information on Richard Stallman please see :  Rirchard Stallman (Credit goes to Wikipedia.org)

    How-To Session: Use the Ubuntu USB Startup Disc Creator on 8.04

    usb-memory-stick

    Many times I will get asked “How can I put Ubuntu on a USB drive?”  The simple answer has always been use Unetbootin.  Unetbootin is a simple tool that can take any linux iso (almost) and make a bootable USB version of it.  But what if no matter what you experience issues using pen drive linux or Unetbootin?  Fear not poor soul!  The official “USB startup Disk Creator” that has been on Ubuntu’s Live CD since 8.04 is the key!  Im making this post becuase UNTIL april 23, students who have tried 8.10 know , more than anyone, that 8.10 does not play well with WPA2 Enterprise with PEAP

    The answer of course is to make a 8.04 Live usb with the same tool thats on 8.10!  Its not in Synaptic Package manager you say?  No worries.  Follow these steps…

    1. Download and Burn a copy of Ubuntu 8.04 at low burn speed 🙂 , safety first!
    2. Put that same iso on a usb drive (1 GB or more)
    3. Boot the live 8.04 CD you made
    4. Get the 8.10 USB creator .deb package HERE
    5. Install the deb package
    6. Copy the 8.04 .iso file to the desktop
    7. You can use the same drive, formatted, but recommended is to use another USB drive (again 1GB or more)
    8. Start the USB Startup Disk Creator.  Located in System > Administration > USB Startup Disk Creator
    9. Point the tool to the 8.04 .iso on the desktop
    10. Format the USB if prompted
    11. You’re Done!

    That simple!  This tool should flawlessly make you a 8.04 Live /Installable / persistent USB flash drive.  The persistent part means you can make changes while booted into your new Live Ubuntu USB, and it will retain any changes you made.  This is what happens when you install it with this tool, it will actually say that on the final steps of the process.  Im am not 100 percent sure if this is true for Unetbootin or ALL usb drives in general.

    Enjoy!

    -Nano