tag:blogger.com,1999:blog-18970180549345712732024-03-13T01:32:22.238+01:00Massimo's BlogPersonal blog about my experiments on Linux and programmingAnonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.comBlogger215125tag:blogger.com,1999:blog-1897018054934571273.post-47661875458421727712018-12-25T00:21:00.000+01:002018-12-25T00:21:09.299+01:00Merry Christmas!<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-8biQScJ-ncY/XCFpWCB4TfI/AAAAAAAABQE/kJ9YTB3krQ0QM9JmWQyDzL1gi-fi6-J_ACLcBGAs/s1600/20181224_202600.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="961" height="400" src="https://3.bp.blogspot.com/-8biQScJ-ncY/XCFpWCB4TfI/AAAAAAAABQE/kJ9YTB3krQ0QM9JmWQyDzL1gi-fi6-J_ACLcBGAs/s400/20181224_202600.jpg" width="240" /></a></div>
<h2>
<span style="color: #cc0000; font-size: x-large;"><br /></span></h2>
<h2>
<span style="color: #cc0000; font-size: x-large;"><br /></span></h2>
<h2>
<span style="color: #cc0000; font-size: x-large;"><br /></span></h2>
<h2>
<span style="color: #cc0000; font-size: x-large;">Merry Christmas !</span></h2>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-56963690520151460782018-10-27T14:51:00.000+02:002018-10-27T14:51:07.925+02:00Hard disk upgrading with Clonezilla
<style type="text/css">
@page { margin: 20mm }
p { margin-bottom: 2.47mm; direction: ltr; line-height: 115%; text-align: left; orphans: 2; widows: 2 }
a:link { so-language: zxx }
</style>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-sVl34TMHVOY/UCqaRiuUJtI/AAAAAAAAAM8/G3ZlUQnbp8gty4hk6Emtkht_vTrGPGbUQCPcBGAYYCw/s1600/Veriton-S661i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="168" data-original-width="64" src="https://4.bp.blogspot.com/-sVl34TMHVOY/UCqaRiuUJtI/AAAAAAAAAM8/G3ZlUQnbp8gty4hk6Emtkht_vTrGPGbUQCPcBGAYYCw/s1600/Veriton-S661i.jpg" /></a></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">Some
time ago my desktop computer welcomed me with an unpleasant message:
the main hard drive was likely to fail soon.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-YYAbf0zfPwc/W9Rd-bUc5xI/AAAAAAAABPo/7bwp5o7nVnUYaY8c72ql_YcqYRh3OVx_wCLcBGAs/s1600/Screenshot%2Bfrom%2B2018-10-20%2B08-41-49.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="742" data-original-width="800" height="370" src="https://1.bp.blogspot.com/-YYAbf0zfPwc/W9Rd-bUc5xI/AAAAAAAABPo/7bwp5o7nVnUYaY8c72ql_YcqYRh3OVx_wCLcBGAs/s400/Screenshot%2Bfrom%2B2018-10-20%2B08-41-49.png" width="400" /></a></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
When
you receive similar messages you never know how soon “soon”
means. Since disk drives prices are reasonably low I decided not to
waste time, I so bought a new, bigger, hard drive to replace the
faulty one.</div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">Upgrading
the computer main drive could be a time consuming business if done
“by hand” since it means copying all system and user data.
Fortunately many tools exist in the Linux world to ease the process,
among them Clonezilla.</span></div>
<div align="justify" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br />
<br />
</div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>Clonezilla</b></span></div>
<div align="justify" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br />
<br />
</div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><a href="https://clonezilla.org/">Clonezilla</a>
is a, very small foot-print, Linux distribution dedicated to disk and
partition backup or cloning. I already used it <a href="http://massimomusante.blogspot.com/2009/02/backing-up-eeepc-with-clonezilla.html">once</a>
to backup EEEPC original Xandros installation. I downloaded
Clonezilla ISO image and installed it on a SUB disk using <a href="https://unetbootin.github.io/">Unetbootin</a>.
Because of its very small size I’ve been able to install Clonezilla
on a old 1GB USB drive. </span>
</div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">Before
starting Clonezilla Iinstalled the new drive on my desktop PC
together with the old one and partitioned it using <a href="https://gparted.org/">Gparted</a>.</span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">At
boot Clonezilla offer some boot options, I selected the default on</span><span lang="en-GB">e</span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">Then,
once the system had started, </span><span lang="en-GB">after the long
language and keyboard selection menu</span><span lang="en-GB">, I’ve
been shown several options. I selected to work in a “</span><a href="https://clonezilla.org/show-live-doc-content.php?topic=clonezilla-live/doc/03_Disk_to_disk_clone"><span lang="en-GB">device-device</span></a><span lang="en-GB">”
mode then selected the “</span><span lang="en-GB">local
</span><span lang="en-GB">partition-to-</span><span lang="en-GB">local
</span><span lang="en-GB">partition” copy mode.</span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">I
proceeded with copying partition one from the old disk to partition
one in the new disk, once completed I repeated with partition two.</span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">At
last I powered of the computer, removed the old faulty disk and left
the new one in its place. I restarted the system but, the new disk
didn’t boot.</span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">After
a while I figured I forgot that Clonezilla, when copying
partition-by-partition, didn’t copy boot information. Not a big
deal, once you understand it.</span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">Eventually
I started again the system using Clonezilla and, using command line
interface, I installed <a href="https://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/">GRUB</a>
on the new disk.</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><span lang="en-GB" style="font-family: "Courier New", Courier, monospace;">sudo mkdir /mnt/ubuntu</span></span><span lang="en-GB"><span lang="en-GB" style="font-family: "Courier New", Courier, monospace;"><br /></span></span><span lang="en-GB"><span lang="en-GB" style="font-family: "Courier New", Courier, monospace;">sudo mount </span></span><span lang="en-GB" style="font-family: "Courier New", Courier, monospace;">/dev/sd</span><span lang="en-GB" style="font-family: "Courier New", Courier, monospace;">a1</span><span lang="en-GB" style="font-family: "Courier New", Courier, monospace;"> /mnt/ubuntu</span><span lang="en-GB" style="font-family: "Courier New", Courier, monospace;"><br /></span><span lang="en-GB" style="font-family: "Courier New", Courier, monospace;">sudo grub-install --boot-directory=/mnt/ubuntu/boot /dev/sd</span><span lang="en-GB" style="font-family: "Courier New", Courier, monospace;">a</span></blockquote>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">After
this my computer started, working like before.</span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">By
the Way now I have a unreliable spare 500 GB hard disk, what could I
use it for?</span></div>
<br />Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-43620750095963841902018-09-29T11:46:00.000+02:002018-09-29T11:46:36.233+02:00Things to remember: mount your USB drives using UUID
<style type="text/css">
@page { margin: 20mm }
p { margin-bottom: 2.47mm; direction: ltr; line-height: 115%; text-align: left; orphans: 2; widows: 2 }
</style>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="171" data-original-width="207" src="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" /></a></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">This
is just a short post to remember myself, and hopefully to my few
readers, how a little more research before doing things could save
from problems in future. I had to disconnect all my computer, the
Raspberry and every devices because of some maintenance works I hhad
to do at home. As often happens when I connected all back not
everything worked as before.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Worst
of all was the Raspberry Pi 3 that didn’t boot anymore or, at
least, the boot process crashed betore turning on the network. I had
to attach the Raspberry to my TV to discover that the boot process
failed while trying to mout the attached USB drives. After some
swapping of available USB slots I managed to get back to the original
working position. I had to solve the problem definitively.</span></div>
<div align="justify" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br />
</div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>Mounting
drives using UUID</b></span></div>
<div align="justify" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br />
</div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">USB
drive devices are assigned on a per position basis. This is usually
irrilevant for removable drives but it can become a problem when
using USB for fixed, mounted on boot, drives. The solution is
defining drives non by using their assigned device but the device
unique identifier (UUID). The funny thing is that the solution was
already on display in Raspberry “fstab” file since the system
uses a similar identifier (PARTUID) in order to mount boot and root
partitions.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">The
drive UUID can be easly printed by using “blkid” or “lsblk”
commands. Here the vary informative output produced by “lsblk”
command:</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">sudo
lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,MODEL</span></blockquote>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-6ozKDzYUJXA/W69JT29MkVI/AAAAAAAABPc/C6aF9hlnlmImpKkaydoXlMCky-F4T95nwCLcBGAs/s1600/Screenshot%2Bfrom%2B2018-09-23%2B11-25-53.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="488" data-original-width="734" height="424" src="https://4.bp.blogspot.com/-6ozKDzYUJXA/W69JT29MkVI/AAAAAAAABPc/C6aF9hlnlmImpKkaydoXlMCky-F4T95nwCLcBGAs/s640/Screenshot%2Bfrom%2B2018-09-23%2B11-25-53.png" width="640" /></a></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
once
identified drive UUIS is just matter of replacing it inside
“/etc/fstab” file like this:</div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#
USB Disk<br />#/dev/sda1 /media/usbdisk ext4 rw,defaults
0 0<br />#/dev/sdb1
/media/backup xfs rw,defaults 0 0<br />UUID=bc83dfb9-ebc5-4a96-9cd2-0657fa767717
/media/usbdisk ext4 rw,defaults 0 0<br />UUID=debd0d49-549a-4187-8284-f20dc3c8f986
/media/backup xfs rw,defaults 0 0</span></blockquote>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<br />
<br />
</div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<br />
<br />
</div>
<br />Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-88351232372085085722018-07-07T11:38:00.000+02:002018-07-07T11:38:44.373+02:00The joy of virtualization: Docker<style type="text/css">
@page { margin: 20mm }
p { margin-bottom: 2.47mm; direction: ltr; line-height: 115%; text-align: left; orphans: 2; widows: 2 }
a:link { so-language: zxx }
</style>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-sVl34TMHVOY/UCqaRiuUJtI/AAAAAAAAAM8/G3ZlUQnbp8gty4hk6Emtkht_vTrGPGbUQCPcBGAYYCw/s1600/Veriton-S661i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="168" data-original-width="64" src="https://4.bp.blogspot.com/-sVl34TMHVOY/UCqaRiuUJtI/AAAAAAAAAM8/G3ZlUQnbp8gty4hk6Emtkht_vTrGPGbUQCPcBGAYYCw/s1600/Veriton-S661i.jpg" /></a></div>
<div style="letter-spacing: -0.5pt; line-height: 100%; margin-bottom: 0mm; text-align: justify;">
I
took a relative pause from experimenting with Raspberry Pi to report
my first experiences with something completely different. One of the
first things you realize while programming server-side is how your
program is only one piece of a bigger puzzle. Your application
usually runs inside a container, connects to a database, expose or
consume services and so on ... Solving this puzzle means defining an
installation procedure that becomes different and sometime more
complex by changing or scaling the installation target.</div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB"><b>Docker</b></span></div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB"><a href="https://www.docker.com/">Docker</a>
is an </span><span lang="en-GB">container platform</span><span lang="en-GB">
that overcomes the installation problems by producing a
ready-to-install standardized </span><a href="https://en.wikipedia.org/wiki/Operating-system-level_virtualization"><span lang="en-GB">o</span><span lang="en-GB">perating-system-level</span></a><span lang="en-GB">
virtual machine, packed with everything your application needs to be
run. Unlike other virtualization solutions a Docker image only
contain</span><span lang="en-GB">s</span><span lang="en-GB"> what
your application needs without </span><span lang="en-GB">having to
install</span><span lang="en-GB"> and run a full hardware simulation
like, for example, </span><span lang="en-GB">in </span><span lang="en-GB">Virtual
Box.</span></div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<b><br /></b></div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<b>Installation</b></div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Docker
is available in two versions a professional “</span><span lang="en-GB"><a href="https://www.docker.com/enterprise-edition">enterprise</a>”
edition</span><span lang="en-GB"> and a community one (<a href="https://www.docker.com/community-edition">Docker
CE</a>) free to download. Installing Docker CE on Ubuntu is just
matter of adding Docker repository address </span>
</div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<div style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">sudo
apt-get update</span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><span lang="en-GB"></span></span><br />
<div style="text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;"><span lang="en-GB">sudo
apt-get install apt-transport-https ca-certificates curl
software-properties-common</span></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><span lang="en-GB">
</span><span lang="en-GB"><div style="text-align: left;">
curl
-fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add
-</div>
</span><span lang="en-GB"><div style="text-align: left;">
sudo
apt-key fingerprint 0EBFCD88</div>
</span><span lang="en-GB"><div style="text-align: left;">
<span lang="en-GB">sudo
add-apt-repository "deb [arch=amd64]
https://download.docker.com/linux/ubuntu </span><span lang="en-GB">$(lsb_release -cs) </span>stable"</div>
</span></span></blockquote>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Then
installing it using the usual apt command</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><span lang="en-GB">sudo
apt-get update</span><span lang="en-GB">sudo
apt-get install docker-ce</span></span></blockquote>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Once
the installation completed the current user, or any user who will use
Docker, must be added to the “docker” group. </span>
</div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB"><span style="font-family: "courier new" , "courier" , monospace;">sudo
adduser maxx docker</span></span></blockquote>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">After
logging out and in again Docker was ready for use and command</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm; text-align: left;">
<span lang="en-GB"><span style="font-family: "courier new" , "courier" , monospace;">docker
info</span></span></blockquote>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Correctly
reported the empty environment initial state</span></div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB"><b>First
run</b></span></div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">In
order to test Docker is correctly installed and running a simple
“hello-world” image is available. Just by calling the command:</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB"><span style="font-family: "courier new" , "courier" , monospace;">docker
run hello-world</span></span></blockquote>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Docker
take care of downloading the image from its repository, installing
and running it.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-6InMYMuIzt8/W0CJEP5iFnI/AAAAAAAABOs/Kjnvyh2yhfcD7hz8gETzcEIj0qkgTc2KwCLcBGAs/s1600/docker-0.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="740" data-original-width="1148" height="411" src="https://3.bp.blogspot.com/-6InMYMuIzt8/W0CJEP5iFnI/AAAAAAAABOs/Kjnvyh2yhfcD7hz8gETzcEIj0qkgTc2KwCLcBGAs/s640/docker-0.jpg" width="640" /></a></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB"><br /></span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
Another
interesting image to start with is, as suggested in hello-world
printout, the “ubuntu” image that installs and starts a
console-only Ubuntu virtual machine with no effort.</div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br />
<a name='more'></a><br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB"><b>Eclipse
IDE integration</b></span></div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Since
one of the main use of a tool like Docker is in software development
<a href="https://github.com/docker/labs/blob/master/developer-tools/java/chapters/ch07-eclipse.adoc">integration</a>
plug-ins are available for <a href="https://www.eclipse.org/">Eclipse</a>
as for most important IDE software. </span>
</div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">The
Eclipse Docker Tools plug-in can be easily installed from <a href="https://marketplace.eclipse.org/content/eclipse-docker-tooling">Eclipse
Market</a></span><a href="https://marketplace.eclipse.org/content/eclipse-docker-tooling"><span lang="en-GB">p</span><span lang="en-GB">lace</span></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-iUSyYfwvZXc/W0CJW-J7kdI/AAAAAAAABO0/EQSNXwY6Yg8-0Z43wOEoUH3uWdueiJEjwCLcBGAs/s1600/docker-2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="873" data-original-width="1108" height="504" src="https://2.bp.blogspot.com/-iUSyYfwvZXc/W0CJW-J7kdI/AAAAAAAABO0/EQSNXwY6Yg8-0Z43wOEoUH3uWdueiJEjwCLcBGAs/s640/docker-2.jpg" width="640" /></a></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">after
installation is completed the plug-in provides a new perspective
displaying currently installed Docker images and containers. From
here both can be started or controlled in many ways without the need
of command line Docker commands.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-VBZC89MBTP4/W0CJXcF-7vI/AAAAAAAABO4/U75PZlS83gcjZKXJGKjSKToNr1KbvXWugCEwYBhgL/s1600/docker-6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="873" data-original-width="1600" height="348" src="https://3.bp.blogspot.com/-VBZC89MBTP4/W0CJXcF-7vI/AAAAAAAABO4/U75PZlS83gcjZKXJGKjSKToNr1KbvXWugCEwYBhgL/s640/docker-6.jpg" width="640" /></a></div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB"><b>Next
steps ...</b></span></div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">That’s
all for now, in the near future I’ll try, of course, to develop a
custom image but also experimenting with Docker and the Raspberry PI
could be an interesting development.</span></div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-49041680794958832832018-06-03T15:56:00.001+02:002018-06-03T16:00:23.759+02:00Simple hardware interface for the Raspberry Pi Zero<style type="text/css">
@page { margin: 20mm }
pre { direction: ltr; line-height: 108%; text-align: left; orphans: 2; widows: 2 }
p { margin-bottom: 2.47mm; direction: ltr; line-height: 115%; text-align: left; orphans: 2; widows: 2 }
a:link { so-language: zxx }
</style>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="171" data-original-width="207" src="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" /></a></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">I
spent some hours, last weekend, working to another little step into
my Raspberry Zero camera project. After experimenting remote software
interface possibilities I started building some minimal bare hardware
interface in order to, at least, safely turn on and off the Raspberry
Pi. </span>
</div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-eFNaOnTF6fU/WxPv_4dFuMI/AAAAAAAABOY/pTau1GjA_RUBjjvVYH5HhNrpBqyyYHc0gCLcBGAs/s1600/20180526_194620-2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="786" data-original-width="1266" height="247" src="https://2.bp.blogspot.com/-eFNaOnTF6fU/WxPv_4dFuMI/AAAAAAAABOY/pTau1GjA_RUBjjvVYH5HhNrpBqyyYHc0gCLcBGAs/s400/20180526_194620-2.jpg" width="400" /></a></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>A
bare minimum interface</b></span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">The
bare minimum hardware interface for a Raspberry project is made of a
power push-button and a status LED telling if the device is still
active or it can be safely removed from power.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">Plenty
of tutorials are available on the Internet, I mostly followed
instructions from <a href="https://howchoo.com/g/ytzjyzy4m2e/build-a-simple-raspberry-pi-led-power-status-indicator">here</a>
and <a href="https://howchoo.com/g/mwnlytk3zmm/how-to-add-a-power-button-to-your-raspberry-pi">here</a>.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">The
power status information is directly provided from the UART pin
without the need of writing additional software. UART must be enabled
in ‘/</span><span lang="en-GB">boot/config.txt’ </span><span lang="en-GB">configuration
file</span><br />
<span lang="en-GB"><br /></span>
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">enable_uart=1</span></blockquote>
</div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><br /></span>
<span lang="en-GB">Then I just connected a LED diode between UART
pin and ground (trough a current limiting resistor of course).</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">Also
the wake-up functionality is implemented by briefly connecting GPIO
pin 6 to ground trough a normally-open push button.</span><br />
<a name='more'></a></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">The
power-off functionality, at last, need writing a simple Python script
listening for power button press then calling the shutdown command. </span>
</div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<script src="https://gist.github.com/massimomusante/fbc2cf5170be469f7cecb96963f61eae.js"></script>
</div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0mm;">
I then copied the
script in ‘usrl/local/bin’ folder and made it executable</div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><code>sudo mv listen-4-shutdown.py /usr/local/bin/</code><code><span lang="en-GB">sudo chmod +x /usr/local/bin/listen-4-shutdown.py</span></code></span></blockquote>
<pre><code><span lang="en-GB">
</span></code></pre>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">The script must run as root, in order to have
shutdown privilege, and must start as the Raspberry is powered on.
This can be achieved by writing a start-up shell script that allow
the python program to be executed as a service.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<script src="https://gist.github.com/massimomusante/a7a6976654cb832ca7b523e903b0209e.js"></script>
</div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">This
shell script can be then installed by </span><span lang="en-GB">moving</span><span lang="en-GB">
it in “/etc/unit.d/” folder and activated with the following
command </span>
</div>
<pre style="background: #f5f2f0;"><code><span lang="en-GB">sudo mv listen-4-shutdown.sh /etc/init.d/</span></code>
<code>sudo chmod +x /etc/init.d/listen-4-shutdown.sh</code>
<code>sudo update-rc.d listen-for-shutdown.sh defaults</code></pre>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br />
<br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>What’s
next ...</b></span></div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">A
simple point-and-click camera needs at least one more push-button to
take shots and one more, software controlled, status LED to inform
user camera is working. </span><span lang="en-GB">So next step will
be a more complex Python script to handle multiple buttons and LED.</span></div>
<br />Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-66747094884172334082018-04-21T17:05:00.000+02:002018-06-03T16:01:31.783+02:00Remotely controlling the Raspberry Pi Zero and Pi Camera<style type="text/css">
@page { margin: 20mm }
p { margin-bottom: 2.47mm; direction: ltr; line-height: 120%; text-align: left; orphans: 2; widows: 2 }
</style>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="171" data-original-width="207" src="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" /></a></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Here
I am continuing my very slow paced building of a Raspberry Pi Zero
based camera. After experimenting with raspberry-desktop file
exchanging I’ve now took some time experimenting with remote
controlling options. I’ll eventually have to wire to the Raspberry
some, at least minimal, physical interface, but remote control,
trough a Android smart-phone, could be a viable </span><span lang="en-GB">solution</span><span lang="en-GB">
to </span><span lang="en-GB">avoid</span><span lang="en-GB"> a too
complex hardware interface.</span></div>
<div align="justify" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>The
ready-made solution: Raspicam Remote</b></span></div>
<div align="justify" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">The
first solution I found in Android Play store has been <a href="https://play.google.com/store/apps/details?id=com.pibits.raspberrypiremotecam&hl=en_GB">Raspicam
</a></span><a href="https://play.google.com/store/apps/details?id=com.pibits.raspberrypiremotecam&hl=en_GB"><span lang="en-GB">Remote</span></a><span lang="en-GB">.
Raspicam is a quite simple application providing a simple but
complete user interface and connecting to the Raspberry Pi using
Wi-Fi and SSH.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Unfortunately
Raspicam doesn’t work on my old phone (Jelly bean) but it works
fine in my much newer tablet. I understand you can’t keep backwards
compatibility with everything. Other solutions are available but they
look more suited for remote surveillance than camera interface.</span></div>
<div align="justify" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>The
mostly Do-it-yourself solution: BlueDot</b></span></div>
<div align="justify" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Interfacing
to the Raspberry trough Wi-Fi offers clear advantages a specially in
terms of connection speed but also poses some disadvantage.
Setting-up a Wi-Fi connection might be trivial while at home where is
available an already configured access point but it’s not the same
while outside. Connecting the Raspberry with a smart-phone using
Wi-Fi means <a href="http://massimomusante.blogspot.it/2016/05/place-raspberry-pi-at-centre-of-your.html">configuring</a>
one of them to act as access-point, its not difficult but it might
become tricky. Also on the power consumption aspect must be kept in
consideration especially for the device acting as access-point.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Bluetooth
overcomes both set-up and power consumption problems in exchange, of
course, for transfer speed and connection range.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Here
comes to play <a href="http://bluedot.readthedocs.io/en/latest/">BlueDot</a>:
a simple looking Android <a href="https://play.google.com/store/apps/details?id=com.stuffaboutcode.bluedot">application</a>
that together with a easy to use Python <a href="http://bluedot.readthedocs.io/en/latest/dotapi.html">library</a>
allows a unidirectional Bluetooth communication between smart-phone
and a Raspberry device.</span><br />
<a name='more'></a></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Installing
BlueDot means, on the Android side, just installing the BlueDot
application from Android Play Store. On the Raspberry side some
Python library is necessary. Since I’m quite new to Python and have
no backward compatibility problems I’ve choose to use exclusively
Python 3. </span>
</div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span style="font-family: "courier new" , "courier" , monospace;"><span lang="en-GB">sudo
apt-get install python3-picamera</span><span lang="en-GB">sudo
apt-get install python3-dbus</span><span lang="en-GB">sudo
apt-get install python3-pip</span><span lang="en-GB">sudo
pip3 install bluedot</span></span></blockquote>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Once
everything has been installed the Raspberry and the phone must be
paired in order to communicate freely over Bluetooth. I followed </span><span style="color: navy;"><u><a href="https://www.teachmemicro.com/setting-raspberry-pi-zero-bluetooth/"><span lang="en-GB">this</span></a></u></span><span lang="en-GB">
tutorial and used the </span><span lang="en-GB"><i>bluetoothctl</i></span><span lang="en-GB">
command.</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB"><span style="font-family: "courier new" , "courier" , monospace;">sudo
bluetoothctl </span></span></blockquote>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">this
command has its own command line interface: the commands ...</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><span style="font-family: "courier new" , "courier" , monospace;">agent
on</span></span><span style="font-family: "courier new" , "courier" , monospace;">default-agent</span></blockquote>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">enable
the pairing agent, then the command …</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><span style="font-family: "courier new" , "courier" , monospace;">scan
on</span></span></blockquote>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">start
scanning for available devices. Once the my phone has been listed …</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><span style="font-family: "courier new" , "courier" , monospace;">pair
<device-id></span></span></blockquote>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">start
the pairing procedure.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">When
all preliminary operations have been completed I verified BlueDot was
working by starting the simple demo Python scripts <a href="http://bluedot.readthedocs.io/en/latest/recipes.html">available</a>
at BlueDot site. Among the already povided BlueDot demos <a href="http://bluedot.readthedocs.io/en/latest/recipes.html#remote-camera">one</a>
is dedicated to taking a photo at the press of application “blue
dot”.</span></div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br /></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>Sending
back photos using Bluetooth</b></span></div>
<div align="justify" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">BlueDot
is a one-way-only communication system, so I thought on I the
raspberry could send back photos to cell-phone. The file transfer
protocol over Bluetooth most commonly used is called OBEX FTP, back
some year ago, when most phones didn't have wireless support, it was
more common having to deal with it. Now it’s almost forgotten but
still supported both from Linux and Android phones.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">OBEX
FTP is installed on Raspbian with the following command</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><span style="font-family: "courier new" , "courier" , monospace;">sudo
apt-get install obexftp bluetooth</span></span></blockquote>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">As
install completed I’ve been able to interrogate my, already paired,
phone for available Bluetooth services.</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB"><span style="font-family: "courier new" , "courier" , monospace;">sudo
sdptool browse <device-id></span></span></blockquote>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Among
the available services I took note of the channel number (12 in my
case) of “OBEX push service” the one allows receiving files like
a message. After some searching on the Internet I eventually came to
the right command to send a file:</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB"><span style="font-family: "courier new" , "courier" , monospace;">obexftp
--nopath --noconn --uuid none –bluetooth <device-id>
--channel <channel> -p <file></span></span></blockquote>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">File
transfer is quite slow, even slower than I used to remember, so is
not fit as main file transfer mean but it could be enough to get a
preview from a display-less camera.</span></div>
<div style="text-align: justify;">
<br /></div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-58289058769609451912018-03-03T14:22:00.000+01:002018-03-03T14:35:55.584+01:00Sharing files on the Raspberry Pi Zero W<style type="text/css">
@page { margin: 20mm }
p { margin-bottom: 2.47mm; direction: ltr; line-height: 120%; text-align: left; orphans: 2; widows: 2 }
a:link { so-language: zxx }
</style>
<br />
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">I
eventually managed to find some time to continue working to my
Pi-zero camera project. During initial tests I took advantage of
Pi-Zero wireless interface and used “sftp" command in order to
transfer files between Raspberry and desktop computer. A more
suitable way of transferring files using USB, like real digital
cameras, would be of course advisable.</span></div>
<div align="justify" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>Raspberry
Pi Zero as mass storage</b></span></div>
<div align="justify" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">The
Pi Zero USB port is </span><span lang="en-GB"><a href="https://blog.gbaman.info/?p=699">directly
connected</a> to processor, unlike others Raspberrys </span><span lang="en-GB">using
a</span><span lang="en-GB"> on-board USB Hub</span><span lang="en-GB">.
This, </span><span lang="en-GB">cheaper, solution </span><span lang="en-GB">means
the Pi Zero can be configured to act as USB </span><span lang="en-GB">host</span><span lang="en-GB">,
like a computer, or </span><span lang="en-GB">as</span><span lang="en-GB">
a “USB </span><span lang="en-GB">gadget”</span><span lang="en-GB">
like all cell-phones and digital cameras do. </span><span lang="en-GB">In
order to activate </span><span lang="en-GB">such “USB gadget”
mode</span><span lang="en-GB"> </span><span lang="en-GB">some
specific “dcw2” kernel modules must be enabled, in my specfic
case the needed module is called “g_mass_storage”. I followed
this <a href="https://gist.github.com/gbaman/50b6cca61dd1c3f88f41">simple
guide</a> from a <a href="https://github.com/">Github</a> user.</span></div>
First I enabled DCW2 USB driver<br />
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span style="font-family: "freemono" , monospace;">echo
"dtoverlay=dwc2" | sudo tee -a /boot/config.txt</span><span style="font-family: "freemono" , monospace;">echo
"dwc2" | sudo tee -a /etc/modules</span></blockquote>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
then I created a virtual disk image to be mounted as mass storage
and formatted if as a FAT32 disk.<br />
<blockquote class="tr_bq">
<span style="font-family: "freemono" , monospace;">sudo dd if=/dev/zero
of=/usb-drive.img bs=1M count=1000</span><span style="font-family: "freemono" , monospace;">sudo mkdosfs -F 32 /usb-drive.img</span></blockquote>
Once the Raspberry PI is conncted to a computer the mass storage
can be enabledl ike this<br />
<blockquote class="tr_bq">
<span style="font-family: "freemono" , monospace;">sudo modprobe g_mass_storage
file=/usb-drive.img stall=0 removable=1</span></blockquote>
and disabled with following modprobe command<br />
<blockquote class="tr_bq">
<span style="font-family: "freemono" , monospace;">sudo modprobe -r g_mass_storage</span></blockquote>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
the same virtual
disk can be availabe to Raspberri PI by mounting it</div>
<blockquote class="tr_bq">
<span style="font-family: "freemono" , monospace;">sudo mkdir /media/usb-drive</span><span style="font-family: "freemono" , monospace;">sudo mount -o loop,rw
/usb-drive.img /media/usb-drive/</span></blockquote>
of course the same virtual disk cannot be both available as mass
storage drive and mounted on Raspberry at the same time, since it
could lead to disk corruption. The camera software will have so to
manage the switch between two modes.<br />
<a name='more'></a><br />
<br />
<b>Automatically mount a removable USB disk</b><br />
<br />
<br />
<div align="justify">
As alternative to using Raspberry Pi Zero as mass
storage device a USB disk, or a SD card, could be used to store
produced media. Advantage of such solution is the increased available
disk space available by swapping the removable drives. On the other
side this solution needs some adapter like a USB-OTG cable or a Pi
Zero specific USB Hub or card reader.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-12Y_lPkYCpQ/WpqhFzh6MSI/AAAAAAAABNc/bdBoaERMuHQta1cXDKsxe-XWRSfHHPxCQCLcBGAs/s1600/20180303_131611.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="588" data-original-width="830" height="453" src="https://1.bp.blogspot.com/-12Y_lPkYCpQ/WpqhFzh6MSI/AAAAAAAABNc/bdBoaERMuHQta1cXDKsxe-XWRSfHHPxCQCLcBGAs/s640/20180303_131611.jpg" width="640" /></a></div>
<div align="justify">
<br /></div>
<div align="justify">
The “<i>pmount</i>” command is the key to
automatically mount USB drives once are connected, I configured it by
following <a href="https://github.com/avanc/mopidy-vintage/wiki/Automount-USB-sticks">these
instructions</a> from another Github user.</div>
<div align="justify">
I so installed pmount<br />
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace;">sudo apt-get install pmount</span></blockquote>
</div>
<div align="justify">
then I configured the udev rule file<br />
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace;">sudo vi /etc/udec/rules.d/usbstick.rules</span></blockquote>
</div>
<div align="justify">
<span style="font-variant: normal;"><span style="color: #24292e;"><span style="font-family: , "blinkmacsystemfont" , "segoe ui" , "helvetica" , "arial" , sans-serif , "apple color emoji" , "segoe ui emoji" , "segoe ui symbol";"><span style="font-size: small;"><span style="letter-spacing: normal;"><span style="font-style: normal;"><span style="font-weight: normal;">with
following content</span></span></span></span></span></span></span></div>
<blockquote class="tr_bq">
<span style="font-family: "freemono" , monospace;"><span style="font-variant: normal;"><span style="color: #24292e;"><span style="letter-spacing: normal;"><span style="font-style: normal;"><span style="font-family: "courier new" , "courier" , monospace; font-weight: normal;">ACTION=="add",
KERNEL=="sd[a-z][0-9]", TAG+="systemd",
ENV{SYSTEMD_WANTS}="usbstick-handler@%k"</span></span></span></span></span></span></blockquote>
<div align="justify">
<span style="font-variant: normal;"><span style="color: #24292e;"><span style="font-family: , "blinkmacsystemfont" , "segoe ui" , "helvetica" , "arial" , sans-serif , "apple color emoji" , "segoe ui emoji" , "segoe ui symbol";"><span style="font-size: small;"><span style="letter-spacing: normal;"><span style="font-style: normal;"><span style="font-weight: normal;">and
the systemd service file</span></span></span></span></span></span></span></div>
<blockquote class="tr_bq">
<span style="font-family: "freemono" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-variant: normal;"><span style="color: #24292e;"><span style="letter-spacing: normal;"><span style="font-style: normal;"><span style="font-weight: normal;">vi
</span></span></span></span></span><span style="font-variant: normal;"><span style="color: #24292e;"><span style="letter-spacing: normal;"><span style="font-style: normal;"><span style="font-weight: normal;">/lib/systemd/system/usbstick-handler@.service</span></span></span></span></span></span></span></blockquote>
<div align="justify">
<span style="font-variant: normal;"><span style="color: #24292e;"><span style="font-family: , "blinkmacsystemfont" , "segoe ui" , "helvetica" , "arial" , sans-serif , "apple color emoji" , "segoe ui emoji" , "segoe ui symbol";"><span style="font-size: small;"><span style="letter-spacing: normal;"><span style="font-style: normal;"><span style="font-weight: normal;">like
this</span></span></span></span></span></span></span><br />
<blockquote>
<span style="color: #24292e; font-family: Courier New, Courier, monospace;">[Unit] </span><span style="color: #24292e; font-family: Courier New, Courier, monospace;"><br /></span><span style="color: #24292e; font-family: Courier New, Courier, monospace;">Description=Mount USB sticks </span><span style="color: #24292e; font-family: Courier New, Courier, monospace;"><br /></span><span style="color: #24292e; font-family: Courier New, Courier, monospace;">BindsTo=dev-%i.deviceAfter=dev-%i.device </span><span style="color: #24292e; font-family: Courier New, Courier, monospace;"><br /></span><span style="color: #24292e; font-family: Courier New, Courier, monospace;"> </span><span style="color: #24292e; font-family: Courier New, Courier, monospace;"><br /></span><span style="color: #24292e; font-family: Courier New, Courier, monospace;">[Service] </span><span style="color: #24292e; font-family: Courier New, Courier, monospace;"><br /></span><span style="color: #24292e; font-family: Courier New, Courier, monospace;">Type=oneshot </span><span style="color: #24292e; font-family: Courier New, Courier, monospace;"><br /></span><span style="color: #24292e; font-family: Courier New, Courier, monospace;">RemainAfterExit=yes </span><span style="color: #24292e; font-family: Courier New, Courier, monospace;"><br /></span><span style="color: #24292e; font-family: Courier New, Courier, monospace;">ExecStart=/usr/bin/pmount --umask 000 --noatime -r --sync %I usbstick </span><span style="color: #24292e; font-family: Courier New, Courier, monospace;"><br /></span><span style="color: #24292e; font-family: Courier New, Courier, monospace;">ExecStop=/usr/bin/pumount /dev/%I</span></blockquote>
<span style="font-variant-east-asian: normal; font-variant-numeric: normal;"><span style="color: #24292e;"><span style="font-family: Courier New, Courier, monospace; font-weight: normal;"></span></span></span><br />
<span style="font-variant: normal;"><span style="color: #24292e;"><span style="font-family: , "blinkmacsystemfont" , "segoe ui" , "helvetica" , "arial" , sans-serif , "apple color emoji" , "segoe ui emoji" , "segoe ui symbol";"><span style="font-size: small;"><span style="letter-spacing: normal;"><span style="font-style: normal;"><span style="font-weight: normal;">
</span></span></span></span></span></span></span><br />
<div align="left">
<span style="font-variant: normal;"><span style="color: #24292e;"><span style="font-family: , "blinkmacsystemfont" , "segoe ui" , "helvetica" , "arial" , sans-serif , "apple color emoji" , "segoe ui emoji" , "segoe ui symbol";"><span style="font-size: small;"><span style="letter-spacing: normal;"><span style="font-style: normal;"><span style="font-weight: normal;"><span style="font-family: "courier new" , "courier" , monospace;">
</span></span></span></span></span></span></span></span></div>
<span style="font-variant: normal;"><span style="color: #24292e;"><span style="font-family: , "blinkmacsystemfont" , "segoe ui" , "helvetica" , "arial" , sans-serif , "apple color emoji" , "segoe ui emoji" , "segoe ui symbol";"><span style="font-size: small;"><span style="letter-spacing: normal;"><span style="font-style: normal;"><span style="font-weight: normal;">
</span></span></span></span></span></span></span></div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-22389265391280912832018-01-17T22:32:00.000+01:002018-01-17T22:32:08.949+01:00New toy on the desk: Raspberry PI zero W and Raspberry Camera<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="171" data-original-width="207" src="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" /></a></div>
<div style="line-height: 100%; margin-bottom: 0mm; text-align: justify;">
<span lang="en-GB">Just
before Christmas I have been to an electronics and surplus fair where
I bought myself, among other things, a new <a href="https://www.raspberrypi.org/">Raspberry</a>
family “thing”. I started with a vague idea of building my very
own “hackable” camera. I didn't have, and still don't, have a
definitive idea of how it must be or what to do with it ... just it
must be hackable i.e. I must be able to reprogram it once I need it
for something else. I so bought a <a href="https://www.raspberrypi.org/products/raspberry-pi-zero-w/">Raspberry
Pi Zero</a> kit, including the official <a href="https://www.raspberrypi.org/products/raspberry-pi-zero-case/">withe-red
case</a> heath sink and male pin strip, and a 8 M pixel <a href="https://www.raspberrypi.org/products/camera-module-v2/">Pi
Camera</a>.</span></div>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB"><b>Headless
installation</b></span></div>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div style="line-height: 100%; margin-bottom: 0mm; text-align: justify;">
<span lang="en-GB">I'm
getting quite used to prepare and install Raspberry Pi images, it's
the fourth time, almost always headless. </span><span lang="en-GB">Plenty
of <a href="http://desertbot.io/setup-pi-zero-w-headless-wifi/">tutorials</a>
can be <a href="https://learn.adafruit.com/raspberry-pi-zero-creation/overview">found</a>
on the Internet by the way. </span><span lang="en-GB">This time is
not very different apart from just one detail: I had to configure the
Raspberry to connect to WIFI network from the very beginning.</span></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">So
after copying the latest Raspbian image on the micro-SD card withe
the usual “dd” command</span></div>
<blockquote class="tr_bq" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB"><span style="font-family: Courier New, Courier, monospace;">sudo
dd if=2017-11-29-raspbian-stretch-lite.img of=/dev/sdd</span></span></blockquote>
<div style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">I
configured Raspbian to enable SSH by default</span></div>
<blockquote class="tr_bq" style="line-height: 100%; margin-bottom: 0mm;">
<span style="font-family: Courier New, Courier, monospace;"><span lang="en-GB">sudo
touch /media/maxx/</span><span lang="en-GB">boot</span><span lang="en-GB">/ssh</span></span></blockquote>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">Then
on the same root directory I created a “wpa_supplicant” WIFI
configuration file</span></div>
<blockquote class="tr_bq" style="line-height: 100%; margin-bottom: 0mm;">
<span style="font-family: Courier New, Courier, monospace;"><span lang="en-GB">sudo
vim.tiny /media/maxx/</span><span lang="en-GB">boot</span><span lang="en-GB">/wpa_supplicant.conf</span></span></blockquote>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">Where
I wrote down my wireless network configuration</span></div>
<blockquote class="tr_bq" style="line-height: 100%; margin-bottom: 0mm;">
<span style="font-family: Courier New, Courier, monospace;"><span lang="en-GB">country=</span><span lang="en-GB">IT</span></span><span lang="en-GB"><span style="font-family: Courier New, Courier, monospace;">ctrl_interface=DIR=/var/run/wpa_supplicant
GROUP=netdev</span></span><span lang="en-GB"><span style="font-family: Courier New, Courier, monospace;">update_config=1</span></span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span lang="en-GB"><span style="font-family: Courier New, Courier, monospace;">network={</span></span><span lang="en-GB"><span style="font-family: Courier New, Courier, monospace;">ssid="WIFI"</span></span><span lang="en-GB"><span style="font-family: Courier New, Courier, monospace;">psk="secret"</span></span><span lang="en-GB"><span style="font-family: Courier New, Courier, monospace;">}</span></span></blockquote>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div style="line-height: 100%; margin-bottom: 0mm; text-align: justify;">
<span lang="en-GB">At
last I powered the Raspberry Pi and scanned the WIFI network for the
new entry computer. </span>
</div>
<div style="line-height: 100%; margin-bottom: 0mm; text-align: justify;">
<span lang="en-GB">I
connected trough SSH and I went, of course, trough the usual
post-installation operations like changing the Pi user password and
expanding the file system to the full micro-SD extent.</span></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB"><br /></span></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<b>Pi
Camera installation</b></div>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div style="line-height: 100%; margin-bottom: 0mm; text-align: justify;">
<span lang="en-GB">Once
I verified the Raspberry was correctly working I powered it back down
and connected the Pi Camera using the small flat cable also included
in the Pi-Zero kit I bought.</span></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-RNwu0XeRkOw/Wl-9tGudjGI/AAAAAAAABMY/qZjTaWOse0AWJrUILEq8ZfZg_iJIbOdTwCLcBGAs/s1600/20180101_122417.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="666" data-original-width="1600" height="265" src="https://4.bp.blogspot.com/-RNwu0XeRkOw/Wl-9tGudjGI/AAAAAAAABMY/qZjTaWOse0AWJrUILEq8ZfZg_iJIbOdTwCLcBGAs/s640/20180101_122417.jpg" width="640" /></a></div>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
</div>
<a name='more'></a>I
enabled the camera interface in the raspi-config tool and restarted
the Raspberry.<br />
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-0zrYsZ16ncw/Wl--8ud_qAI/AAAAAAAABMk/hMTnAEfzcWQBzBJkfmQEevfknIkfjfqSACLcBGAs/s1600/Screenshot%2Bfrom%2B2018-01-01%2B14-42-09.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="650" data-original-width="1058" height="392" src="https://2.bp.blogspot.com/-0zrYsZ16ncw/Wl--8ud_qAI/AAAAAAAABMk/hMTnAEfzcWQBzBJkfmQEevfknIkfjfqSACLcBGAs/s640/Screenshot%2Bfrom%2B2018-01-01%2B14-42-09.png" width="640" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
Here is the camera “first light” I took by calling
the snapshot command.</div>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-iX5BOLnnUqo/Wl-_V_KTaCI/AAAAAAAABMo/x_9Z1Mt4LvMSVZ5NTIrL-LQHrtZxK3q-wCLcBGAs/s1600/test.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1202" data-original-width="1600" height="300" src="https://3.bp.blogspot.com/-iX5BOLnnUqo/Wl-_V_KTaCI/AAAAAAAABMo/x_9Z1Mt4LvMSVZ5NTIrL-LQHrtZxK3q-wCLcBGAs/s400/test.jpg" width="400" /></a></div>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm; text-align: justify;">
(I
know it’s out of focus and I didn’t even remove the protective
plastic tab from the lens ... but I liked the idea of the Raspberry
taking a shot of itself as first thing). Once I checked
the camera was working properly I installed it inside its case:</div>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-TAD3RUp-acU/Wl-_iqnqhBI/AAAAAAAABMs/npR-WemDnqEfPo5oCDOIu2OzlJvWRu63ACLcBGAs/s1600/20180101_151537.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="630" data-original-width="1142" height="352" src="https://4.bp.blogspot.com/-TAD3RUp-acU/Wl-_iqnqhBI/AAAAAAAABMs/npR-WemDnqEfPo5oCDOIu2OzlJvWRu63ACLcBGAs/s640/20180101_151537.jpg" width="640" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB"><br /></span></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">Then I powered the Raspberry with a
cell-phone power bank and took it out for a brief tour, while the
time-lapse command was autonomously taking photos. Here is one of the
best shots</span></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-QSYFH5_4OZc/Wl_ALt_TVCI/AAAAAAAABM4/_eEU1BA77w8V2GcFrAkxEAvAnkcruyDsQCLcBGAs/s1600/timelapse0021.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1202" height="400" src="https://3.bp.blogspot.com/-QSYFH5_4OZc/Wl_ALt_TVCI/AAAAAAAABM4/_eEU1BA77w8V2GcFrAkxEAvAnkcruyDsQCLcBGAs/s400/timelapse0021.jpg" width="300" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB"><b>Now
what?</b></span></div>
<div align="justify" lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<style type="text/css">
@page { margin: 20mm }
p { margin-bottom: 2.47mm; direction: ltr; line-height: 120%; text-align: left; orphans: 2; widows: 2 }
a:link { so-language: zxx }
</style>
<br />
<div style="line-height: 100%; margin-bottom: 0mm; text-align: justify;">
<span lang="en-GB">Today
I barely tested the Raspberry plus camera capabilities. For certain
uses, like a remotely operated security camera, the current
configuration could be enough, but for most of possible uses some
sort of physical interface must be added. Picture quality is
comparable with an average cell-phone camera but Pi Camera real
strength lies In flexibility. In the near future I’ll add a bare
minimum interface, at least power and shot buttons and some status
indicator LED, and I’ll try using it as time-lapse camera.</span></div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-26544972442287137222017-12-31T11:47:00.000+01:002017-12-31T11:47:05.858+01:00Happy 2018!<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-enYitywPg4s/Wki_jQN8OpI/AAAAAAAABMA/i0CPBswuXfI9ipiCrigsNe6F0eBmewP_wCLcBGAs/s1600/DSCN4698.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1000" data-original-width="620" height="400" src="https://3.bp.blogspot.com/-enYitywPg4s/Wki_jQN8OpI/AAAAAAAABMA/i0CPBswuXfI9ipiCrigsNe6F0eBmewP_wCLcBGAs/s400/DSCN4698.JPG" width="248" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
To all my readers and visitors ...</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<span style="color: #990000; font-family: Verdana, sans-serif; font-size: x-large;"><b>HAPPY NEW YEAR!</b></span></div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-33132468719962698482017-12-30T16:37:00.001+01:002017-12-30T16:37:56.494+01:00Backing-Up Your Data With Raspberry Pi<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="171" data-original-width="207" src="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" /></a></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Among
information technology bad practices not backing-up your data is the
one you are going to regret more as something goes wrong. For too
many years I’ve been relying solely on the good health of my disk
drives, that means I was relying mostly on good luck, and on manually
copying data, mostly photos and videos, on different supports. I
decided so to buy myself a bigger disk drive with the sole purpose of
keeping a backup copy of my data.</span></div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br />
</div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB"><b>Hardware
set-up</b></span></div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br />
</div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">First
things first, I bough</span><span lang="en-GB">t</span><span lang="en-GB">
an external 2TB USB disk. The disk size is enough to backup my 1TB
NAS disk and other data I actually keep on the <a href="https://www.raspberrypi.org/">Raspberry
Pi</a> server or the desktop PC. More importantly the disk is
externally powered since the Raspberry couldn’t power it by itself.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">I
formatted the , with the XDS file-system, by using the tool provided
with my NAS disk, after attaching the new disk to the NAS spare USB
port. This step is not strictly necessary but it will allow me, in
future, to share the backup disk just by connecting it to the NAS USB
port.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">I
then connected the backup disk to the Raspberry Pi 3 and configured
the </span><span lang="en-GB"><i>/etc/fstab</i></span><span lang="en-GB">
file in order to mount it on start-up</span></div>
<blockquote class="tr_bq" style="line-height: 100%; margin-bottom: 0mm; text-align: left;">
<span style="font-family: FreeMono, monospace;"><span lang="en-GB">/dev/sdb1
/media/backup xfs rw,defaults 0 0</span></span></blockquote>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm; text-align: left;">
<br />
</div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br />
</div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB"><b>Software
set-up: rdiff-backup</b></span></div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br />
</div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">While
I was looking for a backing-up software solutions I was mostly
thinking to some directory mirroring tool like RSync but, like often
happens, I stumbled in a more complete solution when I did read <a href="https://opensource.com/life/16/3/turn-your-old-raspberry-pi-automatic-backup-server">this
page</a> describing a backup system based on Raspberry Pi and
<a href="http://rdiff-backup.nongnu.org/">rdiff-backup</a>.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Rdiff-backup
is a command line based backup tool, it provide all basic backing-up
features like differential backups or time based restore. More
importantly, to me, it’s based on standards tools like Rsync
directory mirroring and tar archives, meaning that archives are
easily readable without the need of rdiff-backup itself.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">I
installed rdiff-backup with apt-get tool:</span></div>
<blockquote class="tr_bq" style="line-height: 100%; margin-bottom: 0mm; text-align: left;">
<span style="font-family: FreeMono, monospace;"><span lang="en-GB">sudo
apt-get install rdiff-backup</span></span></blockquote>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm; text-align: left;">
<br />
</div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Then
created some target folder in the backup drive </span>
</div>
<blockquote class="tr_bq" style="line-height: 100%; margin-bottom: 0mm; text-align: justify;">
<div style="text-align: left;">
<span style="font-family: FreeMono, monospace;">sudo
mkdir /media/backup/public</span></div>
<span style="font-family: FreeMono, monospace;"><div style="text-align: left;">
sudo
mkdir /media/backup/nas</div>
</span><span style="font-family: FreeMono, monospace;"><div style="text-align: left;">
sudo
chown pi:pi /media/backup/public/</div>
</span><span style="font-family: FreeMono, monospace;"><div style="text-align: left;">
sudo
chown pi:pi /media/backup/nas/</div>
</span></blockquote>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm; text-align: left;">
<br />
</div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Then
I manually started the initial backup, knowing the operation was
going to take some time I started a independent shell session with
the </span><span lang="en-GB"><i>screen</i></span><span lang="en-GB">
command.</span></div>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm; text-align: justify;">
<br />
</div>
<blockquote class="tr_bq" style="line-height: 100%; margin-bottom: 0mm; text-align: justify;">
<div style="text-align: left;">
<span style="font-family: FreeMono, monospace;">screen</span></div>
<span style="font-family: FreeMono, monospace;"><div style="text-align: left;">
rdiff-backup
--exclude /media/public/BTdownload /media/public/
/media/backup/public/</div>
</span></blockquote>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm; text-align: justify;">
<br />
</div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">The
backup command just needs source and destination folders path, many
optional switches are available like the one I used, “--exclude”,
which exclude from the backup process some sub-folder.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Once
the initial backup completed successfully I used the <i>crontab</i> command
to schedule the backup command.</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm; text-align: left;">
<span style="font-family: FreeMono, monospace;"><span lang="en-GB">crontab
-e</span></span></blockquote>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Since
most of backed-up data are photos and videos I produce during
week-ends I scheduled it weekly ad Tuesday (Monday is already
SD-card backup day)</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span style="font-family: FreeMono, monospace;"><span lang="en-GB">0
5 * * 2 rdiff-backup --exclude /media/public/BTdownload
/media/public/ /media/backup/public/</span></span></blockquote>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br />
</div>
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB"><b>Some
notes on performances</b></span></div>
<div lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br />
</div>
<style type="text/css">
@page { margin: 20mm }
p { margin-bottom: 2.47mm; direction: ltr; line-height: 120%; text-align: left; orphans: 2; widows: 2 }
a:link { so-language: zxx }
</style>
<br />
<div style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">The
initial backup of my photos and videos collection, about 300 GB, took
most of the day to complete. The poor performance is mostly because I
keep my data on a Samba share. Rdiff-backup documentation discourages
backing up networked disks through in favor of the better optimized
SSH protocol, unfortunately my NAS disk doesn't support this option.
Not a big problem in my case anyway, because future differential
backups will need less time, of course, and the backup process will
be performed automatically between two always-on devices.</span></div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-7752452468245507892017-12-23T23:30:00.001+01:002017-12-23T23:30:32.788+01:00Merry Christmas!<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-vrxUNyOa0sI/Wj7YZ03breI/AAAAAAAABLw/0g7ZUu9pqUgO46j5lCyLvpa0jNh_zs2BwCLcBGAs/s1600/20171208_200058.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="906" data-original-width="481" height="400" src="https://3.bp.blogspot.com/-vrxUNyOa0sI/Wj7YZ03breI/AAAAAAAABLw/0g7ZUu9pqUgO46j5lCyLvpa0jNh_zs2BwCLcBGAs/s400/20171208_200058.gif" width="210" /></a></div>
<div style="text-align: center;">
The most sincere</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<span style="color: #990000; font-family: Georgia, Times New Roman, serif; font-size: x-large;"><i><b>MERRY CHRISTMAS!</b></i></span></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
to all my readers and visitors.</div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-91794698387895419782017-11-23T23:11:00.000+01:002017-11-23T23:11:20.343+01:00Blog Birthday Nine<div style="text-align: justify;">
One more year of lazy blogging is passed. Looking back to this year I must say I have no excuses for writing less than one post per month. Far more better looking forward, I'll try doing something more next year: I have two Raspberry PI installations, at the moment, which are attracting my interest more of the "flatter" desktop computing world. So I hope you'll find something more interesting on this blog next year. Stay tuned ...</div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-88057310800552273312017-11-05T17:02:00.002+01:002017-11-05T17:05:36.428+01:00Upgrading to Ubuntu 17.10 (Artful Aardvark)<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-sVl34TMHVOY/UCqaRiuUJtI/AAAAAAAAAM8/G3ZlUQnbp8gty4hk6Emtkht_vTrGPGbUQCPcBGAYYCw/s1600/Veriton-S661i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="168" data-original-width="64" src="https://4.bp.blogspot.com/-sVl34TMHVOY/UCqaRiuUJtI/AAAAAAAAAM8/G3ZlUQnbp8gty4hk6Emtkht_vTrGPGbUQCPcBGAYYCw/s1600/Veriton-S661i.jpg" /></a></div>
<div class="western tr_bq" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">It's some time I don't upgrade my desktop
computer, I must reckon I enjoyed the relative stability of using a
<a href="https://wiki.ubuntu.com/XenialXerus/ReleaseNotes?_ga=2.97473695.1492858631.1509891924-76614406.1508098314">LTS</a>
distribution and didn't fell the need of a twice-a-year system
upgrade. Unfortunately my PC suffered of a system crash, probably
because of some faulty hardware, just while updating with the result
of corrupting the installed operating system beyond my capability of
repairing it.</span></div>
<div class="western" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">I so downloaded latest <a href="https://www.ubuntu.com/">Ubuntu</a>
distribution release and started the good-old installation procedure.</span></div>
<div class="western" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div class="western" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>No
more Ubuntu-gnome long live to Ubuntu (Gnome)</b></span></div>
<div class="western" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div class="western" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">I’ve been a <a href="https://ubuntugnome.org/">Ubuntu-Gnome</a>
user for a long time, so I’ve been quite pleased to <a href="http://ubuntugnome.org/ubuntu-gnome-17-04-released/">learn</a>
<a href="https://www.canonical.com/">Canonical</a> decided to stop
Unity support and adopt Gnome-Shell as primary desktop manager. I so
went for downloading latest Ubuntu ISO image. Once finished I
prepared a bootable USB disk using <a href="https://unetbootin.github.io/">Unetbootin</a>
tool, then I restarted my PC.</span></div>
<div align="justify" class="western" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div align="justify" class="western" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>Installation</b></span></div>
<div align="justify" class="western" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div class="western" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">I started my computer from USB disk then selected
the “Try Ubuntu ...” option instead of starting directly the
installation program in order to collect screen-shots more easily. </span>
</div>
<div class="western" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">After usual language and “third party” option
selection I came to the installation type selection where I choose to
upgrade my 16.04 installation.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-DP-IbONHClo/Wf81lhc3tEI/AAAAAAAABKE/HreExzq_k2wf2vuZDztsU6wY1J4rbuo7ACLcBGAs/s1600/ubuntu-17.10-upgrade-5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="575" data-original-width="966" height="237" src="https://1.bp.blogspot.com/-DP-IbONHClo/Wf81lhc3tEI/AAAAAAAABKE/HreExzq_k2wf2vuZDztsU6wY1J4rbuo7ACLcBGAs/s400/ubuntu-17.10-upgrade-5.jpg" width="400" /></a></div>
<div class="western" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span style="font-size: 11pt;"></span></div>
<a name='more'></a>Then I selected location, keyboard layout and user
details …<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-zvTMUnqbxVY/Wf81rSVV7pI/AAAAAAAABKI/vSk25LlpafgDx3E3AKd6PxWdTz1pCx_ugCLcBGAs/s1600/ubuntu-17.10-upgrade-8.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="575" data-original-width="966" height="237" src="https://2.bp.blogspot.com/-zvTMUnqbxVY/Wf81rSVV7pI/AAAAAAAABKI/vSk25LlpafgDx3E3AKd6PxWdTz1pCx_ugCLcBGAs/s400/ubuntu-17.10-upgrade-8.jpg" width="400" /></a></div>
<div class="western" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span style="font-size: 11pt;">at last installation process started.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-yoJtWkb-x40/Wf8124-LzHI/AAAAAAAABKM/HxjcMCHK6NE5zwr7fXyAB4mzWkRE4gMdACLcBGAs/s1600/ubuntu-17.10-upgrade-10.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="569" data-original-width="752" height="302" src="https://2.bp.blogspot.com/-yoJtWkb-x40/Wf8124-LzHI/AAAAAAAABKM/HxjcMCHK6NE5zwr7fXyAB4mzWkRE4gMdACLcBGAs/s400/ubuntu-17.10-upgrade-10.jpg" width="400" /></a></div>
<div class="western" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<br /></div>
<div align="justify" class="western" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>Post installation setup</b></span></div>
<div align="justify" class="western" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div class="western" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">The installation type I selected should keep most
of previously installed applications. In reality at my first access
to the newly installed system I found most of applications I used
missing. I installed some but I’m not in a hurry of installing them
all since I often have my PC filled with programs I use once then I
forget.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-RvSwGZj1m4Y/Wf81-r4COGI/AAAAAAAABKQ/hSQ4UpiZ2kEai_GZwZL3AfCahm_mSt-5wCLcBGAs/s1600/ubuntu-17.10-upgrade-11.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://2.bp.blogspot.com/-RvSwGZj1m4Y/Wf81-r4COGI/AAAAAAAABKQ/hSQ4UpiZ2kEai_GZwZL3AfCahm_mSt-5wCLcBGAs/s640/ubuntu-17.10-upgrade-11.jpg" width="640" /></a></div>
<div class="western" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB"><br /></span></div>
<div class="western" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Just after install Ubuntu 17.10 comes with
Gnome-shell configured to look like the (now old) Unity: with a
left-sided dock and the upper-left “hot corner” disabled. I so
installed <a href="https://apps.ubuntu.com/cat/applications/gnome-tweak-tool/">gnome-tweak</a>
application to enable hot corner and also hide trashcan and drive
icons from desktop. At last I visited gnome extensions page where I
updated shell extension I usually use.</span></div>
<div align="justify" class="western" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div align="justify" class="western" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>Mounting Samba shares</b></span></div>
<div align="justify" class="western" lang="en-GB" style="line-height: 108%; margin-bottom: 2.82mm;">
<br /></div>
<div class="western" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">It seems every time I upgrade my computer the
parameters needed to mount my NAS Samba shares changes in something.
This time has been no exception. Just after the system has been
installed I edited configuration file “/etc/fstab” adding the
couple of configuration lines I used before (and still are working on
other machines). As I tried mounting them using</span></div>
<div class="western" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">Sudo mount -a</span></div>
<div class="western" style="line-height: 108%; margin-bottom: 2.82mm; text-align: justify;">
<span lang="en-GB">I got an odd “</span><span lang="en-GB">Host is
down” </span><span lang="en-GB">error. After some searching I
<a href="https://askubuntu.com/questions/915549/16-04-cifs-host-is-down-but-they-are-not">learned</a>
that, because of some Microsoft's protocol update, a new “version”
parameter has been added. Since my NAS is quite old I has to set this
parameter to “1.0”.</span></div>
<div align="justify" class="western" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">Here is my updated configuration:</span></div>
<blockquote style="line-height: 100%; margin-bottom: 2.82mm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="font-family: Courier New, Courier, monospace;">#
NAS Public share//192.168.0.110/public
/media/public cifs
guest,uid=1000,iocharset=utf8,file_mode=0777,dir_mode=0777,sec=ntlm,vers=1.0
0 0</span> </span></blockquote>
<blockquote style="line-height: 100%; margin-bottom: 2.82mm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#
NAS Maxx share//192.168.0.110/sh_maxx
/media/nas cifs
uid=1000,credentials=/home/maxx/.smbcredentials,iocharset=utf8,sec=ntlm,file_mode=0777,dir_mode=0777,vers=1.0
0 0</span></blockquote>
<style type="text/css">
@page { margin: 20mm }
p { margin-bottom: 2.47mm; direction: ltr; color: #00000a; line-height: 120%; text-align: left; orphans: 2; widows: 2 }
p.western { font-family: "Calibri", serif; font-size: 11pt; so-language: it-IT }
p.cjk { font-family: ; font-size: 11pt; so-language: it-IT }
p.ctl { font-family: ; font-size: 11pt; so-language: ar-SA }
a:link { so-language: zxx }
</style>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-34648153671634717422017-10-02T22:17:00.000+02:002017-10-02T22:17:06.328+02:00Backing-up the Raspberry Pi 3<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="171" data-original-width="207" src="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" /></a></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">Recently
I had to repeat installation of my Raspberry Pi 3 server. Probably
because of some SD card corruption problem I started experiencing
unexpected loss of active services, first GitLab then MiniDLNA, a and
failures while trying reinstalling or reconfiguring them. I so
downloaded latest Raspbian image and went with a complete
installation. Not a big deal, since I’ve been following <a href="http://massimomusante.blogspot.it/2017/04/setting-up-raspberry-pi-3-as-home-server.html">my
own instructions</a> on this blog but still a time consuming process.</span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">Once
the Raspberry server was operative again I started looking for a
simple backup solution in the case something broke again by itself
or, not unlikely, I broke something by myself.</span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">I
quickly found in the Internet <a href="https://raspberrypi.stackexchange.com/questions/5427/can-a-raspberry-pi-be-used-to-create-a-backup-of-itself">this
discussion</a> page where, among other solutions, it was proposed a
handy shell script to completely backup Raspberry SD Card. Following
discussion links I landed on <a href="https://github.com/aweijnitz/pi_backup">this
GitHub page</a> where the same script is available in its latest
version.</span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>Installation</b></span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">Installing
the script is just matter of downloading and unzipping it or, as
alternative, cloning it with git command. I did choose the latter
since I’m going to need git in future.</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span lang="en-GB">sudo
apt-get install git</span><span lang="en-GB">mkdir
script</span><span lang="en-GB">cd
script/</span><span lang="en-GB">git
clone </span><span style="color: navy;"><u><a href="https://github.com/aweijnitz/pi_backup.git"><span lang="en-GB">https://github.com/aweijnitz/pi_backup.git</span></a></u></span></span></blockquote>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>configuring
the script</b></span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">The
PI backup script is a fine example of shell programming, it needs
only a couple of arrangements to fit the system where is installed.</span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">First
functions </span><span lang="en-GB"><i>stopServices</i></span><span lang="en-GB">()
and </span><span lang="en-GB"><i>startServices</i></span><span lang="en-GB">
must be edited by uncommenting commands to stop and start services
running on the Raspberry. I added command to stop and start MiniDLNA
service:</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span lang="en-GB">...</span><span lang="en-GB">sudo
service minidlna stop</span><span lang="en-GB">...</span><span lang="en-GB">sudo
service minidlna start</span>...</span></blockquote>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">Then
I edited the backup path. In the same scrip section it’s possible
to set the number of old backups to keep and if backed-up images must
be compressed.</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">...</span></span><span lang="en-GB"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#
Setting up directories</span></span><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span lang="en-GB">SUBDIR=</span><span lang="en-GB"><b>backup</b></span></span><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span lang="en-GB">MOUNTPOINT=</span><span lang="en-GB"><b>/media/usbdisk</b></span></span><span lang="en-GB"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">DIR=$MOUNTPOINT/$SUBDIR</span></span><span lang="en-GB"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">RETENTIONPERIOD=1
# days to keep old backups</span></span><span lang="en-GB"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">POSTPROCESS=0
# 1 to use a postProcessSucess function after successfull backup</span></span><span lang="en-GB"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">GZIP=0
# whether to gzip the backup or not</span></span><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">...</span></blockquote>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b></b></span></div>
<a name='more'></a><br />
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>Scheduling
Pi backup</b></span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">The
backup script can, of course, be executed manually </span>
</div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span style="font-family: Courier 10 Pitch;"><span lang="en-GB">/script/pi_backup/backup.sh</span></span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">But
the real strength in having a backup script is not to have to
remember to call it. So, last but not least, I configured the </span><span lang="en-GB"><i>cron</i></span><span lang="en-GB">
service in order to automatically execute the script:</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">crontab
-e</span></span></blockquote>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">Since
I mostly work on Raspberry during week-and I configured a weekly
backup on Monday morning</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span lang="en-GB">...</span><span lang="en-GB">0
5 * * 1 /home/pi/script/pi_backup/backup.sh</span><span lang="en-GB">...</span></span></blockquote>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-ffM2EcpskdU/WdKeO4Y9zXI/AAAAAAAABJw/njomU89oGSoS5cUVUPmEde0ZKcQ3IpgcwCLcBGAs/s1600/result-log.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="577" data-original-width="1032" height="355" src="https://2.bp.blogspot.com/-ffM2EcpskdU/WdKeO4Y9zXI/AAAAAAAABJw/njomU89oGSoS5cUVUPmEde0ZKcQ3IpgcwCLcBGAs/s640/result-log.jpg" width="640" /></a></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<b>Performances</b></div>
<style type="text/css">
@page { margin: 20mm }
p { margin-bottom: 2.47mm; direction: ltr; line-height: 120%; text-align: left; orphans: 2; widows: 2 }
</style>
<br />
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<a href="https://www.blogger.com/null" name="_GoBack"></a>
<span lang="en-GB">Performances can vary widely depending on SD card
size and destination drive speed, it takes about half an hour to
complete on my system with the compression option disabled. On a home
machine, mostly used as media server, I can afford half a hour of
downtime every week. </span>
</div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-64097735975811969962017-09-10T09:45:00.000+02:002017-09-30T18:25:10.451+02:00KODI on RetroPie (and Raspberry Pi)<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="171" data-original-width="207" src="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" /></a></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">I’m
not what you’d call a hard gamer ... probably I’m not a gamer at
all. So after a little playing with <a href="http://massimomusante.blogspot.it/2017/07/installing-retropie-on-raspberry-pi-b.html">RetroPie</a>,
and the few ROM files I managed to find, I continued with
experimenting with available RetroPie “ports”.</span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><a href="https://retropie.org.uk/">RetroPie</a>
<a href="https://github.com/RetroPie/RetroPie-Setup/wiki/Ports">ports</a>
are a plug-in system that usually allow you to add open source games
or additional emulation engine to RetroPie interface. The “</span><a href="https://github.com/RetroPie/RetroPie-Setup/wiki/KODI"><span lang="en-GB">KODI</span></a><span lang="en-GB">”
port instead allow you to install and start from RetroPie interface a
full featured media manager giving your retro-computing machine an
effective “double life”.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b><br /></b></span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>KODI
Media Manager</b></span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b><br /></b></span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><a href="https://kodi.tv/">KODI</a>,
previously known as </span><span lang="en-GB">XBMC</span><span lang="en-GB">
is a media manager software <a href="https://kodi.tv/download">available</a>
for various Linux flavours. On the Raspberry it's available both as
installation package and as stand alone distribution. KODI is of
course capable of playing music and video both stored locally on a
remote DLNA source. In addition KODI allows installing a great
variety of </span><a href="https://kodi.tv/addons"><span lang="en-GB">add-on</span></a><span lang="en-GB">
modules to display, for example, YouTube videos or whether </span><span lang="en-GB">news</span><span lang="en-GB">.</span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b><br /></b></span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b>Installing
KODI “port”</b></span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b><br /></b></span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">KODI
can be installed and integrated with RetroPie interface from RetroPie
set-up script.</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">sudo
RetroPie-Setup/retropie_setup.sh</span></span></blockquote>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">I
selected the “Manage packages” menu, then the “Optional
packages” one at last I selected “KODI” package in packages
list.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-Okre1GWbyss/WbTsqrO7E1I/AAAAAAAABJY/zKz0I3FiWdM09CBRgE3HKb12YFIb-ItQACLcBGAs/s1600/kodi-configuration-screenshot-2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="594" data-original-width="744" height="508" src="https://1.bp.blogspot.com/-Okre1GWbyss/WbTsqrO7E1I/AAAAAAAABJY/zKz0I3FiWdM09CBRgE3HKb12YFIb-ItQACLcBGAs/s640/kodi-configuration-screenshot-2.jpg" width="640" /></a></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
Then
the installation script started and I only hat to patiently wait its
conclusion.</div>
<a name='more'></a><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-PCHM9FY9auY/WbTs1qMe4-I/AAAAAAAABJc/FZVJCJrol5wAkfnpDqi4zZkUkQdfmaWPwCLcBGAs/s1600/kodi-configuration-screenshot-4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="594" data-original-width="744" height="508" src="https://3.bp.blogspot.com/-PCHM9FY9auY/WbTs1qMe4-I/AAAAAAAABJc/FZVJCJrol5wAkfnpDqi4zZkUkQdfmaWPwCLcBGAs/s640/kodi-configuration-screenshot-4.jpg" width="640" /></a></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<b><br /></b></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<b>First
run and some troubleshooting</b></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<b><br /></b></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">As
the installation completed I’ve been able to select KODI from
RetroPie interface “ports” section and to start it. KODI worked
fine and I had no problems to connect with the other Raspberry
MiniDLNA server and play media I keep stored there (I haven’t
attached a local disk yet).</span></div>
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">Problems
raised when I tried to install some optional module from <a href="https://kodi.tv/addons">KODI
repository</a>, since I continued getting network error</span><span lang="en-GB">s</span><span lang="en-GB">
like the RetroPie machine wasn’t connected the Internet.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">After
some search I found <a href="https://retropie.org.uk/forum/topic/7971/linux-connected-to-internet-but-kodi-isn-t">this</a>
post suggesting to manually set DNS server instead of letting
RetroPie to fetch it from the DHCP server.</span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">I
so installed dnsmasq ...</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">sudo
apt-get install dnsmasq</span></blockquote>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">And
edited its configuration ...</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">sudo
vim.tiny /etc/dnsmasq.conf</span></span></blockquote>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">By
adding Google DNS servers IP ...</span></div>
<blockquote class="tr_bq" style="line-height: 108%; margin-bottom: 2.82mm;">
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><span lang="en-GB">#
Add other name servers here, with domain specs if they are for</span><span lang="en-GB">#
non-public domains.</span><span lang="en-GB">#server=/localnet/192.168.0.1</span><span lang="en-GB">server=8.8.8.8</span><span lang="en-GB">server=8.8.4.4</span></span></blockquote>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></b></span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">Con</span>clusions</b></span></div>
<div style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB"><b><br /></b></span></div>
<style type="text/css">
@page { margin: 20mm }
p { margin-bottom: 2.47mm; direction: ltr; line-height: 120%; text-align: left; orphans: 2; widows: 2 }
a:link { so-language: zxx }
</style>
<br />
<div align="justify" style="line-height: 108%; margin-bottom: 2.82mm;">
<span lang="en-GB">After
setting DNS servers I downloaded and tested some optional module,
like the YouTube or the DailyMotion ones. I must say that while </span><span lang="en-GB">KODI
has been able to play almost all my videos optional modules I tried
revealed particularly slow and almost useless, of course it’s
possible things works much better using a newer and faster Raspberry
instead of my old PI-one.</span></div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-80017360714701893852017-07-15T16:29:00.000+02:002017-07-15T16:29:37.495+02:00Installing RetroPie (on the Raspberry Pi B+)<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="171" data-original-width="207" src="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">Just
after I installed the Raspberry Pi 3 as <a href="http://massimomusante.blogspot.it/2017/04/setting-up-raspberry-pi-3-as-home-server.html">home
server</a> I promised myself I would have destined the old board to
more “experimental” experiences. As soon as I got some fee time I
so decided to explore Raspberry gaming capabilities. I'm far from
being a gamer today but I spent some time playing computer games when
I was younger, during the “Commodore Amiga age”. </span>
</div>
<div align="justify" lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<b>RetroPie</b></div>
<div align="justify" lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB"><a href="https://retropie.org.uk/">RetroPie</a>
is a Raspberry Pi distribution, based on <a href="https://www.raspbian.org/">Raspbian</a>,
specialised on making the Raspberry a full featured gaming machine.
RetroPie image is provided with a great variety of emulation
software, a graphics user interface, gaming control support and a
configuration program to setup most of its options without the need
of keyboard and mouse. Among its features RetroPie allows to download
and install optional modules supporting things like media server
software and open source games.</span></div>
<div align="justify" lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<b>Parts
list</b></div>
<div align="justify" lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">Before
starting to install I collected the required hardware: The Raspberry
Pi, of course, a 8GB USB disk I had available, a wireless USB adapter
I <a href="http://massimomusante.blogspot.it/2016/05/place-raspberry-pi-at-centre-of-your.html">already
used</a> with the Raspberry and a cheap wireless keyboard I bought
during a surplus fair. Last but not least by bedroom TV was going to
be used as monitor. The wireless keyboard has been the only thing I
bought with this project in mind.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-os5kG285bL4/WWohhgjRqNI/AAAAAAAABIg/r7iVfxpixLQpnk7NbZGCBgdgvA3G_CvhgCLcBGAs/s1600/20170715_150438_2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="716" data-original-width="594" height="640" src="https://2.bp.blogspot.com/-os5kG285bL4/WWohhgjRqNI/AAAAAAAABIg/r7iVfxpixLQpnk7NbZGCBgdgvA3G_CvhgCLcBGAs/s640/20170715_150438_2.jpg" width="530" /></a></div>
<div align="justify" lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
</div>
<a name='more'></a><br /><br />
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<b>Installing
RetroPie </b>
</div>
<div align="justify" lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">Installing
RetroPie is not different from installing Raspbian, I downloaded the
disk image from RetroPie <a href="https://retropie.org.uk/download/">download
page</a>, then I copied the disk image on Raspberry micro-SD disk
using “dd” command</span></div>
<blockquote class="tr_bq" style="line-height: 100%; margin-bottom: 0mm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">sudo dd bs=4M if=retropie-4.2-rpi1_zero.img of=/dev/sdd</span></blockquote>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">Then
I mounted the newly created disk and added an empty “ssh” file in
order to enable SSH server.</span></div>
<blockquote class="tr_bq" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">touch
/media/maxx/boot/ssh</span></span></blockquote>
<div align="justify" lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">Eventually
I inserted the micro-SD card in the Raspberry plugged it to the
network and powered it. After a quick network scan I’ve Ben able to
connect to the newly installed RetroPie machine.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/--kZruUBXIKc/WWokwoqSeQI/AAAAAAAABIk/NizCCWdlVjQ5ufJMqP4ICCvLbok58iE1gCLcBGAs/s1600/retropie-4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="475" data-original-width="735" height="258" src="https://2.bp.blogspot.com/--kZruUBXIKc/WWokwoqSeQI/AAAAAAAABIk/NizCCWdlVjQ5ufJMqP4ICCvLbok58iE1gCLcBGAs/s400/retropie-4.jpg" width="400" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<b>RetroPie
configuration</b></div>
<div align="justify" lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">The
first step in configuring RetroPie Has been, of course, configuring
Raspbian. I started the configuration program</span></div>
<blockquote class="tr_bq" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">sudo
raspi-config</span></span></blockquote>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">And,
as I already did before, I expanded the memory card file system and
changed “pi” user default password.</span></div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">Then
I started the RetroPie configuration script</span></div>
<blockquote class="tr_bq" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">sudo
RetroPie-Setup/retropie_setup.sh</span></span></blockquote>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">From
here I’ve been able to configure wireless network connection </span>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-1evp3FFG70U/WWolVTsjuPI/AAAAAAAABIo/NY9FrJ1wWrwFiyI0yOdfTnnZ9XvCM08PwCLcBGAs/s1600/retropie-config-5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="628" data-original-width="870" height="286" src="https://4.bp.blogspot.com/-1evp3FFG70U/WWolVTsjuPI/AAAAAAAABIo/NY9FrJ1wWrwFiyI0yOdfTnnZ9XvCM08PwCLcBGAs/s400/retropie-config-5.jpg" width="400" /></a></div>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">And
to enable the </span><span style="color: #24292e;"><span style="font-family: apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;"><span style="font-size: 12pt;"><span lang="en-GB">USB
ROM Transfer Service</span></span></span></span><span lang="en-GB">.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-t9-XGat4qwE/WWolizLsNLI/AAAAAAAABIw/pjDS2vUnhGgOBgC6tUmWSt4FjwK0J6lnACLcBGAs/s1600/retropie-config-4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="628" data-original-width="870" height="287" src="https://3.bp.blogspot.com/-t9-XGat4qwE/WWolizLsNLI/AAAAAAAABIw/pjDS2vUnhGgOBgC6tUmWSt4FjwK0J6lnACLcBGAs/s400/retropie-config-4.jpg" width="400" /></a></div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB"><br /></span></div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">At
last I connected the 8GB USB disk, formatted with a FAT file-system,
where I had previously created a “retropie-mount” folder.</span></div>
<blockquote class="tr_bq" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">mkdir
/media/usb0/retropie-mount</span></span></blockquote>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">RetroPie
automatically recognized the USB disk as the one where ROM files must
be stored and provided to create the required directory structure
inside of “retropie-mount” folder.</span></div>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<b>First run</b></div>
<div lang="en-GB" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<style type="text/css">
@page { margin: 20mm }
p { margin-bottom: 2.47mm; direction: ltr; line-height: 120%; text-align: left; orphans: 2; widows: 2 }
a:link { so-language: zxx }
</style>
<br />
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span lang="en-GB">I
connected the Raspberry to my TV HDMI port and powered all on, the
wireless keyboard has been recognised at once without the need of any
configuration. I only had to map keys to my preferences. I’ve been
positively impressed from Raspberry’s graphics capabilities, I own
it since some years but I always used it in headless mode. Of course
the Raspberry Pi 3 would behave much batter as game machine but I
prefer keep it on it's sever work. In the near future I’m planning
to explore the available optional modules, called “ports”,
especially the <a href="https://kodi.tv/">Kodi</a> media server one.</span></div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-20365799059391553532017-06-30T00:08:00.000+02:002017-06-30T00:08:23.331+02:00GitLab on the Raspberry Pi 3<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="171" data-original-width="207" src="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAgB8SX0B8tdGo6FMskYjXNbACPcBGAYYCw/s1600/raspberry-pi-i.jpg" /></a></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
<span lang="en-GB">Software
version </span><span lang="en-GB">control</span><span lang="en-GB">
systems </span><span lang="en-GB">(VCS) </span><span lang="en-GB">are
among essential (almost life-saving) tools when programming in team.
</span><span lang="en-GB">A</span><span lang="en-GB">lso while
working by themselves they can reveal a big deal useful. I had
<a class="western" href="https://en.wikipedia.org/wiki/Mercurial">Mercurial</a>
and Mercurial-server <a class="western" href="http://massimomusante.blogspot.it/2013/07/mercurial-and-mercurial-server-playing.html">installed</a>
on my desktop computer </span><span lang="en-GB">time ago </span><span lang="en-GB">and
used </span><span lang="en-GB">them</span><span lang="en-GB"> to
backup and </span><span lang="en-GB">synchronize</span><span lang="en-GB">
my programming experiments between </span><span lang="en-GB">the
netbook and the desktop computer</span><span lang="en-GB">.</span></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
Since
I installed Mercurial I went trough a couple of desktop
full-reinstall, of course, I also had to reinstall and reconfigure
the version control system tools. So, when I bought the Raspberry Pi
3, I did put using it as VCS server on top of my personal wish-list.</div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
<br /></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
<b>Why
Git? Why GitLab?</b></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
<b><br /></b></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
<span lang="en-GB">I
must say I have no complaints against Mercurial, it always worked
without any problem, but I’ve become a GitHub user so, passing to
Git also at home seemed me the natural thing to do. At the beginning
I was thinking about a plain bare-bone Git installation, without any
graphical user interface, just like it was for Mercurial-server.
While I was looking for a suitable git-on-raspberry how-to </span><span lang="en-GB">page</span><span lang="en-GB">
I literally stumbled on <a class="western" href="https://howtoraspberrypi.com/private-git-raspberry-gitlab/">this</a>
GitLab Installation how-to.</span></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
<span lang="en-GB"><a class="western" href="https://about.gitlab.com/">GitLab</a>
is a G</span><span lang="en-GB">i</span><span lang="en-GB">t server
full featured with web interface, projects and users management.
GitLa</span><span lang="en-GB">b</span><span lang="en-GB"> is
Open-source, </span><span lang="en-GB">or </span><span lang="en-GB">at
least exists a <a class="western" href="https://about.gitlab.com/community/">community</a>
version, but what triggered my decision is that it’s quite easy to
install. </span><span lang="en-GB">I</span><span lang="en-GB">nstalling
GitLab is not harder than installing a bare-bone Git server, so …
here I am.</span></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
<span lang="en-GB"><br /></span></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
<b>Installing
GitLab</b></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
<b><br /></b></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
Installing
GitLab has been a simple four-step process, at the end of
installation process GitLab was ready-and-running without any need of
configuration.</div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
<span lang="en-GB">First
I installed some required dependenc</span><span lang="en-GB">ies.</span><span lang="en-GB">
</span><span lang="en-GB">B</span><span lang="en-GB">ecause of
previous installation</span><span lang="en-GB">s</span><span lang="en-GB">
on my Raspberry the only one I had to install has been </span><span lang="en-GB"><a class="western" href="http://www.postfix.org/">Postfix</a>
mail server</span><span lang="en-GB">.</span></div>
<blockquote class="tr_bq" style="line-height: 107%; margin-bottom: 2.82mm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">sudo
apt install curl openssh-server ca-certificates postfix
apt-transport-https</span></blockquote>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
Then
I added GitLab repositories and keys to Raspbian sources:</div>
<blockquote class="tr_bq" style="line-height: 107%; margin-bottom: 2.82mm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">curl
https://packages.gitlab.com/gpg.key | sudo apt-key add -<br />sudo
curl -o /etc/apt/sources.list.d/gitlab_ce.list
"https://packages.gitlab.com/install/repositories/gitlab/raspberry-pi2/config_file.list?os=debian&dist=jessie"
&& sudo apt-get update</span></blockquote>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
I
then installed GitLab with a simple apt-get command</div>
<blockquote class="tr_bq" style="line-height: 107%; margin-bottom: 2.82mm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">sudo
apt-get install gitlab-ce</span></blockquote>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
At
last I executed the GitLab reconfiguration command in order to make
configuration effective.</div>
<blockquote class="tr_bq" style="line-height: 107%; margin-bottom: 2.82mm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">sudo
gitlab-ctl reconfigure</span></blockquote>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
I
edited GitLab configuration file (located in /etc/gitlab/gitlab.rb)
only to change two configuration details: I placed GitLab repository
folder on Raspberry external USB disk</div>
<blockquote class="tr_bq" style="line-height: 107%; margin-bottom: 2.82mm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">git_data_dirs({"default"
=> "/media/usbdisk/gitlab"})</span></blockquote>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
And
I set GitLab web server in order to work on a HTTP port different
from default one.</div>
<blockquote class="tr_bq" style="line-height: 107%; margin-bottom: 2.82mm;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">external_url
'http://raspberrypi3:8887'</span></blockquote>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
After
any change of GitLab configuration file the reconfigure command must
be executed in order to see them effective. In spite of changing
GitLab web port SFPG picture gallery I had installed on the Raspberry
stopped working, I’ll have to solve this in the near future.</div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
<br /></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
<b>First
login</b></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
<b><br /></b></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
On
the very first access to GitLab web page user is asked to change
administrator password</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-I2dwGcBfG_E/WVV4vnVs-cI/AAAAAAAABHs/SosapEk272Qb3BkRzhTkf8lI2_23-l2vgCLcBGAs/s1600/gitlab-screenshot-0.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="873" data-original-width="1249" height="444" src="https://2.bp.blogspot.com/-I2dwGcBfG_E/WVV4vnVs-cI/AAAAAAAABHs/SosapEk272Qb3BkRzhTkf8lI2_23-l2vgCLcBGAs/s640/gitlab-screenshot-0.jpg" width="640" /></a></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
</div>
<a name='more'></a>Then
I’ve been able to login as administrator user.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-Su6xP88QVb4/WVV4-_BBGCI/AAAAAAAABHw/GJ1k87O8TIEE8SCz7t5fV_ran1NNtyfIgCLcBGAs/s1600/gitlab-screenshot-2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="873" data-original-width="1183" height="472" src="https://1.bp.blogspot.com/-Su6xP88QVb4/WVV4-_BBGCI/AAAAAAAABHw/GJ1k87O8TIEE8SCz7t5fV_ran1NNtyfIgCLcBGAs/s640/gitlab-screenshot-2.jpg" width="640" /></a></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
Into
the Admin area there are many configuration and management options</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-aZdsvtRqlcc/WVV5HbrrStI/AAAAAAAABH0/mFduVjdLVZkoSjpjclRr1WAiC7iiiTrcwCLcBGAs/s1600/gitlab-screenshot-3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="873" data-original-width="1183" height="472" src="https://4.bp.blogspot.com/-aZdsvtRqlcc/WVV5HbrrStI/AAAAAAAABH0/mFduVjdLVZkoSjpjclRr1WAiC7iiiTrcwCLcBGAs/s640/gitlab-screenshot-3.jpg" width="640" /></a></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
From
here I added a new user with a proper projects limit.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-2GVBPqqtDyg/WVV5SLFllLI/AAAAAAAABH4/N2PtqOIMEG0aJE9FTcHLlm4ru_GW3Nz6ACLcBGAs/s1600/gitlab-screenshot-4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="873" data-original-width="1183" height="472" src="https://3.bp.blogspot.com/-2GVBPqqtDyg/WVV5SLFllLI/AAAAAAAABH4/N2PtqOIMEG0aJE9FTcHLlm4ru_GW3Nz6ACLcBGAs/s640/gitlab-screenshot-4.jpg" width="640" /></a></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
Eventually
I logged out from the administrator and logged in as the newly
created user.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-ubjb_mUYnKU/WVV5dyYI7WI/AAAAAAAABH8/V6rQmLMdimk3aGpOi8wU9Niis95VEmhLACLcBGAs/s1600/gitlab-screenshot-5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="848" data-original-width="1183" height="458" src="https://1.bp.blogspot.com/-ubjb_mUYnKU/WVV5dyYI7WI/AAAAAAAABH8/V6rQmLMdimk3aGpOi8wU9Niis95VEmhLACLcBGAs/s640/gitlab-screenshot-5.jpg" width="640" /></a></div>
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
In
my next post I’ll show about creating projects and pushing commits
up to the server.</div>
<style type="text/css">
@page { margin: 20mm }
p { margin-bottom: 2.47mm; line-height: 120% }
a.cjk:link { so-language: zxx }
a.ctl:link { so-language: zxx }
</style>
<br />
<div align="justify" style="line-height: 107%; margin-bottom: 2.82mm;">
Stay
tuned …</div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-46049583660757273852017-05-27T22:29:00.000+02:002017-05-27T22:29:18.554+02:00New toy on the desk: Galaxy tab A6<div align="justify">
At least I gave up and decided for buying myself a
tablet. I've always been more favorable towards netbooks instead of
tablets mostly because real computers, even under-powered, better
suits the way I use them: mostly writing documents and programming. I
didn't entirely changed my mind but I have to reckon a tablet can
have many uses where it perform superbly like browsing the Internet
or keeping in contact with e-mail or the many social media
applications. Last but not least I needed a modern device for
studying and testing <a href="http://massimomusante.blogspot.it/search?q=android">Android
development</a>, so here I am ...</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-QpSDQs9WsCw/WSng6eD5XuI/AAAAAAAABG4/yloMsdng1c0UIkY48BHgCem5M6bCktOFACLcB/s1600/20170527_193354-s.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="726" data-original-width="1034" height="449" src="https://1.bp.blogspot.com/-QpSDQs9WsCw/WSng6eD5XuI/AAAAAAAABG4/yloMsdng1c0UIkY48BHgCem5M6bCktOFACLcB/s640/20170527_193354-s.jpg" width="640" /></a></div>
<div align="justify">
</div>
<a name='more'></a><br /><br />
<div align="justify">
<b>First</b> <span style="font-style: normal;"><b>impressions</b></span></div>
<div align="justify">
<br />
<br />
</div>
<div align="justify">
When I unpackage a new Android device I feel, I
must say, more like I had bought a new appliance instead of a new,
powerful computing device. <a href="http://www.samsung.com/nz/tablets/galaxy-tab-a-10-1-2016-t580/">Galaxy
Tab A6</a> is not an exception. Apart from this is a great piece of
hardware: in everyday usage like browsing the Internet, reading
e-mails or watching videos it behaves flawlessly. Screen resolution
is as good as my eyes can resolve. Interaction with apps is smooth
and the only visible delay is because of the Internet connection
speed.</div>
<div align="justify">
Producing contents on tablets is not the same than
consuming it. The Galaxy Tab A6 comes with <a href="https://play.google.com/store/apps/details?id=com.microsoft.office.officehub&hl=en">Microsoft
Office Mobile</a> installed, I tried Word and I must say it's a quite
honest application even I don't like being reminded every time to
subscribe their services and, when used off-line, it's limited to
saving documents in “.docx” format. Since I'm a Libre Office user
I went looking for an Android port. I installed <a href="https://play.google.com/store/apps/details?id=com.andropenoffice&hl=en">AndroOpen
Office</a>, I only really tested Writer, it works fine but it suffers
a little being a PC port instead of an application designed for
tablet devices from the beginning.</div>
<div align="justify">
I also bought a universal cover with included
keyboard but it revealed being less practical than I thought if you
don't have a firm work surface available. On the other hand the
floating software keyboard revealed to be easier to use than I'd
expected, even when in portrait orientation.</div>
<div align="justify">
By the way I managed to write this post entirety
on the tablet using AndroOpen Office.</div>
<style type="text/css">
@page { margin: 20mm }
p { margin-bottom: 2.12mm }
a:link { so-language: zxx }
</style>
<br />
<div align="justify">
A last word on battery: The tablet arrived three
days ago, at the time I'm writing this, I've been using it quite
intensely, at least during free time and the battery is still at 59%
of its capacity.</div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-42940814428204216002017-04-28T22:40:00.001+02:002017-09-18T10:24:57.267+02:00Setting-up the Raspberry PI 3 as a home server<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAg2Q1yfVCjsmRKdWVBDaxLzgCPcB/s1600/raspberry-pi-i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAg2Q1yfVCjsmRKdWVBDaxLzgCPcB/s1600/raspberry-pi-i.jpg" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
It
has been some time since <a href="http://massimomusante.blogspot.it/2017/01/new-toy-on-desk-raspberry-pi-3.html">last
time</a> I wrote, unfortunately my job stole most of my limited free
time keeping me from experimenting and so posting about it. At last I
managed to collect enough free time to complete Raspberry PI 3
installation and replace the older model I was using as home server.</div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<b>Just like before?
Not exactly</b></div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
When
I started configuring and installing the Raspberry PI 3 I was hoping
it would have been a simple repetition of operation I already
performed on the older Raspberry. Most of it has been that way but in
some cases I experienced some relevant difference.</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<b>Configuring
a static IP address</b></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
I've
been configuring static IP address on Linux since I installed my
first <a href="http://massimomusante.blogspot.it/p/my-machines.html">Pentium
III</a> based Linux, so I really didn't expect any problem here. Once
I configured “/etc/networking/interfaces file” I instead noticed
the Raspberry was visible on the network with two different
addresses. After some <a href="https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=111709">searching</a>
on the Internet I discovered it's because of a different way DACP
client works on latest Raspbian release. The problem can be solved in
two ways: first is configuring DHCP client in order to let it set a
static address on network interface alternatively it's possible
disable DHCP client for one or more network interface. I chose the
latter, at the end, since the Raspberry is going to be a DHCP server
so there is no deal in keeping DHCP client active. I disabled DHCP
client from assigning address to both wired and wireless network
interface by adding the following line to “/etc/dhcpcd.conf”
configuration file.</div>
<blockquote class="tr_bq" style="line-height: 100%; margin-bottom: 0mm;">
<span style="font-family: "courier new" , "courier" , monospace;">denyinterfaces
wlan0 eth0</span></blockquote>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<b>DHCP
server and wireless access point</b></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
Like
I did on my first Raspberry server I configured the new one to work
as DHCP server and a wireless access point. It seem there are no
relevant changes since first time I did it, I simply had to follow my
own instructions.</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<b>Installing
applications</b></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
Installing
apt-ger based applications like <a href="http://massimomusante.blogspot.it/2015/06/more-work-on-raspberry-pi.html">LAMP</a>
sever and <a href="http://massimomusante.blogspot.it/2015/05/setting-up-dlna-media-server-on.html">MiniDLNA</a>
server has been a quite easy task, while to install other
applications like <a href="http://massimomusante.blogspot.it/2016/02/monitoring-raspberry-pi-with-rpi-monitor.html">RPI-Monitor</a>
I had to look for the <a href="http://rpi-experiences.blogspot.it/2015/01/rpi-monitor-version-210-is-available.html">updated
download link</a> on the Internet. I also installed the updated
version of <a href="http://massimomusante.blogspot.it/2015/08/a-picture-gallery-server-for-raspberry.html">SFPG</a>
picture gallery, it works but picures thumbnails don't show. I'll
look for a solution later.</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<b>Power
supply and cables</b></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<b><br /></b></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
Once
I had the Raspberry PI 3 installed and configured on my desktop I pit
it in place of the old one and … nothing was working. It took me
some time of testing and pinging before I noticed the board power led
wasn't properly lighted-up. The phone/tablet charger I used to supply
the old Raspberry wasn't up to the Raspberry PI 3 power requirement.
I replaced the power supply with the one I used for desktop test but
it wasn't enough to make the Raspberry PI 3 working, I had to replace
micro-USB power cable with a shorter one in order to have it working,
I think it's better I'll buy a dedicated Raspberry PI 3 power supply
soon.</div>
<style type="text/css">
@page { margin: 20mm }
p { margin-bottom: 2.47mm; line-height: 120% }
a:link { so-language: zxx }
</style>Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-90872531872258037282017-01-15T12:38:00.001+01:002017-01-15T12:39:30.089+01:00New toy on the desk: Raspberry PI 3<style type="text/css">p { margin-bottom: 2.47mm; line-height: 120%; }a:link { }</style>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAg2Q1yfVCjsmRKdWVBDaxLzgCPcB/s1600/raspberry-pi-i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://2.bp.blogspot.com/-7wKVr2hXFj0/VKQLYegQtGI/AAAAAAAAA2c/7xdIaw35DAg2Q1yfVCjsmRKdWVBDaxLzgCPcB/s1600/raspberry-pi-i.jpg" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
Just
before Christmas I've been to a “traditional” electronics and
surplus <a href="http://www.studiofulcro.it/Marc/Home.aspx">fair</a>,
here in Genoa, and bought myself, among other things, a Raspberry PI
3 (version B) board. My goal is to replace, as home server, the
Raspberry PI I <a href="http://massimomusante.blogspot.it/2014/12/new-toy-on-desk-raspberry-pi.html">bought</a>
two years ago in order to take advantage of the more computing power
offered by the new board. Additionally the older board will be set
free for more “experimental” experiments. As “accessories” to
my new Raspberry board I bought a (clear) plastic case, a 16GB micro
SD card and en external 2.5'' USB hard disk.</div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<b>Installation and
first tests</b></div>
<div style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
I
first downloaded latest <a href="https://www.raspberrypi.org/downloads/raspbian/">Raspbian</a>
release, the “Lite” version since I'm going to use it as a
headless server. Like I did last time I copied the disk image on the
16GB SD card using the “<i>dd</i>” command.</div>
<blockquote class="tr_bq">
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Courier 10 Pitch;">sudo
dd if=2016-11-25-raspbian-jessie-lite.img of=/dev/sdd</span></span></div>
</blockquote>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
All
worked fine but I had to fix a couple of things. The image I copied
at the first tentative didn't boot, I had to remove all memory card
partitions using <a href="http://gparted.org/">Gparted</a> then
repeat the copy process. The disk copied after the second tentative
works fine, I don't know if problem was because a failure in the
first copy or because of how the card was pre-formatted.</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
The
latest Raspbian <a href="http://downloads.raspberrypi.org/raspbian/release_notes.txt">release</a>
has SSH demon disabled by default to enable it I had just to add an
empty “<i>ssh</i>” named file on the memory card root folder.</div>
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Courier 10 Pitch;">t</span><span style="font-family: Courier 10 Pitch;">ouch
/media/maxx/boot/ssh</span></span>
</blockquote>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
</div>
<a name='more'></a>After
enabling SSH I've eventually managed to connect to Raspberry PI 3
using SSH. I first changed the “pi” user default password then I
started the raspi-config utility in order to expand the SSD boot
partition to the full 16GB disk<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-PPaDeSbbBVg/WHteRaX0toI/AAAAAAAABGQ/7WxmUOwmNDItP5iPGtnnG3OY37qstKySQCLcB/s1600/raspberry-pi-3--1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="257" src="https://4.bp.blogspot.com/-PPaDeSbbBVg/WHteRaX0toI/AAAAAAAABGQ/7WxmUOwmNDItP5iPGtnnG3OY37qstKySQCLcB/s400/raspberry-pi-3--1.jpg" width="400" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
and
change the host name to a very imaginative one</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-PPaDeSbbBVg/WHteRaX0toI/AAAAAAAABGQ/yjYa_JMFjqk--36eda3ZV23exi2rNzSZwCEw/s1600/raspberry-pi-3--1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="258" src="https://2.bp.blogspot.com/-PPaDeSbbBVg/WHteRaX0toI/AAAAAAAABGQ/yjYa_JMFjqk--36eda3ZV23exi2rNzSZwCEw/s400/raspberry-pi-3--1.jpg" width="400" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
at
last, to test the future server complete configuration, I plugged the
external USB disk and mounted it manually (automatic mount is not
enabled and I'm not going to enable it).</div>
<blockquote class="tr_bq">
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Courier 10 Pitch;">sudo
mkdir /media/usbdisk</span></span></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Courier 10 Pitch;"> sudo
mount /dev/sdc1 /media/usbdisk</span></span></div>
</blockquote>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<b>Now
what?</b></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
In
the immediate future I'm going to install and configure on the new
Raspberry MiniDLNA and all other applications I currently use on the
old one. Than I'll be free to start experimenting with both the
'Berries.</div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-9977970245325508252017-01-04T22:03:00.000+01:002017-01-04T22:06:25.967+01:00Test drive: (Raspberry PI) Pixel on the EEEPC 900<style type="text/css">p { margin-bottom: 2.47mm; line-height: 120%; }a:link { }</style>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-G2_NQKKT2M8/T3c6MkRT1bI/AAAAAAAAADY/P0G2NZ-JXc8e4J2Q0p9kLv1VPP4_lziVgCPcB/s1600/eeepc900i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-G2_NQKKT2M8/T3c6MkRT1bI/AAAAAAAAADY/P0G2NZ-JXc8e4J2Q0p9kLv1VPP4_lziVgCPcB/s1600/eeepc900i.jpg" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
I
own a <a href="https://www.raspberrypi.org/">Raspberry PI</a> since
two years but I used it as headless server from the <a href="http://massimomusante.blogspot.it/2014/12/new-toy-on-desk-raspberry-pi.html">very
beginning</a>. I have, almost, never seen its window manager apart
from some remote desktop experiment. I so learned only recently how
<a href="https://www.raspberrypi.org/blog/introducing-pixel/">latest
Raspbian</a> released are shipped with a new lightweight desktop
environment: Pixel. More recently I also <a href="https://www.raspberrypi.org/blog/pixel-pc-mac/">learned</a>
that Pixel has been released for X86 “common” computers I decided
to test how it runs on my EEEPC 900 netbook.</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<b>First
impressions</b></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
I
downloaded Pixel ISO disk image from <a href="http://downloads.raspberrypi.org/pixel_x86/images/pixel_x86-2016-12-13/2016-12-13-pixel-x86-jessie.iso">here</a>
and prepared a bootable USB disk. Raspberry page suggested using
<a href="https://etcher.io/">Etcher</a> to prepare the boot disk but
<a href="https://unetbootin.github.io/">UNetbootin</a> did the job as
well as usual.</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
The
boot process went smooth and quite fast, and Pixel here is my very
first screen-shot of Pixel.</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-xZI_r0bEnzM/WG1iHrHd6SI/AAAAAAAABFs/HnndpLWBtKAtH8GhDUXt723Kj2PwHnswgCLcB/s1600/pixel-on-the-eeepc-1-0.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="374" src="https://2.bp.blogspot.com/-xZI_r0bEnzM/WG1iHrHd6SI/AAAAAAAABFs/HnndpLWBtKAtH8GhDUXt723Kj2PwHnswgCLcB/s640/pixel-on-the-eeepc-1-0.jpg" width="640" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
</div>
<a name='more'></a><br />
<br />
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
Needless
to say Pixel user interface is a traditional “no-frills” one,
with panels and a big application menu. Pixel unique icons and fonts
are combined into a default theme of good readability even on the
small EEEPC display.</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
Software
packages provided with Pixel reveal this distribution vocation for
education: together with the most classic <a href="https://www.libreoffice.org/">Libre
Office</a> suite …</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-wNNMUoA58iU/WG1iatslryI/AAAAAAAABFw/AO3aCJ_EqV8FAj1yESHkxTkLmCSZx1TwQCLcB/s1600/pixel-on-the-eeepc-2-4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="298" src="https://2.bp.blogspot.com/-wNNMUoA58iU/WG1iatslryI/AAAAAAAABFw/AO3aCJ_EqV8FAj1yESHkxTkLmCSZx1TwQCLcB/s320/pixel-on-the-eeepc-2-4.jpg" width="320" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
is
shipped a good selection of lightweight programming IDEs …</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-PgD5gnLkl5g/WG1iqhPaqsI/AAAAAAAABF0/s-lEAO3whdA0hts4-hBgGAbFpAVEkqQwACLcB/s1600/pixel-on-the-eeepc-2-3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="271" src="https://2.bp.blogspot.com/-PgD5gnLkl5g/WG1iqhPaqsI/AAAAAAAABF0/s-lEAO3whdA0hts4-hBgGAbFpAVEkqQwACLcB/s320/pixel-on-the-eeepc-2-3.jpg" width="320" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
to
be noted also the choice of <a href="https://www.chromium.org/Home">Chromium</a>
as default browser.</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-MIcsUzUJCng/WG1i8ROGZYI/AAAAAAAABF8/56BxI_U_z10Kl7WP1Cq2mrZQ25Tl_fzCACLcB/s1600/pixel-on-the-eeepc-2-5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="284" src="https://1.bp.blogspot.com/-MIcsUzUJCng/WG1i8ROGZYI/AAAAAAAABF8/56BxI_U_z10Kl7WP1Cq2mrZQ25Tl_fzCACLcB/s320/pixel-on-the-eeepc-2-5.jpg" width="320" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<b>Conclusions</b></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br /></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
Pixel
is a great lightweight desktop environment, it's snappy-fast both
while booting than while working with it. From a <b>very subjective</b>
point of view it looks to me faster than other lightweight desktops,
like XFCE or LXDE, I <a href="http://massimomusante.blogspot.it/2015/03/test-drive-xfce-xubuntu-on-eeepc-900.html">tested</a>
<a href="http://massimomusante.blogspot.it/2015/01/test-drive-lxde-lubuntu-on-eeepc-900.html">before</a>.
I wish I had an even older PC to test Pixel on it. On the other hand
Pixel, at least its X86 release, is still very unfinished I couldn't
manage, for example, to configure mouse-pad click-with-a-tap even if
other features, like double-fingered-scroll, worked from the
beginning without need of configuration. Pixel might not be ready to
replace my XFCE installation but they are only at the beginning after
all!</div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-30264995170668408642016-12-24T13:06:00.000+01:002016-12-24T13:06:00.065+01:00Merry Christmas<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-nVmppE846SU/WF5jdhi5PAI/AAAAAAAABFc/ZERUd16VeD0bgJ88MwPpCNi-1cTGQNiwQCLcB/s1600/20161223_230302-2.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="400" src="https://2.bp.blogspot.com/-nVmppE846SU/WF5jdhi5PAI/AAAAAAAABFc/ZERUd16VeD0bgJ88MwPpCNi-1cTGQNiwQCLcB/s400/20161223_230302-2.jpg" width="300" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<span style="color: #cc0000;"><i><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"><span style="font-size: small;">A sincere </span></span></span></i></span></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<span style="color: #cc0000;"><i><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"><span style="font-size: x-large;">MERRY CHRISTMAS!</span></span></span></i></span></div>
<div style="text-align: center;">
<span style="color: #cc0000;"><i><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"><span style="font-size: x-large;">and a</span></span></span></i></span></div>
<div style="text-align: center;">
<span style="color: #cc0000;"><i><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: large;"><span style="font-size: x-large;">HAPPY NEW YEAR!</span></span></span></i></span></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<span style="font-size: small;"><span style="color: #cc0000;">To all my readers and visitors</span></span></div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-27439719836960283512016-11-26T09:58:00.000+01:002016-11-26T09:58:12.194+01:00Blog-Birthday Eight (a bit late)<div style="text-align: justify;">
Here we are, again, another year of blogging is passed. In spite of my last year promise of being more proficuous blogger my post writing rate has been even lower. Doing things and writing about them takes time and I'm not having a lot of spare time ultimately. On the other hand doing things in Linux is becoming every day easier so there is also less to explain. So ... no more promises for next year just stay tuned!</div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-2729828611243419952016-10-17T22:02:00.000+02:002016-10-17T22:02:04.599+02:00LibGDX: The “Swiss Army Knife” of Java Games Programming
<style type="text/css">p { margin-bottom: 2.47mm; line-height: 120%; }a:link { }</style>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-sVl34TMHVOY/UCqaRiuUJtI/AAAAAAAAAM8/G3ZlUQnbp8gGZISgt_3eijeWttjzWrhVQCPcB/s1600/Veriton-S661i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-sVl34TMHVOY/UCqaRiuUJtI/AAAAAAAAAM8/G3ZlUQnbp8gGZISgt_3eijeWttjzWrhVQCPcB/s1600/Veriton-S661i.jpg" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
My
few readers might <a href="http://massimomusante.blogspot.it/search/label/Fun-Programming">remember</a>
I sometimes explore, and play with, game engines and libraries. I
suppose it's a sort of “compensation” for my everyday work with
<i>not-so-exciting</i> middle-ware and web-services projects. I
already posted about <a href="http://massimomusante.blogspot.it/2013/04/fun-programming-java-and-slick2d.html">Slick2D</a>
libraries for Java games but I was looking for something more
complete and, most of all, that would allow me to develop also
Android applications.
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<a href="https://libgdx.badlogicgames.com/">LibGDX</a>
is a Java game-engine that provide a vast variety of features for
developing games. It's mostly aimed to 2D games development but it
even provides <a href="https://libgdx.badlogicgames.com/features.html">some
3D features</a>. In addition LibGDX can deploy games on different
platforms like Java desktop or Applet, Android, HTML5 and IOS (with
some extra requirement due to <i>peculiar </i>Apple developing
policies). Last but not least a LibGDX project can include additional
extension libraries helping to develop different aspects of game
programming like AI, physics or networking (and this is the why of
this post title).</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<b>First
project creation</b></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm;">
<br />
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
You don't have to <a href="https://libgdx.badlogicgames.com/download.html">download</a>
the whole LibGDX project in order to start to develop. LibGDX people
suggest using the handy utility they provide, LibGDX Project Setup,
in order to generate a skeleton project. The generated project will
be based on the <a href="https://gradle.org/">Gradle</a> building
tool that will think about downloading from the Internet all needed
libraries and their dependencies.</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
<br />
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-97VqUnxrjKc/WAUsK5YR1EI/AAAAAAAABEE/W2ZAPVzyioI5TmZ4AQf2cclZpHE5QZmkwCLcB/s1600/libgdx-java-16.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://4.bp.blogspot.com/-97VqUnxrjKc/WAUsK5YR1EI/AAAAAAAABEE/W2ZAPVzyioI5TmZ4AQf2cclZpHE5QZmkwCLcB/s400/libgdx-java-16.jpg" width="365" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
</div>
<a name='more'></a>In the project setup you're asked to define project and main class
name, choosing the target platforms (I selected Desktop and Android
ones) and selecting the optional extensions. The “Advanced”
button provide some additional options like generating project files
for a specific IDE (I selected Eclipse of course).
<br />
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-cX5-EaCUQ_g/WAUsV40RI2I/AAAAAAAABEI/FwsfVjIpoJE3OUQjHvCqUERQy0ThCLU2gCLcB/s1600/libgdx-java-8.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://1.bp.blogspot.com/-cX5-EaCUQ_g/WAUsV40RI2I/AAAAAAAABEI/FwsfVjIpoJE3OUQjHvCqUERQy0ThCLU2gCLcB/s400/libgdx-java-8.jpg" width="400" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
In addition of LibGDX provided extension libraries the tool also
allow you to add to your project a bunch of third party extensions.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-dY_s54IAUig/WAUsjNgRFSI/AAAAAAAABEM/8dfV0huiNjAT6d25N-wjr_MbgJIgXEHfwCLcB/s1600/libgdx-java-9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="193" src="https://3.bp.blogspot.com/-dY_s54IAUig/WAUsjNgRFSI/AAAAAAAABEM/8dfV0huiNjAT6d25N-wjr_MbgJIgXEHfwCLcB/s400/libgdx-java-9.jpg" width="400" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
While the tool was busy creating my project I got the following
message complaining about Android API being too recent then
recommended.</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-PbtB3LfVvyA/WAUsuhBLkLI/AAAAAAAABEQ/WPTd2fxhV14Fq6iLkfXzB522XpikzWnYQCLcB/s1600/libgdx-java-12.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="102" src="https://1.bp.blogspot.com/-PbtB3LfVvyA/WAUsuhBLkLI/AAAAAAAABEQ/WPTd2fxhV14Fq6iLkfXzB522XpikzWnYQCLcB/s400/libgdx-java-12.jpg" width="400" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
I selected “yes” and continued without any problem (by the way
project target and minimal version can easily changed afterward).</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
<br />
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
<b>Importing and running first project</b></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
<br />
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
From Eclipse IDE I selected the “Existing Projects into Workspace”
import wizard</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-YT8moS7pK1M/WAUs34lzqUI/AAAAAAAABEU/_Eoqyaik09MXWjtp1dvZFt0BBKFrYl5LgCLcB/s1600/libgdx-java-18.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="366" src="https://4.bp.blogspot.com/-YT8moS7pK1M/WAUs34lzqUI/AAAAAAAABEU/_Eoqyaik09MXWjtp1dvZFt0BBKFrYl5LgCLcB/s400/libgdx-java-18.jpg" width="400" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
I then selected the project folder, where the project setup tool had
previously written its files, and did choose the three listed
projects for import.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-Mr0vis_H0cw/WAUtAsyHb9I/AAAAAAAABEY/fcKuTSzUYOkW2Kp1-gSISxxEehx7kpBDQCLcB/s1600/libgdx-java-19.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://2.bp.blogspot.com/-Mr0vis_H0cw/WAUtAsyHb9I/AAAAAAAABEY/fcKuTSzUYOkW2Kp1-gSISxxEehx7kpBDQCLcB/s640/libgdx-java-19.jpg" width="477" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
LibGDX setup tool created three projects: the “-core” one, in my
case LibGdxDemo-core, contains the game logic. The other projects, in
this case marked by the “-desktop” and “-android” suffixes,
hold the platform specific code and configurations.
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
<br />
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
<b>Running the projects</b></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
<br />
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
I had to fix some configuration detail, like setting the minimal
required version appropriate for my old device, but at last I've been
able to run my demo project on both platforms:</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
<br />
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-eood2q-0RMI/WAUtNdZVmDI/AAAAAAAABEc/W_q5wQ6qjp42Ub2Pw_ZJTcCk_j30O9CrgCLcB/s1600/libgdx-java-20.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="322" src="https://2.bp.blogspot.com/-eood2q-0RMI/WAUtNdZVmDI/AAAAAAAABEc/W_q5wQ6qjp42Ub2Pw_ZJTcCk_j30O9CrgCLcB/s400/libgdx-java-20.jpg" width="400" /></a></div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
<br />
</div>
<div align="justify" style="line-height: 100%; margin-bottom: 0mm; text-decoration: none;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-3x54cMCeQ08/WAUtyv0WOvI/AAAAAAAABEo/HMsWq9NLt50MJ1_mA-QoUJ5TIQJPE9GEgCLcB/s1600/libgds-android.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-3x54cMCeQ08/WAUtyv0WOvI/AAAAAAAABEo/HMsWq9NLt50MJ1_mA-QoUJ5TIQJPE9GEgCLcB/s1600/libgds-android.jpg" /></a></div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0tag:blogger.com,1999:blog-1897018054934571273.post-55596571177964818642016-09-21T00:42:00.001+02:002016-09-21T00:42:16.934+02:00Netbeans 8.1 on the EEEPC 900
<style type="text/css">p { margin-bottom: 2.47mm; line-height: 120%; }a:link { }</style>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-G2_NQKKT2M8/T3c6MkRT1bI/AAAAAAAAADY/P0G2NZ-JXc8e4J2Q0p9kLv1VPP4_lziVgCPcB/s1600/eeepc900i.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-G2_NQKKT2M8/T3c6MkRT1bI/AAAAAAAAADY/P0G2NZ-JXc8e4J2Q0p9kLv1VPP4_lziVgCPcB/s1600/eeepc900i.jpg" /></a></div>
<div align="justify">
It's quite recent in the <a href="https://wiki.apache.org/incubator/NetBeansProposal?utm_content=bufferf4b61&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer">news</a>
that <a href="https://netbeans.org/">Netbeans</a>, the Oracle Java
IDE, is going to pass under the <a href="https://www.apache.org/">Apache</a>
wing. The immediate effect of this news has been to remind me to
upgrade my EEEPC Netbeans <a href="http://massimomusante.blogspot.it/2014/04/java-jdk-8-and-netbeans-8-on-eeepc.html">installation</a>.</div>
<br />
<br />
I<b>nstallation and first run</b><br />
<br />
<br />
<div align="justify">
Netbeans for Linux is provided in the form of an
auto-installing executable script, once downloaded I started it from
shell:</div>
<blockquote class="tr_bq">
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">chmod +x
netbeans-8.1-javase-linux.sh</span></span><br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">
</span></span><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">sudo ./netbeans-8.1-javase-linux.sh</span></span></blockquote>
<div align="justify">
when started with the “sudo” command the
installation script install Netbeans into the “/usr/local”
directory otherwise the script will install in your home directory.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/--0B_B4o3wwk/V-G6e8I9XzI/AAAAAAAABCw/p3WhacqEWkoZnoVcSzQhnGMP5Y4PJ5uDwCLcB/s1600/nebeans-screenhot-2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="332" src="https://3.bp.blogspot.com/--0B_B4o3wwk/V-G6e8I9XzI/AAAAAAAABCw/p3WhacqEWkoZnoVcSzQhnGMP5Y4PJ5uDwCLcB/s400/nebeans-screenhot-2.jpg" width="400" /></a></div>
<div align="justify">
</div>
<a name='more'></a>the script continued with the installation and the
download of available updates it took almost thirty minutes on the
EEEPC to complete.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-WMmb3K_K86s/V-G6kVJXFNI/AAAAAAAABC0/kXXW_aulqskfi7_TPhkkppb1Dhwo1ClPQCLcB/s1600/nebeans-screenhot-4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="332" src="https://2.bp.blogspot.com/-WMmb3K_K86s/V-G6kVJXFNI/AAAAAAAABC0/kXXW_aulqskfi7_TPhkkppb1Dhwo1ClPQCLcB/s400/nebeans-screenhot-4.jpg" width="400" /></a></div>
<div align="justify">
at first run Netbeans successfully imported
existing projects and plug-ins resolving, almost automatically, some
dependency problems.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-2R4zBkkTA2M/V-G6rSB9zRI/AAAAAAAABC4/WbhrJGSVx6YIvkWhyDBjwFflkZH8Y1JpACLcB/s1600/nebeans-screenhot-6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="90" src="https://3.bp.blogspot.com/-2R4zBkkTA2M/V-G6rSB9zRI/AAAAAAAABC4/WbhrJGSVx6YIvkWhyDBjwFflkZH8Y1JpACLcB/s400/nebeans-screenhot-6.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-lDjjnm6O_0E/V-G6xJSqkdI/AAAAAAAABC8/ORqHtYbi_hYipQNAUnNp8aqDTQqQNwbXQCLcB/s1600/nebeans-screenhot-9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="336" src="https://1.bp.blogspot.com/-lDjjnm6O_0E/V-G6xJSqkdI/AAAAAAAABC8/ORqHtYbi_hYipQNAUnNp8aqDTQqQNwbXQCLcB/s400/nebeans-screenhot-9.jpg" width="400" /></a></div>
<div align="justify">
</div>
<div align="justify">
</div>
<div align="justify">
<br />
</div>
<div align="justify">
<b>Conclusions</b></div>
<div align="justify">
<br />
</div>
<div align="justify">
No news good news? After installing something on
an old computer, like the EEEPC, this is often my first though.
Netbeans 8.1 works as well as the previous version. I'll meet the <a href="https://netbeans.org/community/releases/81/">new
features</a> as soon as I'll need then. Meanwhile I'm eager to see
what the Apache “new management” will bring to this
<i>aging-but-good</i> development environment.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-0DWeqauIRzs/V-G64k89FpI/AAAAAAAABDA/nI4Vkyfw9_4nxIyTWkq2qhwc91s9eRXNgCLcB/s1600/nebeans-screenhot-10.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="374" src="https://4.bp.blogspot.com/-0DWeqauIRzs/V-G64k89FpI/AAAAAAAABDA/nI4Vkyfw9_4nxIyTWkq2qhwc91s9eRXNgCLcB/s640/nebeans-screenhot-10.jpg" width="640" /></a></div>
Anonymoushttp://www.blogger.com/profile/06720171334350170047noreply@blogger.com0