Wednesday, 7 January 2015

How to Get Navigation Directions (Even Offline) Without Buying a GPS


smartphone-gps-navigation-mount-in-car
Dedicated GPS devices are going the way of the dodo, and for good reason. That smartphone or tablet you have can be a capable GPS with turn-by-turn navigation. This works even if you don’t have a data connection.
Find a way to mount your smartphone or tablet in your car and it can even make a capable in-car GPS solution. This is illegal in some jurisdictions, so check your local laws before mounting anything.

If You Have Mobile Data…

Using a smartphone or tablet as a GPS is very easy if you have mobile data. Google Maps, Apple Maps, and even Nokia’s HERE Maps are capable map apps with turn-by-turn navigation directions. If you have data access, these solutions are better than a dedicated GPS device in many ways. You get a more user-friendly interface, up-to-date search results from the web, links to open websites in your browsers, and real-time traffic data. Some services will even route you around bad traffic on the fly.
On Android, use the Google Maps app to search for directions to your destination. Tap the Start navigation button and you’ll be taken to a GPS navigation-style experience with spoken, turn-by-turn directions.
gps-navigation-with-google-maps-on-android
On an iPhone or iPad, you can also install the Google Maps app and use it in a similar way. You can also use the Apple Maps app included with your device. Tap Directions in Apple Maps to get directions to a location, tap the Route option to view the route, and tap Start. Apple Maps will display turn-by-turn directions.
use-apple-maps-for-gps-navigation-on-ipad[4]
Windows Phone users can use Nokia’s HERE Maps to get turn-by-turn directions in a similar way.

Offline Turn-By-Turn Navigation

This all works great if you’re paying for mobile data, but you can use your device as a GPS navigation solution even if you don’t have mobile data access.
Dedicated GPS devices include a GPS receiver and an offline map database they can use to display your location, provide directions, and allow you to search for locations. Your modern smartphone or tablet also has a GPS chip so it can determine its location offline — all you need is an app that will provide offline map data and navigation directions.
Google Maps allows you to download map data and view it offline. To do so, zoom to the area you want to cache in Google Maps and type “OK maps” into the search box. You can then open Google Maps and see where you are on the map — the map will work fine even when you’re offline. Unfortunately, Google Maps doesn’t provide a way to get navigation directions offline. You can search for navigation directions before you leave Wi-Fi and continue using the cached navigation directions to get to your destination, but that’s it.
download-google-maps-for-offline
If you’re looking for a free offline GPS navigation app for Android , try Osmand or Navfree. If you’d like something more full-featured and polished, you may want to buy a paid app like Sygicor one of the many other offline navigation apps in Google Play. Sure, they cost money — but they’re cheaper than buying a dedicated GPS device and having to pay for map updates.
offline-gps-navigation-on-android
On iPhone or iPad, you can use Google Maps to save offline map data in the same way, but it still won’t provide offline navigation. Apple Maps doesn’t provide offline navigation instructions, either. You’ll find a variety of offline navigation apps in the app store, like the paid Sygic and CoPilot GPS.
offline-gps-navigation-on-ipad
On Windows Phone, Nokia’s HERE Maps allows you to cache maps for offline use and even get navigation directions offline.

Note that you can’t use an iPod Touch as an offline GPS device. Apple’s iPod Touch doesn’t include GPS hardware, so it can’t use GPS to figure out where it is.

How to Turn Your Ubuntu Laptop into a Wireless Access Point


image
If you have a single wired Internet connection – say, in a hotel room – you can create an ad-hoc wireless network with Ubuntu and share the Internet connection among multiple devices. Ubuntu includes an easy, graphical setup tool.
Unfortunately, there are some limitations. Some devices may not support ad-hoc wireless networks and Ubuntu can only create wireless hotspots with weak WEP encryption, not strong WPA encryption.

Setup

To get started, click the gear icon on the panel and select System Settings.
image
Select the Network control panel in Ubuntu’s System Settings window. You can also set up a wireless hotspot by clicking the network menu and selecting Edit Network Connections, but that setup process is more complicated.
image
If you want to share an Internet connection wirelessly, you’ll have to connect to it with a wired connection. You can’t share a Wi-Fi network – when you create a Wi-Fi hotspot, you’ll be disconnected from your current wireless network.
image
To create a hotspot, select the Wireless network option and click the Use as Hotspot button at the bottom of the window.
image
You’ll be disconnected from your existing network. You can disable the hotspot later by clicking the Stop Hotspot button in this window or by selecting another wireless network from the network menu on Ubuntu’s panel.
image
After you click Create Hotspot, you’ll see an notification pop up that indicates your laptop’s wireless radio is now being used as an ad-hoc access point. You should be able to connect from other devices using the default network name – “ubuntu” – and the security key displayed in the Network window. However, you can also click the Options button to customize your wireless hotspot.
image
From the wireless tab, you can set a custom name for your wireless network using the SSID field. You can also modify other wireless settings from here. The Connect Automatically check box should allow you to use the hotspot as your default wireless network – when you start your computer, Ubuntu will create the hotspot instead of connecting to an existing wireless network.
image
From the Wireless Security tab, you can change your security key and method. Unfortunately, WPA encryption does not appear to be an option here, so you’ll have to stick with the weaker WEP encryption.
image
The “Shared to other computers” option on the IPv4 Settings tab tells Ubuntu to share your Internet connection with other computers connected to the hotspot.
image
Even if you don’t have a wireless Internet connection available to share, you can network computers together and communicate between them – for example, to share files.

We’ve previously written about turning computers running Windows 7 and Windows 8 into wireless hotspots.

How to Restore Your Ubuntu Linux System to its Previous State


00_lead_image_timeshift
Wouldn’t it be nice to be able to try a new version of Ubuntu while knowing you can return to the previous version if you don’t like it? We’ll show you a tool that allows you to take a snapshot of your system at any time.
TimeShift is a free tool that is similar to the System Restore feature in Windows. It allows you to initially take a snapshot of your system and then to take incremental snapshots at regular intervals. TimeShift protects only system files and settings, not user files such as documents, pictures, and music. You can use a tool like Back In Time to backup your user files.
NOTE: When we say to type something in this article and there are quotes around the text, DO NOT type the quotes, unless we specify otherwise.

sudo apt-add-repository –y ppa:teejee2008/ppa
Recently, we showed you how to back up your applications and PPAs using a tool called Aptik, which is included in the same PPA as TimeShift. First, press Ctrl + Alt + T to open a Terminal window. If you haven’t installed Aptik, type the following two commands (separately) at the prompt, pressing Enter after each command, to add the PPA and update it. For more information, see our article about Aptik.
sudo apt-get update
If you have installed Aptik, you are ready to install TimeShift and do not need to enter the previous commands. Type the following text at the prompt and press Enter.
sudo apt-get install timeshift
Type your password when prompted and press Enter.
01_command_to_install_timeshift
Once the installation is finished, close the Terminal window by typing “exit” at the prompt and pressing Enter or by clicking the “X” button in the upper-left corner of the window.
02_closing_terminal
To open TimeShift, click the “Search” button at the top of the Unity Launcher bar.
03_opening_search
Type “timeshift” in the search box. Results of the search display as you type. When the icon for TimeShift displays, click on it to open the application.
04_starting_timeshift
A dialog box displays asking for your password. Enter your password in the edit box and click “OK.”
05_entering_password
The main TimeShift window displays and the system size is estimated. The “Backup Device” drop-down list allows you to select a different drive or partition to be backed up, if you have more than one.
06_estimating_system_size
The amount of space needed for the snapshot is listed on the bottom status bar. Snapshots are saved on the selected device so be sure you have enough space to store the snapshot. To back up the selected “Backup Device,” click “Backup” on the toolbar.
07_take_a_manual_on_demand_snapshot
While the snapshot is being created, a “Synching files…” message displays in the bottom status bar.
08_synching_files
When the snapshot is finished, it is listed with the date and time and the name and version of the system. The status bar states how much space is free on the system after the snapshot is taken and states when the last snapshot was taken.
09_snapshot_created
Moving the mouse over the “Backup Device” drop-down list shows you the path where the snapshots are saved on the selected device.
10_location_of_snapshots_popup
The “timeshift” directory contains the various snapshots taken using TimeShift, including scheduled snapshots, which we will discuss later in this article.
11_snapshots_directory
The “snapshots” folder contains snapshots taken manually. We recommend that you copy the folder for your snapshot to a USB flash drive, network drive, or a cloud service, such as Dropbox or Google Drive, in case it gets corrupted or deleted.
12_snapshot_folder
You can see what’s in the snapshot by clicking the “Browse” button.
13_clicking_browse
The snapshot directory is opened in a Files Manager window and the directories and files from your system (no user files) are listed.
14_contents_of_snapshot_folder
There are various settings you can customize, such as setting up automatic backups and choosing when older snapshots will be automatically removed. To access the settings, click “Settings” on the toolbar.
15_clicking_settings
The “Schedule” tab allows you to specify times when snapshots will be performed. Click or slide the ON/OFF slider button to turn on the “Scheduled Snapshots”. Select the check boxes in the “Enable” column to specify the time interval for the snapshots.
16_settings_schedule
The “Auto-Remove” tab allows you to automatically remove older snapshots so you don’t run out of space on your hard drive. There is a “Rule” for each type of snapshot. Enter a “Limit” for each type to tell TimeShift to remove snapshots older than the specified limit, including a limit for when free space is less than a certain amount.
17_auto_remove_tab
The “Advanced” tab allows you to exclude specific files, directories, and directory contents from and include specific files and directories in the snapshots.
When you’ve finished customizing the settings, click “Save.”
18_advanced_tab
When you want to restore a snapshot, open TimeShift, select a snapshot and click “Restore.”
NOTE: Depending on the state of your system, you might have to install TimeShift again.
19_clicking_restore
The “Target” tab on the “Restore” dialog box allows you to specify the device to which you will restore the selected snapshot. Moving the mouse over the device in the list reveals more information about the device for restoring the snapshot. Select the “Device for Restoring Snapshot” and the “Device for Bootloader Installation.”
20_selecting_snapshot
Use the “Exclude” tab to select applications for which you want to keep the current settings and not restore the previous settings.
21_exclude_tab_for_restore
The “Advanced” tab allows you to exclude specific files, directories, and directory contents from and include specific files and directories in the restored system.
22_exclude_tab_for_restore
To close TimeShift, click the “X” button in the upper-left corner of the main window.
23_closing_timeshift
TimeShift is a useful tool if you like experimenting with upgrades to your system or if something goes wrong with your system. Just like System Restore in Windows, you can simply restore your system to a previous working state rather than reinstalling your system.

Thursday, 1 January 2015

The Ultimate Guide to Changing Your DNS Server


ethernet-connection
We recently looked at the many reasons you might want to use a third-party DNS server. You can change the DNS server for your entire network on your router or set it individually on a PC or other device.
Switching DNS servers back and forth can be tedious, so we have some tips for speeding it up — perfect if you use Tunlr to occasionally access geoblocked media sites.

On Your Router

If you want to change the DNS server for your entire network, you’ll need to do it on your router. All the devices on your network — PCs, smartphones, tablets, game consoles, and anything else connected to the network — get their DNS server from the router. By default, your router uses your Internet service provider’s DNS servers. Change the DNS server on your router and every other device on your network will use the  DNS server you specify.
To do this, just access your router’s web interface — how you do this will depend on which router you have. If you’re not sure how to do this, you’ll probably want to glance at your router’s manual to see instructions and learn the default password you’ll need.
Once there, you’ll probably find a DNS option on one of the pages. Change this and the setting will affect your entire network. If you’re having trouble finding the option, search your router’s manual or perform a Google search for your model of router and “change DNS.”

Windows – Control Panel

You can also override the automatic DNS server selection and set a custom DNS server on each individual device. On Windows, you can change the DNS server for each network adapter separately — this means that you’ll have to change it for both your Wi-Fi and Ethernet connections if you use both wireless and wired network connections on a laptop.
You can do this from the Network and Sharing Center. View your list of network connections, right-click the one you want to configure, and select Properties. Select the Internet Protocol Version 4 (TCP/IPv4) option in the list, click the Properties button, and enter your desired DNS server addresses. For more details, read this full guide to changing your DNS server with screenshots.
windows-set-custom-dns-server

Windows – Quick Switching

If you’d like to quickly switch between DNS servers, Windows makes this rather difficult. You could do it with the Command Prompt — we’ll cover that below — but average users would rather do it with a graphical application.
If you want to switch between DNS servers regularly — perhaps you use Tunlr as your DNS server occasionally so you can watch Netflix and Hulu outside the USA — we recommend DNS Jumper. It’s a free application that allows you to choose DNS servers from a list and quickly switch to them. You can enter custom DNS servers and even switch DNS servers for all your network adapaters at once. It’s much faster than digging through the Windows networking dialogs.
dns-jumper

Windows – Command Line

If you want to avoid all the clicking and quickly change your DNS server, you can do this with a command in the Command Prompt window. The below command also be integrated into batch files you could use to quickly switch your DNS settings between multiple servers.
To do this, you’ll need an Administrator command prompt window — right-click the Command Prompt shortcut and select Run as Administrator to open it.
The following command sets the connection named “Local Area Connection” to use 8.8.8.8, one of the Google Public DNS servers, as its primary DNS server:
netsh interface ip set dns name=”Local Area Connection” static 8.8.8.8
change-dns-server-from-command-prompt

On Your Smartphone or Tablet

Android and iOS devices allow you to set a custom DNS server, but this will only apply to a single network. In other words, you can change the DNS server for your home network, but you’ll have to change it again each time you connect to a new Wi-Fi network.
To do this on Android, open the Wi-Fi networks list and long-press the one you’re connected to. Tap Modify network and check the Show advanced options box. Set IP settings to Static and you’ll be able to change your DNS server — unfortunately, this also means you can’t use DHCP on the network anymore.
set-custom-dns-server-on-android
If your Android device is rooted, you can install the Set DNS app instead. With Set DNS, you can choose a custom DNS server and the app will automatically set your DNS server every time you connect to a new network — no need for static IPs or manually changing settings.
set-dns-root-app-on-android
The process is similar on iOS. Go into the Wi-Fi Settings screen, tap the arrow next to the network you’re connected to, tap the DNS field, and enter your custom DNS servers.

After you change your DNS server for a Windows PC, you may need to flush your DNS cachewith the following command before your changes will take effect:
ipconfig /flushdns

How does Linux Know That a New Password is Similar to the Old One?

If you have ever received a message that your new password is too similar to your old one, then you may be curious as to how your Linux system ‘knows’ they are too much alike. Today’s SuperUser Q&A post provides a peek behind the ‘magic curtain’ at what is going on for a curious reader.
Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.
The Question
SuperUser reader LeNoob wants to know how a Linux system ‘knows’ that passwords are too similar to each other:
I tried to change a user password on various Linux machines a few times and when the new password was much like the old one, the operating system said that they were too similar.
I have always wondered, how does the operating system know this? I thought passwords were saved as a hash. Does this mean that when the system is able to compare the new password for similarity to the old one that it is actually saved as plain text?
How does a Linux system ‘know’ that passwords are too similar to each other?

The Answer

SuperUser contributor slhck has the answer for us:
Since you need to supply both the old and new passwords when using passwd, they can be easily compared in plain text.
Your password is indeed hashed when it is finally stored, but until that happens, the tool where you are entering your password can just access it directly.
This is a feature of the PAM system which is used in the background of the passwd tool. PAM is used by modern Linux distributions. More specifically, pam_cracklib is a module for PAM that allows it to reject passwords based on similarities and weaknesses.
It is not just passwords which are too similar that can be considered insecure. The source code has various examples of what can be checked, such as whether a password is a palindrome or what the edit distance is between two words. The idea is to make passwords more resistant against dictionary attacks.
See the pam_cracklib manpage for more information.
Make sure to read through the rest of the lively discussion over at SuperUser via the topic thread linked below.

How to Automatically Reboot Your Router the Geeky Way


Verizon FIOS is great — the speeds are incredible, and the price is… well, kinda expensive. The real problem is that the terrible router they give you needs to be rebooted all the time, which is a royal pain considering it’s down in the basement. Plus, I don’t want to get off the couch.
So I contemplated how I could solve this problem using technology. That’s what geeks do, right?
Yeah, I know, I could probably call Verizon and upgrade the router, I’m sure they have a better model now. And sure, you can update the firmware, but that won’t work for my old router since there isn’t an update. Time for an easier solution that ideally involves a cron job. Cron jobs are always a good decision.
After three minutes of research and brainstorming, a solution presented itself: You can enable telnet on the router, setup a script that automatically runs a series of commands using the telnet interface, and then schedule that script with a cron job to run on a regular basis. For me, that meant every morning at 7am, an hour before I wake up, and again at 5:30pm, since I’m always out of the house at that point. Problem solved, and I can use Vim, which also makes me happy.
And of course, you can make a script to run on demand to immediately reboot the router whenever you want.
Note: you can probably do the same thing with a router that isn’t Verizon. You’ll need to check your router administration panel and see how the options work on there.

Connecting to Your Router via Telnet

The first thing you’ll want to do is figure out how to enable telnet on the router. For the Verizon router, that required going into Advanced -> Local Administration and making sure “Using Primary Telnet Port” is enabled. Make sure to click Apply.
At this point you can easily use telnet from the terminal or command prompt to connect to the router. If you’re using Windows, you’ll probably have to enable telnet. To connect, just type this, substituting the IP address for your own router’s IP if necessary (though most are set to use the 192 range)
telnet 192.168.1.1
Once you’re in there, you can usually type the help command to see what the options are. For Verizon FIOS, the option I was looking for was in the system sub-section, and was aptly titled “reboot.” You have to actually type “system reboot” and not just “reboot” though.
Once you type the command at the prompt, you’ll be disconnected, and the router will be rebooted. Easy, yes. But who wants to do all that typing every time?

Scripting Telnet through the Terminal (OS X or Linux or Cygwin on Windows)

We’re going to assume you have access to the bash shell, whether that’s in your normal OS, or if your OS (Windows) doesn’t have bash, you might have to install Cygwin.
It’s surprisingly easy to script a set of command and pipe them into the telnet application. All you need to do is something like this:
(echo commandname;echo anothercommand) | telnet 192.168.1.1
The only problem is the nagging login that you have to get through… it doesn’t show up right away. So if you pipe in an “echo admin” and then “echo password,” it will happen too quickly and won’t be sent to the server. The solution? Use the sleep command!
Adding in a couple of sleep 3 commands, to wait three seconds, solves the problem. First we’ll echo the username and password, and then we’ll echo the reboot command, and each time we’ll wait three seconds between. The final command will reboot the server immediately:
(sleep 3;echo admin;sleep 3;echo mypassword;sleep 3;echo system reboot;sleep 3;) | telnet 192.168.1.1
You can put this into a shell script and run it whenever you want. Or you can add it to your cron like this (on OS X or Linux):
crontab -e
Add this line somewhere:
1 7 * * * (sleep 3;echo admin;sleep 3;echo mypassword;sleep 3;echo system reboot;sleep 3;) | telnet 192.168.1.1
This will reboot your router at 7:01 AM each morning.

Rebooting the Router the Windows Way

If you’re running Windows, it’s a lot more complicated to schedule this automatically, but we can definitely script it out easily enough. First you’re going to need to go into Control Panel, get to the “Turn Windows features on or off” panel (just search for it), and then enable the Telnet Client.
Now you can paste the following into Notepad, but change out the router IP if necessary, and change the mypassword line to be your actual password instead. You may need to edit the script for different commands.
Option explicit
Dim oShell
set oShell= Wscript.CreateObject("WScript.Shell")
oShell.Run "telnet"
WScript.Sleep 3000
oShell.Sendkeys "open 192.168.1.1~"
WScript.Sleep 3000
oShell.Sendkeys "admin~"
WScript.Sleep 3000
oShell.Sendkeys "mypassword~"
WScript.Sleep 3000
oShell.Sendkeys "system reboot~"
WScript.Sleep 3000
oShell.Sendkeys "~"
Wscript.Quit
Save it out as a .vbs extension, and then you can double-click on it any time you want to reboot the router.

Scheduling in Windows with a Scheduled Task

Open up the Task Scheduler and create a new Basic Task, giving it a name and a schedule — daily at a certain time would work. Then use the Start a Program option and browse to the script file that you’ve created.
That’s pretty much all you have to do.
Note: the instructions in this article are specific to Verizon FIOS but you can probably do this with any router. Please let us know in the comments if you get it to work with another router and we’ll update the article to reflect it.