Raspberry Pi install Howto from a dummy for dummies...
Hey dear Domo-Team,
as promised here my FAQ from a dummy and for dummies how to install trunk Gambas on a RPi. You may take it in the wiki if you like any I would recommend to make those two two script files dowloadable so people may get them easy inside Putty with wget.
To all linux-experts: Like described the FAQ is FROM a dummy. So maybe there were too much pakets or an easier way but this was the first time after LOT of tries it worked for me - exactly like this...
So folks, first you should get Putty, newest Wheezy image for RPi and UltraVNC. Just google - all of them were free and easy to find. If you use windows the Wheezy may be flashed easily "Win32diskimager".
I expect now you have a card of at least 4 GB flashed with Wheezy. Slip it into your RPi plugged to the network, power it on and wait some sec until the yellow LED flashes randomly. If it doesnt this is a common problem. It may be solved by bending the contacts, some people use tape (not worked for me) and I just took an SD from another brand which works perfect since today.
So now you have a RPi with network and need to find out the IP. In most cases just may look it up in your router config. If this isnt possible there were also some tools to find it. You also just may open "cmd" in windows, enter "ipconfig" and look up your computers IP on top of the answer. In most cases the Pi should have an IP where the last number is 1..2..3.... higher than this. So just enter "ping 192.168.xxx.xxx" where xxx is your IP and as mentioned the last number is higher than the one of your computers ipconfig. If you dont have other computers and get an answer from the ping this should be you Pi.
Open Putty and enter the IP of your Pi. Log in with "pi" and "raspberry". Mention that the user "pi" is no admin so some commands start with "sudo" which means they were done with one-time-admin-privileges.
Now you have a black screen and see some lines of Pi-login, right? Fine! On your keyboard enter
and take the first menu point which resizes your SD to full space. Choose "yes" and go back to the main menu. After you may also go to the "overclock" point to make you Pi a bit faster. As choice I recommend "medium" as higher may lead to instability. Back in the main menu press right arrow to choose "finish" and answer the question for reboot with "yes". Wait a minute and login with putty again.
Now you need to update your Pi. You may enter line by line from hand (or copy from here and paste to the putty window with right click) but as it takes some minutes I recommend to make a small script. To do this just enter
sudo nano stepa
which opens a kind of editor. Mark and copy the commands from below to clipboard (windows: mark with mouse, STRG-C), klick the putty window and paste them with right mouse button. Be sure that you have four commands line by line. If not correct this with arrow keys and enter button on end of the line. So now you see that four lines from below in your nano-editor? Fine! Save the result with STRG-O and leave the editor with STRG-X. Then you need to make this script executable with the command "sudo chmod 755 stepa" and after execute it with "./stepa".
So what should be put in the script or alternatively may be entered line by line from hand is:
sudo apt-get update
sudo apt-get upgrade -y
A minute after the reboot log in in to your Pi with putty (agaaaain.....) and do the following commands. For this I really recommend using a script as it takes about 4 hours. You may make a new script named "stepb" similar as described above or just use the command with "stepa" again to edit your existing one, kill the four lines and paste these instead. Be aware that the long "apt-get" command must be ONE long line in nano editor. If your copy/paste takes the structure from the webpage you need to correct this to have only one blank between the package names and one long line. Commands were:
sudo apt-get install automake binutils build-essential firebird-dev g++ gcc gtk-doc-tools gtk+3.0 kdelibs5-dev libaa1-dev libalure-dev libasound2-dev libbonobo2-dev libbz2-dev libc6 libc6-dev libcairo2 libcairo2-dev libcos4-dev libcurl4-gnutls-dev libdirectfb-dev libesd0-dev libfbclient2 libffi-dev libgdk-pixbuf2.0-dev libglew-dev libglib2.0-dev libgmime-2.6-dev libgmp-dev libgnome-keyring-dev libgsl0-dev libgstreamer0.10-dev libgstreamer-ocaml-dev libgtk2.0-dev libgtkglext1-dev libiconv-hook-dev libimlib2-dev libintl-perl libjpeg8-dev libldap2-dev libmysqlclient-dev libncurses5-dev libomniorb4-dev libpcre3-dev libpng12-dev libpoppler-cpp-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libpoppler-qt4-dev libpq-dev libqt4-dev libqt4-opengl-dev libqtcore4 libqtgstreamer-dev libqtgui4 libqxt-core0 librsvg2-dev librsvg2-dev libsage-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-sound1.2-dev libsdl-ttf2.0-dev libsqlite0-dev libsqlite3-dev libsvga1-dev libtiff4-dev libtool libv4l-dev libxml2-dev libxslt1-dev libxtst-dev lighttpd linux-libc-dev llvm-3.1-dev ntp php5-cgi php5-mysql php5-xmlrpc rrdtool ssh subversion tightvncserver unixodbc-dev -Y
sudo echo "deb http://vontaene.de/raspbian-updates/ . main" >> /etc/apt/sources.list
sudo apt-get install libgstreamer1.0-0-dbg gstreamer1.0-tools libgstreamer-plugins-base1.0-0 gstreamer1.0-plugins-good gstreamer1.0-plugins-bad-dbg gstreamer1.0-omx gstreamer1.0-alsa -Y
svn checkout svn://svn.code.sf.net/p/gambas/code/gambas/trunk
sudo make install
So now it's next morning, you're back from work or disco...? Fine, lets go on:
What you see is the vncserver asking you for a password. Just enter one of your choise two times and answer the following question with "n".
Now its time to test if gambas is working. Open the "UltraVNC viewer" from your ultravnc installation and access the Rpi at 192.168.178.26::5901 with your chosen password. In the screen that opens double click the "terminal" and in this manually enter "gambas3". If Gambas now opens after some seconds you passed 99% of the traps leading to a working Domotiga and may go on with the install-procedure at Step "mysql": http://www.domotiga.nl/projects/domotiga/wiki/3_Installation .
Hint: You also may run Domotiga in the UltraVNC Viewer using the file explorer (left on bottom line of the screen) and just double clicking the "DomotiGa3.gambas" file with "execute".
Regards and have fun with DomotiGa
Thanks for the clear HOWTO, lets see how we can merge it into the following link:
How about an additional step "How To Backup your installation"
Maybe the easiest way to backup your SD card is using "Win32DiskImager".
This will give you an exact copy of the SD card in .img container.
So a 16 GB SD card will give you 16 GB of backup.
In my case I currently only use 4 GB out of the 16 GB.
Restoring a smaller image will also be much faster.
I store these 16 GB fikes at my laptop in c:\temp (NTFS)
How to resize this image can be done in the following way.
I use a BOOTCD and a cardcreader from USB stick.
Just open a terminal.
1. sudo modprobe loop 2. sudo losetup -f (/dev/loop1 is created) sometimes loop0 so keep a close eye on the result.
Now lets Mount ntfs partitie
3. cd /mnt 4. sudo mkdir mountIn my case /dev/sda2 is the second NTFS partition on my HD
5. sudo mount -t ntfs /dev/sda2 /mnt/mount 6. sudo losetup /dev/loop1 /mnt/mount/temp/myimage.img
7. sudo partprobe /dev/loop1 8. sudo gparted /dev/loop1
Resize your image with Gparted, keep a 200 MB of spare space and apply.
Just wait for a little while for it to finish.
The filesystem has now been resized. However the image size is still the same.
9. sudo losetup -d /dev/loop1
Now we actually have to resize the image.
10. fdisk -l myimage.img
Disk myimage.img: 6144 MB, 6144000000 bytes, 12000000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ea37d
Device Boot Start End Blocks Id System
myimage.img1 2048 9181183 4589568 b W95 FAT32
12. truncate --size=$[(9181183+1)*512] /mnt/mount/temp/myimage.img
Voila you now saved a lot of room.
what about rpi clone ?
what about rpi clone ?
Looks promising, However keeping the raspi "write-free" might be an issue.
Unfortunately I backup to physical windows machine to store my images (.img).
I would like to use an external USB HDD to run the whole show.
It seems possible.
Seems to go off-topic with my latest post. Sorry
I did follow the installation procedure but get an error while running the "make" command:
make5: Leaving directory '/home/pi/trunk/gb.gtk/src'
Making all in opengl
make5: Entering directory '/home/pi/trunk/gb.gtk/src/opengl'
In file included from main.c:26:0:
main.h:31:23: fatal error: gtk/gtkgl.h: No such file or directory
Makefile:422: recipe for target 'gb_gtk_opengl_la-main.lo' failed
make5: * [gb_gtk_opengl_la-main.lo] Error 1
make5: Leaving directory '/home/pi/trunk/gb.gtk/src/opengl'
Makefile:1317: recipe for target 'all-recursive' failed
make4: [all-recursive] Error 1
make4: Leaving directory '/home/pi/trunk/gb.gtk/src'
Makefile:373: recipe for target 'all-recursive' failed
make3: [all-recursive] Error 1
make3: Leaving directory '/home/pi/trunk/gb.gtk'
Makefile:304: recipe for target 'all' failed
make2: [all] Error 2
make2: Leaving directory '/home/pi/trunk/gb.gtk'
Makefile:367: recipe for target 'all-recursive' failed
make1: [all-recursive] Error 1
make1: Leaving directory '/home/pi/trunk'
Makefile:307: recipe for target 'all' failed
make: * [all] Error 2
Can someone help ?
Here I get the same error compiling trunk gambas on raspberry.
On my system the latest libgtklext1-dev is installed and /usr/include/gtkglext-1.0/gtk/gtkgl.h is there.
I had this error before i think (months ago), can you try with the following rpm:
apt-get install libpangox-1.0-dev
It isn't the missing gtkgl.h, but a pkg-info file is missing in another directory.
libpangox-1.0-dev seems also to be already installed on my raspberry...
If I look to the makefile produced in the config step, I do not see the reference to /usr/include/gtkglext-1.0 where I would expect it.
Ok, according to the Gambas wiki, libgtk-3-dev is needed for trunk compilation. After installing this, reconf-all and config again, make worked like a charm.