atc » Linux http://blog.alexcollins.org Musings of technology, sport, life et al Thu, 10 Jun 2010 10:24:24 +0000 en hourly 1 http://wordpress.org/?v=3.0.5 Sky Songs and Linux http://blog.alexcollins.org/2009/12/15/sky-songs-and-linux/ http://blog.alexcollins.org/2009/12/15/sky-songs-and-linux/#comments Tue, 15 Dec 2009 22:55:02 +0000 atc http://blog.beplacid.net/?p=104 If you want to use the Sky Songs download client in Linux (say Ubuntu or Debian), just paste the following into a file called skysongs in $HOME/bin and then chmod a+x it:
cd $SKY_SONGS_DIR; /usr/bin/java -cp . -jar downloader.jar $*

Note, $SKY_SONGS_DIR should be changed to your installation directory. If you used wine to install Sky Songs, have a look under /home/YOURUSERNAME/.wine/drive_c/windows/profiles/YOURUSERNAME/Local Settings/Application Data/Sky  Songs/.

Sky Songs works by giving you “SKS” files that describe to its client (“Sky Songs MP3 Downloader“) what and how to download; i.e. your songs. Once you’ve downloaded one (say Renegades.sks; the “Renegades” album by Rage Against the Machine), just execute the skysongs script as follows:
alex@prometheus:~/Music$ skysongs Renegades.sks

Thankfully the Sky Songs download client is written in Java so it’s not only cross-platform but its structure is obvious.

Please note that these instructions are absolutely not intended for circumventing Sky’s download procedure, nor are they to be used to break the Terms of Service you’re most likely bound to by law. This information is purely for educational purposes and to assist those who are new to Linux get to grips with their everyday software in a new environment.

]]>
http://blog.alexcollins.org/2009/12/15/sky-songs-and-linux/feed/ 0
Alt+Tab and Linux Window Managers http://blog.alexcollins.org/2009/09/25/alttab-and-linux-window-managers/ http://blog.alexcollins.org/2009/09/25/alttab-and-linux-window-managers/#comments Fri, 25 Sep 2009 14:33:47 +0000 atc http://blog.beplacid.net/?p=78 Regardless of window manager, why can’t I click on an icon to select the app I want to focus when ALT+TAB’ing? Or am I missing something?

Yes it’s used primarily for keyboard usage to prevent having to use the mouse, but sometimes I’m ALT+TAB’ing while I am web browsing to check on the progress in another application. Clicking would speed things up by, say, 0.0051 ms. Perfect, right?

]]>
http://blog.alexcollins.org/2009/09/25/alttab-and-linux-window-managers/feed/ 0
The Joy of Spotify http://blog.alexcollins.org/2009/06/27/the-joy-of-spotify/ http://blog.alexcollins.org/2009/06/27/the-joy-of-spotify/#comments Sat, 27 Jun 2009 14:06:08 +0000 atc http://blog.beplacid.net/?p=73 When it comes to music distribution, we’re in slightly controversial times. You’re deemed a criminal if you copy your CD to your PC or portable media device so you can listen on the train. You’re — rightly or wrongly — breaking the law when you download your favourite track from the various distribution methods such as Bit Torrent et al.

Various efforts have come about attempting to cash in on this phenomenon; Last.fm to Napster, they’ve all got their merits. Somewhat under the radar is Spotify, an iTunes-esque attempt at bridging the gap between the stubborn fat-cats running the music industry and the slick distribution medium that is the internet. Spotify has some great features, from playlists to quick but advanced search (which includes a command-like interface such as ‘genre:blues’). Spotify also runs very well under Wine non-natively; it’s completely free (ad-supported) and doesn’t seem to waste too much bandwidth.

Spotify is split into free and premium services. The former having audio ads every 50 or so minutes and banner ads throughout the GUI, the latter having no ads and higher-quality music.

It’s different to alternatives like Last.Fm. Spotify doesn’t run with the idea of suggesting music for you. You put in an artist and it’ll list all it has. It’s up to you to build your own playlists. Without knowing the advanced search feature like ‘genre:blues’ you might get frustrated, but I’ve found that the freedom to build my own playlists leaves me with the music I love, and not the tripe that Last.fm thinks I’ll like (nor it’s crappy ‘loved tracks’ idea).

A feature I’d love to have is the ability to purchase the playlists as CDs; that is, I click ‘burn to CD’ and Spotify mails me a burnt copy of my playlists. Bit of a nice to have, though :)

Check Spotify out. Well worth it, in my most humble opinion.

]]>
http://blog.alexcollins.org/2009/06/27/the-joy-of-spotify/feed/ 1
Sony X-Series NWZ-X1060 Walkman, AVI/WMV Transcoding and Linux (Debian/Ubuntu) http://blog.alexcollins.org/2009/05/28/sony-x-series-nwz-x1060-walkman-avi-wmv-transcoding-linux-debian-ubuntu/ http://blog.alexcollins.org/2009/05/28/sony-x-series-nwz-x1060-walkman-avi-wmv-transcoding-linux-debian-ubuntu/#comments Thu, 28 May 2009 16:02:34 +0000 atc http://blog.beplacid.net/?p=72 Having purchased my awesome Sony X-Series and begun getting it to work with Linux, I was eager to begin using the OLED display to its full potential. Namely, video and lots of it. Most portable devices support the WMV and MPEG codecs and the X-series is no exception (WMV with/without DRM and MPEG-4, plus H.264 to be precise). Most AVI files you might have won’t be compatible with the device which means you have to transcode: convert from one codec to another.

There are lots of solutions for transcoding on Linux. Some more simpler than others. The solution I found to work out of the box was Mark Pilgrim’s mencoder based solution. I successfully converted from AVI to WMV by just running the following commands in a shell/terminal:

sudo aptitude install lsdvd mplayer gpac zenity mencoder
sudo wget http://diveintomark.org/public/2007/06/podencoder.txt -O /usr/local/bin/podencoder
sudo chmod +x /usr/local/bin/podencoder
podencoder foo.avi

This worked 100% for me. I then just copied the file to the videos folder on my Walkman and it worked!

Yay.

]]>
http://blog.alexcollins.org/2009/05/28/sony-x-series-nwz-x1060-walkman-avi-wmv-transcoding-linux-debian-ubuntu/feed/ 2
Sony X-Series NWZ-X1060 and Linux (Debian/Ubuntu) http://blog.alexcollins.org/2009/05/28/sony-x-series-nwz-x1060-linux-debian-ubuntu/ http://blog.alexcollins.org/2009/05/28/sony-x-series-nwz-x1060-linux-debian-ubuntu/#comments Thu, 28 May 2009 07:49:00 +0000 atc http://blog.beplacid.net/?p=71 Update: if you need to copy videos to your device with Linux, follow my transcoding howto post.

So I ended up having to purchase a new portable media player. I’d been used to my aged Samsung YP-Z MP3 player for a while with a broken screen; memorising the various menu selections to get where I needed to.

Sony have a mixed history with portable media — from MiniDisc to their Sonicstage software — so I was skeptical about choosing something from them again.

In short, the Sony NWZ-X1060 (X series) portable media player is outstanding. The OLED 3″ screen is stunning and vidid and the sound quality is unbelievable. I have Denon C751 earphones and combined with the X series I am hearing new things in tracks I’ve listened to for a while. It’s all very, very impressive.

The touch screen is great too. It’s quick, forgiving, responsive and very thumb friendly. If you’re unsure about buying it: drop your doubts and go purchase it. I got the 32 GB version and I’m really happy.

Enough of the propoganda though, there’s a point to this post. I’m an avid fan of Linux and this was my main concern when purchasing anything like this. “Will it work on Linux?!”.

In short, yes it works with Linux. It will mount just like any other mass-storage device. Good job Sony!

There are some caveats: mass copying can be a little flaky and I haven’t found anything to transcode to the WMV + Codec it requires for video (though I’ve only been look a day as of writing this).

I’ll keep looking for something that will work with regards to transcoding video.

]]>
http://blog.alexcollins.org/2009/05/28/sony-x-series-nwz-x1060-linux-debian-ubuntu/feed/ 4
Upgrading to Ubuntu 9.04 (Jaunty Jackalope) from 8.10 http://blog.alexcollins.org/2009/04/23/upgrading-to-ubuntu-904-jaunty-jackalope-from-810-or-earlier/ http://blog.alexcollins.org/2009/04/23/upgrading-to-ubuntu-904-jaunty-jackalope-from-810-or-earlier/#comments Thu, 23 Apr 2009 16:30:05 +0000 atc http://blog.beplacid.net/?p=70 Run update-manager -c (not -d anymore, that’s for development releases) in a shell/terminal. This is handy if you don’t get the upgrade button.

]]>
http://blog.alexcollins.org/2009/04/23/upgrading-to-ubuntu-904-jaunty-jackalope-from-810-or-earlier/feed/ 1
Virtualbox 2.1.x VBoxAddIf no longer exists (command not found) http://blog.alexcollins.org/2009/02/16/virtualbox-21x-vboxaddif-no-longer-exists-command-not-found/ http://blog.alexcollins.org/2009/02/16/virtualbox-21x-vboxaddif-no-longer-exists-command-not-found/#comments Mon, 16 Feb 2009 23:30:25 +0000 atc http://blog.beplacid.net/?p=64 or, “What happened to VboxAddIf?!”

I decided to upgrade to Virtualbox 2.1 the other day as I wanted to keep up to date. It’s a great bit of software.

One of the VMs I use regularly runs Debian and serves as a development environment and a nagios server for monitoring the various sites I host here at beplacid.net. Unfortunately, a command I relied on regularly was VBoxAddIf to setup a bridged network device between my host (also Debian) and the guest instance. According to this bug report, networking has been completely rewritten in VirtualBox 2.x, therefore VBoxAddIf (the script) is no longer relevant.

There are two ways you can fix this: use the GUI to configure the VM to use one of your host devices, or if you’re headless, setup the network using VBoxManage modifyvm. The user manual (section 8.5.3) has the best collection of information on it. For me, I do the following to force the VM to use my previously created bridge device br0. It’ll do for now until I’ve got more time to investigate and do it properly:

VBoxManage modifyvm debian -nic1 hostif -hostifdev1 br0

You’ll need to run the command while the VM is not running.

]]>
http://blog.alexcollins.org/2009/02/16/virtualbox-21x-vboxaddif-no-longer-exists-command-not-found/feed/ 0
Why does htop display an exclamation mark next to uptime? http://blog.alexcollins.org/2009/01/14/why-does-htop-display-an-exclamation-mark-next-to-uptime/ http://blog.alexcollins.org/2009/01/14/why-does-htop-display-an-exclamation-mark-next-to-uptime/#comments Wed, 14 Jan 2009 11:02:27 +0000 atc http://blog.beplacid.net/?p=62 I keep getting the exclamation mark in htop next to the uptime and always wondered why it’s there. According to this mailing list post it’s a little easter egg in UptimeMeter.c:

35 char daysbuf[15];
36 if (days > 100) {
37 sprintf(daysbuf, "%d days(!), ", days);
38 } else if (days > 1) {
39 sprintf(daysbuf, "%d days, ", days);
40 } else if (days == 1) {
41 sprintf(daysbuf, "1 day, ");
42 } else {
43 daysbuf[0] = '\0';
44 }

]]>
http://blog.alexcollins.org/2009/01/14/why-does-htop-display-an-exclamation-mark-next-to-uptime/feed/ 2
Careful with sudo – giving access to vi/vim via sudo could allow someone to wreak havoc http://blog.alexcollins.org/2009/01/07/careful-with-sudo-giving-access-to-vi-vim-via-sudo-could-allow-someone-to-reak-havoc/ http://blog.alexcollins.org/2009/01/07/careful-with-sudo-giving-access-to-vi-vim-via-sudo-could-allow-someone-to-reak-havoc/#comments Wed, 07 Jan 2009 14:44:02 +0000 atc http://blog.beplacid.net/?p=60 sudo can be used to give certain users access to commands that require root. This is handy when you’ve got lots of users that need to administer the system or software that resides within it. This also means you don’t have to distribute the . An example would be to allow a user to edit certain configuration files in a directory that’s owned by root, and which changing the permissions could be troublesome or yield unknown consequences.

If you’re an admin and you’re doing things in this way, be careful who you give `sudo vi` permissions to. Allowing someone to access vi through sudo means they can execute anything as root. Vi (or Vim) has the ability to run commands on the OS by just issuing `:! somecommand` within the editor. Therefore, doing a sudo vi means you can `rm -rf`, chgrp or chmod (and everything else), and not have any issues whatsoever.

access a command as root via vim

]]>
http://blog.alexcollins.org/2009/01/07/careful-with-sudo-giving-access-to-vi-vim-via-sudo-could-allow-someone-to-reak-havoc/feed/ 3
Xbox 360 Debian/Ubuntu Linux – Media (video, music) Streaming http://blog.alexcollins.org/2008/11/24/xbox-360-debianubuntu-linux-media-video-music-streaming/ http://blog.alexcollins.org/2008/11/24/xbox-360-debianubuntu-linux-media-video-music-streaming/#comments Mon, 24 Nov 2008 22:40:12 +0000 atc http://blog.beplacid.net/2008/11/24/xbox-360-debianubuntu-linux-media-video-music-streaming/ Being both a Linux and Xbox fan makes for an interesting time. One of the best features of the Xbox is its streaming from a PC on your LAN. There are various features that the Xbox provides for seamless media streaming (be it videos, music or pictures) but it’s not as straightforward as it may seem (at least from what I’ve seen from various searches).

Xbox media streaming uses the DNLA protocol to receive content from a peer on a network. Using ushare, you can setup streaming to your Xbox on any Linux machine quite easily. All that’s needed is libupnp2 (if you’re running Debian, you may have to install libupnp via the Ubuntu deb as only version 3 is available and the uShare package depends on it explicitly), a minor configuration change and a quick hack to the init script. All of which I’ll explain now.

Installation (for Debian Sid)

Note: for Ubuntu, you’ll just need to run ‘sudo apt-get install ushare’ in a shell.  Then skip to the configuration section below.

uShare depends on libupnp2 and unfortunately only version 3 is available (at least in sid). Therefore, you’ll need to obtain a deb for version 2 (I got the Ubunutu equivalent from here and it works fine). Once you’ve downloaded a .deb for your architecture, fire up a shell (or ‘terminal’) and enter the following (filenames will differ depending on your arch):

sudo dpkg -i libupnp2_1.4.3-2_amd64.deb

Now that libupnp2 is installed, you’ll need to get a deb for uShare or alternatively (and best, because you’ll get updates via apt) is to add the uShare apt repository to your sources.list. Open /etc/apt/sources.list as root (using sudo):

sudo vi /etc/apt/sources.list

Now add the following line at the bottom of sources.list:

deb http://www.geexbox.org/debian/ unstable main

Save and close sources.list. Finally, update your package list:

sudo apt-get update

Now you’ll have uShare available via apt. To install it, run the following:

sudo apt-get install ushare

Configuration

Once finished, you’ll have uShare installed and ready for configuration. Out of the box, it won’t provide much apart from a daemon listening on a random port (defined as part of IANA Dynamic Ports range). You’ll need to edit /etc/ushare.conf to enable Xbox compatibility as well as define the standard port – 49200. Open /etc/ushare.conf as root and change the following lines:

USHARE_PORT=49200
USHARE_DIR=/path/to/your/media
ENABLE_XBOX=YES

Before these changes will take effect, you’ll need to restart ushare using its init script. However, an issue I’ve noticed is that the last line (‘ENABLE_XBOX=YES’) does not always work. So before we restart uShare, we’ll need to make a small change to the init script that resides under /etc/init.d/ to force Xbox compatibility:

sudo vi /etc/init.d/ushare

and add the following line at the beginning of the script:

USHARE_OPTIONS=-x

This tells uShare to start with Xbox compatibility. Now restart uShare using the init script:

invoke-rc.d ushare restart

And you’re done. Almost. :) You may need to restart your Xbox for it to recognise your Linux machine (although the use of UPnP – Universal Plug ‘n’ Play – would suggest otherwise). Once you’ve done that (or if you’re brave), navigate to ‘My Xbox’ and then select ‘Videos’ and finally you should see ‘uShare’ at the bottom (computer icon). Selecting that will connect to your Linux box and you’ll be able to browse your media just as you would on your PC. Awesome!

]]>
http://blog.alexcollins.org/2008/11/24/xbox-360-debianubuntu-linux-media-video-music-streaming/feed/ 39