Set up a Raspberry Pi Zero headless

If you are using the GUI (Raspian full download) and want to connect your RPi Zero to a keyboard and monitor there are probably easier ways to do this. These notes are for people that want to use a headless (no monitor and GUI) setup ready to connect to your RPi after first boot via SSH from another terminal. "Raspberry Pi Zero W" (CC BY-SA 2.0) by lespounder Download Raspbian Lite wget -O raspbian-lite-latest.zip https://downloads.raspberrypi.org/raspbian_lite_latest Download link: https://www.raspberrypi.org/downloads/raspbian/ Write Image to SD Card dd bs=4M if=2017-08-16-raspbian-stretch-lite.img of=/dev/sdb After this step there should be 2 additional mounts (if not mount the 2 SD card partitions manually). Set up network interfaces Create a new config file for the wireless interface. cd etc/network/interfaces.d/ vim wlan0.conf Add the following to the new file (if you want to use DHCP - change to static if you want to fix the IP): auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf Set up connection details for local wireless network vim etc/wpa_supplicant/wpa_supplicant.conf Check the file and ensure the network settings are as per the Wireless Network you are connecting to. country=AU ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="SSID" psk=HASHED_PSK_VALUE } You could use the clear-text PSK passphrase but I prefer not to do that in configuration files. Create a PSK hash using 'wpa_passphrase' this older article There could be other config values you might need depending on the network you are connecting to. More info: https://linux.die.net/man/5/wpa_supplicant.conf. Ensure there are DNS Servers configured sudo vim etc/resolv.conf Add the following to the new…

Continue ReadingSet up a Raspberry Pi Zero headless

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

Paperless Office using the Raspberry Pi

This is a follow-up on an older blog using Ubuntu.    by  rosmary  For this purpose I used a Fujitsu ScanSnap S1300i scanner as I really like the features of this series (full duplex scan as well auto document feeder as well for around $250). It's document feeder is not a good as the S1500 we have in the office, but very compact and can be powered from USB hub. Raspberry Pi Prerequisites Since this will be a purely headless install designed to sit in a corner behind the scanner I am using a Base Raspian (Debian Wheezy) install (I personally like the clean minimal install via https://github.com/debian-pi/raspbian-ua-netinst the best). apt-get install sudo vim wget wput libusb-dev build-essential git-core Add non-privileged user account(s) adduser USERNAME adduser USERNAME sudo groupadd scanner usermod -a -G scanner USERNAME Install Sane The version of sane from the Raspbian repos is not working with the Fujitsu ScanJet range and needs to be built from source. git clone git://git.debian.org/sane/sane-backends.git cd sane-backends BACKENDS=epjitsu ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var make make install Install S1300i Driver You need to get the driver file ('1300i_0D12.nal') from the CD that came with the scanner. If you still have access to a CDROM drive that is. :( mkdir -p /usr/share/sane/epjitsu/ cp 1300i_0D12.nal /usr/share/sane/epjitsu/ Check /etc/sane.d/epjitsu.conf and see if the following line is there (in my case it was already created by sane build). # Fujitsu S1300i firmware /usr/share/sane/epjitsu/1300i_0D12.nal usb 0x04c5 0x128d sane-find-scanner -q found USB scanner (vendor=0x04c5 [FUJITSU], product=0x128d [ScanSnap S1300i]) at libusb:001:004 found…

Continue ReadingPaperless Office using the Raspberry Pi

Ubuntu 14.04 Amazon EC2 Cloud Desktop using LXQT

Using Amazon EC2's free usage tier to host your own cloud desktop is a very economical way to to have a desktop at hand anytime you can not be near one. Since I quite often use Chromebooks these days when on the road this is a particular handy way should I need a full desktop for certain tasks. Since Ubuntu 14.05 is my default desktop on my normal hardware I obviously want to have my cloud desktop running the same underlying OS. However I don't think running Unity as the desktop interface would be appropriate via a low-bandwidth remote desktop connection. For this reason I chose LXQT. If you need total stability you probably should go for the more mature LXDE instead, but I have already tried LXQT on an old EEE PC and was very impressed by the speed and low resource usage. NOTE (Edit: 2014-11-03): Please find an updated (and easier) version of this blog here. I was experiencing some issues with LXQT (which is understandable as it clearly states that it is not a release version) Provision Ubuntu 14.04 LTS EC2 Instance Instance details Connect to AWS Console and go to EC2 Service Choose OS Image: "Ubuntu Server 14.04 LTS" (see screenshot) Choose a "Micro Instance" if you want to use Amazon's Free Usage Tier Choose Instance details - the defaults will generally be fine Add Storage (I generally add a separate Volume for /home but default should do) Tag instance (just give it a name to…

Continue ReadingUbuntu 14.04 Amazon EC2 Cloud Desktop using LXQT

Installing libdvdcss on Ubuntu 13.10

With the demise of the Medibuntu repository and libdvdcss not being hosted in the main Ubuntu repos due to licensing issues a new repository is needed from 13.10 upwards. Thanks to the good folks at VideoLAN (makers of the awsome VLC Video Player) there is a ready and updated source available. wget ftp://ftp.videolan.org/pub/debian/videolan-apt.asc | sudo apt-key add - echo "deb ftp://ftp.videolan.org/pub/debian/stable ./" | sudo tee /etc/apt/sources.list.d/libdvdcss.list sudo apt-get update sudo apt-get install libdvdcss2

Continue ReadingInstalling libdvdcss on Ubuntu 13.10

Disable services on boot – Ubuntu 12.04

To keep my desktop (notebook) machine light and responsive I don't want unnecessary services starting on boot-time. Turns out Ubuntu is surprisingly cumbersome to configure in this area (compared to RedHat / Fedora). Two services I need on my notebook, but don't want them to start unless I require them running are MySQL and Apache. But it looks like some services are started using upstart init daemon and it appears there is no management tool for this. Services can pe prevented from auto-starting either by renaming the config file or commenting out the start line in the config file sudo cp /etc/init/mysql.conf /etc/init/mysql.conf.modified sudo rm /etc/init/mysql.conf Or comment out the following line in the config file sudo vim /etc/init/mysql.conf #start on runlevel [2345] Reference: http://upstart.ubuntu.com/cookbook/#disabling-a-job-from-automatically-starting Other services are still started using rc.d such as Apache. They can be disabled using sudo update-rc.d -f apache2 disable Now these services should not start up when the machine boots and can be started manually sudo service apache2 start sudo service mysql start EDIT (2012-08-07): thanks to a comment below from Van Luu there is a GUI option that I was unaware of called BootUp Manager (http://www.marzocca.net/linux/bum.html) sudo apt-get install bum

Continue ReadingDisable services on boot – Ubuntu 12.04

Disable the Guest account from Ubuntu Login Screen

Having a guest account might be useful on a home computer, but it's generally not what I want enabled on a notebook. To disable the default Guest account you need to edit lightdm.conf and add a line (allow-guest=false). sudo vim /etc/lightdm/lightdm.conf [SeatDefaults] greeter-session=unity-greeter user-session=ubuntu allow-guest=false Tested in Ubuntu 12.04 LTS Precise Pangolin & Ubuntu 11.10 Oneiric Ocelot

Continue ReadingDisable the Guest account from Ubuntu Login Screen

Ubuntu – Google Mail (GoogleApps) as default mail client

Since Ubuntu 9.10 NetbookRemix has been released I am again finding myself using my trusty old ASUS EEE when on the road.  And  finally it seems I have found a vanilla Linux distribution that is reasonably responsive and works 'out of the box'. One thing I don't need on the road (as a matter of fact on none of my equipment) is having to install & maintain some client/server mail client. Here is a workable solution to have your browser default 'mailto:' links to Google Apps. Howto System --> Preferences --> Preferred Applications Chrome: perl -MURI::Escape -e '$to = shift;$to =~ s/^mailto://i;exec("chromium-browser", "https://mail.google.com/a/yourdomain.tld/?view=cm&fs=1&tf=1&cmid=22&to=".URI::Escape::uri_escape($to) );' '%s' Firefox: perl -MURI::Escape -e '$to = shift;$to =~ s/^mailto://i;exec("firefox", "https://mail.google.com/a/yourdomain.tld/?view=cm&fs=1&tf=1&cmid=22&to=".URI::Escape::uri_escape($to) );' '%s' Note: do not forget to replace 'yourdomain.tld' with your actual Google Apps domain Here is the link to the original blog entry by David Davis (xantus77): http://xantus.vox.com/library/post/howto-use-gmail-for-mailto-links-linuxubuntu.html (Kudos !)

Continue ReadingUbuntu – Google Mail (GoogleApps) as default mail client