Ubuntu going back to GNOME

For those that haven’t guessed it yet by my other tech based posts I’m a big fan of open source software. My main computer at home runs Linux.

Over the years the flavor of Linux on it has changed from time to time. But it has been SimplyMepis, Debian, Fedora, or Ubuntu mostly. All depending on what I wanted to do at the time. Even the server running this blog is powered by Linux.

I have liked Debian and Debian-based systems more than others. It’s just the feel is better to me and that is one of the great options about Linux. You get to decide.

Currently at home I am running the GNOME community edition of Ubuntu. For a desktop environment I prefer the feel again of GNOME over the multitude of other environments available.

A number of years ago Ubuntu decided to make their own in-house desktop environment called Unity. My systems really didn’t like it and it was a factor that made me try out other flavors of Linux.

But come next year in 2018 Ubuntu is switching back to GNOME as the default desktop environment. And I am ecstatic and thrilled to hear this news. It’s a good move for the company and the users alike.

 

The Lawnmower Man

Technology is coming a long way. A friend of mine has created semi almost autonomous lawn mower. Pretty cool huh. He can mow his lawn from inside his house using his computer.

The basics of the mower is a RaspberryPi, one of those small single board computers that runs Linux.

He has a kickstarter up at https://www.kickstarter.com/projects/lawnmower/almost-autonomous-lawn-mower

Maybe you can see it for yourself!

 

Hosts files are great

If you have a computer, a hosts file is an absolute must. These handy files located where most system type files are kept can be used to prevent unwanted malware, ads, and other sites from attacking your computer.

The folks at https://github.com/StevenBlack/hosts have created a fine database source for maintaining and installing a hosts file for most operating systems. I strongly suggest checking it out.

On Linux, they created a python script for updating the hosts file. I in turn decided to create my own updating script using bash. Mainly as an exorcise in writing it. So here is my hosts file update script for Linux written in the bash shell.

#!/bin/bash
#---------------------------------
# hosts file updating script
# writen by bynw anlarye
# November 2016
#---------------------------------

# function to merge new hosts file into the system
mergehosts ()
{
mv /etc/hosts /etc/hosts.backup.$(date +"%Y%m%d")
mv hosts /etc/hosts
}

# script needs root access
if [[ $EUID -ne 0 ]]; then
echo "This script needs to be ran by root or with sudo"
exit 1
fi

# downloads latest version of main hosts file
while :
do
clear
echo "  Menu Options  "
echo ""
echo "[A] - The master hosts file"
echo "[B] - The master hosts file + gambling sites"
echo "[C] - The master hosts file + porn sites"
echo "[D] - The master hosts file + social media sites"
echo "[E] - The master hosts file + gambling & porn sites"
echo "[F] - The master hosts file + gambling & social media sites"
echo "[G] - The master hosts file + porn & social media sites"
echo "[H] - All hosts file sites"
echo "[X] - Exit Script"
echo ""
read -p "Please choose one of the above options [A-H or X] and press [ENTER]: " whichhosts
case $whichhosts in
a|A) wget -q --no-clobber https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
break ;;
b|B) wget -q --no-clobber https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts
break ;;
c|C) wget -q --no-clobber https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn/hosts
break ;;
d|D) wget -q --no-clobber https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts
break ;;
e|E) wget -q --no-clobber https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts
break ;;
f|F) wget -q --no-clobber https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts
break ;;
g|G) wget -q --no-clobber https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/porn-social/hosts
break ;;
h|H) wget -q --no-clobber https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts
break ;;
x|X) echo
echo "Host file will not be updated"
exit 1 ;;
*) sleep 1
clear
echo "Invalid responce."
echo "Please choose from [A-H or X]"
sleep 1 ;;
esac
done

# adds user defined custom hosts to file
sed -i '/Custom host records are listed here/r myhosts' hosts

# checks for existance of whitelist
if [ -f whitelist ]
then
grep -Fvxf whitelist hosts > hosts.tmp
mv hosts.tmp hosts
mergehosts
else
mergehosts
fi

echo
echo "Hosts file has been updated"
echo

exit 1

 

Linux on Windows

Sometime this summer when a Windows 10 user gets an update. They will find that there is now a Linux Bash shell available to them.

Bash is the most commonly used shell in the *nix world. The majority of scripts are written in it and most *nix users spend a lot of time in Bash.

Microsoft has partnered with Canonical, the maker of the popular Ubuntu Linux distribution, to bring this Bash shell to life in Windows. This is not going to be a VM or other kind of emulator. This is a true Bash application on Windows.

It’s made possible by a new Windows subsystem for Linux. It’s not yet complete of course so somethings are not working but beta testers are out there working on it.

Some folks in the Linux community don’t like the idea at all. While others do like the idea. Many Linux users, administrators, and developers do operate on a Windows computer for their day to day work. This will help them with the administration and development of the Linux servers they hold dear.

I am going to withhold judgement on it until more information comes out on it. But it is very interesting and worth keeping an eye on its progress.

 

3rd Generation Raspberry Pi

Well the folks at the Raspberry Pi Foundation have come out with the 3rd generation Raspberry Pi board. And I am amazed. It has a faster 64bit processor than previous versions. It also now has Bluetooth and wireless built in. And compared to my 1st generation Raspberry Pi board, this one makes me want to get the new version. And I will.

And of course it still runs Linux and even since the 2nd generation Microsoft has gotten into the RPi act and made an RPi Windows 10 version as well for those interested in that. I might go ahead and turn my old RPi into a full time media server and then use the new one to play around with and see what I can do with it.

The sad part is, with the 3rd generation of the Raspberry Pi, they will be hard to obtain at first until production meets the demand. But still at just $35 for the board. It’s the best deal out there for a computer.

Check out the 3rd Generation Raspberry Pi

 

End of Life

Today marks the end of the Life for Windows XP. This venerable OS from Microsoft has been around for a long time. It’s end of life has even been postponed a couple of times in the past. But now the time has come for millions of users who previously resisted the attempts to update their systems must update.

Personally, of all the Windows OS family members. I do like Windows XP myself, it was a workhorse and I would be using it still if I didn’t make the switch to Linux myself a few years back.

Here and now though, millions of computer users will have to change everything, if they upgrade to Windows Vista, 7 or 8. Their old computers and even a number of their old printers and other devices will need to be physically upgraded as well with the switch to any current version of Windows.

Additionally there is the learning curve between Windows XP and the current Windows 8. A huge difference from the familier to the completely different and unfamilier landscape. And the cost will be high with new computers and equipment.

However, there is an alternative. You can keep your hardware. No upgrade required at all, use the same computer and other attached equipment. And go with Linux.

Taking this route, your software becomes free of charge for the majority of it. There is some commercial software for Linux that some may be interested in, but for the most part. It’s all free.

The learning curve isn’t as near as high or difficult to switch from Windows XP to Linux like it is for switching from Windows XP to Windows 8.

Now if you are a diehard Windows Gamer … well then you probably don’t have to worry about this anyway. Because most diehard Windows Gamers have already made the switch to Windows 7 or Windows 8. In order to “keep up” with the latest graphics and other aspects of their games.

So try out Linux today. Free yourself and your computer.

 

Microsoft and the NSA

Yet another reason has surfaced that suggests its best not to use Windows or other Microsoft products. Back in early 2002 a snippet of the Windows code was released that made people question the security of Windows. In this snippet it showed several keys that suggested the NSA had backdoor access to all Windows based machines.

Now there are clear documents and admittion by Microsoft that they have deliverately violated the security and privacy of their users. Microsoft has assisted the NSA in bypassing it’s own security encryption protocols allowing a level of access to our private data that is frightening to say the least.

Microsoft still claims that the NSA and other government agencies do not have direct access to their products and systems however. But who do you trust more?

I personally will continue to trust an operating system that gives me complete access to it’s code base structure. So I and others can read every line if we are so inclined to do so. Pure transperency the way it should be with software. I know my OS doesn’t “phone home” to the government or any agency thereof.

 

WordPress Script

Hi all.

It’s been a busy time this summer so my posts have been very light as of late. But I thought I would go ahead and share with you a bash script for installing WordPress.

#!/bin/bash
#Created by Bynw Analrye
#Copyleft June 2013 AD

clear #clears screen for a fresh start

#Obtain Information for the WP Install
read -p "Linux User Account: " luan
read -p "Installation Path: " installdir
read -r -p "WP URL (mywebsite.com): " wpURL
read -p "MySQL Root Password: " -s msroot
echo ""
read -p "WP MySQL Username: " wpsqlun
read -p "WP MySQL Password: " -s wpsqlpw
echo ""
read -p "WP MySQL Database Name: " wpsqldbn

#Starting Install Proceedures
echo "Setting up the MySQL database"
echo "CREATE DATABASE $wpsqldbn;" | mysql -u root -p$msroot
echo "CREATE USER '$wpsqlun'@'localhost' IDENTIFIED BY '$wpsqlpw';" | mysql -u root -p$msroot
echo "GRANT ALL PRIVILEGES ON $wpsqldbn.* to '$wpsqlun'@'localhost';" | mysql -u root -p$msroot
echo "FLUSH PRIVILEGES;" | mysql -u root -p$msroot
echo "Successfully created $wpsqldbn MySQL database"

#Creating Apache Virtual Host
echo "

ServerName $wpURL

DocumentRoot $installdir

DirectoryIndex index.php
Options -Indexes FollowSymLinks
AllowOverride All

" > /etc/apache2/sites-available/$wpURL

#Creating the Directory, Download, Unpack & Install WordPress
echo "WP installation starting ... "
mkdir -p $installdir
wget -q "http://wordpress.org/latest.tar.gz" | tar --strip=1 -xzf latest.tar.gz -C $installdir
rm latest.tar.gz
echo "WP installation completed."

#Setting Permissions
usermod -a -G $luan www-data
chmod g+w $installdir
chmod -R g+w ${installdir}/wp-content

# Enable the site
a2ensite $wpURL
a2enmod rewrite
service apache2 restart
echo "Your WP site named $wpURL is now active"
echo "Please go to http://$wpURL or it's IP address and finish the installation"
echo "You will need the following information: "
echo "Your WordPress MySQL Database Name is: $wpsqldbn"
echo "Your WordPress MySQL Username is: $wpsqlun"
echo "Your WordPress MySQL Password is: $wpsqlpw"

#EOF