25 January 2014

544. rehash: making gnome 3 usable on debian

This post is meant to help a specific person leaving ubuntu's unity for debian's gnome. He finds unity easier to use then stock debian gnome 3.

While I agree that gnome 3 without any modifications isn't very good, by installing the right set of extensions you can make it very usable.
I'll be showing Jessie/gnome 3.8 in all the screenshots below. Setting up gnome 3.4 is pretty much the same though.

I've made a few similar posts before:
 http://verahill.blogspot.com.au/2012/01/debian-testing-64-wheezy-installing.html
http://verahill.blogspot.com.au/2012/06/gnome-34-frippery-extensions-in-debian.html
http://verahill.blogspot.com.au/2013/03/367-some-post-install-steps-on-debian.html
http://verahill.blogspot.com.au/2013/05/435-briefly-frippery-extensions-for.html


What I don't like about Stock Gnome 3:
For a first time user there's no obvious first action when greeted by a gnome 3/shell desktop
 

1. Everything opens as full screen and 2. you can't resize the windows (look at the top right corner of the title bar of the program). The feeling is claustrophobic.

The menu for each program is located on the top panel. This is only the case for programs which are specifically written for gnome 3 though, like gedit, nautilus, epiphany etc.

Power Off -- there's no way of choosing between hibernate, power off, restart, suspend etc.




Fixing gnome 3:

1. First hit the terminal

I think gnome-tweak-tool is installed by default these days, but by all means do
sudo apt-get install gnome-tweak-tool

Next, get the frippery extensions for your version of debian/gnome: Wheezy:
cd ~
wget http://intgat.tigress.co.uk/rmy/extensions/gnome-shell-frippery-0.4.1.tgz
tar xvf gnome-shell-frippery-0.4.1.tgz

Jessie:
cd ~
wget http://intgat.tigress.co.uk/rmy/extensions/gnome-shell-frippery-0.6.3.tgz
tar xvf gnome-shell-frippery-0.6.3.tgz

Now, log out and log in again in gnome (alt+f2, r didn't work for me).



2. Tweak Tools
Then move your mouse to the top left 'activities' corner and open Tweak Tools:


Go to Shell and change 'Arrangement of buttons on the titlebar' from 'Close Only' to 'All'.
Now you can close and resize applications the 'normal' way
Note how the titlebar changes to include both minimize and close buttons.

Next turn off dynamic workspaces and pick a reasonable number of virtual desktops (e.g. 4-6).
You won't see any visible changes just yet, but that'll come.


Now it's time to activate the frippery extensions. Go to Shell Extensions:
Activate the extensions one by one.

Note how there's an application menu in the top left corner now:

 Note the bottom panel:

Note the location of the clock:

Note the 'favourites' group of icons:



And note the appearance of a shutdown menu item:



Other changes
Other changes that I've made to my desktop are

* installing the faenza icon set: link here
It comes with it's own installation script.

* installing conky
conky is in the debian repos.  Here's my /etc/conky/conky.conf:
background no
own_window yes
own_window_type normal
own_window_argb_visual true
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes


alignment top_right
background yes
border_width 1
cpu_avg_samples 2
default_color white
default_outline_color white
default_shade_color white
default_graph_size 20 200
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
use_xft yes
xftfont DejaVu Sans Mono:size=12
gap_x 20
gap_y 60
minimum_size 5 5
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window_class Conky
own_window_transparent yes
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer none
show_graph_scale no

TEXT
${exec lsb_release -ds}
${execi 5 acpi|gawk '{print $3,$4}'}
${addr eth0}/${addr wlan0}
$hr
${color grey}Uptime:$color $uptime
CPU:$alignc $cpu%
$alignc$color ${cpugraph 10,200 ffff00 ff0000 -t}  
RAM:$alignc $mem/$memmax 
$alignc$color ${memgraph 10,200 ffff00 ff0000 -t}
I/O:$alignc $diskio_read/$diskio_write
$alignc$color ${diskiograph 10,200 ffff00 ff0000 -t}
${color grey}Frequency (in GHz):$color
        ${freq_g 1}, ${freq_g freq_g2}
${color grey}Temperature:
$color CPU: ${acpitemp}°C
$hr
${color grey}File systems:$alignr $color/ ${fs_used /}/${fs_size /}
$alignr /home $color${fs_used /home}/${fs_size /home}
${color grey}Networking:
${color grey}eth0 ${color red} ${upspeed eth0}/${color green} ${downspeed eth0} ${color grey}
${color grey} ${upspeedgraph eth0 10,100 ffff00 ff0000 -t} ${color grey} ${downspeedgraph eth0 10,100 0000ff 00ff00 -t} ${color grey}
${color grey}wlan0 ${color red} ${upspeed wlan0}/${color green} ${downspeed wlan0} ${color grey}
${color grey} ${upspeedgraph wlan0 10,100 ffff00 ff0000 } ${color grey} ${downspeedgraph wlan0 10,100 0000ff 00ff00 } ${color grey}
$hr
${color grey}Name                       CPU%   MEM%
${color} ${top name 1} ${top cpu 1} ${top mem 1}
${color} ${top name 2} ${top cpu 2} ${top mem 2}
${color} ${top name 3} ${top cpu 3} ${top mem 3}
$hr
${color}City            Ping $alignr Time  
$font${color}Google $alignr${execi 60 ping -c 1 google.com -n|grep icmp_seq|sed 's/=/\t/g'|gawk '{print $10,$11}'}       $alignr${tztime America/Los_Angeles %a %H:%M}
$font${color}Melbourne   $alignr${tztime Australia/Melbourne %a %H:%M}

17 January 2014

543. Briefly: unexpected weather in Melbourne according to Android

Southeast Australia, including Adelaide and Melbourne, is currently suffering from 40+ temperatures (Celsius) since the beginning of the week. As opposed to e.g. California, when it's hot in Melbourne during the day, it's also hot at night. Many (most?) houses in Melbourne also don't have air conditioning since we're normally dealing with cold and dreicht weather (16 degrees and rain has been the norm this summer).


Either way, since about midnight Thursday the Weather and News app on android, which uses data from the weather channel, has been reporting blowing snow in Melbourne:

We wish...

06 January 2014

542. gnucash 2.6 on debian wheezy by compiling

Update 7/1/2014: Gnucash 2.6 is now in Jessie

Original post:
"Why would you want to compile gnucash yourself", you might ask. "Because version 2.6, which is currently in SID, allows you to attach files to transactions and that's the bee's knees", I might respond.

I use gnucash to manage my grants. Attaching purchase orders, receipts and invoices would be great. Well, now you can, but not in version 2.4 which is the one found in wheezy and jessie.
I've built so many things on my main desktop that I'm not sure about the exact requirements for gnucash. I've provided a list of packages that I suspect gnucash needs in this post, but it might not be exhaustive.

sudo apt-get install build-essential libglib2.0-dev libgtk2.0-dev guile-2.0-libs libgnomecanvas2-dev libgoffice-0.8-dev guile-2.0-dev libxml2-dev libxslt-dev swig libwebkit-dev libdbd-mysql libdbi-dev libofx-dev python-dev
mkdir ~/tmp/gnucash -p
cd ~/tmp/gnucash
wget http://downloads.sourceforge.net/sourceforge/gnucash/gnucash-2.6.0.tar.bz2
tar xvf gnucash-2.6.0.tar.bz2
cd gnucash-2.6.0/
./configure
Options detected/selected ------------------------- gnucash version ...... : 2.6.0 Build for host ....... : x86_64-unknown-linux-gnu Optional components... : dbi ofx Extra Warnings ....... : -Wdeclaration-after-statement CPPFLAGS ............. : CFLAGS ............... : -Wdeclaration-after-statement -g -O2 -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused LDFLAGS .............. : prefix................ : /usr/local
make sudo checkinstall --install=no
0 - Maintainer: [ root@beryllium ] 1 - Summary: [ gnucash 2.6.0 ] 2 - Name: [ gnucash ] 3 - Version: [ 1:2.6.0 ] 4 - Release: [ 1 ] 5 - License: [ GPL ] 6 - Group: [ checkinstall ] 7 - Architecture: [ amd64 ] 8 - Source location: [ gnucash-2.6.0 ] 9 - Alternate source location: [ ] 10 - Requires: [ ] 11 - Provides: [ gnucash ] 12 - Conflicts: [ ] 13 - Replaces: [ ]
sudo dpkg -i gnucash_2.6.0-1_amd64.deb

If you have issues with libgnc-gnome.so.0 missing, make sure that /usr/local/lib is in your ld.so.conf and do ldconfig to update.

Either way, you can now associate a file with a transaction by right-clicking.

It does, however, seem as if you can't actually SEE if a file is associated, which makes the feature pretty useless.