Sunday, 13 April 2014
Firefox Aurora & Chrome Dev for Linux Mint : Preview upcoming features
I have been wanting to have the most up to date browsers for Linux Mint as its great to be able to see the cutting edge features before they are fully deployed.
This post shows how you can quickly setup Firefox Aurora and Chrome Dev builds on Linux Mint (will also work on Ubuntu as well).
Note : you cannot also run the Stable versions of Firefox & Chrome and the same time so they will be replaced.
Firefox Aurora
First update the repository from Mozilla to Aurora :
$ sudo add-apt-repository ppa:ubuntu-mozilla-daily/firefox-aurora
Then update the repositories and install Firefox :
$ sudo apt-get update
$ sudo apt-get install firefox
Restart Firefox and you will now have the Aurora version. The Sotware Manager also recognized the change and updated to Aurora. All the bookmarks, settings etc will be the same as the stable Firefox version.
Chrome Dev Channel
The slight difference with Chrome is that you need to remove the installed package. First go to the Chrome Release Channels and download the Dev Channel unstable build for you OS architecture.
Next remove the current Chrome stable build :
$ sudo dpkg -r google-chrome-stable
Install the downloaded build :
$ sudo dpkg -i google-chrome-unstable_current_amd64.deb
Startup Chrome and enjoy being on the Dev channel builds!
Setup latest NVIDIA Drivers for Ubuntu or Linux Mint
- If you need to install NVIDIA Driver's on either Ubuntu or Linux Mint the following three commands will update your system with the latest available drivers
$ sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
$ sudo apt-get update
$ sudo apt-get install nvidia-current nvidia-settings
$ sudo apt-get update
$ sudo apt-get install nvidia-current nvidia-settings
- Reboot your system and the drivers should be applied
- For more detailed configuration open the 'NVIDIA X Server Settings Applet'
Paint Format : Google Doc's most useful time saving tool
After some searching I found the solution was the Paint format icon :
To be honest I had never really noticed this icon before and had presumed it was related to images. In fact this turns out to be the most useful and underrated Google doc feature.
Example of Paint Format usage
A typical use case is you have a document with lots of text in it but some of the text in various places requires to be different. For example below I would like every line with a command starting # to be 'Courier New' with Font size of 10 :
Its very time consuming (especially in very large documents) to go to each line individually and select 'Courier New' with Font size of 10 each time.
Fast Track Process - Single Change
- Define the first line as you would like e.g. 'Courier New' with Font size of 10
- Press the 'Paint format' icon once and it will be grey
- Use the mouse to highlight the full line you want to be the same
- The line will now automatically change to 'Courier New' with Font size of 10
Fast Track Process - Multiple Changes
- In the above example the change only occurs for one selection.
- In large doc's we need to be able to apply the same format for many lines
- Press the 'Paint format' icon twice and it will be grey
- Every line you now highlight will change to the new format
- Disable by a single click to the 'Paint format' icon
Crop Images easily in Linux using GIMP
Its great to have a quick but powerful tool to be able to crop
images. On Linux GIMP (GNU Image Manipulation Program) is a powerful
tool but potentially not immediately obvious way to crop images. This
post outlines how you can quickly crop your images on Linux Mint or
Ubuntu.
- GIMP should already be installed but you can quickly check from the terminal :
- Browse to the image, right click and select 'Open With -> GIMP Image Editor'
- The picture will open in the main window and a second 'Toolbox' window to the left will also appear (as highlighted below)
- If the Toolbox does not appear from the main GIMP window select 'Windows -> New Toolbox'
- On the Toolbox select the 'Crop Tool' icon as shown below or press 'Shift + C'
- Select the area you want to keep then choose a corner of this box e.g. as shown below with the arrow
- By selecting the corner box this crops the picture
- The default save format is GIMP XCF. To save as another format e.g. jpeg select 'File -> Export' and select the relevant format you want.
Capture Screenshots using terminal or script with Shutter
For screenshots my favorite Linux tool is 'Shutter' which has lots of
features. It can be useful to capture a screenshot using the terminal
or a script. This post details how you can quickly use it on Linux Mint
or Ubuntu.
Syntax
-a : Capture the current active window
-e : Exit after the first capture has been made
-f : Capture the entire screen
-o : Filename to save the screenshot
Note : You can save to jpeg, png, gif and bmp format
$ sleep 5 && shutter -e -f -o FullScreen.png
Some Useful Things
export PATH=/home/<username>/bin:$PATH
Example
export PATH=/home/cwishaw/bin:$PATH
Additional Package details
- To install shutter
- Also useful to install (details at end of post)
- Capture the full screen :
- Capture active window :
Syntax
-a : Capture the current active window
-e : Exit after the first capture has been made
-f : Capture the entire screen
-o : Filename to save the screenshot
Note : You can save to jpeg, png, gif and bmp format
- Using a sleep command with shutter enables you to setup the capture as required :
$ sleep 5 && shutter -e -f -o FullScreen.png
- Then open the file e.g. my workspace
- A simple bash script is
- This example will create a file called 'FullScreen.png' after 5 seconds under the directory '~/Pictures/screenshots/'
Some Useful Things
- You can add the script under the a bin directory in your home folder i.e. mkdir ~/bin/
- Add your bin directory (insert your username for <username>) to your PATH within ~/.bashrc
export PATH=/home/<username>/bin:$PATH
Example
export PATH=/home/cwishaw/bin:$PATH
- Give the file executable privileges
- Using a fast access top down terminal like Guake is great to quickly start scripts with F12
- Further details can be found with 'man shutter'
Additional Package details
- gnome-web-photo: Create snapshot images and print web pages from the command line
- libnet-dbus-glib-perl - extension for the DBus GLib bindings
- libimage-exiftool-perl - Library and program to read and write meta information in multimedia files
- libimage-exif-perl - Perl module to extract EXIF information from image files
Useful Android Network Console Commands
When dealing with network connectivity issues on computers the
quickest and usually most productive troubleshooting tools involve
opening a console and typing a few key but vital commands.
In the same way for Android I have found myself asking why not follow the same tried & tested method. I have found that the same commands exist and are outlined below. With these commands you will soon locate networking issues.
Note : Your device does not required to have root (super user) access as these as standard. You will require a console or network emulator to be installed which can be found free on Google Play.
Netcfg
Ifconfig
What are the DNS servers defined as?
$ getprop net.dns2
Routing Table
$ show ip route
Ping
In the same way for Android I have found myself asking why not follow the same tried & tested method. I have found that the same commands exist and are outlined below. With these commands you will soon locate networking issues.
Note : Your device does not required to have root (super user) access as these as standard. You will require a console or network emulator to be installed which can be found free on Google Play.
Netcfg
- This is really useful to find out what intefaces you have and the current IP's
- I also find this a quick way to get the MAC address instead of having to navigate through the various Settings screens
- The following screen shows an example (I have obfuscated my MAC addresses)
Ifconfig
- This is similar to what you would use on any Linux machine (or ipconfig on Windows)
- The main thing of note is 'ifconfig' on its own or 'ifconfig -a' will not work you need also to specify an interface
- A common example would be for the WiFi interface e.g.
What are the DNS servers defined as?
- If internet access is not working correctly you may have DNS issues
- To check the DNS servers use
$ getprop net.dns2
Routing Table
- Its important for networking issues to be able to view the routing table
$ show ip route
- The following screen shows examples of running the last three commands
Ping
- The simplest yet very powerful tool is available
- First ping the local gatway e.g. 192.168.0.1 then try an IP on the Internet e.g. 8.8.8.8 (Google's Public DNS)
Buying an Android tablet for a non tech savvy relative
When buying a new tablet for ourselves its easy to know what must
have features we want. Having to decide for a relative who is not
technically savvy can be daunting. This guide gives a proven method to
ensure the correct tablet is purchased. Top tip is making a survey for
your relative (sample given at the end)!
1. Do you want to read e books?
Yes
No
Not sure
2. What size screen would you prefer?
7 inch
8 inch
10 inch
Other (please specify)
3. Do you want to use the tablet to take photos?
Yes
No
Not sure
4. Do you want to connect to tv via HDMI?
Yes
No
What is HDMI?
5. Do you want to make VoIP calls on tablet i.e. Skype or Google hangouts
Yes
No
Not sure
6. Will you want to use tablet for sudoku and crossword apps?
Yes
No
Maybe
7. Is device likely to be used outside home?
Yes
No
Maybe
Screen Size
- The main options are either 7, 8 or 10 inch screens
- Considerations
- How do they feel about their current mobile phone size?
- Is a larger screen size a preference?
- Would they use it on a table or prefer to be hand held?
- Does it have to fit into a particular bag size e.g. hand bag?
Weight
- The larger screens inevitably lead to more weight
- Considerations
- Will the tablet be carried a lot e.g. for commuting?
- If the tablet is to be used for reading is the preference to be able to hold the tablet like a book?
Cameras
- Not all tablets have front and rear cameras
- Considerations
- Will the tablet be used for video calls (front camera required)?
- Is there a need for taking good quality photos or apps that require back camera e.g. scanning bar codes for shopping apps?
E-Reader
- One of the main functions of a tablet can be using it as an e-reader e.g. with Kindle or Kobo
- Considerations
- How often will the tablet be used as an e-reader?
- Would the user prefer a large easy to ready screen, or a lighter, smaller tablet?
TV Connectivity
- Connecting the tablet to TV can be great for sharing or playing content. Using an HDMI connection is easiest but there are adaptors available for tablets without HDMI connection e.g. USB and 30 pin to HDMI are available
- Considerations
- Does your current TV have any HDMI connections?
- Are there sufficient available HDMI connections on the TV or will an HDMI splitter be needed?
- Is there a location the tablet can be placed (e.g. a shelf) to connect to the TV?
Video Calls
- One of the most common reason for buying a relative a tablet is for video calling using Skype or Google Hangouts so a forward facing camera would be required
- Considerations
- Is the quality of the video playback and sound good enough for video calls?
- Does a particular application require to be supported e.g. Skype. Worth checking on reviews to see if other tablet owners have successfully used these apps.
3G or WiFi only
- Wifi only is significantly cheaper.
- Considerations
- Do they need 3G? 3G models also tend to weigh slightly more than their wifi only counterparts
GPS
- If the tablet is to be used for maps outside the home GPS may be useful.
- Considerations
- Some GPS on tablets have "Assisted GPS" which relies on a data connection
Clumsy or Careful Owner
- How rugged does this tablet need to be?
- Considerations
- Will it be bumped, dropped or roll around in a bag?
- Models with Gorilla glass are tougher and less likely to be scratched but if you suspect rough treatment a good padded case and screen protectors are a must.
- Cheaper models may not have so good build quality.
- If possible feel them in store for flex and check out some reviews.
App Usage
- What type of app's will your relative be interested in e.g. news, games, YouTube, music.
- Considerations
- Does the OS version matter. Are they familiar with a version of Android already?
- App compatibility with certain versions of Android.
- Certain types of apps may display better on a larger screen and some apps were developed for mobile so look odd on a big screen.
Accessories
- Accessories are important to most tablet owners
- The person receiving the tablet might like to immediately accessory their latest tech gadgets with cases, screen protectors or speakers.
- Considerations
- While you might like to buy the latest model with great features for your own use bear in mind it might not be possible to buy accessories right away for new release models.
- The person receiving the tablet might like to immediately accessory their latest tech gadgets with cases, screen protectors or speakers.
- Does the tablet have USB connections or bluetooth?
- Do they want to use USB accessories or bluetooth keyboards and headphones?
Getting the correct answers...the easy way!
- As there are so may things to consider speaking with a relative it can overwhelm them
- I would recommend taking 15 minutes to create a customized survey for your relative using something like SurveyMonkey which has a free service
- With the survey approach the relative can think about what they really want on their own time & give you all the answers!
Sample Survey
1. Do you want to read e books?
Yes
No
Not sure
2. What size screen would you prefer?
7 inch
8 inch
10 inch
Other (please specify)
3. Do you want to use the tablet to take photos?
Yes
No
Not sure
4. Do you want to connect to tv via HDMI?
Yes
No
What is HDMI?
5. Do you want to make VoIP calls on tablet i.e. Skype or Google hangouts
Yes
No
Not sure
6. Will you want to use tablet for sudoku and crossword apps?
Yes
No
Maybe
7. Is device likely to be used outside home?
Yes
No
Maybe
Root access for Samsung Galaxy I9000 on Linux
This post explains how to root your Samsung Galaxy I9000 on Linux. I
used Linux Mint 14 but the same process would work for Ubuntu.
One of the first hurdles you will fine when trying to root your Android Samsung Galaxy I9000 is that most post's recommed running 'Odin' which is a Windows only application.
For Odin I tried :
1. Using PlayOnLinux and this does not work with the Odin exe file
2. Using a Windows VM running on VirtualBox, running the Odin exe. I did have the VirtualBox extension pack installed and I could see the Samsung Galaxy I9000 within the VM when the phone was connected via USB when it was powered on. But when it was in 'Download' mode Odin could not detect the Phone in the VM.
The Solution I found was using the Linux posrt of Odin called Heimdall andthe process is :
1. From Heimdall GitHub site download the "Heimdall 1.3.1 command line tool - Debian 32 or 64-bit binary .deb file and install
# wget https://github.com/downloads/Benjamin-Dobell/Heimdall/heimdall_1.3.1_amd64.deb
# sudo dpkg -i heimdall_1.3.1_amd64.deb
2. Download the CF-ROOT kernel zip file
3. Unzip the file, then un tar the file so you are left with a zImage file i.e. you need to extract the archive twice
4. Enable USB Debugging on the phone via Settings, -> Applications -> Development -> USB Debugging option -> Select to enable
5. Power off your phone
6. Power on phone in Download mode (press Volume Down + Home Key +Power together. It will show a show a yellow icon saying "Downloading. Do not turn off Target!!!"
7. Connect USB cable from phone to laptop
8. Run command line tool to show its connected :
$ heimdall detect
Device detected
9. Flash image
$ sudo heimdall flash --kernel zImage
[sudo] password for clunky:
Heimdall v1.3.1, Copyright (c) 2010-2011, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au
This software is provided free of charge. Copying and redistribution is
encouraged.
If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Claiming interface...
Attempt failed. Detaching driver...
Claiming interface again...
Setting up interface...
Checking if protocol is initialised...
Protocol is not initialised.
Initialising protocol...
Handshaking with Loke...
Beginning session...
Session begun with device of type: 0
Downloading device's PIT file...
PIT file download sucessful
Uploading KERNEL
100%
KERNEL upload successful
Ending session...
Rebooting device...
Re-attaching kernel driver...
10. Reboot, phone and download a "Root checker" app from Google Play to check everything is correct.
11. You can also review the CWM and SuperUser new applications
One of the first hurdles you will fine when trying to root your Android Samsung Galaxy I9000 is that most post's recommed running 'Odin' which is a Windows only application.
For Odin I tried :
1. Using PlayOnLinux and this does not work with the Odin exe file
2. Using a Windows VM running on VirtualBox, running the Odin exe. I did have the VirtualBox extension pack installed and I could see the Samsung Galaxy I9000 within the VM when the phone was connected via USB when it was powered on. But when it was in 'Download' mode Odin could not detect the Phone in the VM.
The Solution I found was using the Linux posrt of Odin called Heimdall andthe process is :
1. From Heimdall GitHub site download the "Heimdall 1.3.1 command line tool - Debian 32 or 64-bit binary .deb file and install
# wget https://github.com/downloads/Benjamin-Dobell/Heimdall/heimdall_1.3.1_amd64.deb
# sudo dpkg -i heimdall_1.3.1_amd64.deb
2. Download the CF-ROOT kernel zip file
3. Unzip the file, then un tar the file so you are left with a zImage file i.e. you need to extract the archive twice
4. Enable USB Debugging on the phone via Settings, -> Applications -> Development -> USB Debugging option -> Select to enable
5. Power off your phone
6. Power on phone in Download mode (press Volume Down + Home Key +Power together. It will show a show a yellow icon saying "Downloading. Do not turn off Target!!!"
7. Connect USB cable from phone to laptop
8. Run command line tool to show its connected :
$ heimdall detect
Device detected
9. Flash image
$ sudo heimdall flash --kernel zImage
[sudo] password for clunky:
Heimdall v1.3.1, Copyright (c) 2010-2011, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au
This software is provided free of charge. Copying and redistribution is
encouraged.
If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Claiming interface...
Attempt failed. Detaching driver...
Claiming interface again...
Setting up interface...
Checking if protocol is initialised...
Protocol is not initialised.
Initialising protocol...
Handshaking with Loke...
Beginning session...
Session begun with device of type: 0
Downloading device's PIT file...
PIT file download sucessful
Uploading KERNEL
100%
KERNEL upload successful
Ending session...
Rebooting device...
Re-attaching kernel driver...
10. Reboot, phone and download a "Root checker" app from Google Play to check everything is correct.
11. You can also review the CWM and SuperUser new applications
How to configure a VPN on Linux Mint
- Linux Mint (unlike Ubuntu) does not have VPN access installed by default
- The following 'How to' will get your VPN running quickly
- Install the following packages
$ sudo apt-get install -y openvpn openvpn-blacklist network-manager-openvpn network-manager-openvpn-gnome
- Reboot your system
- Open the Network applet
- Click the + button
- Select VPN for interface then click 'Create'
- For 'Choose a VPN Connection Type' select OpenVPN then click 'Create'
- Configure your VPN connection with the details given by your provider
- Typical details required are :
- Connection Name : Label that appears in Network Manager applet
- Gateway : VPN access point
- Authentication : Username, passwords and certificate details
- Once configured test the VPN connection by selecting the 'Connection Name' now listed in the Network Manager applet
Draw arrows in GIMP on Linux
Unlike most photo editing software GIMP does not come with draw arrow support by default. This post shows how to get this feature within GIMP and how to use it on Linux Mint & Ubuntu.
- Close GIMP if its open
- Go to the GIMP Plugin Registry
- Search for 'Draw arrow' + download 'arrow.scm'
- Copy file from "Downloads" directory to the gimp hidden folder in your home directory
Note : Your GIMP version may vary but will be ~/.gimp-<version>/scripts
- Open an image in GIMP and under menu 'Tools -> Arrow' will now appear
- Select 'Colour Tool' and on the bottom of the 'Toolbox' select the colour you would like the arrow to be :
- Select Paths Tool
- Next is a bit tricky (until you do it a few times). Select where the arrow head will be, press mouse once and a small square will appear
- Select where arrow tail will be, press mouse once and a line appears
- Right click on the line and go to 'Tools-> Arrow'
- Modify how the arrow is defined in the options (you can play with this until its what your want)
- Press OK and the arrow will appear :)
Highlight area of image with rectangle in GIMP on Linux
GIMP is a great photo editing tool on Linux Mint + Ubuntu. This post shows how you can quickly highlight an area of any image with rectangle.
- Open GIMP and select the 'Colour Tool' then scroll down to the bottom of the Toolbox and change to the desired colour.
- Choose the 'Rectangle Select Tool'
- Select the area you want to highlight
- Go to the 'Edit -> Stroke Selection'
- Select the type of stroke (Solid color or pattern) and change the width then press OK
- You now will have the image highlighted
Nexus 4 screenshot capture
Its useful to be able to quickly capture a screenshot on your Nexus 4
for many reasons. This post shows how you can quickly capture the phone
screenshot.
- Press both Power + Down Volume buttons at the same time
- The screenshot will appear in the notifications window
- You will have access to the screenshot under 'Gallery -> Screenshot'
Nexus 4 USB Connection Setup on Linux
Setting up USB transfer mode on my Nexus 4 was not as straightforward
as I thought it would be. This post details how you can connect your
Nexus 4 quickly to Linux Mint or Ubuntu. The solution involves using Go-mtpfs a simple FUSE filesystem for mounting Android devices as a MTP device.
$ sudo apt-get update
$ sudo apt-get install -y go-mtpfs
Some Useful Things
export PATH=/home/<username>/bin:$PATH
Example
export PATH=/home/cwishaw/bin:$PATH
$ chmod +x Nexus4DisMountUSB.sh
- Connect your Nexus 4 to your Linux box
- Under the 'Notification's window on the Nexus 4 it will show the USB options which you can select
- Ensure 'Media device (MTP)' is selected
- Disconnect the Nexus 4 USB from the Linux box
- From the terminal
$ sudo apt-get update
$ sudo apt-get install -y go-mtpfs
- This will create a '/media/MyAndroid' directory
- Connect your Nexus 4 vis USB
- Create a simple mount bash script 'Nexus4MountUSB.sh'
- Create a simple dismount bash script 'Nexus4DisMountUSB.sh'
Some Useful Things
- You can add the script under the a bin directory in your home folder i.e. mkdir ~/bin/
- Add your bin directory (insert your username for <username>) to your PATH within ~/.bashrc Syntax
export PATH=/home/<username>/bin:$PATH
Example
export PATH=/home/cwishaw/bin:$PATH
- Give the files executable privileges
$ chmod +x Nexus4DisMountUSB.sh
- Using a fast access top down terminal like Guake is great to quickly start scripts with F12
- FUSE (Filesystem in Userspace) allows non privilaged users to export a virtual filesystem to the Linux kernel
- MTP (Media Transfer Protocol) is used from Ice Cream Sandwich to access the devices storage via USB
- It allows access to the phone from the PC and the device simultaneously which the older USB Mass Storage did not
Disable Network Manager in Linux Mint
It can be useful to disable the network manager in Linux Mint to
manually configure networking within '/etc/network/interfaces' for
testing. A quick method is to:
$ sudo mv /etc/init/network-manager.conf /etc/init/network-manager.conf-disabled
$ sudo mv /etc/xdg/autostart/nm-applet.desktop /etc/xdg/autostart/nm-applet.desktop-disabled
- Move configuration files
$ sudo mv /etc/init/network-manager.conf /etc/init/network-manager.conf-disabled
$ sudo mv /etc/xdg/autostart/nm-applet.desktop /etc/xdg/autostart/nm-applet.desktop-disabled
- Restart Linux Mint
- The networking configuration will be from '/etc/network/interfaces'
Sudo avoid password prompt in Linux Mint
Its a big time saver avoiding entering the password for sudo. To avoid this on Linux Mint :
# sudo visudo
cwishaw ALL=(ALL:ALL) NOPASSWD: ALL
- Open 'visudo'
# sudo visudo
- At the end of the file place (replace 'cwishaw' with your username)
cwishaw ALL=(ALL:ALL) NOPASSWD: ALL
- Press 'Ctrl + x' to save the file
- Open a new Terminal and sudo commands will no longer request a password
Jenkins Continuous Integration server on Raspberry Pi
From a fresh install of Raspbian “wheezy” image running headless (with no desktop) :
$ cat /etc/debian_version
wheezy/sid
$ uname -a
Linux raspberrypi2 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux
arm_freq=800
<- nothing should show as bound
$ sudo apt-get install -y openjdk-6-jre
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.4) (6b27-1.12.4-1+rpi1)
OpenJDK Zero VM (build 20.0-b12, mixed mode)
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN
Note - Initial load of GUI make take a few minutes with high CPU but this is fine once it loads
$ cat /etc/debian_version
wheezy/sid
$ uname -a
Linux raspberrypi2 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux
- Default Pi speed is slow for Jenkins so we need to overclock
- Select 'Overclock -> Modest 800MHz ARM, 250MHz core, 400MHz SDRAM, 0 overvolt -> OK -> Reboot when selected'
- Post reboot check the frequency is 800 MHz :
arm_freq=800
- Check default port of 8080 is free
<- nothing should show as bound
- Install OpenJDK Java 6 runtime
$ sudo apt-get install -y openjdk-6-jre
- Check Java version
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.4) (6b27-1.12.4-1+rpi1)
OpenJDK Zero VM (build 20.0-b12, mixed mode)
- Install Jenkins
- Post install check port 8080 is now bound for all IP's:
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN
- Open in GUI : http://< Raspberry Pi IP>:8080/
Note - Initial load of GUI make take a few minutes with high CPU but this is fine once it loads
- To monitor peformance htop is a good tool :
EtherApe : A great visual network monitoring tool
EtherApe is a great tool to be able to visualize traffic on your network.
- Install in Linux Mint or Ubuntu
- Create a simple Launch script (to launch with root)
#!/bin/bash
gksudo etherape
- Set writable permissions (replace 'lclark' with your username)
- Update launcher script line to match new script using sudo :
Exec=~/bin/EtherApe.sh
- Launch app using icon from Menu or launcher
ethtool : powerful simple tool to display or modify NIC parameters
I recently discovered ethtool which is a simple but effective command line tool for finding out information about your network card or to change the network settings.
Note - ethtool can only be used against physical adapters
Installation & Adapter Information
- Install on Linux Mint, Ubuntu or Raspberry Pi:
- Find out your adapters with ifconfig (typically starting eth0)
Adapter Information
- Running ethtool with no options prints out adapter information e.g.
- Example output
- The above network card supports
- MMI (Media Independent Interface)
- Maximum of 100base T/Full
- Auto negotiation support
- Wake on 'MagicPacket'
- Actual device settings
- Speed 100Mb/s
- Full Duplex
- Running MII
- Physical address : 1
- Auto Negotiation : enabled
- Wake On Lan : disabled
- Link is detected
- This information is really useful when troubleshooting a network card
Modify Settings
- '-s' can be used to modify settings on a NIC e.g. to set to 1000baseT/Full (if your switch supports it) :
Find a Network Card
- Occasionally on a server will many multiple cards it can be difficult to know which network card related to the system assigned ethX
- ethtool has a cool 'blinking' feature that allows you to define the number of binks on a specified network card :
- The above command will blink eth0 for 10 seconds
- The '-i' option queries the network card for driver information on the card
- This provides a really easy and quick way to obtain the driver information
Statistics
- It can be really useful to obtain network card statistics
- The '-S' option can be used to obtain the information
Lighttpd - lightweight low footprint web server
Having used Apache server for a long time I was looking for a web server with a much lower memory footprint. The solution I found was Lighttpd which is pronounced 'lighty'. Its used by many web sites including YouTube and Wikipedia as it allows them to scale a lot better with the same hardware. Its easy to use, powerful and quick to setup.
Pre Installation Check
- Default listen port is 80
- Check nothing is already bound to port 80
- If the port was bound you would see
Installation
- On Linux Mint, Ubuntu or Raspberry Pi
- Lighttpd will automatically start. Check the port is now bound
- Check status
* lighttpd is running
- Open in a web browser : http://localhost/index.lighttpd.html and you should see the default message
Manual Bug Fix
- In the latest builds the default lighttpd.conf contains a bug
- Open in a text editor and find the line starting 'index-file.names'
- As hightlighted above there is an extra quoue in " index.lighttpd.html"
- Remove quote and save as shown below
- Restart service
Change Default Port
- Its a good idea to change the default listening port from 80 to another non bound port
- I am going to change it to port 8888
- First check nothing is listening on that port
- Open config file in text editor
- Add
- Save file and restart
- Open in a web browser : http://localhost:8888/index.lighttpd.html
- HTML files location : /var/www
- Default directory index : index.html
- CGI Scripts : /usr/lib/cgi-bin
- Logs : /var/log/lighttpd
- Lighttpd has many support modules that enhance functionality
- RRDTool can be used for statistics
Shaarli : personal hosted minimalist delicious clone
Its great to be able to access your own bookmarks in an organized manner. An open source solution I have been using lately is Shaarli. Key advantages are bookmarks are not shared to any 3rd party and you have full control over privacy. Shaarli is quick to deploy and import bookmarks.
Pre installation
- Set up your own web server
- For an example setup see my previous post on Lighttpd - lightweight low footprint web server
- Note - for this guide I assume the webserver is available at http://localhost/
- Install php5-cgi (server-side, HTML-embedded scripting language)
- Enable fastcgi module, php configuration and restart service
$ sudo lighty-enable-mod fastcgi-php
$ sudo /etc/init.d/lighttpd restart
- Create file /var/www/index.php with a text editor with contents
- Open browser to http://localhost/index.php and following should appear
Installation
- Create a folder on your web server
- Download the latest zip file from Shaarli
- Extract file and copy contents to new folder
- Change file and group ownership
- Open browser to http://localhost/shaarli/index.php and following should appear
Configuration
- After login select 'Tools->Shaare link' and drag to your bookmarks toolbar
- Go to a site and when you want to bookmark it select 'Shaare link'
- You can define new tags automatically in the 'Tags' field
- Its easy to export bookmarks from Firefox, Chrome and import under 'Tools->import'
- A corresponding 'Tools->export' feature
Other Features
- The 'Tag cloud' gives an overview of all the tags
- RSS and ATOM feed of site content
- Daily overview of added content for that day in a newsfeed
- Automatically stores thumnails that contain images
- Option 1 : Copy /var/www/shaarli/data/datastore.php to backup location
- Option 2 : Export via 'Tools->export' to html file to backup location
Subscribe to:
Posts (Atom)