Posts

Showing posts with the label Linux

Week in Review - 2013-10

An Optus representative came knocking the other week, and explained that by having an Optus home phone, broadband and mobile phone (which I have), I'd qualify for a 25% discount and free Fetch TV . Now, this is all GOOD. I had to upgrade my mobile plan from $29 to $30 (for which they wanted a $100 plan change fee), but hopefully my next bill will be 25% smaller (down from $80ish to $60ish). And, I'm currently enjoying the Fetch TV experience. This set-top box has a 1T hard disk, and a pretty good interface for navigating the recordings and (free albeit old) IPTV movies. I'm not saying its the best, but it does have me considering turning off the MythTV media center since it takes care of recording terrestrial TV (but I would need a DNLA alternative or similar for watching audio/video/dvds - maybe a NAS? or XBMC?). See https://www.optus.com.au/shop/broadband/bundles/85 An interesting point to note, now that I have FetchTV I can rent and stream movies for approx $6.50 -...

Java on a $5 per month server from Digital Ocean

I just recently came across Digital Ocean - "Simple Cloud Hosting". I was impressed by the pricing, much cheaper than my current VPS solution so I've set up an Ubuntu 12.10 server with 512MB, 20GB SSD, for $5 USD per month. Since I've moved almost everything to Google (from self hosted WordPress to Blogger and Google Docs) the only thing I really need a VPS for is to run my Java applications (there still is the option to use AppEngine with Play 1.2.x if it makes sense to use DataStore). But for $5 a month, this means I can use Grails or Play with a relational database - if it performs well enough. Setting up a server with Digital Ocean really is simple. Once you've signed up (check their Twitter posts for a coupon) and added a credit card, your server can be running in minutes. I chose Ubuntu 12.10, and then they have nice and clear instructions on what to do next to secure it: Initial Server Setup with Ubuntu 12.04 How to Set Up a Firewall Using IP T...

Fixing browser sound on Ubuntu 11.04

I've finally fixed sound via the browser on my Ubuntu 11.04 MythTV media center. MythTV was working fine, but the browsers never even tried to play sound (the sound settings would show NO applications using sound, when Chrome or Firefox should have been). The information I needed was here and I had no /etc/asound.conf so I had to put the following in ~/.asoundrc - pcm.pulse { type pulse } ctl.pulse { type pulse } pcm.!default { type pulse } ctl.!default { type pulse }

Ubuntu, Virgin Mobile Internet Pre-paid (in Sydney), and the Huaweie160e

I recently bought a Virgin Mobile Broadband (Australia) PrePaid USB modem - a Huawei e160e. I activated it over the phone, and when I plugged it in to my Dell Inspiron 1525 running Ubuntu 9.10, I could see that it was connected to the network (this modem flashes a blue light every 3 seconds when connected to the mobile network). But, try as I might, I couldn't get it connected. Every time I tried, it would just disconnect. Looking in the system logs, I'd see: Jan  6 12:42:57 paul-laptop pppd[2846]: Plugin /usr/lib/pppd/2.4.4/nm-pppd-plugin.so loaded. Jan  6 12:42:57 paul-laptop pppd[2846]: pppd 2.4.5 started by root, uid 0 Jan  6 12:42:57 paul-laptop pppd[2846]: Using interface ppp0 Jan  6 12:42:57 paul-laptop pppd[2846]: Connect: ppp0 <--> /dev/ttyUSB0 Jan  6 12:42:57 paul-laptop pppd[2846]: CHAP authentication succeeded Jan  6 12:42:57 paul-laptop pppd[2846]: CHAP authentication succeeded Jan  6 12:43:06 paul-laptop pppd[2846]: Modem ...

Week in Review - 2010-17

Ubuntu 10.04 is here! I've been running Ubuntu exclusively (my wife has the only Windows machine in the house) since (I think) around 6.XX and it just keeps getting better. Last year I converted my parents to Ubuntu 9.10 and every now and then they boot into windows because they don't know how to do something, but thats just because I'm in a different country - otherwise I'd be able to help them a lot more, and show them around. I've got remote control working well now ( Remmina has an option to drop the colours to 256 which means it performs fine across the Tasman) so that means I can show them how to do things easily. I'm looking forward to the new social network aspect of Ubuntu 10, with tight integration into chat and social networks - hopefully this will keep me in touch with my family much more. By the way, I really like Gwibber , and look forward to seeing that evolve. If you like the sound of Linux and/or Ubuntu, I encourage you to try it out. It can m...

My first linux contribution is a disaster

So I recently submitted a patch to the NetworkManager component: https://bugzilla.gnome.org/show_bug.cgi?id=607731  - but it turns out to be a duplicate because this problem was addressed in https://bugzilla.gnome.org/show_bug.cgi?id=600779 - by default Bugzilla doesn't seem to include 'resolved' defects in the search results. You have to go to advanced search and select all statuses . So, if my patch wasn't needed, and this issue has been resolved, then why doesn't the source code in trunk have this change? Bug 600779 mentions that service providers is deprecated, but by what? Ubuntu 9.10 still uses it, because when I edited /usr/share/mobile-broadband-provider-info/serviceproviders.xml it worked fine for me. If service providers is deprecated, then why isn't there something on the homepage? Bugzilla doesn't seem to report which source files were changed in a bug - something I quite like in JIRA. See comment #1 : VirginInternet would still be used for teth...

Default open action for Ubuntu

Something happened on my Ubuntu install sometime which meant that double clicking on an HTML file resulted in the file being opened by gedit . Not really what I wanted. I started looking through the GNOME system menu (Preferences and Administration) to find how to change the default action - but that turned out to be the wrong place. In Nautilus , simply right click on the file and select 'Properties'. From there, go to the 'Open with' tab and select the appropriate application.

Adding items to Gnome menus

I've always wondered how to add items to Gnome menus. Well, it turns out it is relatively easy - as you would expect - and its documented here . It's as simple as creating a text file in the right place - refreshing easy compared to the binary shortcuts in Windows. When I was working on ToolInstaller , I added support for Windows shortcuts by using the OrangeVolt ant tasks library. Now that I have the missing piece of the puzzle, ToolInstaller could be easily modified to support Linux (GNOME). ToolInstaller was a project I started years ago - it was inspired by how easy it was to install software on linux (i.e. apt-get, yum) by using a repository of software, combined with the simplicity of programs which can just be unzipped.

Virtual machines with VirtualBox

I've found VirtualBox to be very easy to create virtual machines - it's free, open source, and available on Windows, Linux, Macintosh and OpenSolaris. One of the features I particularly like is being able to create a virtual disk that grows as needed ( dynamically expanding image ). You can also mount an iso image for the CD/DVD drive - which is exactly what I want to do when installing the operating system on my new virtual machine. Installing on Ubuntu is as easy as: sudo apt-get install virtualbox Now, from the Applications/Accessories/VirtualBox OSE menu item, you can start VirtualBox and create virtual machines. Several things I need to remember after I've created a new machine: Under "Settings/General/Advanced" select "Enable PAE/NX" to avoid the "This kernel requires the following features not present on the CPU: 0:6 Unable to boot - please use a kernel appropriate for your CPU." Under "Settings/Network/Adapter 1" select ...

cp with force overwrite

I was recently trying to copy a directory over an existing one and kept getting prompted - asking if I wanted to overwrite existing files - even though I was using the force option: cp -Rf dir1 dir2 I found the answer  here  - it was caused by an alias forcing the interactive mode. Quick solution is to bypass the alias by an absolute reference to cp: /bin/cp -Rf dir1 dir2

Playlists with MythTV

I've been wanting a way to use playlists on my media center either from within MythTV or with any other player. The reason is I have a bunch of short videos (music and documentaries) that I'd like to be able to play consecutively. It turns out to be a case of just RTFM . You can create playlists for MPlayer from directory listings, and then associate playlists with a particular mplayer command. To generate the playlist from all files in a directory, I use the following: dir * | sed 's/\\//g' > all_videos.pls The sed part of this command removes the \ from escaped spaces... i.e. a file 'Hello world' is output from the dir command as 'Hello\ world' - the space is escaped. We need to generate a file without these escaped spaces for it to work properly. I use the following mplayer command associated with the pls extension: mplayer -shuffle -fs -zoom -quiet -vo xv -playlist %s

Hey! Where'd my swap go?

I've just noticed that I've got no swap space! (Dell 1525 running Ubuntu 8.10). I first installed my laptop with Ubuntu 8.04, and later upgraded to 8.10. After the upgrade I noticed that hibernate no longer worked, and I think (from memory) I found an error message saying something about not enough swap space. I briefly thought about trying to find out how to add more swap (I already had a 4G partition defined, and I've only got 2G ram) but then I swiftly moved on to other more pressing issues. Well, just recently I fired up System Monitor to check on a process, and notice in the bottom right corner it said there was no swap space. Firing up 'top' confirmed this - my system had zero swap! I could see that I had a swap partition defined: paul@dell1525:~$ sudo blkid /dev/sda8: TYPE="swap" UUID="4bd53cb9-611c-4e57-a9df-4754d6bcdd65" But the corresponding entry in /etc/fstab had a different entry:. # /dev/sda8 UUID=e6eb6c47-599c-4612-ac8a-287279ee438...

Set default browser in Ubuntu

To set the default browser, use update-alternatives as shown below: paul@dell1525:~$ sudo update-alternatives --config x-www-browser There are 2 alternatives which provide `x-www-browser'. Selection Alternative ----------------------------------------------- 1 /usr/bin/firefox-3.0 *+ 2 /usr/bin/seamonkey Press enter to keep the default[*], or type selection number: 1 Using '/usr/bin/firefox-3.0' to provide 'x-www-browser'. There is a good write-up of the update-alternatives system here .

Podcatching solution

I'm getting closer to a podcatching solution with gpodder . Gpodder is a simple and easy to use podcatcher - and importantly, it can be invoked from the command line in a non-interactive mode. This is important because of my internet plan - I get twice as much download quota on off-peak times as I do on on-peak. So, I can shedule a cron job to fire gpodder up at 1am and download the latest podcasts. Great, because I'm not going to consume precious on-peak bandwidth. Now that I've got the latest podcasts handy, I can listen to them on my media center using Amarok . This isn't the only option, but it works for me because the interface lets me 'group by album' - which is conveniently groups most podcasts - and display those added today/1 week/1 month/... Amarok also lets me configure Xine to output to SPDIF - important, because my media center is only connected via SPDIF to my surround sound receiver. Without this option, I wouldn't be able to hear anything. A...

Extra Ubuntu Repositories

A friend put me on to this blog post about extra repositories for Ubuntu. This is a great resource which highlights some great (and possibly essential) software that you should know about if you are running Ubuntu (and possibly any linux flavour). Have a look, you may find some software listed there of interest to you. I didn't know about some of the items listed (eg GNOME Do ) so its been a great resource for me.

Getting rid of Root email

I've got a Linux VPS through RimuHosting - I'm no system admin, and the root account gets a pile of email spam. This takes up disk space so I try to regularly delete it. The best way I've found is to us Mutt - a console based email reader. Firing up Mutt as root displays the thousands of spam mails recieved. Pressing 'D' lets you delete messages that match a pattern. So I can specify the pattern 'a' and that matches almost all of the messages. When quitting the application, it deletes the marked messages. So, this is a good solution for reading or deleting many emails without downloading them - if you have ssh access. To avoid having to do this, can anyone tell me how to stop receiving these emails?

Removing svn files

I recently needed to clean up and remove all of the svn files in a directory structure. I found the answer here , a simple linux command line to recursively delete .svn folders: find . -name ".svn" -print0 | xargs -0 rm -Rf

Cannot find a valid baseurl for repo: core

I came across this error while trying to install a package on Fedora 5: # yum install gd-devel Loading "installonlyn" plugin Setting up Install Process Setting up repositories core [1/3] Cannot find a valid baseurl for repo: core Error: Cannot find a valid baseurl for repo: core The solution was relatively simple if obscure - I found it  here . I simply changed the enabled=1 to enabled=0 in: /etc/yum.repos.d/fedora-core.repo /etc/yum.repos.d/fedora-extras.repo /etc/yum.repos.d/fedora-updates.repo

Do you have that package installed

With yum, you can find out if you have a package installed using the query option. For example if you want to know if 'php-gd' is installed: # rpm -q php-gd php-gd-5.1.6-1.6

Mplayer sound via SPDIF

I recently lost sound via mplayer on my MythTV mediacenter. This affected any of my video collection that weren't DVD iso images since mplayer was the configured player for most types. At first I thought it might have been related to doing a system update, but now I think it was related to my tinkering which got interrupted by the kids - and then promptly forgotten about. Days or weeks later, I was surprised to find the sound missing when playing videos (rarely done - I usually watch the recordings or DVDs which use the internal player). Now that I've fixed the issue, the problem is obvious. I have a Gigabyte motherboard and I use the SPDIF output to take the sound via optical cable into my surround sound receiver. In the video setup, I had the default player set to mplayer with the command: mplayer -ao alsa:device=spdif -fs -zoom -quiet -vo xv %s This directed sound to the SPDIF output. But, when using MythStream, no sound came out when watching things such as the Apple movi...