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!
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.
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.
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.
Wednesday, January 28, 2015
How to sync files between multiple computers (made simple)
Do you have more than one computer and wish your files could 'magically' travel between them.
Or do you need to share files between co-workers and clients, without having to attach them to emails?
This blog entry explains two simple ways to accomplish this.
This blog post is written with a Linux Mint user in mind, but the concept of syncing files between computers in not limited to just Linux Mint. It is very easy to sync files between two Linux computers, and Windows computers, and Apple, and so forth.
So, your are probably asking 'what is this file syncing stuff, and how can I use it?'.
The 'What is it' answer is
File Syncing can allow you to add, delete, change, rename, or move a file in a special folder on one computer, and that change is also made, automatically, in the corresponding folder in all your computers that access that sync. So if you change a file on your home computer, then your changes will also be saved on your offices computer, and your laptop, and any other computer that shares that sync.
As for the 'how can I use it' part;
let me give you 3 made-up examples. These may give you some ideals as to how file syncing can work for you.
Example 1:
In this make believe example; John is a contract worker for ABC home improvements. He goes to a work site, takes pictures of the project with his cell phone, and takes notes using a pen and paper. Before he leaves the site, he also takes a picture of his notes. Next, he goes to a nearby cafe for lunch, and to use their free WiFi connection. He only has to make the connection to the Internet, the software agent on his cell phone will take care of the rest.
The pictures are automatically copied to folders on both the offices receptionist's PC (running Linux Mint), and to the Big Boss's PC (running Windows) at his house.
The receptionist looks at the picture of John's notes, type them into a LibreOffice document, and save the document back into that same folder.
At the same time, the Big Boss is reviewing the pictures, creates a word document granting his approval and any additional notes, and saves it back into the same folder.
John also has access to all these files, and can add new ones, but is unable to delete or modify any that already exists (security reasons).
The receptionist and Big Boss do have rights to delete and/or modify any documents or pictures.
The software agents on all 3 devices keep track of all the files, and copy them to to the folders on each.
This also has the added benefit of the data being on multiple computers at different locations, in case one should fail to boot, or is stolen, or the building burns to the ground, etc.
In this case, there is a copy of the folder in 'the cloud', that has a one-to-many relationship to both computers, and John's cell phone. Additional computers and cell phones can easily be added to this.
Example 2:
Mary has a small business in which she assist others with writing books. She currently has 7 clients, and a separate folder for each on her hard drive. Each client has a identical folder on their own computer. Mary is using Linux Mint. Some clients use Linux, others use Windows, and one uses a Mac. Any files added, changed, renamed, moved, or deleted in any of these folders, either by Mary or her client, is automatically changed in the other synced folder. The clients can not see the folders of other clients. Each client's folder has a one-to-one relationship with its partner on the other computer. Mary simply has 7 different software agents on her computer, keep track of 7 different one-to-one synced folders.
Example 3:
Mike is a very busy guy, and seldom has an Internet connection. He is a part-time college student, and a small business owner. He uses a Mac at home, carries a Linux Mint net-book to class and work, and sometimes uses his girlfriends Windows computer at her place. But instead of syncing all 3 by an Internet connection, Mike uses a 64 gig USB thumb drive. When he sits down at one of the computers, he inserts the thumb drive, runs a short utility to sync, and then unmount and remove the thumb drive. The thumb drive is synced to a folder called 'MikeSync' on each of the computers. At the end of his 'session' he repeats this procedure. This way, Mike is sure that he has the most recent copy of his files at the start of his session, and has all updated files at the end. He also has the added benefit of having his data at 3 different locations, just in case one should fail to work any more. This has become habit to him, and he seldom even thinks about it. In this example, the thumb drive has a one-to-many manual sync to each of the 3 computers.
There are many different ways to set up a sync like these, but in order to keep things simple, I will only explain two of the more common ways here.
DROPBOX
https://www.dropbox.com/
For the above examples 1 and 2, DROPBOX can do the job. As of the time I'm writing this blog entry, you can get a free DROPBOX account, which can hold 2 gigs of data. You can also get a 1 TB account for $10 a month, or a Business account for about $15 a month. All you need to do is create an account on their web site, and install a software agent on the computers that need to share the files. There are Dropbox agents for Windows, Linux, and Mac.
Your files are saved in a secure location in 'the cloud' and synced to any of your computers when they connect to the Internet. Any files that are added, changed, renamed, moved, or deleted on any of the computers, will be reflected on all the other computers using the account.
To create a dropbox account, go to the above web site, and follow the sing-up link.
You can download the dropbox agent from the Linux Mint repository. Install it the same way you would install any other package using the Software Manger. Just search for 'DROPBOX'. If you are unsure how to do this, this article can help: http://www.linuceum.com/Desktop/installingAppsFromMintSC.php
You will be prompted for your dropbox account information and password. The software agent will create a Dropbox folder in your home folder, this is the folder that will be synced.
For the Windows or Mac versions of the agent, consult the Dropbox website for downloads.
You can have more than one of these agents running on your computer at any one time. This allows you to have one account for your personal use, and one for business. Or as in example 2, one for each of your clients. If your are interested in doing this, here is a very good article explaining how to do this
http://niftylettuce.com/posts/multiple-dropbox-instances/
There are also versions of the dropbox agent for I-Phone and Android. This allows you to take pictures with your cell phone, and when you get a WiFi connection, are uploaded to your dropbox account.
IMPORTANT:
if you have large files, or files that are changed often, and you have limits on Internet bandwidth or maybe a 500 gig monthly limit, dropbox can eat up a lot of your resources. If you exceed your allocated amount of data during a month, some plans charge you extra fees. Uploading and downloading large files can eat up a lot of time and money. Something to thing about.
FreeFileSync
http://sourceforge.net/projects/freefilesync/
This would be an ideal solution for the above example number 3. This utility will allow you to sync a folder on your hard drive to a folder on a USB thumb drive. It will keep also keep track of any deleted and modified files. This would be a manual processes (not automatic like Dropbox) but if you get into a routine habit of doing this procedure at the beginning and end of each 'session' it will do the same job as Dropbox.
This software is free, but any contributions to the project would be much appropriated. It can be downloaded for free at the above website. There are versions of it for Windows, Linux, and Mac. It is fairly easy to setup and use. Documentation (if you need it) can also be found at this website.
This way of syncing files does NOT use the Internet, so it can be used during times you don't have a connection. It also avoids any data usage fees. And it is VERY fast as it will only copy files that have been added, changed, or deleted since the time of the last sync. The amount to data you can sync is limited only by the size of your hard drive and your USB thumb drive. I recommend also getting a second USB thumb drive of the same size as a backup just in case your primary should fail (it does sometimes happens).
So, which one do I myself use?
The answer is.....Both.
I have a free Dropbox account to allow pictures from my phone to automatically wind up on my laptop and net-book. For everything else, I use FreeFileSync and a 64 gig USB thumb drive. I sync between my net-book, laptop, and a desktop workstation. Each system has a folder called SYNC on it, which is the folder synced between systems. Anything I'm working on, I save in that folder.
I carry one USB thumb drive with me. I keep a second in a safe place as a backup copy, which I refresh about once a week.
As I said, there are two of the simpler solutions to sync files between computers, and are the most commonly used. If nether of them truly fit your needs, I suggest that you do a Google search on “file sync software” to find others.
A WORD OF WARNING:
There is something you need to keep in mind if you set up a sync like this.
In Linux, file and folder names are case sensitive. That means that the file names mydata, MyData, and Mydata are all very different files.
However, in Windows, file and folder names are NOT case sensitive. That means that the file names mydata, MyData, and Mydata are refer to the exact same file.
This can a BIG problem if you are syncing between a Linux and Windows systems. So, the best practice is to make sure that all folder and file names, on both our Linux and Windows computers, are NOT case sensitive. That is to say, instead of mydata, MyData, and Mydata you should use file names like MyData1, MyData2, and MyData3.
That's it for this time. Good luck and have fun.
Friday, January 9, 2015
Difference between Cinnamon, Mate, KDE and Xfce - Explained
This particular blog entry is intended
for new users to Linux Mint. But some more experiences users might
find useful info here as well.
When a new user goes to download Linux
Mint for install on their computer (from website
http://www.linuxmint.com/download.php),
they have a choice of 4 desktop environments; Cinnamon, Mate, KDE
and Xfce. Also they have to pick between version with a codecs or
without, and 64-bit vs 32-bit.
Confusing?
What's the difference?
Which one should you pick?
That's what I hope to explain in this
short blog entry.
So, what's the difference between
Cinnamon, Mate, KDE and Xfce?
The difference is that these are 4
different desktop environments. That's to say, they are 4 different
ways that Linux Mint looks on your screen, and behaves.
Think of it this way, if you have 4
different cars that are all the same make and model, but one is red
with a stereo, one is blue and has stick shift, one is yellow and no
AC, and one is black with a sun roof. Each is very different in their
look and features. But under the hood, they are are all the same. The
Linux Mint 'engine' (called the Kernel) are all the same for all
versions of 17.1. It's the appearance on the screen and a few of the
features that are different.
And just as all 4 cars can be driven
down the same road, all 4 desktop environments will run the same
software packages.
Here is a very short rundown of the
differences:
CINNAMON
The Cinnamon desktop environment is the
one I highly recommend for people who are new to Linux Mint. That is
assuming you are installing it on a laptop or workstation that is
less than 8 years old. If your hardware is more than 8 years old, I
suggest you check into the MATE environment (see bellow).
Cinnamon requires less actual memory
(RAM) than Mate, but it does require much more CPU and video
resources. On older hardware, this extra load can result in a very
slow system. Also, some older graphics cards can't handle Cinnamon at
all, and you will get a screen full of junk when you boot up. If that
is the case, I suggest you use another computer to download the Mate
version and install it.
The big advantage of Cinnamon is its
ability to do some animations (like the rotating cube demo), semi
transparent windows like the Terminal, and a very smooth opening and
closing of windows. As far as actual functionality, it does
everything that Mate does.
Most people pick Cinnamon. It just
looks cooler and does everything most people need.
Note: Be sure to read what I have to
say about Mate (bellow) before you pick this one.
MATE
Pronounced like 'Matt-Tay', this
desktop environment is primarily for older hardware which may have
issues with the slick graphics of Cinnamon. As far as actual
functionality, it does everything that Cinnamon does, only not as
pretty. If you are using a laptop or workstation that's older than 8
years old, I would recommend the MATE desktop environment for new
users.
Some people who do have newer hardware
pick Mate just out of personal preference. They prefer the simpler
look and feel of the environment. In such a case, it just comes down
to what you like.
“Isaac's Computer Tips” has a
wonderful YouTube video showing a side by side comparison between
Cinnamon and Mate.
Note: I myself have 3 very older systems,
and Mate is the version that I use on all 3.
MATE OEM
Do NOT install this version. This is a
very small, bare-bones version of MATE. It is intended to be used by
manufactures as a “pre-installed” version of Linux. Basically, it
can run an in-store demo to show off the systems speed and graphics.
It does NOT do much else.
KDE
KDE is a desktop environment is
designed for advanced users. It's more “Windows” like in
appearance than the others environments. The advantage of KDE is that
it gives the user many configuration options and extra widgets not
found in the other environments; allowing the user to customize their
system to their liking. However, many people new to Linux Mint would
probably find it very confusing, and a bit overwhelming. I would not
recommend it for new users. I recommend starting with Cinnamon or
Mate, and then graduating to KDE down the road, if you feel you
really need to.
Xfce
Like Mate, Xfce is primarily for older
hardware which many have issues with the demands of Cinnamon. It is
fast, easy, and simple. It is a very bare-bone, minimalist desktop
environment. It reminds me very much of Linux distros of years past.
However, it does NOT come with several key packages built-in that I
think many new users would expect. I would NOT recommend this for a
system you plan to use for entertainment or business work. However,
if you are looking for a very simple environment to learn about Linux
itself, this one can't be beet. If you are a student and learning
about the Linux OS, go for this one.
Versions of Linux Mint with “No
Codecs”
Basically, a codecs (pronounced like
'Code-Ex') is a software package that allows you to watch moves from
a DVD drive, play music CD-Roms, and watch some videos over the
Internet.
In some cases, businesses are legally
obligated to pay a fee to have this software on their corporate PCs.
If the PC is NOT a corporate PC, don't worry about it.
Most people just download the version
that has the codece.
If you still have questions about this,
I would recommend you read this short White Paper on the subject for
clarification.
32-bit vs. 64-bit
Most versions of Linux Mint come in
both a 32-bit and 64-bit version. This refers to the type of CPU you
have in your computer.
The rule of thumb here is this: almost
all modern day computers are 64-bit, so go with that version. If you
have one of the very rare systems that is 32-bit, it will give you an
error message when you try to install Linux Mint. In that case, use
another computer to download the 32-bit version and use that one.
Now that you have picked the version of
Linux Mint you want and have downloaded it, what to do next?
Go to one of the following websites
depending on which version you have picked. These are the Official
Linux Mint Users Guides for each version. Take some time to read it
over. The first time you install Linux Mint, it might be helpful to
also have this document on another PC or your cell phone in case you
need to refer to it during the processes.
CINNAMON:
MATE:
KDE & Xfce:
There is no offical guide from these
versions at this time. Use the one above for Cinnamon to install
theses.
Good luck, and see ya'll on-line :)
Subscribe to:
Posts (Atom)