Axel's Blog

A blog about operating systems, software and other interesting stuff

Replay Music- style audio recording in Linux Mint 12 (and *buntu)

One of the last reasons to dual boot into my Windows partition was a tool called Replay Music. RM can record audio from the soundcard, auto split into tracks and get the tags from Gracenote (aka CDDB). This obviously comes handy when you want to digitize your analogue song collection (vinyl records, cassettes, etc.) and I’m sure you can think of other use cases, too … RM is of course a commercial product which supports only Windows and does not even work in WINE, because it uses its own audio driver for recording. So you can imagine my enthusiasm, when I finally stumbled over a solution on how to do this on Linux.

The tricky part of this is the recording … of course you could record song by song using Audacity but there is a more elegant way – directly record to MP3 using the sox command.  Install sox using your favorite package manager (mine’s still Synaptic) and make sure it is set as recording device (there’s a youtube video on how to do this using Pavucontrol). Now enter:

rec -r 44100 -2 -s -p silence 1 0.50 0.1% 1 1:00 0.1% | \
     sox -p song.ogg silence 1 0.50 0.1% 1 3.5 0.1% : \
     newfile : restart

This will split your recording into one file per song, named song001.mp3 to songNNN.mp3, auto- splitting after 3.5 seconds of silence and completely stopping the session after 1 minute of silence. There’s a lot more options documented on the man page, for example you can normalize the output or …

TODO: EXAMPLES

If you have accidentally split a song in 2 or more parts, you can again use Audacity to fix this, or just merge the files using:

cat one.mp3 two.mp3 > merged.mp3

After that you can tag your new MP3s with a tool like Kid3 (always install kid3-qt, the other one has full KDE dependencies). Kid3 supports multi edit and automatic tagging from Gnu/FreeDB, Amazon, TrackTypes, Discogs and MusicBrainz, which in combination gives you a recognition rate even superior to Gracenote.

I tried this on Mint 12, but it should work exactly the same on Ubuntu or Ubuntu- based systems, and at least similar on any other distribution (if the distribution is not using Pulse Audio yet, it might even be easier).

Filed under: *buntu, linux, mint

Gnome Shell Extensions and Tweaks

A few weeks ago I wrote a rather enthusiastic review about Mint 12 “Lisa”, and I’m still using it as my daily OS. I really like my current Gnome Shell setup and I never liked Gnome 2, so I’m not interested in the various attempts to recreate its XP like user experience (Mate, Cinnamon, …). In fact I think forking Gnome (no matter if old or new code) is a pointless waste of time, when you could just use XFCE instead. But back to the subject at hand which is how to get more out of Gnome 3.

The killer feature of Gnome Shell is the extension concept, which allows you to customize and extend your desktop as easily as your browser. Here’s a small selection of the extensions I use, for more browse extensions.gnome.org or use my Google Custom Search (there are so many cool extensions meanwhile, that finding a special one can become difficult):

Most extensions work by just installing them (using the switch to the left of the entry on extensions.gnome.org), if  you see no change, restart Gnome Shell (Alt+F2, r). The “Evil Status Icon” extension needs to be customized by modifying ~/.local/share/gnome-shell/extensions/EvilStatusIconForever@bone.twbbs.org.tw/extension.js (e.g. to show Gajim, add “gajim.py” to the application list, to hide the bluetooth icon uncomment the related line in the “built-in” list). If you use Mint you already have some of these extensions (and a couple of others) installed. You can use Gnome Tweak Tool (“Advanced Settings”) to enable or disable them (I disabled all Mint extensions except mgse-userthemes).

There are a lot of other tweaks in the Tips & Tricks thread of the Mint forums, only downside is you have to use browser search (Ctrl+F) to find it them, unfortunately it is not possible to link a “trick” directly. Here’s again my personal selection:

  • 2g – “Less spacing between notification area icons”  allows you to compress the notification are on the top panel to make more room for the task list
  • 2i – “Change size of overview grid icons” helps to get more application icons on my 12″ netbook screen

For both tips, make sure to adapt the gedit path to the theme you actually use (e.g. replace “Mint-Z” by “Mint-Z-Dark”). If the theme was installed from a repository, you should also lock the package in Synaptic (or your package manager of choice), to avoid your changes being overwritten when the theme gets updated.

Filed under: linux, mint, other

Clementine – a cross platform music player

Clementine is a music player inspired by Amarok 1.4. Unlike its archetype it is not limited to KDE, but is available for GTK- based Linux (Gnome etc.), Mac and  Windows, too. There is even a portable version here.

The big advantage over other advanced players like Amarok 2, Rhythmbox or Itunes is, that while you CAN add all your music to a database, you don’t have to. Clementine is working very well on the folder view.

Feature- wise it has everything that a good player needs, down to mobile player support (incl. iPod), automatic tagging, Visualizations and webradio / lastfm integration – for a comprehensive list take a look at the homepage. Compared to other advanced players Clementine is very fast and lightweight, the portable version needs only 27MB including QT.

Before Clementine, I was always forced to switch between an ultra- light “directory player” like 1by1 and a full featured player – Clementine can do both, quickly play that mp3 from your USB stick AND organize your music library. Give it a try, you won’t be disappointed !

Filed under: linux, windows

2011 Linux Winners and Losers

Here’s my personal retrospect of the Linux / OpenSource year 2011, ordered by winners and losers:

Winners

  • Gnome 3 has avoided KDE 4 – like disaster and is headed to be the next standard for the Linux desktop, thanks to focus on quality and a Firefox- style extension concept
  • Mint has taken the top position on Distrowatch with Mint 12 “Lisa”, and is successfully bringing Gnome 3 to the masses
  • Bodhi has shown that lightweight does not necessarily mean ugly, by creating the first useable distro based on E17
  • Archbang 2011.11 is a dream come true – WORKING Archlinux right out of the box
  • Never thought I’d live to see the day, but Linux Kernel has finally made it to version 3.0 !!

Losers

  • Unity is far from the “better Gnome 3″ it was intended to be, and is coherently abandoned by more and more users for Gnome 3, XFCE or even KDE
  • Ubuntu is the basis for 2 of the winner- distributions, but nobody seems to want to use the real thing anymore … time for Ubuntu’s “benevolent dictator” to  rethink his UI strategy ?
  • Oracle has finally given up and donated OpenOffice to the Apache foundation but who cares, now that LibreOffice is included in all major distributions ?
  • The HP Touchpad could have been a Linux- based iPad killer, but unrealistic pricing and bad marketing killed it even before the first slate hit the stores – Leo has done it again ;)
  • Meego could have been a serious competitor for iOS and Android, but was abandoned by Nokia for Windows Phone 7 (and a bribe of a couple of billion dollars)

Filed under: linux

Linux Mint 12 with Gnome 3: The better Ubuntu

LinuxMint has a reputation as easy and beginner- friendly Linux distribution, and I have sucessfully recommended it to work co- workers and relatives. Now version 12 “Lisa” has even replaced Ubuntu as no. 1on Distrowatch. It remains yet to be seen if this will be as significant as the last change in 2005(!), when Ubuntu followed Mandrake, but Mint is definitely the distribution of the hour. Reason enough to give it a thorough test drive as my main OS on the Asus 1215N.

Technically Mint 12 is just Ubuntu 11.10 with extras (some tools, themes and Gnome extensions) and Gnome Shell instead of Unity. This has the welcome side effect that all Ubuntu packages, PPAs and tools work out of the box.

Even if Gnome 3 my look similar to Unity at first glance, it is not. No global menu, no ”dash”, no auto hide, no embedded file management, no ‘leftist’ window buttons – Gnome 3 has all the looks but none of the annoyances of Unity. My only criticism right now is the lack of easy customizing options. With Gnome Tweak Tool (“Advanced Settings”) and Gnome Extensions you can work around the most severe pain points (read thisForum Thread for a comprehensive list tweaks), but there should be an easier (and more secure) way to hide the Bluetooth icon than to install an extension attached to some forum thread … Still, after a little tweaking Gnome 3 is a very pleasant desktop environment and compared to let’s say KDE4 at a similar point in life, it is very stable and feature complete.

The extensions included with Mint allow users to get used to know Gnome Shell without having to abandon desktop icons, taskpane and start menu right away. For me this has worked really well, after 2 weeks I have turned off the desktop and the bottom panel / menu, but I’m still using the Window List extension that shows all tasks in the top panel instead of only the current activity. Other than that I’m happily using Gnome Shell’s “Activities Overwiew” for all my app launching, searching and switching needs.

I only had a very short look at the Mate and “Fallback” options, both seem to work ok but especially Mate looks really dated compared to the other two. Still it’s nice to have the option around for all the die hard Gnome 2 fans out there – Linux is about choice after all.

For now I’m going to stay with Mint, i.e. will keep my install on the Eee and will replace the dated (still Ubuntu- based) Crunchbang Install on my old laptop, that now serves as kids / guest / backup PC. If you want a Linux distribution that “just works”, Mint is more than ever my number one recommendation. It is easy to install, easy to use and offers a non disruptive way to try out Gnome 3, the most interesting desktop environment of our time – give it a chance, you might be surprised !!

Filed under: linux, mint

Playlist Nov. / Dec.

Here’s my playlist for November / December 2011 …

And an 80s Classic …

Filed under: music

Diaspora Tricks and Tweaks

Almost a month and I’m still posting stuff on DIASPORA*, so it looks like I finally found a social network that works for me … time to share some of the tricks I learned, to get YOU started, too. Most of them can be found in the tutorials at diasporial, check this out if you are planning to join DIASPORA* or already did.

  1. Want an invite ? Read my lips …  YOU DON’T NEED AN INVITE !!! Just pick ANY Pod from podupti.me and register, most of them are free to join
  2. [commenting currently unavailable] is not a bug – you just have to add the person before you can comment / like / reshare with her, unless she’s on the same pod
  3. Typing ‘@’ will let you auto complete a user name to ‘mention’ (i.e. get them notified about your post)
  4. Adding #tags will add your post to the stream of all people who have subscribed to the tags.
  5. Put something like ![pic](http://website.com/image.jpg) in your post to embed an image
  6. Look here for a lot of helpful hints for formatting your posts
  7. To embed a video, just paste the URL into the post, e.g. http://www.youtube.com/watch?v=F_BEekGyKb8 (don’t use https, and you have to reload the page with Ctrl + F5 before it will show)
  8. If you have problems consuming the Diaspora atom feed (some sites like WordPress don’t support https), use atom2rss to convert it to plain old http- only RSS
  9. Another cool thing to do with the atom feed: use twitterfeed.com to automatically keep your friends at Facebook, LinkedIn, Hellotxt, Twitter or Status.net (Identica) in the loop, without having to press a button when sharing …
  10. Diaspora user numbers are listed here, these are estimates  based on diasp.eu user data

That’s already it for today, I will add more tricks and tweaks as I move along … mean time, see you on Diaspora (search for axel668@joindiaspora.com).

Filed under: diaspora, web

Diaspora – a better Google Plus

Finally got my Diaspora Invite, so I thought I’d quickly share my experiences from a couple of days playing around with it …

The maybe most important insight on my part was that waiting for an invite to joindiaspora.com was totally in vain, because Diaspora, unlike any other social network, uses a decentralized approach. Diaspora is organized in Pods, that work somehow like an Email provider – you always sign on to the same pod, but you can add people from all other pods, too. So if you can’t get an invite from joindiaspora.com, or are experiencing performance issues, just pick another pod from this list, diasp.eu has been around for over a year and works well for me over here in Germany. Moving between pods is not fully working, yet, but you can already export your user data to XML.

At first sight, Diaspora looks much like Google Plus – so much indeed, that it makes me wonder how many Google employees were in last year’s Diaspora Alpha programs (yes, Diaspora precedes Google Plus by a couple of months). In short, a Plus user will not miss anything in Diaspora, the authorization concept (“Aspects” vs. “Circles”) is very similar and allows complete control over who gets to see which post.

A big advantage of Diaspora over Plus is, that Diaspora offers a usable (!) bookmarklet and Twitter / Facebook integration for forwarding your posts. Unlike Plus, Diaspora already has Apps – right now only one of them, but more will follow. Another thing I really like about Diaspora is the Atom feed they provide for your public posts, and the ability to follow tags, although a filter option would be nice (e.g. for #NewHere or #nsfw).

While Diaspora will not change my general attitude about social networks (“I’m NOT posting my damily pics and political opinions to world & dog”), it at least qualifies as Twitter replacement, which is more than can be said about Plus or Facebook. So feel free to add axel668@joindiaspora.com (my diasp.eu account is inactive) or just follow my feed, trying to put some content in there soon.

Unfortunately right now the Diaspora community is quite small even compared to Plus and tiny compared to Facebook, but after my first impression I think this is going to improve soon. Diaspora is clearly the social network of choice for people who never liked / tried social networks, for those with Privacy concerns towards Facebook and Google, and of course for “the cool kids” who want to use something new and different.

For an Alpha version Diaspora is very stable and mature, so go give it a try !

Filed under: diaspora, googlealternative, web

10 more things to do after installing Archbang

So you installed Archbang, and now you are getting bored because everything is running so smoothly ? Already finished your “10 things to do after installing Archbang” ? Here’s some more stuff you can do around your favorite Linux Distro …

1. Install Tools

While Archbang has everything you need, there is always room for improvement on the tools side …

  • Htop is a task manager for the console – either assign it to a hotkey (in urxvt) or start it from a root terminal (Ctrl+F1) to control over every single process on your OS
  • Scite will give you advanced text editing and syntax highlighting, while being almost as light as leafpad
  • Double Commander is a cross platform clone of the famous Total Commander with additional improvements, which makes it the best (orthodox) file manager currently avaliable on any OS
  • Mc is a Norton Commander clone for the console – a real life saver in case you mess up your X while updating or tweaking the configuration

2. Install LibreOffice

In a perfect world this would be a no- brainer, but ‘sudo pacman -S libreoffice’, while getting the job done, will include 500+ MB of KDE goodness from the libreoffice-kde package. Arch Wiki offers to use ‘pacman -S libreoffice-common libreoffice-{base,calc,draw,impress,math,writer,gnome,sdk,sdk-doc}’, and if you do not use Extensions you can skip the sdk parts, too.

3. Install MS Fonts

Install ttf-ms-fonts and ttf-vista-fonts, this will not only make websites look more like on the Win7 office rig, but will also improve the looks of your imported Word docs a lot !

4. Put your laptop to sleep on lid close

Of course you could just install xfce4-power-manager for this, but that’s not exactly The Arch Way, right ? A more elegant solution is to use acpid and pm-utils … as a little exercise, figure out the details from the Wiki – good luck !!

5. Connect with netcfg

If your machine is usually connected to the same network, you might want to use netcfg in /etc/rc.conf. The connection is started early in the boot process, so you will be online even before the desktop is loaded. Always use the ‘@’ prefix for it in the DAEMONS array, otherwise the whole boot process will be delayed until connection attempts are finished. You can of course disable network-manager and network with the ‘!’ prefix, just don’t uninstall – downloading network-manager can be tricky when your network is broken …

6. Show network status in conky

Of course netcfg doesn’t have a tray icon, so you might want to add a couple of lines to you conkyrc, to show network status (example shows a wireless connection):

${wireless_essid wlan0} (${wireless_bitrate wlan0}) $alignr ${wireless_link_qual_perc wlan0}%
${wireless_link_bar wlan0}
Down: ${downspeed wlan0} $alignr Up: ${upspeed wlan}
${downspeedgraph wlan0 20,115 999999 cccccc} ${alignr}${upspeedgraph wlan0 20,115 999999 cccccc}

7. Create your own keyboard bindings

Like every decent operating system, you can customize keyboard shortcuts in Archbang’s openbox environment. The most comfy way to do this, is installing obkey. But even editing openbox rc.xml is not rocket science, and is well documented in the openbox Wiki

8. Install games

Most operating systems offer a small selection of games – here’s my suggestion for the “Archbang Games” collection:

  • Pysolfc offers a huge collection of solitaire card (and Mahjong) games
  • Ltris is a very nice Tetris clone
  • Stone-soup (aka Dungeon Crawl)  is a rogue-like with (simple) graphics and tutorial mode
  • Dopewars is a classic business simulation with a drug dealing theme
  • Micropolis is the original Sim City game (open sourced for the OLPC project)

Of course there are fancier Linux games around, but the ones mentioned above are effective time killers and go well with the Arch philosophy … a good starting point for Linux gaming in general is LGDB, or of course Google.

9. Run Windows programs using WINE

If someone asks you, “This Archbang is kinda nice, but will it run {insert random Windows program} ?” – wouldn’t you love to just tell them “Sure, pass me that CD” ? In fact, about two thirds of the software I’m asked about by family and friends runs just fine, if you add wine and winetricks to your Archbang install. Check the WINE AppDb, you will be surprised how much Windows software will work fine under Linux.

10. Join the community

Even if you are not a programmer, you can contribute … join the forums (Archbang, Arch), file Bugs or contribute to the Arch Wiki.

Filed under: arch, linux

Archbang 2011.10 on Asus Eee 1215N

Although my Bodhi install is running fine, I have still not given up on my dream of running some kind of Archlinux as my primary OS, and preferably with a #! style Openbox desktop. After discouraging results with both, ‘vanilla’ Arch 2011.08.19 and CTK Arch 0.7 (both could not handle my wireless or run X in the native solution), I was not really optimistic about the new Archbang 2011.10. But what a pleasant surprise, with the “Autodetect X” boot option I did not only get wireless and full resolution X, but even Intel 3D on the live USB. Of course I instantly picked ‘install’ from the openbox menu, and was rewarded with a working Arch install just 15 minutes later.

Archbang features the #! ‘classic’ setup with Openbox and Tint2. The preinstalled software is reduced to the absolute essentials – Firefox Nightly, Flash, uTorrent, Thunar, gmplayer, urxvt, Zathura (PDF reader),  and so on (complete list on Softpedia). Archbang includes packer, a neat package manager with AUR access, giving you easy access to every piece of Linux software currently available, even closed source binaries like Citrix or some freeware games.

Bumblebee ION2 support can simply be installed from the AUR, after 5 minutes of heavy compiling (and some simple config steps) I was successfully running ‘optirun glxgears’ at several hundred FPS. Mission completed. All other hardware seems to work out of the box, as expected with Kernel3.

If you want to know more about Archbang check their FAQs … for me Archbang offers the perfect balance between The Arch Way and “pleasantly boring” #!. So if you are running #! or Bodhi and want to go to the next level, Archbang is definitely for you. The blog post “10 things to do after installing Archbang” provides a good starting point for customizing your install.

Filed under: 1215n, arch, crunchbang, linux

RSS DIASPORA* (via atom2rss)

Twitter

Follow

Get every new post delivered to your Inbox.