Tuesday, 16 September 2008

How to access to music with amarok from anywhere (almost)

The idea is to gain access and playback to any or as many music folders from right clicking on the desktop or any file browser screen.

Works with amarok and probably audacious. (with correct launch comm.) Once it's setup very easy to add or delete 'entries'.

first install this

sudo apt-get install nautilus-open-terminal

This provides a right click - 'open in terminal' on any directory (folder
Useful to run a command or get proper path to a folder without typing errors.

EX.
I have a mp3 music folder - 'derek and the dominos' somewhere. (red is path
Browse to the folder, r. click 'open in terminal'

~/mp3/ruchi And The Dominos (1970) Layla And Other Assorted Love Songs$

Copy the path only and then browse to home dir. -> .gnome2 -> nautilus-scripts.
Inside create a new text docu., name it something simple (I used layla - note; must be lowercase

Use this as a template, replace my path by pasting in copied path. Leave quotes for paths with spaces and or oddities

The file extension must match format of music files

#!/bin/bash
cd ~/mp3/"Derek And The Dominos (1970) Layla And Other Assorted Love Songs"
amarok --load --play *.mp3

Save and backspace to .gnome2, r/ click, 'open in terminal' and run

chmod +x layla

Now a r.click will show a 'Scripts", mouse over and click name chosen. If Amarok is open the folder will load and begin playing, it it isn't Amarok will open, ect.

EX. of flac

#!/bin/bash
cd ~/flac/"Quicksilver Messenger Service (1968) Quicksilver Messenger Service"
amarok --load --play *.flac

You can also create subdirectories in nautilus-scripts if wanted, a right click 'collection' of sorts.We made a couple based on sub dir. = artist, script = album or mix.

0 comments: