RaspberryPi Version 3 SOE

Since there is now a supported Raspbian version without GUI and other unneeded add-ons available as Raspbian Lite the need to use other installers (with sometimes some downsides) is now not a necessity anymore. Below is a list of steps I like to perform before using them for any purpose as my Standard Operating Environment. Download Raspbian Lite Download link: https://www.raspberrypi.org/downloads/raspbian/ Write to SD Card dd bs=4M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdb Boot RPi Default login details are UID: pi PWD: rasbperry Regional settings locale-gen en_AU.UTF-8 dpkg-reconfigure locales ln -sf /usr/share/zoneinfo/Australia/Adelaide /etc/localtime System update sudo apt update && sudo apt -y upgrade apt install vim Setup SSH keys As a security precausion it's a good idea to disable password authentications ssh-keygen -t rsa vim /root/.ssh/authorized_keys # --> add RSA public key Setup Wireless LAN iwlist wlan0 scan wpa_passphrase SSID WPA_KEY vim /etc/wpa_supplicant/wpa_supplicant.conf Copy the resulting hash from the previous command Example config country=AU ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="YOURSSID" psk=123456789012345678901234567890 } Rename default user account The default Raspbian images use the default user 'pi' - I prefer to change this user to another account for security purposes and to be in line with other Linux system I use. Reboot and log in to the RPi as root - you need to run the following commands as root. usermod -l NEW_USER_ID pi usermod -m -d /home/NEW_USER_ID NEW_USER_ID groupmod --new-name NEW_USER_ID pi mkdir /home/NEW_USER_ID/.ssh/ vim /home/NEW_USER_ID/.ssh/authorized_keys # --> add RSA public key # change owner and permissions on key files chown -R NEW_USER_ID:NEW_USER_ID /home/NEW_USER_ID/.ssh/ chmod 700…

Continue ReadingRaspberryPi Version 3 SOE

Install Hugo on Ubuntu to generate static websites

Whilst there is a .DEB installer to download from the GoHugo sites I get all matter of warnings that the package is of bad quality and I am not comfortable to run these kinds of installers. I rather install from sources in this case which is very straight forward since the main dependencies (largely GO) are in the Ubuntu main repositories. Install dependencies sudo apt-get install golang git mercurial python-pygments Create environment variables vim ~/.bashrc #add the following 3 lines export GOROOT=/usr/lib/go export GOPATH=$HOME/go export PATH=$PATH:$GOROOT/bin:$GOPATH/bin Update Bash Environment Variables without logging out. source ~/.bashrc Install Hugo go get -u -v github.com/spf13/hugo Start using Hugo #create new site hugo new sitename /path/to/sitename #change directory to site cd /path/to/sitename #create content page hugo new about.md #edit content page vim content/about.md

Continue ReadingInstall Hugo on Ubuntu to generate static websites

Android SDK issues on Ubuntu 14.04 64bit

Since the upgrade to Ubuntu 14.04 (Trusty Tahr) I have had issues running the Android SDK Tools. For example this error: ./adb bash: ./adb: No such file or directory Check the multi-arch architectures installed on the system. sudo dpkg --print-architecture Mine only showed 'amd64'. Turns out you need to add the i386 architecture and install libc6:i386,libncurses5:i386,libstdc++6:i386 library packages. sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 sudo ./adb

Continue ReadingAndroid SDK issues on Ubuntu 14.04 64bit

Apache Cordova development environment install on Ubuntu

Apache Cordova has very nice documentation, however as so many projects it is focused on the Windows/MacOS duopolies only. Fortunately it's not too hard to work out the differences. Installing dependencies Thanks to: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager sudo apt-get install python-software-properties python g++ make ant openjdk-7-jre openjdk-7-jdk Installing Android SDK Please note: one of the problems I found was that I had some Android tools from the Ubuntu repos that were conflicting with the SDK install. It's probably a good idea to remove them first. That might save you from a lot of headaches down the line (and time to troubleshoot). sudo apt-get remove android-tools-adb android-tools-fastboot Download as per http://developer.android.com/sdk/index.html wget http://dl.google.com/android/android-sdk_r22.6.2-linux.tgz Note: check for updated link version obviously vim ~/.bashrc Add the PATH variables to the top of the file #AndroidDev PATH export PATH=${PATH}:~/android-sdk-linux/tools export PATH=${PATH}:~/android-sdk-linux/platform-tools Reload bash variables without reboot / logout source ~/.bashrc Testing SDK android This command should now bring up the SDK manager. Installing Eclipse IDE This is obviously an optional step depending on the IDE you want to use. I have previously covered a manual Eclipse install (as opposed to the Ubuntu repositories). Install Eclipse ADT Plugin As per: http://developer.android.com/sdk/installing/installing-adt.html Node.js Install The main difficulty on Ubuntu (as with so many development tools - see Eclipse above) is that the included node.js version in the Ubuntu repositories is outdated (remove the Ubuntu version with 'sudo apt-get remove node'). sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install python-software-properties python g++ make nodejs Install Cordova sudo npm install…

Continue ReadingApache Cordova development environment install on Ubuntu

Making VIM the default text editor on Ubuntu

In my never ending quest to find the ideal text editor here is another installment. Since I have been using VIM as my default command line editor for years I thought I give it a try for basic GUI editing as well. Install and set desktop app & icon sudo apt-get install vim vim-gnome sudo wget --output-document=/usr/share/applications/gvim.desktop https://raw.github.com/leogaggl/misc-scripts/master/gvim.desktop sudo wget --output-document=/usr/share/icons/hicolor/scalable/apps/gvim.svg http://gfxmonk.net/images/vim-logo/vim-logo.svg sudo update-desktop-database Set MIME defaults vim ~/.local/share/applications/mimeapps.list #add or edit the following mime type and add others as needed text/plain=gvim.desktop;

Continue ReadingMaking VIM the default text editor on Ubuntu

Ubuntu Apache2 – run VHOST as different user

There are several reasons why you might want to run different Apache Virtual Hosts as separate users from the Apache user account. My most frequent usage is on my development machine to allow running from my home directory. The most commonly recommended option for this purpose is MPM-ITK (a quick hack would be to add yourself to the www-data group using "sudo usermod -a -G www-data USERNAME") sudo apt-get install apache2-mpm-itk sudo a2enmod mpm_itk Modify the virtual host config file in /etc/apache2/sites-available <Virtualhost *:80> ServerName HOSTNAME ServerAdmin webmaster@domain.com <ifmodule mpm_itk_module> AssignUserID USERNAME GROUPNAME </ifmodule> DocumentRoot /home/USERNAME/www/docs ErrorLog /home/USERNAME/www/logs/error.log CustomLog /home/USERNAME/www/logs/access.log combined </Virtualhost> PLEASE NOTE: If you doing this on a machine that already had a default install where MPM-PREFORK is enabled you have to disable sudo a2dismod mpm_prefork sudo a2enmod mpm_itk

Continue ReadingUbuntu Apache2 – run VHOST as different user

Quick ‘manual’ Eclipse install on Ubuntu

Since I always had trouble with the Eclipse version that is avaialable via the Ubuntu repositories I often need to install Elcipse on new machinery. Hence I am documenting the process for myself and hopefully it might help others as well.   by  jah~  If you haven't got the Java dependencies Java dependencies install sudo apt-get install openjdk-7-jre openjdk-7-jdk icedtea-7-plugin Eclipse download Note: download link needs to be updated - current as of 2014-01-27 cd /tmp wget http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/M4/eclipse-standard-luna-M4-linux-gtk-x86_64.tar.gz&mirror_id=1051 tar -xzf eclipse-standard-luna-M4-linux-gtk-x86_64.tar.gz sudo mv eclipse/ /opt rm -f eclipse-standard-luna-M4-linux-gtk-x86_64.tar.gz Create symlink ln -s /opt/eclipse/eclipse /usr/bin/eclipse Create application launcher NOTE: (Edit 2014-01-27) as of Ubuntu 13.10 you need to change the 'exec' line in the desktop launcher to include "env UBUNTU_MENUPROXY=0" as you otherwise will not see any of the menu items in the top nav-bar. sudo touch /usr/share/applications/eclipse.desktop sudo echo "[Desktop Entry]" >> /usr/share/applications/eclipse.desktop sudo echo "Version=4.2" >> /usr/share/applications/eclipse.desktop sudo echo "Name=Eclipse" >> /usr/share/applications/eclipse.desktop sudo echo "Comment=Integrated Development Environment" >> /usr/share/applications/eclipse.desktop sudo echo "Exec=env UBUNTU_MENUPROXY=0 /opt/eclipse/eclipse" >> /usr/share/applications/eclipse.desktop sudo echo "Type=Application" >> /usr/share/applications/eclipse.desktop sudo echo "Icon=/opt/eclipse/icon.xpm" >> /usr/share/applications/eclipse.desktop sudo echo "Terminal=false" >> /usr/share/applications/eclipse.desktop sudo echo "NoDisplay=false" >> /usr/share/applications/eclipse.desktop sudo echo "Categories=Development;IDE" >> /usr/share/applications/eclipse.desktop sudo update-desktop-database

Continue ReadingQuick ‘manual’ Eclipse install on Ubuntu

BESPIN – another nice one from Mozilla.org

Getting excited about a new text editor of all things is not something I like to admit to easily, but in my line of work (although less and less is actually doing hands on coding) text editing is an important part. That's why I checked out the BESPIN project as soon as I heard of it. The prospect of being able to edit your files from anywhere is very appealing to me since I spend a lot of time away from the desk and on devices that not always have good text editor (let alone all the files necessary). The thought of being able to edit files from a netbook while on the run is coming to mind straight away. So far (even though this is a 0.1 'techo-preview') I really like what you see. Not something that the average word processor crowd would find appealing or easy to use, but for somebody that is familiar with (specially *NIX) text editors it is easy to pick up and I can definitely see lots of potential there. There are some important features still missing to make it truly useful in practical conditions, but I am sure they will be addressed in future revisions and it should be fairly easy to host your own since it's basically Javascript & HTML5 and an Open Source project. Great work by these guys: Keep it coming ! Soon ...

Continue ReadingBESPIN – another nice one from Mozilla.org