Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Saturday, 27 June 2015

SNES Emulator on Elementary OS Linux

Getting SNES emulation to work on your linux machine is super easy.  I'm running elementary OS Freya on an Acer C720 chromebook.


The two main contenders for SNES emulation are SNES9x and ZSNES.  Between the two options, you want ZSNES.  SNEX9x is ok and much easier to use, but ZSNES offers more customisation and works better on my linux machine.

The best part is that it's already included in the repos: 

sudo apt-cache search zsnes
sudo apt-get install zsnes

I had to also install jstest-gtk in order to get my iBuffalo SNES retro usb gamepads to work.  Once installed, they worked like a charm and only required button configuration in ZSNES.  

sudo apt-get install jstest-gtk

Now head on over to DopeROMs and grab some of the classics.


Wednesday, 26 November 2014

Acer C720 Linux Ubuntu Brightness Keys (ElementaryOS)

This is written for the Acer C720-3445 ("NX.SHEAA.019") running elementary OS Freya beta-1, but it should work for other Acer C720 models and/or other ubuntu-derived flavours.

After installing your favourite flavour of linux on your Acer C720 chromebook, you may notice that the special function keys above the numbers row do not work as anticipated.  These are actually just normal function keys (i.e. "F keys") that you see on a normal keyboard, but instead of being labelled F1, F2, F3... they are labelled with pictures.


You'll notice that you can use them just like normal Function keys.  For example, ALT + F4 (the fullscreen image key) will close a program and F1 (the "back" key) will pull up a Help Menu on most applications.  Getting the volume keys working is pretty straight forward.  The keys that normally control this function are XF86AudioMute XF86AudioLowerVolume and XF86AudioRaiseVolume, but we're going to change them to F8, F9, and F10, respectively.  In elementary OS and other ubuntu 14.04 derivations, this keybindings can be manually set quite easily from the System Settings > Keyboard > Media menu:


Settings the brightness keys is more difficult, since the option for brightness keybindings is not build into the elementary OS or ubuntu settings.  However, this can be accomplished through the custom keybindings settings in org.gnome.settings-daemon.plugins.media-keys custom-keybindings.  The goal is to use a package called xdotool to call the brighness keys behind the scenes.  We'll then bind this process to the F6 and F7 keys on the Acer keyboard.  Here's how it is accomplished:

First, grab the xdotool application.  It should already be accessible from the repositories:
sudo apt-get install xdotool

The keys we want are XF86MonBrightnessDown and XF86MonBrightnessUp.  You can test these commands by opening an terminal and running:
xdotool key XF86MonBrightnessDown
xdotool key XF86MonBrightnessUp

You should see your screen brightness decrease, then increase.  It should also tie in with elementary OS's info window.  Next is to check if you already have any custom keybindings.  Run:
dconf read /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings

It should come back empty.... if not, you've probably already modified it and will need to make sure your current custom keybindings are not deleted.  Next, we will create two keybindings: one for brightness down and another for brightness up.  Let's call them custom1 and custom2, respectively:
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/','/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/']"

You can check these settings visually with dconf (dconf-tools):


All that's left is to set the name, binding, and command parameters.  Start with brightness down/ F6:
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ name 'BrightnessDown'

gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ binding 'F6'

gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ command 'xdotool key XF86MonBrightnessDown'


And here's brightness up for F7:
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/ name 'BrightnessUp'

gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/ binding 'F7'

gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/ command 'xdotool key XF86MonBrightnessUp'


The keys should work as per the keypad now.  Note that this will likely screw up your native F6 and F7 functions, which was not a problem for me since those keys were never used for anything else.  I also had to restart my computer before the keybindings took affect.




Monday, 10 November 2014

Elementary OS Luna Configuration Script

Elementary OS 'Luna'  rocks!...... BUT, it does need some help out of the box.  Nothing crazy, mostly look & feel improvements, removing programs and adding others.  I'm in the middle of buying a new laptop, and am trying out lots of different installs.  To help save time (and sanity) I wrote a short script to configure Luna the way I want right after install.

Now, it's not perfect.... there may be a few hiccups but it basically turns this:

Pre config script
.
.
. . .into this:
Post config script!

I think it's a lot more polished look, so I'm sharing the script below to help my fellow elementary OS-ers.  

What it does

Uninstalls all these default applications:
  • Midori (default browser) 
  • Software Center (default software management)
  • Scratch (text editor) 
  • ModemManager (does anyone really need this?)
  • Empathy (chat aggregator)
  • Indicator-messages (empathy chat in the toolbar)
  • Maya (default calendar)
  • Geary  (mail app....because, really, nothing beats Gmail in the browser)
  • Shotwell (photos)
  • Totem (video player)
  • Noise (I was going to replace this with Clementine but turns out I like Noise better)
Installs these (better?) applications:
  • Google Chrome
  • Firefox
  • Zotero  (& Qnotero)
  • Dconf tools
  • Gedit (text editor)
  • Gnome Partition Manager
  •  VLC media player
  • Lots of unzip and file packaging utilities
  • Ubuntu Restricted Extras
  • Pinta (image editor... yeah, I like it better than the Gimp)
  • GPicView Image Viewer
  • Elementary Tweaks (this rocks!)
  • a bunch of Elementary Window, Icon & Plank themes
  • Super Wingpanel & Synapse search indicator
  • Skype
  • Libreoffice & dictionaries
  • QBitTorrent
  • Conky
Makes some settings & config changes:
  • Shortens window open/close animation time
  • Reduces window shadows but about 90%
  • Top-left hot corner shows all windows
  • Default "list" in pantheon-files (instead of icons) and default double-click (instead of single)
  • Change Plank icons (smaller) and apply HUD theme
  • Apply elFaenza icon set to everything
  • Configure Conky (a la custom elementary OS conky theme)
  • a few other gedit and terminal settings changes

Some cavetats

  • Some applications need 3rd party repositories.  These REPOSITORIES WILL BE ADDED TO YOUR APPROVED LIST
  • You might need to make some edits to your conky script to get it working properly
  • Super-Wingpanel and Conky might not work correctly until a reboot
  • Many settings can be modified and tweaked via Elementary Tweaks.  Access this from your Settings application menu.

Ok, ok, where's the script?

Download it here or copy the full text below:
#!/bin/bash        

### Written by anjp on 04-November-2014
### http://justplainobvious.blogspot.com
###  
### Download Elementary OS from here:
### http://sourceforge.net/projects/elementaryos/files/stable/
###
### Save this script as Luna_config.sh and run in Terminal "sudo sh Luna_config.sh"


###  Function list
RunWholeScript(){
    while true; do
        read -p "Are you sure? Run with NO USER INPUTS (y/n)???" yn
        case $yn in
            [Yy]* )
                    ### Remove the eOS Junk                  
                    read -p "First is removing eOS default apps.  Press ENTER key to continue..." pause
                    sudo apt-get autoremove --purge midori-granite software-center scratch-text-editor modemmanager empathy indicator-messages maya-calendar geary shotwell totem              
                    echo "Done removing eOS junk apps...\n"
                    ### Add all the new Repos
                    read -p "Next is adding new Repos.  Be patient.  Press ENTER key to continue..." pause
                    sudo add-apt-repository ppa:pinta-maintainers/pinta-stable
                    sudo apt-add-repository ppa:versable/elementary-update
                    sudo add-apt-repository ppa:smathot/cogscinl
                    sudo apt-add-repository "deb http://archive.canonical.com/ubuntu/ precise partner"
                    sudo add-apt-repository ppa:libreoffice/ppa
                    sudo add-apt-repository ppa:git-core/ppa
                    wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
                    sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'                  
                    wget https://raw.github.com/smathot/zotero_installer/master/zotero_installer.sh \    -O /tmp/zotero_installer.sh
                    chmod +x /tmp/zotero_installer.sh                  
                    echo "Done adding Repos...\n"
                    ### Update
                    read -p "Next is an apt-get update.  Press ENTER key to continue..." pause
                    sudo apt-get update
                    echo "Done with update\n"
                    ### Install new software                                      
                    read -p "Next is installing all new software.  Press ENTER key to continue..." pause                  
                    sudo apt-get install google-chrome-stable firefox dconf-tools gedit gedit-plugins gparted vlc unace unrar zip unzip xz-utils p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller ubuntu-restricted-extras pinta gpicview elementary-desktop elementary-tweaks elementary-blue-theme elementary-champagne-theme elementary-colors-theme elementary-dark-theme elementary-harvey-theme elementary-lion-theme elementary-milk-theme elementary-plastico-theme elementary-whit-e-theme elementary-elfaenza-icons elementary-emod-icons elementary-enumix-utouch-icons elementary-nitrux-icons elementary-taprevival-icons elementary-plank-themes super-wingpanel indicator-synapse qnotero skype libreoffice libreoffice-style-human libreoffice-style-oxygen libreoffice-style-crystal libreoffice-style-sifr libreoffice-style-tango libreoffice-style-galaxy libreoffice-pdfimport hyphen-en-us mythes-en-us libreoffice-help-en-us qbittorrent git conky lm-sensors
                    sudo /tmp/zotero_installer.sh
                    sudo rm /tmp/zotero_installer.sh
                    echo "Done installing new software...\n"                                      
                    ### Gala Configs - Window Animations
                    read -p "Next is shortening Window Animations.  Press ENTER key to continue..." pause                                      
                    gsettings set org.pantheon.desktop.gala.animations close-duration 260
                    gsettings set org.pantheon.desktop.gala.animations menu-duration 120
                    gsettings set org.pantheon.desktop.gala.animations minimize-duration 160
                    gsettings set org.pantheon.desktop.gala.animations close-duration 300
                    gsettings set org.pantheon.desktop.gala.animations snap-duration 120
                    gsettings set org.pantheon.desktop.gala.animations close-duration 300
                    echo "Done shortening Window Animations...\n"
                    ### Gala Configs - Change to Windows Min/Max/Close
                    read -p "Next is changing window min/max/close buttons.  Press ENTER key to continue..." pause                                      
                    gsettings set org.pantheon.desktop.gala.appearance button-layout ":minimize,maximize,close"
                    echo "Done changing window buttons...\n"
                    ### Gala Configs - Change Hot Corner Top-Left
                    read -p "Next is changing top left hot corner.  Press ENTER key to continue..." pause                                      
                    gsettings set org.pantheon.desktop.gala.behavior hotcorner-topleft "window-overview"
                    echo "Done changing window buttons...\n"
                    ### Gala Configs - Decreasing Window Shadows
                    read -p "Next is decreasing window shadows .  Press ENTER key to continue..." pause                                      
                    gsettings set org.pantheon.desktop.gala.shadows dialog-focused "['2','-1','0','1','190']"
                    gsettings set org.pantheon.desktop.gala.shadows dialog-unfocused "['2','-1','0','1','130']"
                    gsettings set org.pantheon.desktop.gala.shadows menu "['2','-1','0','1','130']"
                    gsettings set org.pantheon.desktop.gala.shadows normal-focused "['3','-1','0','2','220']"
                    gsettings set org.pantheon.desktop.gala.shadows normal-unfocused "['2','-1','0','2','150']"
                    echo "Done decreasing window shadows...\n"
                    ### Gala Configs - Files LIST VIEW and DOUBLE CLICK
                    read -p "Next is changing Files List View and Double Click.  Press ENTER key to continue..." pause                                      
                    gsettings set org.pantheon.files.preferences default-viewmode "list"
                    gsettings set org.pantheon.files.preferences single-click false
                    echo "Done Gala Files configs ...\n"
                    ### Gedit Configs
                    read -p "Next are gedit formatting configs.  Press ENTER key to continue..." pause                                      
                    gsettings set org.gnome.gedit.preferences.editor auto-indent true
                    gsettings set org.gnome.gedit.preferences.editor display-line-numbers true
                    gsettings set org.gnome.gedit.preferences.editor display-right-margin true
                    gsettings set org.gnome.gedit.preferences.editor wrap-mode none                
                    echo "Done gedit configs...\n"
                    ### Terminal Configs
                    read -p "Next is changing terminal forget tabs upon reload.  Press ENTER key to continue..." pause                                      
                    gsettings set org.pantheon.terminal.settings remember-tabs false                  
                    echo "Done terminal configs...\n"
                    ### Super Wingpanel Configs
                    read -p "Next Super Wingpanel configs.  Press ENTER key to continue..." pause                                      
                    gsettings set org.pantheon.desktop.super-wingpanel enable-slim-mode true
                    gsettings set org.pantheon.desktop.super-wingpanel hide-mode "Intellihide"
                    gsettings set org.pantheon.desktop.super-wingpanel slim-panel-edge "Curved 3"
                    gsettings set org.pantheon.desktop.super-wingpanel slim-panel-separate-launcher true
                    gsettings set org.pantheon.desktop.super-wingpanel slim-panel-margin 64
                    gsettings set org.pantheon.cerbere monitored-processes "['super-wingpanel', 'plank', 'slingshot-launcher --silent']"
                    killall wingpanel & super-wingpanel &        
                    echo "Done super-wingpanel configs...\n"
                 
                    ### Plank
                    read -p "Next is configuring Plank.  Press ENTER key to continue..." pause
                    rm ~/.config/plank/dock1/settings
                    rm ~/.config/plank/dock1/launchers/*                                  
   echo "#This file auto-generated by Plank.
#2014-11-05T04:11:42+0000

[PlankDockPreferences]
#Whether to show only windows of the current workspace.
CurrentWorkspaceOnly=false
#The size of dock icons (in pixels).
IconSize=40
#If 0, the dock won't hide.  If 1, the dock intelligently hides.  If 2, the dock auto-hides. If 3, the dock elementary-hides.
HideMode=3
#Time (in ms) to wait before unhiding the dock.
UnhideDelay=0
#The monitor number for the dock. Use -1 to keep on the primary monitor.
Monitor=-1
#List of *.dockitem files on this dock. DO NOT MODIFY
DockItems=google-chrome-stable.dockitem;;firefox.dockitem;;zotero.desktop;;libreoffice-startcenter.dockitem;;pantheon-files;;switchboard.desktop;;pantheon-terminal.desktop;;gnome-screenshot.desktop
#The position for the dock on the monitor.
Position=3
#The dock's position offset from center (in percent).
Offset=0
#The name of the dock's theme to use.
Theme=HUD
#The alignment for the dock on the monitor's edge.
Alignment=3
#The alignment of the items in this dock.
ItemsAlignment=3" > ~/.config/plank/dock1/settings


echo "[PlankItemsDockItemPreferences]
Launcher=file:///usr/share/applications/google-chrome-stable.desktop" > ~/.config/plank/dock1/launchers/google-chrome-stable.dockitem

echo "[PlankItemsDockItemPreferences]
Launcher=file:///usr/share/applications/firefox.desktop" > ~/.config/plank/dock1/launchers/firefox.dockitem

echo "[PlankItemsDockItemPreferences]
Launcher=file:///usr/share/applications/zotero.desktop" > ~/.config/plank/dock1/launchers/zotero.dockitem

echo "[PlankItemsDockItemPreferences]
Launcher=file:///usr/share/applications/libreoffice-startcenter.desktop" > ~/.config/plank/dock1/launchers/libreoffice-startcenter.dockitem

echo "[PlankItemsDockItemPreferences]
Launcher=file:///usr/share/applications/pantheon-files.desktop" > ~/.config/plank/dock1/launchers/pantheon-files.dockitem

echo "[PlankItemsDockItemPreferences]
Launcher=file:///usr/share/applications/switchboard.desktop" > ~/.config/plank/dock1/launchers/switchboard.dockitem

echo "[PlankItemsDockItemPreferences]
Launcher=file:///usr/share/applications/pantheon-terminal.desktop" > ~/.config/plank/dock1/launchers/pantheon-terminal.dockitem

echo "[PlankItemsDockItemPreferences]
Launcher=file:///usr/share/applications/gnome-screenshot.desktop" > ~/.config/plank/dock1/launchers/gnome-screenshot.dockitem
                    echo "Done Plank configs...\n"
                 
                    ### Conky
                    read -p "Next is configuring Conky.  Press ENTER key to continue..." pause                                      
                    wget http://anjp.comlu.com/scripts/.conkyrc
                    mv  ~/Downloads/.conkyrc ~/
                    wget http://anjp.comlu.com/fonts/Dotmatrx.ttf
                    wget http://anjp.comlu.com/fonts/PIZZADUDEBULLETS.ttf
                    wget http://anjp.comlu.com/fonts/STYLBCC_.TTF
                    wget http://anjp.comlu.com/fonts/openlogos.ttf
                    wget http://anjp.comlu.com/fonts/weather.ttf
                    mkdir ~/.fonts/
                    mv ~/Downloads/Dotmatrx.ttf ~/.fonts/
                    mv ~/Downloads/PIZZADUDEBULLETS.ttf ~/.fonts/
                    mv ~/Downloads/STYLBCC_.TTF ~/.fonts/
                    mv ~/Downloads/openlogos.ttf ~/.fonts/
                    mv ~/Downloads/weather.ttf ~/.fonts/
                    conky &
                    echo "Done ...\n"
                    read -p "Next is telling Conky to autostart.  Press ENTER key to continue..." pause                                      
                    mkdir ~/.config/autostart
echo > "[Desktop Entry]
Type=Application
Exec=conky -p 5
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_CA]=Conky Launcher
Name=Conky
Comment[en_CA]=Conky!
Comment=Conky!" > ~/.config/autostart/Conky
                    echo "Done ...\n"
                 

                    # Change start menu to open with ONLY the Super key, instead of Super + Space
                    # gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['Super_L','F2']"
                    ### next line to change back ###
                    # gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['space', 'F2']"

                 
                    #Cleanup
                    sudo apt-get update
                    sudo apt-get upgrade
                    sudo apt-get autoremove
                    sudo apt-get autoclean
                    #All done
                    echo "\nNO USER INPUT script complete!\n"                  
                    read -p "Press ENTER key to exit..." pause            
                    exit;;
            [Nn]* ) break;;
            * ) echo "Please answer yes or no.";;
        esac
    done
}



echo "\n******************************************************"
echo "***********  eOS Luna configuration script  **********"
echo "******************************************************\n"
echo "This script will remove most of the eOS default applications and install more commonly used ones\n"
echo "See 'Luna_config.sh' for more info"
echo "Press CTRL + C at any time to exit...\n"
read -p "Press ENTER key to start..." pause


#### Option to just do everything without step-by-step
while true; do
    read -p "Do you just want to run the entire script WITH NO USER INPUTS (y/n)?" yn
    case $yn in
        [Yy]* )
                RunWholeScript
                break;;
        [Nn]* ) break;;
        * ) echo "Please answer yes or no.";;
    esac
done

### Starting user-input script
echo "\nStarting script with user input...\n"
echo "\n  Sorry, I got lazy and decided only to write the NO USER INPUT part!"
read -p "Press ENTER key to exit..." pause

Now just run the script in a terminal and follow the prompts:
sudo sh Luna_config.sh

I'm sure there will be some hiccups... post questions below and let me know what you did with all your time savings!


Sunday, 9 November 2014

Elementary OS Conky Theme (Script)

Update: You can get this script and more desktop customizations through a new Freya Config script here.

In the last month or so I've switched over to elementary OS Luna (I've tried the Freya beta as well, but it's still not polished enough for my every day work laptop).  The switch to elementary OS necessitated a good conky theme.

Below are light theme (blue/grey) and dark theme (orange/black) options for a nice simple conky script that displays all the info I want at any time.  The main formatting and icons were taken from the vinDSL theme, but I removed the weather, calendar, and fancy lua bars.  I wanted this conky script to be lightweight and easy on the eyes.

Elementary OS "Light" conky theme:

Conky Desktop (light theme)

Elementary OS "Dark" conky theme:

Conky Desktop (dark theme)


The first thing you need is conky itself and lm-sensors (for HD + GPU info):
sudo apt-get install conky lm-sensors

You might also need to run the following command to allow conky permission to pull wireless data:
sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/conky

Now it's a simple matter of grabbing the conky script (light theme here, dark theme here) and saving it as ".conkyrc" in your home folder. You will also need to grab the DotMatrix, PizzaDude, OpenLogos, and StyleBats icon font sets and place them in your ~/.fonts folder.  You can do this by executing:
wget http://anjp.comlu.com/fonts/Dotmatrx.ttf
wget http://anjp.comlu.com/fonts/PIZZADUDEBULLETS.ttf
wget http://anjp.comlu.com/fonts/STYLBCC_.TTF
wget http://anjp.comlu.com/fonts/openlogos.ttf
wget http://anjp.comlu.com/fonts/weather.ttf
mkdir ~/.fonts/
mv ~/Downloads/Dotmatrx.ttf ~/.fonts/
mv ~/Downloads/PIZZADUDEBULLETS.ttf ~/.fonts/
mv ~/Downloads/STYLBCC_.TTF ~/.fonts/
mv ~/Downloads/openlogos.ttf ~/.fonts/
mv ~/Downloads/weather.ttf ~/.fonts/

You can run conky anytime by executing:
conky

If you made a mistake or need to close conky, it can be stopped using:
killall conky

NOTE #1: This conky config looks like a desktop panel but just runs on the desktop. If you want it to act as a panel, change the variable 'own_window_type' from 'desktop' to 'panel' and remove 'undecorated' from own_window_hints

NOTE #2: Most of the variables are dynamic, but a few at the top info area (hardware model, gpu model) are hardcoded. Others (processor type) truncate at certain string lengths and may need some tlc

Here's the full 'light theme' code:
####
## Prerequisites (required)
#
#  conky-all 1.8.0 or 1.8.1-5
#  cURL - Command Line Tool
#  xsltproc - Command Line Tool
#  UTF-8 Compatible Text Editor
#
## Tips n' Tricks
## Several ppl (including myself) have experienced issues with conky-all 1.8.1-6
## In every instance, downgrading to conky-all 1.8.1-5 has solved the problem(s).
## I recommend using (and pinning) conky-all 1.8.1-5 until things get sorted.
## conky-all 1.8.1-5 can be downloaded here: https://launchpad.net/ubuntu/+source/conky-all/1.8.1-5

####
## Installed fonts (required)
#
#  ConkyWeather (Stanko Metodiev)
#  Cut Outs for 3D FX (Fonts & Things)
#  Droid Font Family (Google Android SDK)
#  KR A Round (Kat's Fun Fonts)
#  OpenLogos (Icoma)
#  PizzaDude Bullets (Jakob Fischer)
#  Radio Space (Iconian Fonts)
#  StyleBats (Vinterstille)
#  Ubuntu Font Family (Canonical Ltd)
#  Ubuntu Title Bold (Paulo Silva - not included in link below)
#  Weather (Jonathan Macagba)
#
## Tips n' Tricks from Mr. Peachy, djyoung4, and 42dorian (Thanks!)
## Most necessary fonts can be downloaded here: http://ompldr.org/vOHdoag
## Unzip the fonts into your font folder, for example: /home/username/.fonts
## Run this command in a terminal (rebuilds font cache file): sudo fc-cache -fv

####
## Use XFT? Required to Force UTF8 (see below)
#
use_xft yes
xftfont DroidSans:size=8
xftalpha 0.1

####
## Force UTF8? Requires XFT (see above)
## Displays degree symbol, instead of °, etc.
#
override_utf8_locale yes

####
## This buffer is used for text, single lines, output from $exec, and other variables.
## Increasing the text buffer size (too high) will drastically reduce Conky's performance.
## Decreasing the size (too low) will truncate content and cause strange display output.
## Standard text buffer size is 256 bytes (cannot be less). Adjust YOUR buffer wisely!
#
text_buffer_size 640

####
## Daemonize Conky, aka 'fork to background'.
#
background yes

####
## Update interval in seconds.
#
update_interval 2.0

####
## The number of times Conky will update before quitting.
## Zero makes Conky run forever.
#
total_run_times 0

####
## Create own window in instead of using desktop?
#
own_window yes
own_window_transparent no
own_window_type desktop    ## (panel or desktop)
own_window_class conky-semi
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

####
## Background color IF own_window_transparent set to "no"
own_window_colour 323232          ######## Default background color

####
## Some distros also require the following 2 lines.
#
own_window_argb_visual yes
own_window_argb_value 160     # 0 - 255 where 255 is opaque

####
## Force images to redraw when they change.
#
imlib_cache_size 0
255255
####
## Use double buffering? Reduces flicker.
#
double_buffer yes

####
## Draw shades?
#
draw_shades yes
default_shade_color 292421  

####
## Draw outlines?
#
draw_outline no

####
## Draw borders around text?
#
draw_borders no

####
## Draw borders around graphs?
#
draw_graph_borders no

####
## Print text to stdout?
## Print text in console?
#
out_to_ncurses no
out_to_console no

####
## Text alignment.
#
alignment top_right

####
## Minimum size of the text area.
## Syntax: minimum_size [width] [height]
#
minimum_size 200 1200

####
## Maximum width of the text area.
## Syntax: maximum_width [width]
#
maximum_width 200

####
## Gap between text and screen borders.
#
gap_x 6  ## Left / Right
gap_y 2  ## Top / Bottom

####
## Shorten MiB/GiB to M/G in stats.
#
short_units yes

####
## Pad % symbol spacing after numbers.
#
pad_percents 0

####
## Pad spacing between text and borders.
#
border_inner_margin 4

####
## Limit the length of names in "Top Processes".
#
top_name_width 10

####
## Subtract file system -/+buffers/cache from used memory?
## Set to yes, to produce meaningful physical memory stats.
#
no_buffers yes

####
## Set to yes, if you want all text to be in UPPERCASE.
#
uppercase no

####
## Number of cpu samples to average.
## Set to 1 to disable averaging.
#
cpu_avg_samples 2

####
## Number of net samples to average.
## Set to 1 to disable averaging.
#
net_avg_samples 2

####
## Add spaces to keep things from moving around?
## Only affects certain objects.
#
use_spacer right

####
## My colors (suit yourself)
#
color0 White #FFFFFF    ---
color1 6b6b6b #6b6b6b    Icons
color2 6b6b6b #323232    System/Processors/Mem/HD text
color3 Ivory3 #CDCDC1    Text
color4 6db9d5 #6db9d5   Headings
color5 Tan2 #EE9A49    ---
color6 323232 #323232    PizzaDude Icons
color7 323232     #323232    Processes Icons
color8 323232 #323232    Heading Lines
color9 6b6b6b #6b6b6b    BarGraphs


#### Color Schemes
#
# elementary bkgnd = f5f5f5
# elementary grey  = d3d3d3
# dark grey        = 323232
# lighter grey     = 6b6b6b or a4a4a4
# light blue       = 6db9d5
#
####


TEXT
##################################
##             LOGO             ##
##################################
${voffset 36}${font RadioSpace:size=14}${color3}${alignc}${uid_name 1000}@${nodename}${font}
${voffset 3}${font DroidSans:size=8.6}${color3}${alignc}HP Pavilion dv6428ca
##################################
##            SYSTEM            ##
##################################
${voffset 7}${font DroidSans:bold:size=8.25}${color4}SYSTEM${offset 8}${color8}${voffset -2}${hr 2}${font}
${voffset 4}${font OpenLogos:size=10}${color2}u${voffset -4}${font DroidSans:size=8.6}${color3}${offset 5}${pre_exec lsb_release -sd || cat /etc/*release}${alignr}${pre_exec lsb_release -r | cut -f 2| tr "[:upper:]" "[:lower:]"}${font}
${voffset 2}${offset -2}${font OpenLogos:size=12}${color2}Z${voffset -4}${font DroidSans:size=8.6}${color3}${offset 3}${sysname}${offset 3}${kernel}${alignr}${font DroidSans:size=8.3}${machine}${font}
${voffset 2}${font StyleBats:size=10}${color2}d${voffset -2}${font DroidSans:size=8.6}${color3}${offset 5}nVidia GeForce 6150 G0${alignr}${font DroidSans:size=8.3}${execi 60 nvidia-settings -query GPUCoreTemp | perl -ne 'print $1 if /GPUCoreTemp.*?: (\d+)./;'} °C
${voffset 2}${font StyleBats:size=10}${color2}A${voffset -1}${font DroidSans:size=8.6}${color3}${offset 5}${execi 1000 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 1-20}${alignr 1}${font DroidSans:size=8.3}${freq_g cpu0}${offset 1}GHz${font}
${voffset 2}${font StyleBats:size=10}${color2}q${voffset -1}${font DroidSans:size=8.6}${color3}${offset 5}System${offset 3}Uptime${alignr}${font DroidSans:size=8.3}${uptime_short}${font}
##################################
##          PROCESSORS          ##
##################################
${voffset 8}${font DroidSans:bold:size=8}${color4}PROCESSORS${offset 8}${color8}${voffset -2}${hr 2}${font}
${voffset 4}${font StyleBats:size=9.9}${color2}k${voffset -2}${font DroidSansFallback:size=8.39}${color3}${offset 2}CPU1${offset 5}${font DroidSans:size=8.3}${cpu cpu1}%${font}${color9}${alignr}${cpubar cpu1 6,120}
${voffset 2}${font StyleBats:size=9.9}${color2}k${voffset -2}${font DroidSansFallback:size=8.39}${color3}${offset 2}CPU2${offset 5}${font DroidSans:size=8.3}${cpu cpu2}%${font}${color9}${alignr}${cpubar cpu2 6,120}
${voffset 2}${font DroidSansFallback:size=8.39}${color3}${offset 4}Load  ${loadavg}${alignr}(${execi 5 cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor})
##################################
##            MEMORY            ##
##################################
${voffset 8}${font DroidSans:bold:size=8}${color4}MEMORY${offset 8}${color8}${voffset -2}${hr 2}${font}
${voffset 4}${font StyleBats:size=10}${color2}l${voffset -2}${font DroidSansFallback:size=8.3}${color3}${offset 3}RAM${goto 97}${font DroidSans:size=8.3}${mem}${goto 133}/${offset 5}${memmax}${alignr}${memperc}%${font}
${voffset 2}${font}${color9}${alignc}${membar 6,194}
##################################
##             HDD              ##
##################################
${voffset 8}${font DroidSans:bold:size=8}${color4}HDD${offset 8}${color8}${voffset -2}${hr 2}${font}
${voffset 6}${font StyleBats:size=9.9}${color2}x${voffset -2}${font DroidSansFallback:size=8.3}${color3}${offset 4}Root${goto 95}${font DroidSans:size=8.3}${fs_used /}${goto 133}/${offset 5}${fs_size /}${alignr}${fs_used_perc /}%${font}
${color9}${voffset 2}${alignc}${fs_bar 6,194}
${voffset 6}${font StyleBats:size=9.9}${color2}4${voffset -2}${font DroidSansFallback:size=8.3}${color3}${offset 4}Swap${goto 95}${font DroidSans:size=8.3}${swap}${goto 133}/${offset 5}${swapmax}${alignr}${swapperc}%${font}
${color9}${voffset 2}${alignc}${swapbar 6,194}
##################################
##             TIME             ##
##################################
${voffset 8}${font DroidSans:bold:size=8}${color4}TIME${offset 8}${color8}${voffset -2}${hr 2}${font}
${voffset -4}${font RadioSpace:size=32}${color3}${if_match ${time %l}<=9}${alignc 7}${time %H:%M}${else}${if_match ${time %l}>=10}${alignc -1}${time %H:%M}${endif}${endif}${font}
${voffset 2}${color3}${alignc}${time %A, %d %b %Y}
##################################
##         TOP PROCESSES        ##
##################################
${voffset 8}${font DroidSans:bold:size=8}${color4}TOP PROCESSES${offset 8}${color8}${voffset -2}${hr 2}${font}
${voffset 6}${font StyleBats:size=10}${color7}h${voffset -1}${font DroidSans:size=8.65}${color3}${offset 5}${top_mem name 1}${goto 120}${font DroidSans:size=8.3}${top_mem mem_res 1}${alignr}${top_mem mem 1}%${font}
${voffset 1}${font StyleBats:size=10}${color7}h${voffset -1}${font DroidSans:size=8.65}${color3}${offset 5}${top_mem name 2}${goto 120}${font DroidSans:size=8.3}${top_mem mem_res 2}${alignr}${top_mem mem 2}%${font}
${voffset 1}${font StyleBats:size=10}${color7}h${voffset -1}${font DroidSans:size=8.65}${color3}${offset 5}${top_mem name 3}${goto 120}${font DroidSans:size=8.3}${top_mem mem_res 3}${alignr}${top_mem mem 3}%${font}
${voffset 1}${font StyleBats:size=10}${color7}h${voffset -1}${font DroidSans:size=8.65}${color3}${offset 5}${top_mem name 4}${goto 120}${font DroidSans:size=8.3}${top_mem mem_res 4}${alignr}${top_mem mem 4}%${font}
${voffset 1}${font StyleBats:size=10}${color7}h${voffset -1}${font DroidSans:size=8.65}${color3}${offset 5}${top_mem name 5}${goto 120}${font DroidSans:size=8.3}${top_mem mem_res 5}${alignr}${top_mem mem 5}%${font}
# ${voffset 1}${font StyleBats:size=10}${color7}h${voffset -1}${font DroidSans:size=8.65}${color3}${offset 5}${top_mem name 6}${goto 120}${font DroidSans:size=8.3}${top_mem mem_res 6}${alignr}${top_mem mem 6}%${font}
##################################
##           NETWORK            ##
##################################
${voffset 8}${font DroidSans:bold:size=8}${color4}NETWORK${offset 8}${color8}${voffset -2}${hr 2}${font}
${voffset 4}${font StyleBats:size=10}${color6}l${font}${font DroidSans:size=8.65}${color3}${offset 5}SSID ${alignr}${wireless_essid eth1} @ ${wireless_bitrate eth1}
${voffset 0}${font PizzaDude Bullets:size=9.5}${color6}Z${font}${font DroidSans:size=8.65}${color3}${offset 5}Strength${font}${color9}${alignr}${wireless_link_bar 6,88 eth1}
${voffset 4}${font PizzaDudeBullets:size=9.5}${color6}T${font DroidSans:size=8.65}${color3}${offset 5}Download${goto 120}${font DroidSans:size=8.3}${totaldown eth1}${alignr}${font DroidSans:size=8.3}${downspeed eth1}${font}
${voffset 0}${font PizzaDudeBullets:size=9.5}${color6}N${font DroidSans:size=8.65}${color3}${offset 5}Upload${goto 120}${font DroidSans:size=8.3}${totalup eth1}${alignr}${font DroidSans:size=8.3}${upspeed eth1}${font}
${voffset 4}${font PizzaDudeBullets:size=9.5}${color6}a${font DroidSans:size=8.65}${color3}${offset 5}Private${offset 3}IP${goto 123}${alignr}${font DroidSans:size=8.3}${addr eth1}${font}
${voffset 0}${font PizzaDudeBullets:size=9.5}${color6}a${font DroidSans:size=8.65}${color3}${offset 5}Public${offset 7}IP${goto 121}${alignr}${font DroidSans:size=8.3}${execi 1800 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}${font}
###
### Some of the wireless commands require the following command to be run in terminal (one-time) before they work: (it's a permissions issue)
### sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/conky


#################################
##             END             ##
#################################


Did this script work for you?  Did you add any other variables to monitor?  Share in the comments below...

Tuesday, 23 September 2014

Elementary OS Fixes (shell script)

I'm really enjoying ElementaryOS Luna.  It's lightweight, fast, and easy on the eyes.  In fact, I'm running it on an old notebook right now but the plan is to throw it on an Acer C720 chromebook and run it instead of Chrome OS.  But it's not 100% turnkey (I'd say 90%, which is awesome).  The only thing I really felt had to be changed pronto was the uninstalling of some default software (and the installing of better replacement applications).   For example, the default browser is Midori.  Sure, it's ok.. but I'm entrenched into Google Chrome.  Same thing with Totem, Geary, and Empathy....there are just better applications out there.

So here's a bash script that uninstalls all the junk and replaces it with awesome programs!  You can run it as a script or just run each line.  Note that this is a modification of memoryleakx's original script here.

#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/

#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade

#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update
sudo apt-get install google-chrome-stable

#####If you prefer Firefox
#Install Firefox
#sudo apt-get install firefox

#Clean-up System (remove unnecessary ElementaryOS software)
sudo apt-get purge midori-granite
sudo apt-get purge noise
sudo apt-get purge software-center
sudo apt-get purge scratch-text-editor
sudo apt-get purge bluez
sudo apt-get purge modemmanager
sudo apt-get purge empathy
sudo apt-get remove --purge indicator-messages
sudo apt-get purge maya-calendar
sudo apt-get purge geary
sudo apt-get purge shotwell
sudo apt-get purge totem

sudo apt-get autoremove
sudo apt-get autoclean

#Install gedit (Text Editor)
sudo apt-get install gedit gedit-plugins

# Install VLC
sudo apt-get install vlc

#Install File Compression Libs
sudo apt-get install unace unrar zip unzip xz-utils p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller

#Install Ubuntu Restricted Extras
sudo apt-get install ubuntu-restricted-extras

# Install Pinta Photo Editor
sudo add-apt-repository ppa:pinta-maintainers/pinta-stable
sudo apt-get update
sudo apt-get install pinta

# Install Image Viewer
 sudo apt-get install gpicview

#Install Elementary OS extras
sudo apt-add-repository ppa:versable/elementary-update
sudo apt-get update
 ## Elementary Tweaks (System prefs)
sudo apt-get install elementary-desktop elementary-tweaks
## Elementary Themes
sudo apt-get install elementary-blue-theme elementary-champagne-theme elementary-colors-theme elementary-dark-theme elementary-harvey-theme elementary-lion-theme elementary-milk-theme elementary-plastico-theme elementary-whit-e-theme
## Elementary Icons
sudo apt-get install elementary-elfaenza-icons elementary-emod-icons elementary-enumix-utouch-icons elementary-nitrux-icons elementary-taprevival-icons
## Plank Themes
sudo apt-get install elementary-plank-themes
## Wingpanel Slim && Super Wingpanel
sudo apt-get install wingpanel-slim indicator-synapse
sudo apt-get install super-wingpanel

###################
#if not installed
#Install the Dynamic Kernel Module Support Framework
##### sudo apt-get install dkms
##### mkdir kernel
##### cd kernel
####################

#Install Kernel 3.12.2 on 32 Bit
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12.2-trusty/linux-headers-3.12.2-031202-generic_3.12.2-031202.201311291538_i386.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12.2-trusty/linux-headers-3.12.2-031202_3.12.2-031202.201311291538_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12.2-trusty/linux-image-3.12.2-031202-generic_3.12.2-031202.201311291538_i386.deb

sudo dpkg -i *.deb

cd ..
rm -rf kernel
#Reboot!

# Install Zotero for Linux
wget https://raw.github.com/smathot/zotero_installer/master/zotero_installer.sh \    -O /tmp/zotero_installer.sh
chmod +x /tmp/zotero_installer.sh
sudo /tmp/zotero_installer.sh

#Install Qnotero for Linux (Zotero toolbar companion)
sudo add-apt-repository ppa:smathot/cogscinl
sudo apt-get update
sudo apt-get install qnotero

### Don't forget to install the ZotFile plugin manually from www.zotfile.com

#### Install some Handy Indicator Applets ####
#Install CPU Freq Indicator
sudo apt-get install indicator-cpufreq
### copy icon files to elementary theme pack
sudo cp /usr/share/icons/ubuntu-mono-dark/status/22/indicator-cpufreq* /usr/share/icons/elementary/status/22/
sudo gtk-update-icon-cache -f /usr/share/icons/elementary
killall super-wingpanel
#Install Multiload Indicator
sudo apt-get install indicator-multiload
#Install Weather Indicator
sudo apt-get install weather-indicator

#Install Skype
sudo apt-add-repository "deb http://archive.canonical.com/ubuntu/ precise partner"
sudo apt-get update && sudo apt-get install skype

#Install Libre Office (most recent)
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt-get install libreoffice
#Install LibreOffice themes
sudo apt-get install libreoffice-style-human libreoffice-style-oxygen libreoffice-style-crystal libreoffice-style-sifr libreoffice-style-tango libreoffice-style-galaxy
#Install PDF editing
sudo apt-get install libreoffice-pdfimport
##Install Support for US English
sudo apt-get install hyphen-en-us mythes-en-us libreoffice-help-en-us

##Install Support for UK English
sudo apt-get install libreoffice-help-en-gb libreoffice-l10n-en-gb myspell-en-gb hunspell-dictionary-en-gb myspell-dictionary-en-gb hyphen-en-gb libreoffice-grammarcheck-en-gb mythes-en-gb

#Remove extra LibreOffice icons from Slingshot Start Menu (leaves only main 'LibreOffice')
cd /usr/share/applications
sudo rm libreoffice-base.desktop libreoffice-draw.desktop libreoffice-impress.desktop libreoffice-writer.desktop libreoffice-calc.desktop libreoffice-math.desktop

#Install the Clementine Music Player
sudo add-apt-repository ppa:me-davidsansome/clementine
sudo apt-get update
sudo apt-get install clementine

#Install the latest git Version
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install git

# Change start menu to open with ONLY the Super key, instead of Super + Space
gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['Super_L','F2']"
### to change back
# gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['space', 'F2']"

#Make sure everything is up to date all over again
sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoclean


Let me know if you think I missed some anything awesome that should be added to eOS. Happy customising!

Sunday, 28 April 2013

How to Rename Android Device on Network

Android devices don't have nice default names on a local network.  This can be confusing, especially if you have to type "android-cfd55432173d6d3e" often.  But, if your android device is routed, it's just one line in a terminal (as superuser) to change this:

setprop net.hostname THE_NEW_HOSTNAME


Here's a screenshot:




Sunday, 29 January 2012

How to convert .bin to ISO in Ubuntu

.bin/.cue image files were made popular by Golden Hawk's CDRWin application.  The disc image is expressed in pairs, with the .bin file containing most of the data and the .cue file containing layout information.  I am not a big fan really hate when I get a disc image in .bin/.cue format.  ISO is the way to go and is easily readable by Ubuntu.

To convert, get a command-line program called bchunk. 

sudo apt-get install bchunk
Usage looks like: 
bchunk [options] image.bin image.cue output.iso
.  Simple and easy.

Monday, 5 December 2011

How to Disable Overlay Scrollbars in Ubuntu

Looking back, I don't know why I put up with Ubuntu's overlay scrollbars for so long... they're just that awful.  Your mouse must be in just the right spot to catch the scrollbar, and forget about paging down click by click.


So this morning I decided to just get rid of them.  Turns out it's easy.  Just add this line of code:

export LIBOVERLAY_SCROLLBAR=0
to the file
/etc/X11/Xsession.d/99disable-overlay-scrollbars
for global removal (you may need to create that file).  To disable only on a user-by-user basis, enter the same text in the user's file:
~/.xprofile

Sunday, 4 December 2011

Ubuntu Wired Ethernet Connection Not Working

I recently upgraded my home internet connection to 50 mbps.  Shaw (ISP) gave loaned me a new Cisco DPC3825 cable modem.  The Cisco DPC3825 also functions as a gateway, router, and wireless router, so I pulled the plug on my old Trendnet TEW-432BRP.  In doing this, I started to notice multiple failures between my PS3 and my Ubuntu 11.04 machine (running PS3 Media Server, both wired) in the form of frequent DLNA errors.  On top of this, Ubuntu sometimes wouldn't recognise the wired ethernet connection (even though the hardware lights activated).

Fixing/resetting this was simple:

sudo service network-manager stop
sudo ifconfig eth0 up
sudo dhclient eth0
sudo service network-manager start
These commands stop network manager, ensure the wired ethernet device (eth0 in my case) is being monitored, renew its DHCP lease, and restart network manager.  So far, it's worked for me every time.

After a little more digging, I believe the problem lies with my Cisco SPA2102 VOIP phone adapter.  It was running under the gateway and also assigning DHCP.  I've since turned this feature off and am hoping for less no more communication errors.

Tuesday, 15 November 2011

Explanation of the Linux (Ubuntu) file system


The linux filesystem is simple and intuitive - much more so than that of Windows.  But sometimes those abbreviations are unclear.  Here's an explanation of the folder you should see in the root of your drive ("/"):

/bin – binary applications (most of your executable files)
/boot – files required to boot (such as the kernel, etc)
/dev – your devices (everything from drives to displays)
/etc – just about every configuration file for your system
/home – locally stored user files and folders
/lib – system libraries (similar to Program Files)
/lost+found – lost and found for lost files
/media – mounted (or loaded) devices such as cdroms, digital cameras, etc.
/mnt – mounted file systems
/opt – location for “optionally” installed programs
/proc – dynamic directory including information about and listing of processes
/root – “home” folder for the root user
/sbin – system-only binaries (see /bin)
/sys – contains information about the system
/tmp – temporary files
/usr – applications mainly for regular users
/var – mainly logs, databases, etc.

Note that to the beginner/regular user, most of these folders will remain untouched, with the exception of /home.  The /home directory contains folders for each user, in which _your_ specific documents, photos, video, etc. will be.  This is similar to C:/Documents and Settings/USERNAME/ you see in Windows.

Tuesday, 8 November 2011

How to fix /opt/google/chrome/libgcflashplayer.so crash

I keep getting a /opt/google/chrome/libgcflashplayer.so has crashed error when clicking "fullscreen" on any flash video in Ubuntu.  I'm on Ubuntu natty 11.04 and using Chrome 7.0.517.44 (I know it's old, but I have a number of issues with the newer versions).

Solution?  At least temporarily...

about:plugins

Expand the "Details" box in the upper right-hand corner and you will notice the "Shockwave" plugin has two entries.  I have 10.1 r103 and 11.0 r1.


Disable the older version in location /opt/google/chrome/libgcflashplayer.so.  Flash objects now fullscreen without problem.


Saturday, 24 September 2011

How to Add a Thesaurus in LibreOffice (OpenOffice)

I just started using LibreOffice 3.3.3 and am astounded to learn that there isn't a working thesaurus.  At least not for English (UK) or English (Canada).  The Thesaurus menu option is greyed out when using either of these languages, and CTRL + F7 doesn't do a thing.


Some Googling brought me to the Weekly Whinge and a UK language thesaurus extension.  It looks like it's old (March 2009) but it works great.  Just install via Tools > Extensions Manager and you are good to go.

Tuesday, 15 March 2011

Ubuntu: Make SIP Calls Using Empathy

Ubuntu's default chat client, Empathy, supports a myriad of instant messaging protocols.  Unfortunately, SIP isn't included in this list.  If you have an SIP VOIP account (almost any home phone VOIP product) you can get it working in this application in less than 10 minutes.

First, you must install the sofiasip package (it's in the universe repository).  In terminal, type:
sudo apt-get install telepathy-sofiasip
You should now see a new option in the drop-down Accounts list in Empathy, titled SIP.  Simply enter your SIP username and password and you're good to go.  


To make a call, it's just CTRL + M under the Chat file menu, select your SIP account and enter the number in the Contact ID box.


You'll get a window that looks something like the screenshot below, and you're good to go.

Friday, 11 March 2011

Ubuntu: How to Add Gmail to Indicator Applet

Ubuntu's indicator applet is a relatively new, nifty tool for getting rid of all the system bar clutter and organising it in one drop-down menu.  I'd say it's received mixed reviews... But I like it.  By default, it integrates with instant messaging, email, social broadcast and audio programs BUT its email integration only goes so far as Evolution.

I don't use Evolution.  I find it too clunky and prefer my web-based gmail client.  But the indicator applet menu doesn't allow for web-based gmail noitification by default.  To enable, we must install the gm-notify package.  The good news is that it's contained within the universe repository and installation is a piece of cake.

sudo apt-get update
sudo apt-get install gm-notify

You will see a new menu item called GMail Notifier Configuration under System > Preferences.  Open it and configure your account:


Once saved, you need only to restart your menubar and all will be well:

killall gnome-panel


Based on my settings, clicking Inbox will open a Google Chrome browser and take me to new mail.


Thursday, 10 March 2011

Ubuntu: How to Change Computer Name

My Ubuntu computer used to be named laptop and my other machine was desktop.  That was all fine and dandy until I installed Ubuntu on my wife's laptop.  Now we run into a situation where names are no longer clearly defined.  You may run into a similar situation.  Or you may regret initially naming your system Darth-gr8-hax0r and the like.  Here's how to change your system name:

From terminal, run:

gksudo gedit /etc/hostname

This will open a text file with your system's current name.  Simply replace the old name with a new one, save, close and log out/in or restart your system to show the name name.

Saturday, 5 March 2011

How to Configure Google Chrome for Tor

(This article supposes you already have tor installed on your Ubuntu system.  If not, see How to Install Tor in Ubuntu)

With firefox practically pioneering open source browser technology, it's no surprise that there's a turn-key package for tor browsing in firefox.  But I like google chrome or chromium and there's no tor add-on.  Not to worry, it's fairly easy to make yourself.  Below are 3 completely different ways to get chrome working with tor:

Method 1 - Configure on Launch (best)

This is the best option for a couple reasons: it's easy to setup and it protects the most data.  All you need to do is run the following command from terminal:

google-chrome --proxy-server="127.0.0.1:8118;https=127.0.0.1:8118;socks=127.0.0.1:8118;sock4=127.0.0.1:8118;sock5=127.0.0.1:8118,ftp=127.0.0.1:8118" --incognito check.torproject.org


This command line:
- tells chrome to load using proxy settings
- ensures http, https, socks, socksv4 and sockv5 all use localhost port 8118 (127.0.0.1:8118)
- loads incognito
- goes to http://check.torproject.org for verification

You can substitute any homepage you wish for check.torproject.org but it's nice to have positive verification on load.  You may also remove the --incognito option but I recommend you do not.  Incognito ensures your cookies are not seen by visited websites (cookies easily show the website who you are).

If you don't want to remember that command, simply create a launcher and stick it in the Applications > Internet menu next to chrome:


Just remember that, using this method, you must close all instances of chrome before launching with tor.  If you already have chrome open, the open application's settings will override the tor launch.

Method 2 - Switchy! extension (ok)

This method involves adding the Proxy Switchy! extension to chrome and configuring it for tor/non-tor browsing.  It's good because it allows you to turn tor on and off with the push of a button, but is bad because it doesn't hide your cookie data.

To configure, visit the Proxy Switchy! extension page and install to chrome.  After install, open the extension's settings page and configure to speak with tor/polipo.


Create a profile and name it tor.  Configure this profile to use proxy 127.0.0.1 port 8118 for all protocols.  Your settings should look like the image above when finished.  Now move to the General tab and enable Quick Switch and Binary Switch.  I have my default settings as Profile 1 and my Tor settings as Profile 2.  Just hit the extension image in your toolbar to switch back and forth.


Make sure you visit check.torproject.org to ensure it's working!

Method 3 - Proxy Location (worst)

This is another easy method but not my favourite, as it requires a manual switch from non-tor to tor (each time) and it doesn't protect your cookie information.  For this method, we will create two profiles (or "locations" as chrome calls them) and tell one to use tor, and the other to use a direct connection.



Tools > Preferences > Under the Hood  will get you to the Network settings.  Open Change Proxy Settings and select New Location from the Location drop-down menu.


Select Manual proxy and add proxy 127.0.0.1 and port 8118. Select the checkbox asking if you want to use the proxy for all protocols, and you're finished (screen should look like above image).  Now you must switch from default to tor profile whenever you wish to browse the net over the tor network. This is a good option for someone who wants to use tor all the time and doesn't keep saved cookie data.

Happy anonymous browsing!

How to Install Tor in Ubuntu

(This article shows you how to install tor in ubuntu.  If you're trying to use tor with Google Chrome, see How to Configure Google Chrome for Tor)

This morning I read an article about a German judge who recently awarded a Subpoena to Sony for hacker geohot's website.  This means that Sony will soon have in its hands a list of IPs who have visited (and downloaded) geohot's PS3 hack.  Sony may even be able to link web traffic IPs with PS3 IPs and take action against PS3 online gamers.  Of course, this is a very bad move by Sony since it attacks users who haven't broken any laws.  But I digress.... this got me thinking about the need for internet privacy.  If you're thinking the same thing, Tor may be for you.

Simply put, the tor project allows users to mask their identity and internet habits by bouncing their web traffic over a number of random nodes located all over the planet.  These nodes are sustained by tor volunteers who donate their spare cpu and bandwidth to the network.  You can read more about it here.  This guide will show you how to install the tor client (not server) on your Ubuntu linux machine.  If you're using another OS, check out these other installation guides

Step 1 - Download tor

Add the tor repository to your sources list:
sudo gedit /etc/apt/sources.list

And add the following code to the file.  Save and exit.
#### Tor project - http://www.torproject.org
deb     http://deb.torproject.org/torproject.org maverick main

(You may substitute lucid, karmic, jaunty, etc. for maverick if you're running a different version).  Add the necessary keys:

gpg --keyserver keys.gnupg.net --recv 886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -

Install tor via terminal:
sudo apt-get update
sudo apt-get install tor tor-geoipdb

Step 2 - Configure Polipo

If downloading tor didn't also download polipo (it likely did), you must get it manually as it is required for proper proxy:
sudo apt-get install polipo

Now get rid of the default polipo settings and configure for use with tor.  Open the polipo config file:
sudo gedit /etc/polipo/config

 and replace its entire contents with this substitute configuration.  Save, exit, and restart polipo:
/etc/init.d/polipo restart

Step 3 - Use Tor

Now you can configure any application to route its internet traffic through tor.  Just go to proxy settings, and configure HTTP/HTTPS/SOCKS to point to localhost port 8118 (127.0.0.1:8118).  Remember that you can visit http://check.torproject.org anytime to see if you've configured correctly.

Some applications allow proxy on/proxy off configuration.  Some require you to manually set the proxy each time you wish to use it.  Have a look at Torbutton for Firefox.  It's probably the easiest turn-key solution.  But I use Google Chrome and torbutton doesn't work.  For great detail on this, see my guide on How to Configure Google Chrome for Tor.

Wednesday, 23 February 2011

Enabling USB Support in VirtualBox for Ubuntu

Unfortunately, I still need Windows.  There are a few applications that won't work properly on WINE in Ubuntu (iTunes and Rosetta Stone to name two)...  So I use VirtualBox to boot Windows XP inside Ubuntu.

Here's the problem: there's no native USB support in VirtualBox.  This makes the whole virtual system just useless.  If you install the virtualbox-ose package from the Ubuntu repositories you will face this problem. The solution is to install virtualbox-4.0 from www.virtualbox.org.  Here's how:

This procedure was tested on Ubuntu 10.10 Maverick using a Windows XP Pro SP3 virtual machine.  The virtualbox started out as virtualbox-ose 3.2.8-dfsg-2ubuntu1 and ended up as Oracle virtualbox-4.0.4-70112~Ubuntu~Maverick.

*Don't worry about your existing virtualbox machines.  The install procedure outlined below is turnkey and  your machines will roll over unharmed to the upgraded application.*

1. Add the virtualbox.org repository

sudo gedit /etc/apt/source.list
Add the appropriate repository relative to your linux distribution
deb http://download.virtualbox.org/virtualbox/debian maverick contrib
deb http://download.virtualbox.org/virtualbox/debian lucid contrib
deb http://download.virtualbox.org/virtualbox/debian karmic contrib
deb http://download.virtualbox.org/virtualbox/debian jaunty contrib
deb http://download.virtualbox.org/virtualbox/debian intrepid contrib
deb http://download.virtualbox.org/virtualbox/debian hardy contrib

Get the Oracle public key:
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -

Upgrade virtualbox:
sudo apt-get update
sudo apt-get install virtualbox-4.0

2. Install the VirtualBox Extension Pack

You can grab it here or from the VirtualBox.org downloads page if the address has changed.  Virtualbox manager will open and ask if you wish to install the extension pack (yes).

3. Enable USB support

Add the current user (or whichever user will be running the virtual machine) to the vboxusers group.  You can do this graphically by System > Administration > Users and Groups.  Select the desired user and click Manage Groups.  Scroll to vboxusers, select Properties and add the desired user.



Next, open virtualbox manager if not already open.  You should be able to do this via Gnome Menu > System Tools > Oracle VirtualBox Manager or by launching virtualbox.  Select the machine in question, scroll to USB and enable.  You may need to install a generic usb driver to get the ball rolling.  

Next time you boot the virtual machine, simply right click the USB icon in the lower right hand corner to enable.

 

Finally, USB support for Windows programs in Ubuntu... now that wasn't so hard lol.

  © Blogger template 'Isolation' by Ourblogtemplates.com 2008

Back to TOP