Wednesday, 19 February 2014

Doit.im

Note to self: Doit.im is a web-based todo-management site which has a great set of features for free, looks great, and has a matching Android app. http://doit.im/

Tuesday, 21 January 2014

Firefox Nightly/Beta/Aurora - Sharing plugins with a standard Firefox release on Linux

To share the plugins of an existing, standard Firefox installation on Linux, create a symlink in the directory ~/.mozilla. 1. Open a terminal emulator and navigate to ~/.mozilla. If this directory doesn't exist, create it with the command "mkdir .mozilla". 2. Create a symlink to the 'plugins' directory of the existing Firefox installation with the command "ln -s /usr/lib64/mozilla/plugins/ plugins" 3. Start Firefox Nightly/Beta/Aurora and open the 'Plugins' page. If this procedure has been successful you will see the same list of plugins as in the existing Firefox installation. The example symlink command assumes you're using a 64-bit Linux distribution. If not, exclude the "64" from the command. If the 'plugins' directory is in a different directory to this example, modify the path in the example symlink command.

Wednesday, 2 October 2013

ROXTerm: a good-looking, fully functional terminal application for Linux

Since the GNOME developers recently dropped transparency from the native terminal emulator application, you might be looking for an alternative. There are many available, but I would recommend you consider ROXTerm [1]. It's effectively a drop-in replacement for the GNOME Terminal application. Its features include: drag-and-drop support for files, a tabbed interface, the ability to drag tabs outside the main window to create separate windows, and extensive configuration options. [1] ROXTerm home page: http://roxterm.sourceforge.net/

SOLVED: Writing a hybrid ISO image to a USB stick/key/thumb drive on OSX is very slow

Being new to OSX and my iMac, I couldn't understand why writing an ISO image to a USB thumb drive was very slow, sometimes taking around 2 hours. Having done the same under Linux I *knew* it wasn't supposed to take that long. Finally I searched for and found the solution in a superuser entry [1], I found a solution: prefix the device name with "r". I also learned that the block size parameter must be specified in lower case on OSX: "bs=1M" instead of "bs=1M" under Linux. WARNING: The device parameters I have used in the following examples may not match the device parameters required in your configuration. *DO NOT* simply copy-and-paste these commands. For example, the following is a command I might use under Linux:
dd if=filename.iso of=/dev/sdb bs=1M
The equivalent command on OSX would be:
dd if=filename.iso of=/dev/rdisk1 bs=1m
Note the "r" in the output device's name, also that the "m" is in lower case. [1] http://superuser.com/questions/421770/dd-performance-on-mac-os-x-vs-linux

Sunday, 14 April 2013

Built-in text editor is available in Firefox

Firefox offers a handy built-in Javascript editor named 'Scratchpad' which can act as a basic text editor. It's great for small text editing needs, including your TODO list, or perhaps making quick notes about something you just read about. Multiple instances of Scratchpad can be open at once, and they are seen by a window manager as seperate windows. Scratchpad's features include: * Keyboard shortcuts; * 'Recent files' menu; * Basic editing, including undo, redo, find, and jump (to a specific line number). There is no search-and-replace function because it's outside Scratchpad's design scope. Next time you need to do some basic editing, try Scratchpad instead of your usual editor.

Tuesday, 5 February 2013

grin - an alternative to grep

I sometimes have difficulty getting grep to do what I want it to do. Today I wanted to search all files in a directory and sub-directories for instances of a string. After having difficulty with grep, I went looking for a tool named 'ack' which was written in Perl and intended as a replacement for grep. This search somehow led me to the home page of a smilar tool written in Python. The tool is named 'grin' and can be found at http://pypi.python.org/pypi/grin.

grin was easy to install and very easy to use. I particularly found it useful to have the 'hits' highlighted.

Perhaps I could have done this all with grep but grin has done exactly what I wanted it to do, so I think I will continue using it. Those who disagree with just have to grin and bear it. Bah boom, tish! :D

One-line text editor in your web browser

A colleague of mine gave me a tip for a basic, in-browser text editor. In a modern browser, enter the following in the address bar:

data:text/html, <html contenteditable>

At first it seems that nothing's happened. The browser pane is one large text entry field. It's a great way of being able to quickly copy snippets of text from a web page, or keep temporary notes. You can even bookmark the address so that you can quickly have a scratchpad available.

When I first saw this I was amazed! OK, maybe I'm easily impressed. :) I wanted to share it, so asked if I could mention it on G+. My colleague suggested that instead I link to the original page. When I searched for this, I had many hits returned, with the first being a blog post titled "One line browser notepad". The blog post's author described the method I mentioned above. I then went on to read some of the comments made in reply to the post and was amazed to see that there were at least 10 further enhancements and improvements suggested. I highly recommending you visit this blog post and try some of the methods.
For my purposes I settled on the example below. It goes a few steps further than the basic example, giving the tab a title, adding a [Save] button, increasing the text size, adding a favicon and setting the focus on the editing pane. One advantage of this solution over other solutions suggested is the ability to save the contents of the text box. It's not a fully-blown editor but you can at least save your notes if you want to do that. All credit for the code below goes to those who commented to the blog entry. It is entirely the result of cut-and-paste-ing some of their contributions.
data:text/html;charset=utf-8,<link%20rel="shortcut%20icon"%20href="http://g.etfv.co/http://www.sublimetext.com"/><title>Scratchpad</title><button%20onClick="SaveTextArea()">Save</button>%20<script%20language="javascript"%20type="text/javascript">%20function%20SaveTextArea()%20{%20window.location%20=%20"data:application/octet-stream,"%20+%20escape(txtBody.value);%20}%20</script>%20<textarea%20id="txtBody"%20style="font-size:%201.5em;%20width:%20100%;%20height:%20100%;%20border:%20none;%20outline:%20none"%20autofocus>%20</textarea>

Thursday, 3 January 2013

Firefox plugin: Markdown Editor

In my ongoing saga to assemble a method of storing personal notes in a way that best suits me, I stumbled across a Firefox plugin named Markdown Editor. As its name suggests, it is a Markdown editor which can be used to edit locally-stored text files in Markdown markup.

It provides a split-pane view, with one pane being the editing pane and the other an automatically-refreshed HTML view. The editor is quite basic with undo, save and save as features.

If you use Markdown markup but don't want to use a standalone application, try Markdown Editor. It makes a very useful addition to Firefox. It's quite basic in its functionality at the moment and could perhaps benefit from some enhancements and new features.

Try it and see for yourself. If you do try it, please write a review on its Mozilla Firefox plugins page as so far there it has had very few reviews.

Firefox's recent changes have impressed me

I am impressed by recent changes and changes in progress to Firefox, namely:

  • an optional PDF viewer written in Javascript;
  • a new Downloads dialog box, with a matching Navigation bar button to show/hide the dialog. I definitely prefer this to having an entirely separate window opened (available only in the Nightly build at the moment);
  • an option to open links in a Private Window. This is an improvement over the previous option, which was to switch the entire browser into Private Browsing mode (OK - I may have the name of that feature wrong) (available only in the Nightly build at the moment).
Yay Mozilla!

Note: I am well aware that these features have been available in Chrome for some time. I give Google credit for the excellent browser that is Chrome but my preference is for Firefox.

Thursday, 13 December 2012

HOWTO: Search Pidgin's logs for a regular expression

I wanted to search all of Pidgin's logs for mention of a subject I remembered was discussed a few months ago.

From within the directory for Pidgin's log files - ~/.purple - I tried the following command:

grep -R <regex> *.txt"

Sadly this failed miserably so I asked for help. Immediately someone came up with the answer:

grep -R <regex> **/*.txt

Thursday, 29 November 2012

Android app focus: Link2SD

Link2SD

Category: Utility
Cost: Free
Requires root access?: Yes

I have decided to highlight Android applications I think are useful, interesting or fun. First on the list is Link2SD.

https://play.google.com/store/apps/details?id=com.buak.Link2SD&feature=nav_result#?t=W251bGwsMSwxLDMsImNvbS5idWFrLkxpbmsyU0QiXQ..

Its main goal is to alleviate the problem of limited internal storage of an Android phone by allowing you to move user applications and their data to a micro SD card. Although there are several scripts to do the same for custom ROMs, they can be very ROM-specific and Link2SD is easy to use and has wider ROM compatibility. Link2SD's features also include the ability to freeze apps and automatically move them to SD storage.

If you find the internal storage of your phone is getting low, try Link2SD.

Sunday, 25 November 2012

Google Hangout hints and tips

Overview

Google Hangouts are a free service provided by Google, which allow for video chats between up to 10 people.

To participate in a Hangout only requires a modern PC web browser, or an Android phone with the Google Plus app installed.

Installing the required bits and pieces

When you participate in a Hangout for the first time, the required plug-ins will be installed.

It is therefore recommended to attend a "fake hangout" with a friend before your maiden Google Hangout so the appropriate plug-ins are installed ahead of time.

On Linux, you will be asked to add a new repository, and may also need to perform an update after the repository is installed before you can install the plug-ins.

Microphone/Headset

If you are using the Gnome 3 desktop environment, setting your USB headset or microphone as the default device can sometimes be difficult.

Using Gnome 3 extensions will help you immensely to ensure your headset or microphone is the primary device during a Google Hangout.

Installing the Pulse Audio Shortcuts Extension

  1. Visit https://extensions.gnome.org/extension/109/pulse-audio-shortcuts/
  2. Install the Extension.
  3. Install the suggested packages in the description of the extension (not doing this will make the extesion useless).
  4. If the extension does not appear in the task bar, restart your Gnome 3 session
    Alt+F2, then type restart or r.
  5. Plug in your USB headset or mic.

Setting your input/output device

  1. Open the Volume Control menu in the task bar.
  2. Select Pulse Audio Shortcuts, and then click Volume Control.
  3. Click Volume Control.
  4. In the volume control window, select Configuraton.
    Your Internal Audio and <Headset/Mic Name> will display.
  5. Select the "OFF" profile for the Internal Audio device.
  6. The USB headset is now the only device that will playback and send audio on your PC.

When you have completed the Google Hangout, unplug your USB device, and reverse the configuration in the Setting your input/output device procedure.

Hints and Tips

Wired vs Wireless

If possible, use a wired network connection because you're likely to get better video quality.

Testing... testing... Is this thing on?

Since a Google Hangout uses both audio and video sources, you need to check the audio settings of your desktop environment (DE) AND those of the Google Hangout.
  1. Before starting the Hangout, check your DE's audio setting, making sure that the volume settings are OK and that your microphone is on;
  2. Once the Hangout is started, click on the Settings icon and again confirm that your microphone is on.

Forgetting to do both these checks may result in an award-winning Marcel Marceau impression.

Add your national flag and screen name to your Hangout window

When you start a Hangout, there are many add-ons (called Apps) that will enhance your experience, particulary when talking with international folk, or in a full room.

Once such add on is "Hangout Toolbox". This app will superimpose your name (of your choosing) and your national flag as a "lower third" of your hangout view window.

This makes it really easy to work out who is speaking, and what their name is.

  1. In a hangout session, select Add Apps from the left hand list.
  2. From the list of available apps, select Hangout Toolbox and install.
  3. Hangout Toolbox will display in your left pane apps list.
  4. Click to open the menu.
  5. The first menu is the "lower third" menu.
  6. Set the following
    1. User Name
    2. Role (in the second field)
    3. Select Country (your flag)
    4. Set the slider to ON.

      Talk to the camera, not the screen

  7. The configured options will display the info like you see in news broadcasts. Very cool.

Use Events to make fancy meeting invitations

Google Plus has an Events tab, and it is simply awesome for making meeting invites for work meetings.

You can create an event, and invite people you know on G+ directly. If the invitees accept the meeting, it will appear in their Google calendar as an appointment, and will remind them to attend.

When the user visits G+ to join the hangout, a "join now" button displays at the event start time.

Note
     If you are the organizer, you can not start the Hangout earlier from the invite. You must wait until the start time ticks over before you can launch the Hangout. Otherwise you get an "Untitled" hangout, which none of the other participants will know about.

Talk to the camera, not the screen

When you are the one talking in a Hangout, it is natural to want to talk to the person you see on the screen. This has a weird side-effect: you appear to be looking "somewhere else", not at the person.

Take a leaf out of broadcast television: the camera is the audience. Talk to the camera and engage your participants.

Monday, 19 November 2012

Linux+Browser+Laptop = Chromebook?

I recently tried and failed to boot Hexxeh's Lime and Vanilla builds of Chromium OS on my MSI Wind U200 laptop. While I saw it as a set-back it got me thinking: isn't Linux+Browser essentially an equivalent configuration?

I'm trying to achieve much the same functionality as is provided by a Chromebook:

An OS which boots quickly (up to 30 seconds) and presents the user a web browser in full-screen.

Extra details of what I'm seeking are:
  • Built-in advertisement suppression. Installing an appropriate extension would achieve this goal.
  • Multi-user support. Having multiple Firefox desktop icons would achieve this goal.
  • Synchronisation of bookmarks, history etc. Enable Firefox's native synchronisation would achieve this goal.
  • Printing support. Installing and configuring CUPS should achieve this goal.
  • Domain blocking. Either "installing" an appropriate hosts file or doing this via my router should achieve this goal.

What I don't yet have worked out is the "wrapper" to all of this: a Linux distribution which boots quickly into the browser and only a browser, allowing the user to quickly and easily shut down the PC when they're finished.

My thoughts are to do a minimal Salix OS installation, probably Fluxbox edition, and instead of using GDM or similar, write an .xinitrc which starts Firefox immediately, perhaps followed by the "shutdown" command, so that exiting Firefox shuts down the PC without further user intervention. If this is to be a multi-user installation, I could have large desktop icons labeled with each user's name which start Firefox with their own profile.

I'll report my progress via follow-up posts here.

Sunday, 18 November 2012

HOWTO: Cut the end off a video file using ffmpeg

I had a video file from which I needed to cut the end off from a specific point. I didn't want to use a video editor since it seemed a simple enough task, so I went look for alternate solutions.

The following page gave me a solution using ffmpeg:
http://quickhowto.blogspot.com.au/2011/02/how-to-truncate-video-using-command.html

ffmpeg -vcodec copy -acodec copy -i [inputfile] -ss [start] -t [duration] [outputfile]

My first attempt failed because I specified a duration of 36 seconds and I wanted 36 minutes. Reading ffmpeg's man page confirmed that the duration needs to be specified in the format hh:mm:ss. In my case I needed "00:36:00".

Monday, 12 November 2012

FLOSS advertisements here

My blog tends to be quite sparse because I don't like to tell people about myself. However I realise I use some cool FLOSS which others may not know about. So .... I'm going to start advertising FLOSS here on my blog. Prepare yourselves for an onslaught of stuff. :)

Sunday, 11 November 2012

HOWTO: Store notes online and offline

I have mentioned on this blog several methods of storing notes so that they're available both online and offline. Since when online I usually have a browser open, it seems logical to seek browser-based solutions to the problem. The problem then was how to make these same notes available when offline. So far none of the services I have tried offered all the features I wanted.

Help is here, though, because I have thought of another method and am trialing this now. I won't go into a long explanation as to why I'm trying this method or how to set it up but simply present my current solution:

Installation Method

  1. Install Dropbox client
  2. Create a subdirectory in the Dropbox directory to contain the notes

Storage of notes
Individual notes are created as plain text files and stored in the "notes" directory (or a sub-directory).

Searching
Use the command-line tool 'grep' to search notes' content. An optional feature would be to added specially mark-up "tags" so that you could search by tag, finding matching notes. Example tags could include "todo", "project", "howto".

Formatting
While the notes themselves are plain text files, an optional extra is to use the Markdown markup method to apply formatting. When viewed in a text editor they are still easily read but when viewed using a Markdown viewer, their formatting makes complex notes more legible. One method is to install a Markdown viewer in your browser, give each note with Markdown markup an ".md" extension and associate files with an ".md" extension with the browser. I can then easily browse my notes in a file manager and easily view their contents.

Although I am using Dropbox in my current experiment, I could use a FLOSS alternative.

The beauty of this approach is that it is cross-platform, since each component is itself cross-platform.

Thursday, 1 November 2012

HOWTO: Create a simple, private online photo slideshow

TL;DR I can recommend PhotoSwipe to anyone who needs to create an online photo slideshow on their own web host.
I was recently asked to create an online photo slideshow. Despite being web savvy, I had never done anything like this so I asked my colleagues for suggestions. As a result I used PhotoSwipe, and found it was incredibly easy to get working. All I needed was a web host and access to upload the files which made up the slideshow application.
The steps required were:
  1. Download PhotoSwipe;
  2. Extract the contents of the PhotoSwipe zip file;
  3. Upload PhotoSwipe to a folder on the web host;
  4. Edit the index.html with the names of the images and configuration options;
  5. Upload the images.
Other hosted options such as Dropbox's native slideshow option would have achieved a similar result but in my case I needed to keep the slideshow private.

Tuesday, 17 January 2012

Troubleshooting GDM error message "Oh no! Something has gone wrong"

After a recent update of several packages I booted and instead of the GDM's login screen it showed me a full-screen error message featuring a wonderfully smiling monitor: "Oh no! Something has gone wrong." My first reaction was to panic but I soon calmed down. My problem was that I had never seen a fatal message like this from GDM and so didn't know how to diagnose the problem. I Googled the title of the message and found that the following log file should contain any detailed error messages that GDM is reporting.

/var/log/gdm/:0-greeter.log


I successfully logged in at a console (i.e. non-GDM) by appending "3" to the GRUB kernel line (which specifies the run level to be booted into). I then looked at the above log file and, amongst the messages found that the file "/usr/share/gnome-shell/theme/gdm.css" was reported missing. I confirmed that that file was not there. I'm not sure what package is supposed to contain it but from doing a "pacman-g2 -Qo <file>" on other files in the same directory, it seems it should have come with the Frugalware GDM theme. For the moment I copied this file from another distribution, logged out and rebooted. This time GDM started as normal and I could log in.

Problem solved! \O/

Monday, 31 October 2011

Online web-based notes

In a previous blog entry (http://phayz.wordpress.com/2011/04/11/online-and-offline-notes-for-chromeium/) I wrote that I had been trying to find a way of maintaining notes using the Chrom(e|ium) web browser. I wanted to be able to make a note of little bits and pieces of information via my web browser *plus* have these available when I was offline. At the time I settled on the Scratchpad extension because it did what I wanted and had a bonus of keeping notes in sync on Google Docs.

After a little while I stopped using Scratchpad because I didn't like how it looked, nor how it stored the notes on Google Docs. I later tried the SpringPad web service but this was much more than I wanted and offered an offline option only if using Chrome (or Chromium). I didn't want my choice limited by the browser I was using at the time. For the moment I am using a web-based service named SimpleNote (http://simple-note.appspot.com) because it's very simple but offers searching of notes. It doesn't work offline unfortunately but I usually need these notes when the PC is on and I have Internet connectivity most of the time. If I am desperate I could try one of the third-party applications which allow for notes to be exported.

Once again I'm happy at the moment with my choice. I may change my mind again, so be prepared for future blog entries on the topic. :D

Friday, 28 October 2011

HOWTO: Rotate a video using ffmpeg

Note:I am using Linux and have not tested this on other operating systems, so your results may vary.

I recently received a video from someone with a request to post it to a video hosting site. It all sounded simple until I found that the video had been recorded using an iPad in landscape mode so when I played the video the image was rotated. Before posting it I was going to have to rotate the video so that playback looked normal but how was I going to do that?

I first considered a video editor but the ones I considered had too many dependencies so I continued my search and eventually found a solution here: http://stackoverflow.com/questions/3937387/rotating-videos-with-ffmpeg, which gave instructions on using ffmpeg's "transpose" feature to rotate the video.

For my task here's the command line I used. This is to entered as one line, but may be appear wrapped in your browser:
ffmpeg -i <input_video_filename> -vf "transpose=1" -r 30 -sameq -acodec copy <output_video_filename>

The "transpose" function is one of ffmpeg's many video filters which, according to the ffmpeg man page is used to "Transpose rows with columns in the input video and optionally flip it." Below is a list of other transpose parameters and what they do. For full details, refer to the transpose video filter section of ffmpeg's man page for details of the necessary values.


0 = 90CounterCLockwise and Vertical Flip (default)
1 = 90Clockwise
2 = 90CounterClockwise
3 = 90Clockwise and Vertical Flip


Note: In this example I used three additional parameters:

  • "-acodec copy" parameter, which instructs ffmpeg to copy the audio, not process it again (Note: Thanks to a comment on this blog entry from Tim;

  • "-sameq" parameter so that the video's original quality was not lost during the rotation because without it ffmpeg degraded quality;

  • "-r 30" to maintain a framerate of 30 frames per second.