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 sudo wget --output-document=/usr/share/icons/hicolor/scalable/apps/gvim.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

Install FirefoxOS on Nexus S (GT-9023)

I just had one of my old hand-me-down phones returned by my offspring in a great condition (junior is very careful with his equipment - well done young man !). This doesn't happen all too often shows that the Nexus S is a decently built phone. This is also a good example of breaking the built-in obsolescence of modern phones. This particular unit has served me well for nearly 2 years (my average is one year) and served 2 kids after that. These instructions have been compiled on Ubuntu 13.10 64bit to allow me to re-do this process in future. It should work on any Linux based distro (see pre-requisites) - if you are using another Operating System it might be time to switch. Hopefully it might be useful for other people as well. Installing pre-requisites As per wget python Ubuntu 13.10 additions As per sudo apt-get install --no-install-recommends autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib gcc-4.6 g++-4.6 g++-4.6-multilib git lib32ncurses5-dev lib32z1-dev zlib1g:amd64 zlib1g-dev:amd64 zlib1g:i386 zlib1g-dev:i386 libgl1-mesa-dev libx11-dev make zip libxml2-utils sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 1 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 2 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 1 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 2 sudo update-alternatives --set gcc "/usr/bin/gcc-4.6" sudo update-alternatives --set g++ "/usr/bin/g++-4.6" Check out & build Firefox OS git clone git:// cd B2G echo "export HIDPI=1" > .userconfig ./ nexus-s ./ -j3 The config script will take quite some time depending on your internet connection as…

Continue ReadingInstall FirefoxOS on Nexus S (GT-9023)

Ubuntu 13.10 based Python/Django/WSGI setup

I am currently looking into the use of Django for one of my extra-curricular projects and needed to set up a development environment on Ubuntu. This is the log for future reference and hopefully useful for anybody needing to do the same. Dependencies & Django Installation Core Dependencies & Django sudo apt-get install apache2 apache2-mpm-itk libapache2-mod-wsgi mysql-server python-django python-mysqldb Optional add-ons For my purposes I need a few more additional modules sudo apt-get install python-networkx python-imaging python-pythonmagick python-markdown python-textile python-docutils python-pymongo To test the installation you can check with this command that should print the Django version python -c "import django; print(django.get_version())" Django App Configuration cd /home/USERNAME/projects/python django-admin startproject djangotest cd djangotest python runserver This should give something like the following as output: Django version 1.5.4, using settings 'djangotest.settings' Development server is running at Quit the server with CONTROL-C. WSGI Configuration All that remains to be configured is the Apache VHOST configuration containing the WSGI directives. sudo vim /etc/apache2/sites-available/001-djangotest.conf <VirtualHost *:80> ServerName djangotest ServerAdmin #<IfModule mpm_itk_module> #AssignUserID USERNAME USERNAME #</IfModule> DocumentRoot /home/USERNAME/projects/python/djangotest <Directory /> Options All AllowOverride All Require all granted </Directory> Alias /static/ /home/USERNAME/projects/python/djangotest/static/ <Location "/static/"> Options -Indexes </Location> ErrorLog /home/USERNAME/projects/python/djangotest/apache/logs/error.log CustomLog /home/USERNAME/projects/python/djangotest/apache/logs/access.log combined WSGIScriptAlias / /home/USERNAME/projects/python/djangotest/djangotest/ WSGIDaemonProcess djangotest python-path=/home/USERNAME/projects/python/djangotest processes=2 threads=15 display-name=DjangoTest WSGIProcessGroup djangotest </VirtualHost> Lastly enable the site and restart Apache sudo a2ensite 001-djangotest sudo service apache2 restart PLEASE NOTE: On Ubuntu 13.10 due to Apache being now 2.4 there is a fairly important change in access permissions (which cost me some time to…

Continue ReadingUbuntu 13.10 based Python/Django/WSGI setup

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 <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

Re-index media files on Synology NAS servers

One of the annoying things with Synology NAS servers is the fact that a video file moved to the filesystem does not automatically appear on the DNLA share on client devices. It needs a re-index of the media files. You can log into the HTML Admin Console and start a re-index, however this will be a full re-index and most likely take ages to complete. A quicker way is to connect to the SSH Console and issue the following command: synoindex -R video This will only re-index video files. This can also be used for photos and other media types. As per documentation here are the other command options. synoindex -R {all|photo|music|video|thumb} )

Continue ReadingRe-index media files on Synology NAS servers

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 | sudo apt-key add - echo "deb ./" | 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

Ubuntu – paperless office on a budget

Since paper and myself have never gotten on well I have always been dreaming of a paperless office. A while ago I purchased a Fujitsu ScanSnap S1500 scanner for the office. I did this after doing some research on which Automatic Document Feed (ADF) multipage & duplex scanners were both affordable as well as supported on Linux.   by  Terry Freedman It took a while for me to get around to set all of this up, but the result now is that this scanner is connected to a headless Ubuntu VM and the press of the scanner button will: scan the document perform OCR to convert to text combine the text with PDF to create a searchable PDF OPTIONAL - send the resulting document into Alfresco Document Management Server via FTP Install dependencies NOTE: PPA is only required for support of Fujitsu ScanSnap S1500 sudo apt-add-repository ppa:rolfbensch/sane-git sudo apt-get update sudo apt-get install sane sane-utils imagemagick tesseract-ocr pdftk libtiff-tools libsane-extras exactimage wput Install scanbuttond Download the "Debian Experimental" package from sudo dpkg -i scanbuttond_0.2.3.cvs20090713-14_i386.deb This step is only for the Fujitsu ScanSnap support. For other scanners you can probably install from the Ubuntu Repository Scanner config vim 40-libsane.rules #add this line ATTRS{idVendor}=="04c5", ATTRS{idProduct}=="11a2", ENV{libsane_matched}="yes" Permissions sudo adduser saned scanner Useful command lines for troubleshooting Since I had a few trouble getting this scanner to work properly I found the following commands highly useful in locating the issue. man sane-usb sane-find-scanner scanimage -L dmesg tail /var/log/udev NOTE: If you are using a…

Continue ReadingUbuntu – paperless office on a budget

Quick Adobe Reader install on Ubuntu 13.04

Whilst EVINCE is a very capable PDF Viewer, if you have a need to fill in editable PDF forms it is required to install the Adobe PDF Reader. sudo add-apt-repository "deb precise partner" sudo apt-get update sudo apt-get install acroread PS: If anybody is aware of an Open Source alternative to the Adobe Reader for editable form please leave a comment !

Continue ReadingQuick Adobe Reader install on Ubuntu 13.04

Installing Custom ROM on Galaxy S4 International from Ubuntu

Or as an alternative title "Liberating your Galaxy S4 Hardware from Samsung Bloatware". Unfortunately there is lots of (ad-infested) blogs and forums with dodgy pieces of information on this topic and I found it pretty hard to get descent concise information. So hopefully this might help some poor Linux User liberate their phone. Whilst this has been tested on a Samsung GT-I9505 S4 International LTE device (JFLTEXX series) it should be applicable to other similar Samsung phones that are not fastboot capable (ie. all but the Galaxy Nexus range).   by  Janitors  NOTE: If you have encrypted your device do yourself a favor and do a factory reset BEFORE you start the process (otherwise you will be stuck in a boot-loop as the encryption key will be gone and the device will not start without it). See note below to recover to stock Samsung image if you need to. Rooting This area is the hardest to get decent (Ubuntu relevant) information. However (contrary to some forum entries out there) Heimdall is the most workable solution to use from Ubuntu - binary .deb packages are available from There is both a commandline package as well as a GUI available for Ubuntu 12.10 and 13.04 as well as other Linux distros. Note [2014-11-24]: Had to upgrade my daughters S4 Mini and I noticed that Heimdall is now in the default UBUNTU Repositories. You can install simply by 'sudo apt-get install heimdall-flash' now. Make sure the device has Developer mode enabled Go to Application…

Continue ReadingInstalling Custom ROM on Galaxy S4 International from Ubuntu

SMS Gateway using Sierra Wireless USB Modem on Debian Wheezy

I have been planning to set up a SMS Gateway for sending and receiving SMS messages via a headless utility unit (Raspberry Pi) for a while. Since I had a leftover Sierra Wireless AirCard 880U from Telstra in Australia I wanted to re-purpose this unit with a spare SIM card. Unfortunately it was very hard to find any good setup manual for this particular combination and took some time to fiddle & debug. This is the working setup for future reference and hopefully it helps somebody. Install dependencies Note: install usb-modeswitch BEFORE connecting USB Modem sudo apt-get install usb-modeswitch gsm-utils smstools gammu Connect the USB Modem Check if modem is recognised lsub Bus 003 Device 002: ID 1199:6855 Sierra Wireless, Inc. Edit smstools config file vim /etc/smsd.conf Change the GSM1 entry [GSM1] init = ATE0;+CPMS="SM","SM" device = /dev/ttyUSB2 incoming = yes mode = new baudrate = 115200 smsc = 61418706700 pin = ignore #rtscts = yes #cs_convert = yes report = yes sending_disabled = no memory_start = 1 pre_init = yes primary_memory = SM secondary_memory = SM secondary_memory_max = 40 Troubleshooting the modem I installed gammu purely to have an easier way to test if the modem actually worked. You can use gammu-config to do a GUI config or create a config file manually vim /etc/gammurc [gammu] port = /dev/ttyUSB2 connection = at115200 Testing gammu-detect ; Configuration file generated by gammu-detect. ; Please check The Gammu Manual for more information. [gammu] device = /dev/ttyUSB0 name = Phone on USB serial…

Continue ReadingSMS Gateway using Sierra Wireless USB Modem on Debian Wheezy