Sunday, May 17, 2015

Linux Mint 17.x - Helpfull tips, tricks, and things to know.

Hello everyone

Here is a short list of helpful tips, tricks, and things to know, about Linux Mint 17.x

This blog entry is going to be a simple one. It is written mostly for people who are new to Linux Mint. But more experienced users might find a few gems in it as well. 

These are not in any particular order. 

Also, I'm trying some new ideals for text colors. Hopefully, this will make the text easier to read. Please let me know what you all think.

If you find this info useful, please let me know. Thanks.



A shortcut to open a Terminal Window

To open a Terminal window, while holding down the [Ctrl] and [Alt] keys, tap the letter "T" once.

You can then use this window to enter Linux commands.

To exit gracefully from this window, simply enter this command.
   exit



A shortcut to open your home folder in a file browser window.

To open this window, while holding down the [Alt] key, tap the [F2] key once.
This will open the "Run Application" dialog box.

Next, release the [Alt] key. 

Press the period "." key, and then press the [Enter] key.


Also, on some versions of Linux Mint, you can open your home folder by holding down the [Ctrl] key and tapping the letter "N" once. However, this only works if you are using Natilus as your file browser. And just to make things a bit more complited, on some versions this key combination will open your web browser, not your file browser. So, to keep things simple, I recomend you make a habit of using the first technique (above).



A shortcut to open your root folder in a file browser window.

While holding down the [Alt] key, tap the [F2] key once.
This will open the "Run Application" dialog box.

Next, release the [Alt] key.

Press the slash "/" key, and then press the [Enter] key.

Note: Be sure to use the slash character "/", and not a backslash "\".



A shortcut to open a webpage

While holding down the [Alt] key, tap the [F2] key once.
This will open the "Run Application" dialog box.

Next, release the [Alt] key. 

Enter the webpage URL like this example, and then press the [Enter] key.
    http://www.cnn.com

Note: Be sure to include the "http://" part of the URL. This is what tells Linux that this is a web page and not a file on your hard drive that you wish to open. 

Note: Be sure to use the slash character "/", and not a backslash "\".




How to connect to a public WiFi network

This is how you can connect to a public WiFi network like those found at many coffee houses, public libraries, and fast food restaurants.

In most cases, it is a two step processes to make such a connection.

Step 1:

Look for your Network Connection icon in the lower right corner of your screen. Its the icon that looks like a tinny bar-graph, or like a broken cable for a red 'x' next to it.

Click on this Network Connection icon.
It will show you a list of any near by WiFi networks.

Next, Click on the WiFi network for your current location. If you don't see it, click on the "More networks" option to find it.

Wait for a few minutes for you computer to make the connection.

Step 2:

Next, open your web browser and try to go to any web page. 
You can do this by holding down the [Alt] key, tap the [F2] key once, and entering this command.
   http://www.cnn.com

Chances are you will be re-directed to a web page showing you the rules and restrictions of using this WiFi network, and a "Accept" or "Connect Now" button to accept these rules. 

Click on that "Accept" button.

You are now connected to the WiFi network.




How to find out your current IP address

Note: Your IP address will be a group of 4 numbers, separated by period "." characters. Example: 192.168.1.18  

Note: Each time your computer connects to a network, it will probably be assigned a new IP address. So don't rely on your IP address being the same as it was the last time.

There are 2 good ways to find your current IP address.

Technique 1:

Look for your Network Connection icon in the lower right corner of your screen. Its the icon that looks like a tinny bar-graph. If you see an icon that looks like a broken cable for a red 'x' next to it, it means that you are not current connected to a network.

To find your current IP address, Right click on your Network Connection icon, and then click on "Connection Information". Your current IP address will be near the center of the information that is displayed.

Technique 2:

Open a Terminal Window by holding down the [Ctrl] and [Alt] keys, and tap the letter "T" once.

Enter this command and then press the [Enter] key.
   ifconfig

This will display several blocks of information on your screen. Look for the block labeled "wlan0". Within this block of information, your current IP address will be the one labeled "inet addr". If you don't see such an item, it probably means that you are not connected.



How to find your users name

Open a Terminal Window by holding down the [Ctrl] and [Alt] keys, and tap the letter "T" once.

Enter this command and press the [Enter] key.
    whoami

Your user name will be displayed in response to this command.




How to add an application icon to your desktop

Click on the "Menu" button at the bottom of your screen.

If the options that come up have the title "Favorites" at the top, click the "All Applications" button to the right.

Select the "All" category in the left column, and then scroll down the right column until you find the application you wish to add.

Right click on that application, and then click on "Add to Desktop".

Press your [Esc] key a few times to get back to your desktop.

If you find that some of your new desktop icons have been places on top of each other, right click on an empty area of your desktop, and then click on "Organize desktop by name".




How to install new software packages from the software repository

There are two good ways to do this.

Technique 1:

Click on the "Menu" button at the bottom of your screen.

If the options that come up have the title "Favorites" at the top, click the "All Applications" button to the right.

Select the "Administration" category in the left column, and then scroll down the right column until you find the "Software Manager" application. Click on that Software Manager application.

Enter your password when you are prompted.
It may take a few minutes for the app to start.

If you know the name of the package you wish to install, you can use the search box in the upper right corner to quickly search for it. If you wish to just browse and see what is available, click on any of the category icons and take a look.

When you find a package you wish to install, simply press the "Install" button at the top of the screen.

Technique 2:

While holding down the [Alt] key, tap the [F2] key once. This will open the "Run Application" dialog box.

release the [Alt] key. 
Enter this command, and then press the [Enter] key.
    gksu mintinstall

Enter your password when you are prompted.
It may take a few minutes for the app to start.

If you know the name of the package you wish to install, you can use the search box in the upper right corner to quickly search for it. If you wish to just browse and see what is available, click on any of the category icons and take a look.

When you find a package you wish to install, simply press the "Install" button at the top of the screen.



How to un-delete a file that you accidentally deleted

If you have accidentally deleted a file, there is a short window of time in which you might be able to get it back....maybe.

While holding down the [Alt] key, tap the [F2] key once.
This will open the "Run Application" dialog box.

release the [Alt] key.

Enter a period "." and then press the [Enter] key.
This will open your home folder in a file browser window.

On the left side of this window, you should see an icon labeled "Trash".
Click on that icon.

If you see your deleted file in that Trash folder, you can then left click on it, and click on Restore.




How to take a 'screen shot' and save the image to a file.

There are two ways to do this.

If you want to capture an image of the entire screen and save it to a file, simply press the [PrtScr] key at the top of your keyboard.

If you want to capture an image of only the active window, hold down the [Alt] key and tap the [PrtScr] key.




How to tell if you are running a 32-bit or 64-bit version of Linux.

Open a Terminal Window by holding down the [Ctrl] and [Alt] keys, and tap the letter "T" once.

In this Terminal Window, enter this command:
     uname -m

If the answer you get back is "i686", then you have the 32-bit version installed.

If the answer you get back is "x86_64", then you have the 64-bit version installed.

Important: This will NOT tell you if your computer has a 32-bit or 64-bit processor. A 32-bit version of Linux will run quite happily on a 64-bit processor. It will only tell you if the version of Linux you are running is 32 or 64 bit. To find out what kind of processor your computer has, see "How to create a hardware report" bellow.

Note: There are many third party software packages that have different download files, depending if you are running 32-bit or 64-bit versions of Linux Mint. Two examples are Google Earth, and FireStorm. You can use this command to figure out which one is correct for you.



How to create a hardware report of your computer

Open a Terminal Window by holding down the [Ctrl] and [Alt] keys, and tap the letter "T" once.

If you have not installed lshw yet, you can do so by entering this command into the Terminal Window. You will be prompted for your password.
    sudo apt-get install lshw -y

To display the hardware report on your screen, enter this command into the Terminal Window. It may take a few minutes to run. You can use the scroll bar on the right side of the window to scroll up and down.
    sudo lshw

To write the hardware report to a text file, enter this command into the Terminal Window. You can change the name of the text file if you wish.
    sudo lshw > MyReport.txt




How to reset your time zone settings

Open a Terminal Window by holding down the [Ctrl] and [Alt] keys, and tap the letter "T" once.

Enter this command and press [Enter]. You may be prompted for your password.
     sudo dpkg-reconfigure tzdata

Use your up and down arrow keys to move through the menus. Use your [Enter] key to select the option that best fits your time zone. If you don't see an option that fits your time zone, be sure to scroll all the way down; more options may be further down the menu.

Note: If the clock at the bottom of your screen is showing the wrong time, chances are that your time zone needs to be reset. 



How to view (real time) the processes running on your computer

Open a Terminal Window by holding down the [Ctrl] and [Alt] keys, and tap the letter "T" once.

Enter this command. You may be prompted for your password.
   sudo top

Use your up and down arrow keys to scroll through the list.
The screen will update ever few seconds.

To quit, hold down the [Ctrl] key and tap that letter "c" once.



How to 'kill' a process on your computer

Warning: Killing some processes can cause your computer to crash. Use this technique only if there is no other way to kill a processes.

See the "How to view (real time) the processes running on your computer" above, to find the PID number of the process you wish to kill.

Quit the top command by holding down the [Ctrl] key and tap that letter "c" once.

Enter this command, replacing the words "ProcPid' with the PID number of the processes to be killed.
     sudo kill -9 ProcPid

Example, if the PID of the process you wish to kill is 1234, the command would be:
     sudo kill -9 1234



How to 'download' a YouTube video

Note: You can use this tool to download a YouTube video to your hard drive for latter off-line viewing, or in case the video should be removed for YouTube.

While the video is playing on your screen, left click on it, and then click on "Copy video URL at current time". This will copy the URL to your clipboard.

Open a Terminal Window by holding down the [Ctrl] and [Alt] keys, and tap the letter "T" once.

If you have not already done so, install the youtube-dl package by entering the following command. You may be prompted for your password.
    sudo apt-get install youtube-dl -y

If you wish your video to be downloaded to your Videos folder instead of your home folder, enter this command. The 'V' is uppercase, all other letters are lower case.
    cd Videos

Now, all on one line, type the command   youtube-dl  , a space, a double quote, right click on the window and click on past (past the video URL into the command line), and then end with anotehr double quote. 
The command should look something like this.
   youtube-dl "https://www.youtube.com/watch?feature=player_detailpage&v=g6eWVl4_0_s#t=26"

After you have your command 'built', press the [Enter] key to start the download.




How to give execute permission to Bash and Python files

Open a Terminal Window by holding down the [Ctrl] and [Alt] keys, and tap the letter "T" once.

If the files are in a sub-directory, you will need to use the cd command to change directories. Your command might look something like this.
    cd MyDirectory

Enter the following commands to set the execute permissions. You may be prompted for your password.
    sudo chmod -vR a+x *.sh
    sudo chmod -vR a+x *.py

Note: In order for a Bash or Python script to be executable, they must be granted execute permission. This is what tells Linux that these are not just text files, but are actually scripts that can be run. 




How to search your files for a string of text

Open a Terminal Window by holding down the [Ctrl] and [Alt] keys, and tap the letter "T" once.

Enter the following command, replacing the word MyString, with the string of text you are looking for.
     find . -type f -print0 | xargs -0 grep -l "MyString"

Hint: Rather than type this command in by keyboard, you might want to save this command to a handy text file, so you can quickly copy \ past it into the terminal window whenever you need it.

Example: This will search all my files for the name Harry Lorayne, and show me a list of those files.
     find . -type f -print0 | xargs -0 grep -l "Harry Lorayne"

Example: this will search all my files for any pertaining to auto insurance, and show me a list of those files.
     find . -type f -print0 | xargs -0 grep -l "auto insurance"

Important: The "|" character used in this command is NOT a colon ":". It is the character that looks like two vertical lines stacked on top of each other. It is usually just above the [Enter] key on most keyboards. It's called a 'pipe'. It's function: take the output of the command to the left, and pass it as input to the command on the right. 

Note: This command can take a few minutes to run; be patient if it does not respond right away.





How to scan for a virus

Note: Linux Mint seldom, if ever, has problems with viruses. But if you feel that you really do need to scan for viruses, here is how to do it,

Open a Terminal Window by holding down the [Ctrl] and [Alt] keys, and tap the letter "T" once.

If you have not already done so, install the clamtk virus scanner, by entering this command. You may be prompted for your password.
    sudo apt-get install clamtk -y

Next, download the most recent virus definition file by entering this command. You should do this each time you need to run a scan to ensure you have info about the latest viruses.
    sudo freshclam

To start the clamtk application, enter this command.
    sudo clamtk

Wait for a few minutes while the application starts.
Hold down the [Ctrl] key and tap the letter Z to start the scan.
It may take a few hours to scan the entire system.



How to find information about a Linux command
(Does NOT require an Internet connection)

If you don't already have a Terminal window, open one by holding down the [Ctrl] and [Alt] keys, and tap the letter "T" once.
 
Into this window, enter the word 'man', a space, and then the command you are asking about. Example:    man mkdir

Use your arrow keys to scroll up and down through the documentation.
When you are done, press the letter 'Q' to quit.

Here are a few examples:
    man cd 
    man ls 
    man mkdir
    man kill
    man dir

Note: About the ls command mentioned in the above example: its the lower case letters LS, and not the number one and S.




How to add applications to the "startup" list

There is a list of applications on your computer that start automatically every time your computer boots up. If you wish some other applications to also start automatically, like perhaps thunderbird or firefox, you can add these to the list.

To make changes to the list, click on the "Menu" button at at the bottom of your screen. Then click on "Preferences", and then on "Startup Applications". 

The interface is pretty straight forward.




How to use wget to download files

Wget is one of those old-school Linux commands that is very useful if you know how to use it. It allows you to download files from the Terminal window, or from withing a Bash script. Files can be downloaded to a laptop or a tablet PC for viewing latter when an Internet connection is not available. The commands can be included in a Bash file and run every weekend as part of a regular ToDo list.

Note: Remember that Bash script files have a ".sh" file extension, and need to have execute permission in order to run. See "How to give execute permission to Bash and Python files" above.

The basic syntax of the wget command is either:
   wget FileURL
       or
   wget FileURL -O OutputFileName

Note: If you use the -O option to specify the output file, the "O" has to be uppercase. The lower case "o" option means something else.

Example: Commands to download the most recent King County Metro system maps to a tablet PC for off-line viewing. 
Note that in this example we are NOT using the -O option. We are keeping the same file names as the source.

   wget "http://metro.kingcounty.gov/maps/system/pdf/metro-system-map-northwest.pdf"

   wget "http://metro.kingcounty.gov/maps/system/pdf/metro-system-map-central.pdf"

   wget "http://metro.kingcounty.gov/maps/system/pdf/metro-system-map-southwest.pdf"

   wget "http://metro.kingcounty.gov/maps/system/pdf/metro-system-map-southeast.pdf"

Example: Command to download the schedule for bus 244 to a tabet PC for off-line viewing.

   wget "http://metro.kingcounty.gov/schedules/244/s0.html" -O "ScheduleForBus244.html" 

Example: Command to download the most recent earthquake data for the past 7 days from the US Geological Survey website. 
Use Libre offices to work with this data.

   wget "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_week.csv" -O "EarthQuakeData.csv"

Example: Command to download the most recnet news boradcast from NHK (Engish version from Japan - MP3 format). 
After download, double click on this file from withing your file browser to lessen.

   wget "http://www3.nhk.or.jp/rj/podcast/mp3/english.mp3" -O "NHKNews.mp3"





How to delete a file so that it can NOT be un-deleted

Warning: This technique describes how to use a software tool called 'shred' to securely delete a file so that it's contents can NOT be recovered. There is NO way to get the information back after the file has been 'shredded', so please, use caution.

Note: Shred works by overwriting the data in the file several times with random junk before it's actually deleted. So even if the filespace is successfully recovered, all that will come back is that random junk.

There is nothing that needs to be installed to use shred. It comes built into Linux Mint, ready to go.

If you don't alreay have a Terminal window open, you can open one by holding down the [Ctrl] and [Alt] keys, and tap the letter "T" once.

Enter the following command, replacing the word FileName with the name of the file to be shredded, and then press [Enter].
   shred -uv FileName

Examples:
   shred -uv MyPrivateData.doc
   shred -uv ./Documents/TopSecurity.doc
   shred -uv ./Pictures/NudePicture017.jpg
   shred -uv ./Downloads/BankRecords.csv

For more information about shred, enter this command in to the Terminal window. This will display the documentation.
   man shred



How to use your laptop/webcam as a makeup mirror

Note: Save space in your luggage by leaving your mirror at home; use your laptop/webcam as a makeup mirror. Not really the best utilization of your laptop, but guaranteed to up your 'geek cred' with your friends.

Open a Terminal Window by holding down the [Ctrl] and [Alt] keys, and tap the letter "T" once.

If you have not already done so, install the cheese application, by entering this command. You may be prompted for your password.
    sudo apt-get install cheese -y

To start cheese, enter this command.
    cheese

Your face will then appear on your screen as if it were a mirror.





How to use your laptop as an alarm clock and timer

Open a Terminal Window by holding down the [Ctrl] and [Alt] keys, and tap the letter "T" once.

Install the application by entering this command. You may be prompted for your password.
   sudo apt-get install alarm-clock-applet -y
 
You can start the application by entering this command, or by clicking it's icon until the Accessories menu.
   alarm-clock-applet

The interface is pretty straight forward.

The application runs in the background, so you don't need to keep the window open in order for it to wake you up in the morning. Just make sure to leave your laptop plugged into power, and running beside your bed.




How to have your computer read to you.

Note: Does NOT require a president Internet connection, but quality of the voice is ..... limited. Also, you will probably want to use headphones so as to not disturb people around you.

Open a Terminal Window by holding down the [Ctrl] and [Alt] keys, and tap the letter "T" once.

If you have not already done so, install the espeak application and gui, by entering this command. You may be prompted for your password.
    sudo apt-get install espeak espeak-gui -y

To start, enter this command.
    espeak-gui

Then Copy / Past the text, or ebook, to the text area of the gui, and click the [Play] button. 
Next, sit back with your cup of coffee as your computer reads the text to you.
At first, the 'voice' is difficult to lissen to. It sounds very macanical, and it may be difficult to understand some of the words. But give it a chance and I think you will find that it will improve over time.

Note: Free ebooks as Text files can be downloaded from the "Project Gutenberg" website https://www.gutenberg.org/ . You can them cut/past a few pages at a time into the espeak-gui window and have it read the book to you.




How to install Google Earth

Note: Google Earth is one of those rare packages that you can't simply install from the software repository, but instead needs to be installed from a web page. I believe that this is because of some copyright limitations. You need to agree to the copyright before you can download it.

Since it's such a popular package, I figured it needed it's own entry in this blog post.

Refer to the section above titled "How to tell if you are running a 32-bit or 64-bit version of Linux" to determine if you are running a 32 or 64 bit version. You well need to know this to download the correct files.

Go to this web page
http://www.google.com/earth/download/ge/agree.html

Scroll down to the bottom of the page.

If you are running a 32 bit version of Linux Mint, select the option that reads "32 bit .deb (For Debian/Ubuntu)".

If you are running a 64 bit version of Linux Mint, select the option that reads "64 bit .deb (For Debian/Ubuntu)"

Then, click the button that says "Agree and Download".

When prompted, select the option that says "GDebi Package Installer (default)" and click on the OK button.

If you get a dialog window that says "An older version is available in a software channel", just click the Close button and continue.

When prompted, click on the "Install Package" button in the upper right corner of the window.

Enter your password when prompted.

When the Installation is Finished, just click the Close button.

If you would like to add an icon to your desktop to launch Google Earth, refer to the section above titled "How to add an application icon to your desktop".



That's it for this time.
   So, until next time, good bye, Joe.


Thursday, March 26, 2015

How to Identify your computer in case of theft


Your Laptop has been stolen!!! A week later, you find a laptop on a self at a local pawn shop that you are sure is your. The labels with the serial numbers have been pealed off the bottom, and the hard drive has been wiped clean.  How can you prove that this is your laptop?

Stickers on the bottom of your computer can be removed, any identification scratched into the case can be scratches out, and the hard drive can be wiped clean.

However: there is information in your computer that was put there at the time of manufacturing, that can NEVER be changed. Such as the motherboard serial number, hard drive serial number, and the MAC address to name a few. This blog post will describe how to easily record all this information, and then how to latter check that laptop at the pawn show to prove if it is, or is not, the same system. 

This technique I will describe here will work on Linux, Windows, and Mac computers. On netbooks, laptops, desktops, and servers as well. If fact, it will work on just about any system built after about 2008 that can be booted off of a USB drive (which is just about EVERY PC out there these days).


Step 1: Create a Linux Mint persistent live USB

In a previous blog post, I described How to create a Linux Mint persistent live USB (http://linuxmintexplained.blogspot.com/2015/03/how-to-create-linux-mint-persistent.html).  You will need one of these. So the first step, if you don't already have one, is to refer to this link (previous blog post) and create one. These come in really handy, and I recommend creating more than just one of them.


Step 2: Installing lshw

How boot your computer (any computer) using the USB created in step one, and connect to the Internet. Instructions on how to do this is also included in the previous blog post (link shown above).

Once you have your computer booted into Linux Mint, hold down the [ctrl] and [alt] keys. While holding them down, tap the letter 't'. This will open a terminal window. Enter the following commands, one at a time, into that terminal window. Be sure to enter them in all lower case letters.

sudo apt-get update
sudo apt-get install lshw -y



Step 3: How to use lshw

Now, in that same terminal window, enter this command. It may take a few minutes to run. The information it will display will scroll off the top of the window; you can use the scroll bar on the right to move up and down to view it.

sudo lshw

You will notices that there is all kinds of useful information in this report, not just serial numbers.

Now, to capture all this information into a text file, say for example a file called “MarysComputer.txt”, use the following command.

sudo lshw > MarysComputer.txt

This command will create a text file in your home folder on your USB stick called “MarysComputer.txt”. It will NOT be saved onto the hard drive of the computer your working on. You can of course change the file name to whatever you would like. You can then use a text editor (like gedit, pluma or even Microsoft Word) to view the information.

You can copy this file to another location, or email it to yourself for safe keeping.

Also, since it's being saved on the USB stick, when you shut down the computer and take the stick with you, the file goes with you as well.

The information in this file can latter be used to identify this computer if it should ever be necessary. Just use your Linux Mint persistent live USB to boot the computer into Linux Mint, and run the 'sudo lshw' command again. Then compare the results against the info in the text file.

That's really all there is to it.

Until next time, happing computing  :)



Wednesday, March 18, 2015

How to create a Linux Mint persistent live USB





So..What exactly is a Linux Mint persistent live USB?

A Linux Mint Protestant Live USB drive is a USB memory stick with the Linux Mint Operating system installed, and is BOOTABLE. Which means, you can plug the memory stick into an open USB port, power up the PC or Laptop, and boot into Linux Mint off of the stick. You can use the copy of Libra Offices on the stick to edit documents, or FireFox to surf the web (provided you have an Internet connection of course). There is also a few gigs of free space on the USB to save your work.
You can also install Linux Mint onto the PCs hard drive from the USB if you wish.

When you are done using the computer, you simply halt the system, remove your USB, and restart. The PC will then boot off the hard drive again and go back to being a Linux, or Windows, or Mac machine.


There are a few very good reasons why someone would want to do this:

1. You can create such a USB for someone new to Linux, to try it without having to install it on their hard drive. If they find that they like it, they can use the USB to install Linux Mint on their hard drive.

2. You can carry your 'system' and any project files you are working on in your pocket. You simply need to find an available PC, boot off the USB, and all your 'stuff' is ready to go.

3. You can use this USB to boot a system that has crashed and won't boot on it's own. Then, copy (Recover) the files off of the failed systems hard drive. If you have the right packages installed on your USB, you can also (in most cases) repair the software on the failed PC and get it working again. Note: One of the future blog entries I'm working on is how to create a “Disaster Recovery USB” with all kinds of tools and tricks for recovering deleted files, 'fixing' and sick computer. Stay tuned to my blog list for updates soon.

4. Its just kind of geeky cool to have a few of these around to show your friends and co-workers. They will think your some kind of IT ninja; the person to call for help for their computer issues.


What is needed to create a Linux Mint persistent live USB?

1. You will need a PC or Laptop running Linux with an Internet connection. After the USB has been created, you will be able to use it without that Internet connection.

2. You will need a good quality USB memory stick, at least 16 gigs in size. You should buy a high quality one; the faster the better. Also, the larger the better; you will want extra space to save any documents or other files you might want to keep on your USB.

3. A pen and paper to take notes.

4. You will need about an hour of time to do this.


WARNING...WARNING...WARNING...WARNING...
This process will erase ALL the data on the USB stick.
Be sure to back it up, or better, use a brand new USB stick for this process.


Step 1 – Download the ISO image.

To start, you will need to download an ISO image of Linux Mint. 
I suggest the Mate 32 bit version since it runs easily on almost every computer. 

To download it, go to the Linux Mint download site (http://www.linuxmint.com/download.php) and select the Mate 32 bit version of Linux Mint.

Don't select the version that says “No Codex”.

You will then be asked from which of the 'Primary download mirrors' you want to download from. Try to select a site nearest to your physical location as it will be the fastest.

Depending on the speed of your connection, it should take about 20 minutes to download.

It will most likely save the file to your 'Downloads' folder. The file name will be something like “linuxmint-17.1-mate-32bit.iso” depending what what the current version of the package is.




Step 2 – Install a few additional packages needed to create the USB.

Open a terminal window by holding down the [Alt] and [Ctrl] keys on your keyboard, and tapping the letter 't'.

Enter or cut/past the following commands, one at a time. You will be prompted for your password.

    sudo apt-get update
    sudo apt-get install unetbootin -y
    sudo apt-get install gparted -y



Note: At this point, all the prep work is done. You can now follow Step 3 and down, to create as many of these USB devices you wish.


Step 3 – Create the partitions

Now plug your USB stick into any open USB port, wait a few minutes for it to mount, and enter this command into your terminal window. This should open the Gparted window.

    sudo gparted

VERY IMPORTANT: In the upper right corner of the Gparted window, change the device from your hard drive (/dev/sda) to your USB stick (probably /dev/sdb). If you don't do this, changes you make here will affect your hard drive instead of your USB. You will know you have the right device if it shows that the size is just less than 16 gigs, or whatever size your USB stick is.



Now, right click on the existing FAT32 partition, and select Unmount.



Then, right click again on the existing FAT32 partition, and select Delete.


Now, to create the static FAT32 partition where we will be installing Linux Mint.

Right click on the “unallocated” partition, and select New.
Change the size of the new partition to 1500 Megs,
Change the File system to FAT32,
Leave all the other fields at their default values,
and click the Add button at the bottom of the window.



Now to create the persistent partition where we will be able to save stuff.

Right click again on the “unallocated” partition, and select New.
This time change the file system type to ext2
and set the Label to casper-rw (all lower case letters)
Leave all the other fields at their default values,
and click the Add button at the bottom of the window.




Now hold down the [Ctrl] key on your keyboard and tap the [Enter] key. This is the keyboard shortcut to apply the changes.

Click on the “Apply” button to apply the changes.

This will take a few minutes to complete.
When it's completed, just click on the “close” bottom to get back to the gparted window.



Now to tell it that the FAT32 partition is bootable.
Right click on that first FAT32 partition, and select “Manage Flags”.
Click on the box next to “boot” so that it's has an “x” in it,
then click on the “close” button.

Your screen should now look something like this. The size of the ext2 partition may be different depending on the size of your USB stick. In this example, I'm using a 16 gig USB. Remember, you want a high quality and fast USB, with lots of space to store stuff.



Now, exit from gparted. We are done with it for now.

Remove the USB from the USB port. Wait abut 15 seconds.
Put the USB back into the USB port. Wait another 15 seconds.
This will open two new File Manager windows. Don't close them as we will be using them very soon. Just minimize them to get them out of the way for now.


Step 4 – Installing the Linux Mint ISO

In your terminal window, enter the following command. This will bring up the Unetbootin window.

    sudo unetbootin

Click on the radio button next to “Diskimage”.
Click on the “...” button to the right, select your “Downloads” folder, and then the linuxmint-17.1-mate-32bit.iso file that you download in step 1.
In the field for “Space used to preserve files”, change this to 100.
Leave all the other fields at their default values.

Your window should now look like this.



Click on the “OK” button.

When you are asked if you want to “Reboot Now” or “Exit”, select “Exit”. We still have a steps before we are ready for the reboot.

Now, go back to that File Manager window that opened when we plugged the USB stick back it. That's the one showing the 1.6 gig partition.

Right click on the 'casper-rw' file and Delete it. This will force Linux to use the casper-rw partition instead of this file to save stuff.


Now, close all your windows, and shut down your PC.
You will want to shut your PC all the way down and powered off.

It's time to boot from the USB for the first time.


Step 5 – Booting from the USB for the first time.
Please read all the instructions for Step 5 BEFORE you begin.

Now is the time to boot from the USB for the first time.

Make sure that your bootable Live USB is in one of the USB ports.
Restart your PC by pressing the power button.

As it's booting up, you should see a quick message flash at the bottom of your screen saying something like “Press F2 for Setup, F12 for boot menu”. You want to get to that “Boot Menu”. On most PCs, it's going to be the F12 key, but on some models, it could be the [Del] or [Esc] key.

On a Mac, you need to press and hold down the “option” key while it's powering up.

On some very old PCs, there is no boot menu. You will need to go into Setup and change the “Boot Order” so that the PC will try to boot from anything in the USB port before trying to boot from the hard drive. You should see the instructions on how to do this at the bottom of your Setup screen.

If the F12 key is not working for you, and you don't see that message saying what key to press, then you might want to check out this web site. It has a table listing the most common computer models and what key will get you to the boot menu.


When you get to the Boot Menu, use your up and down arrow keys to select the option to boot from the USB device, and then press Enter.




Next comes the UNetbootin menu.
Use your up and down arrow keys to select the
“Start Linux Mint 17.1 MATE 32-bit (compatibility mode)”
option, and press Enter.



On some computers, when the USB boots for the first time, it gives an error saying something like
“Could not find the ISO”. A screen shot of such an error is bellow.
If you get this error, just enter the world
exit
in lower case letters, and press Enter. The boot process should then continue.



The first boot up is very slow as there is a lot of house keeping that has to be done. It may take several minutes.
After the first boot, you will find that it will boot much faster.



Step 6 – Final odds and ends.

When you finally get it booted from of the USB, there are just a few last tasks to take care of.

1. Connecting to the Network; Just click on the network icon on the bottom of the screen and select the WiFi or Ethernet connection you use. You should be prompted for any passwords needed. Once this is done, the info will be saved onto the USB so you should not have to do this again. Be sure to open FireFox and test that you are able to get to a website like www.cnn.com

2. Set the time zone; You will see that the clock at the bottom of the screen has the wrong time. This is because the time zone is not set yet. To set your time zone, open a Terminal window by holding down the [Ctrl] and [Alt] keys, and tap the letter 't'. Then enter this command, and answer the questions as they come up. Once the time zone is set, the info will be saved onto the USB so you should not have to do this again.

         sudo dpkg-reconfigure tzdata

3. Label your USB: Also, don't forget to stick a label on your USB so you know what it is (see example photo at the top of my blog entry).



CONGRADULATIONS!
You now have a Linux Mint persistent live USB.



That's all for this time. Bye ya'll.



Saturday, March 7, 2015

The Leap Second of 2015




By Joseph Roten


What the heck is a Leap Second and when?

On Tuesday, June 30, 2015 at 23:59:59 UTC, the IERS - International Earth Rotation and Reference Systems Service (Yes, there really is such a group), will be adding a second to the worlds master atomic clocks. This is needed to bring the clocks back into agreement with astronomical time. Basically, every few years, a second is added or removed so as to keep our clocks, in agreement with the Earth's rotation.

Note: UTC is Coordinated Universal Time. This is the time zone in which the Royal Observatory in Greenwich England is located. For many centuries, it was the clocks at the Royal Observatory that served as the worlds master clocks. Even thought this is no longer the cast, we still use UTC as the default time zone when talking about world time.

Whenever a leap second is added or subtracted from the atomic clocks, the time change is automatically be passed down to the Internet time servers, then to other servers who get their time from those, and on down until it reaches all the workstations, laptops, routers, and cell phones of the world.  This is done by the NTP (Network Time Protocol), which is simply a way for one computer to ask “Hay, time server, what time is it?” out to the Internet. A time server will then reply with the EXACT time, down to a fraction of a second.

The last time a leap second was added was on Saturday, June 30, 2012. This caused a few minor problems, but nothing very serious.
The most noted one was that the booking computers for Qantas Airways choked on the time change and were down for a few hours. Flight attendants were forced to check some passengers in by hand. Which of course wasn’t really a big issue; more like a big hassle for the attendants and passengers,
Some types of GPS receivers with older software started recording the wrong date to their logs. This issue has been resolved with software upgrades. 
And a few popular web sites like Reddit and Mozilla experienced “brief technical problems” which were resolved within a few hours. 


So...What does this have to do with Linux Mint?
      Actually....nothing at all.
            Which is kind of the point you see.
                  Linux Mint is NOT affected by such a change.


Linux Mint (and Linux in general) will handle this event without any issues.
The code that was the source of the “glitches” in 2012 has long since been corrected.
Many in the Linux community, including Linux's creator Linus Torvalds, see this event very much as a tempest in a teacup. Everyone who is familiar with this event are saying that there shouldn't be any issues at all this time.

See “Linux’s Creator Wants Us All to Chill Out About the Leap Second”
at http://www.wired.com/2015/01/torvalds_leapsecond/



History in the making: This might be the last Leap Second event.

There is a chance that this 2015 Leap Second event might be the last one. There has been a debit over the past 15 years to have the Leap Second ideal abolished entirely, and just allow the worlds clocks be a second or two out of sync with the Earth's rotation. In the past few years, momentum has been growing towards this. It will most likely be brought up once again this coming November during a conference in Geneva, and this time, the Leap Second ideal might be done away with.

Other than a few specialist like astronomers, GPS technicians, and people involved with the deep space network, there is little piratical need for the world atomic clocks to be 100% in sync with the Earth's astronomical time. A few seconds out of sync with the Earth rotation would not matter to the average person. All that really matters is that all the atomic clocks and Internet Time servers are in agreement about what the current time is.  

If you are interested in reading more about the possible abolishment of the Leap Second, I would suggest the blog entry:
“The Leap Second Is About to Rattle the Internet. But There’s a Plot to Kill It”,
By Robert McMillan
at http://www.wired.com/2015/01/leap-second-rattle-internet-theres-plot-kill/



What time will this Leap Second happen?

This leap second will happen on Tuesday, June 30, 2015 at 23:59:59 UTC.

For the US time zones, this works out to be....

    Easter Standard Time........Tuesday, June 30, 2015 at 7:59:59 PM
           New York City, USA East Coast

    Central Standard Time.........Tuesday, June 30, 2015 at 6:59:59 PM
          Chicago, Dallas     

    Mountain Standard Time.........Tuesday, June 30, 2015 at 5:59:59 PM
           Denver

     Pacific Standard Time........Tuesday, June 30, 2015 at 4:59:59 PM
           Seattle, USA West Coast

To convert the time of this event to another time zone, there is a handy calculator to do so at:
http://www.timeanddate.com/worldclock/converter.html


That's all for this time. Thanks, Joe.

Saturday, February 21, 2015

How to install Apache, PHP, MySQL and Bluefish on Linux Mint.



by Joseph Roten
Saturday, February 21, 2015


Would you like to learn Apache, PHP, or MySQL, but don't want to invest in a web server?
Would you like to learn html?
Would you like a very friendly development environment for creating websites?

If you answered YES to any of these questions, then read on; this blog entry is for you.

In this blog entry, I will be explaining how to install Apache, PHP, and MySQL on your Linux Mint computer (workstation or laptop), how to set it up, and get you started on the road to using it as a website development platform and learning tool.

So, what exactly are Apache, PHP, and MySQL?
Here is a very short, and very simplified answer to the question.

Apache is a software package that allows an Internet server to 'serve up' web pages. When you use your web browser on your computer to access a web site, it is an Apache server some where on the Internet that sends the text and images to your computer.

PHP is a scripting language that runs on top of Apache. It allows you to add 'logic' to your web page. If a web page does anything other than just shows text and pictures, chances are good that it's PHP doing the work.

MySQL is a database package. If you buy something on-line, looks up a street address, sign up as a new user on a website, or so forth, it's most likely that this information is being stored in a MySQL database.

These 3 packages combined, plus Linux, create what is commonly called a LAMP server; Linux, Apache, MySQL, Php. LAMP servers are the heart and sole of the Internet. The vast majority of Internet web sites and services run on such servers.

This blog entry describes how to install Apache, PHP, and MySQL on your Linux Mint laptop/workstation. Basically, creating your own private LAMP server. Since it's YOUR server, you are the admin and user, and you can do pretty much what you please with it.

Please note that we are NOT taking anything away from the way your computer works. You will still be able to use it to surf the Internet, do email, write documents, and anything else that you are currently using your computer for. We will simply be adding some really cool abilities to your computer.

This blog entry will also describe how to install a package called Bluefish. For those of you who might not have ever heard if it, Bluefish is a very simply text editor that makes writing html, PHP and Javascript code, very easy. It has some very nice functions that makes developing web pages very simple and fast, and it's very easy to learn.

In order to do the install described in this blog post, you will need a working Internet connection. After everything has been installed and configured, you can then use your LAMP server without having to be connected to the Internet. Since both the Server and Client (web browser) will be running on the same physical hardware, you won't need the Internet connection to use it.

IMPORTANT: You will also need a pen and paper to take notes and record passwords. If you don't have such, this is a good point to stop and get it.


Step 1. Installing the software

To do the install, open a terminal window (click on 'Menu' at the bottom of the screen, then on 'Terminal'), and enter each of these commands one at a time. You will need to wait for each command to complete before entering the next. You will be prompted to create a new password for the MySQL root account, and the PHP Admin account. Be sure to record these on your paper and keep this info in a safe place. This install processes should take you about 10 minutes depending on the speed of your Internet connection.


sudo apt-get update
< enter your system password when prompted >
sudo apt-get install apache2 -y
sudo apt-get install php5 libapache2-mod-php5 -y
sudo /etc/init.d/apache2 restart
sudo apt-get install mysql-server -y
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin -y
sudo /etc/init.d/apache2 restart
sudo apt-get install bluefish -y
sudo chmod -R 777 /var/www
echo "<?php phpinfo(); ?>" > /var/www/html/testphp.php


Step 2. Setting up your MySQL server

IMPORTANT: For safety reasons, you should only use the MySQL root account for creating new databases and users. Never use your root account for daily tasks, it's just too easy to accidentally do something damaging.

So, our next step is to use the MySQL root account to create a new database called 'sandbox', a new user called 'user1', and grant user 'user1' full rights to database 'sandbox'. After this is done, you can then safely use the user1 account to learn and work with MySQL.

Using the same terminal window you used to install the software, enter this command:

mysql -u root -p

Enter your MySQL root password when prompted. This is the password you created when you installed the MySQL server.

You should now see a prompt that looks like this:

MySQL>

If you see this prompt, you are successfully logged into your MySQL server as 'root'.
Now, cut and past this text into your terminal window. Note that MySQL commands always end with a semi-coluon. The 'GRANT ALL' command shown bellow is one long command on several lines. It's not until it sees the ';' that it actually does anything.


CREATE DATABASE sandbox;
USE sandbox;
CREATE USER 'user1'@'localhost' IDENTIFIED BY 'xxx123';
GRANT ALL ON sandbox.* TO 'user1'@'localhost'
    WITH MAX_QUERIES_PER_HOUR 320
    MAX_UPDATES_PER_HOUR 310
    MAX_CONNECTIONS_PER_HOUR 350
    MAX_USER_CONNECTIONS 6;
SET max_error_count = 65530;
FLUSH PRIVILEGES;


Next, you will want to set up the password for the user1 account. Enter this command at the MySQL> prompt, replacing the word 'yourpassword' with the password you want for this account. Be sure to also record this password on your paper so you won't forget it.

SET PASSWORD FOR 'user1'@'localhost' = PASSWORD('yourpassword');

And finally, enter the word 'EXIT' to sign out of the MySQL root account.


Step 3. Testing everything.

We are now ready to test.
Using your web browser on your computer (Chrome, FireFox, Opera, or other) bring up each of these web pages. Note that these pages are ON YOUR OWN HARDDRIVE, and not on the Internet. Your web browser will see your computer as if it was an Internet web host server, by the name of 'localhost'.
Pertly cool!
If you get a 404 error on any of these, something went wrong with the install, and you should try again.



To test the Bluefish editor, enter this command into the terminal window. You should see the contents of the index.html file. To leave Bluefish, just do a file/quit like any other application.

bluefish /var/www/html/index.html


To test MySQL, enter the following commands in the terminal window.

mysql -u user1 -p
< enter your user1 password when prompted >
use sandbox;
status;
exit


Step 4 (optional). Installing Wordpress

If you are a Wordpress user, or would like to learn Wordpress, now would be a good time to install it as well. There is an extremely good article on how to do this at http://community.linuxmint.com/tutorial/view/828.



Step 5. A few things you should know.

You can create new html or PHP documents (web pages) and save them into the folder /var/www/html    Any files saved into this folder will be visible to your web browser as http:\\localhost\filename
For example: If you create a file called /var/www/html/aboutme.html you will be able to see it from your web browser as http:\\localhost\aboutme.html

Your web browser will be able to access files in your /var/www/html folder even if your computer does not have an active Internet connection. So you can use the Bluefish editor to create new html or php documents, any ware, any time, and test them, regardless if you have an Internet connection or not.

The Bluefish editor can be used to create or change html or PHP files. Just remember to save them into the folder /var/www/html so that your browser can see them. It's a fairly simple and straight forward editor, and most users will be able to use it right from the start. But if you feel that you really need to see the documentation, it can be found at: http://bfwiki.tellefsen.net/index.php/Manual_2_ToC

Most Internet web hosting providers (like FatCow, HostGator, and others) have a function in their file manager that will allow you to upload your html and PHP files from your computer to your web account. So after you have your web page looking the way you want it on your computer, you can then move it into 'production' so that the whole world can see it.

You might want to think about creating a new folder in your home folder called something like 'notebook', and downloading any manuals and documentation about web page development to that folder. That way, you can have all your documentation and notes available even if your laptop does not have an Internet connection. A few documents you might want to consider are in the links at the bottom of this blog entry.

IMPORTATN..IMPORTATN..IMPORTATN:
Always remember to make backup copies of ANYTHING you write (including notes, scripts, and web pages), to an external hard drive or USB thumb drive. I suggest you make this a daily 'end of the day' ritual.

Always remember that your hard drive, especially in a laptop that you carry around with you and is subject to bumps and vibrations, could fail AT ANY TIME!!

You should keep your backup external hard drive or USB thumb drive in a safe place, like the top shelf of a closet or behind a book on your book shelf. 

Please DON'T carry your backup device around with you in a backpack. If you feel that you really need to carry your backup device with you, I suggest you have a second, or maybe even a third backup device for that purpose. Thumb drives don't cost that much, and you can NEVER have too many backup copies.



A few words about PHP and Javascript:
Javascript, like PHP, is a scripting language that allows your web pages to do stuff other than just display text and images. A great many web pages use Javascript to display side shows, videos, run user login scripts, games, and a great many others things.

You may have notices that I have not said anything about installing Javascript yet. The reason why is...well...there is nothing that you need to install. The Bluefish editor will allow you to write your scripts, and everything you need to run them is already installed.

A script written in PHP runs (executes) on the the LAMP server, and only passes the output to the client computer. If your security is set up right, the end user CAN'T see your PHP script. So any IDs, passwords, or database scripts inside your PHP are secure (the user can't see them). This makes PHP an excellent language for doing anything for a business, working with money, or working with a user's personal information.

A script written in Javascript is first downloaded from the LAMP server to the client computer, and then runs (executes) on the client computer. A savy computer user will be able to view your Javascript, along with any IDs and passwords you may have in it. This makes Javascript very un-secure as compared to PHP. However, Javascript tends to be much faster than PHP, and has many more capabilities. Javascript is an excellent choice if speed, and NOT security is what you are looking for.

So...which one to use for your website?
BOTH!
There is no reason why a web page can't use a mix of PHP and Javascript. In fact many do just that. So...I would recommend that the student learn, and use, BOTH PHP and Javascript.


Step 6. Where to go from here.

Now that you have a development environment installed and running, it's time to start learning and doing. I recommend the following websites to learn more. I will also be writing additional blog posts on these subjects.

HTML5 Tutorials at W3Schools:

PHP5 Tutorials at W3Schools:

Javascript Tutorial at W3Schools:

Using and configuring the Apache web server (YouTube video):

MySQL Tutorials:

Introduction to Bluefish by Jon Morin:

How To Build a Website: HTML, CSS and HTML Editors, By Michael Rohde

Debian GNU/Linux installation notes for PHP

Interpreted Languages: JavaScript, PHP, Python, Ruby (Sheet One)

The PHP Security Manual

The PHP Security Cheat Sheet



That's it for this time. So long for now, and good luck.
Joe.

Last updated 02/21/2015.