Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Tuesday, March 16, 2010

Rhythmbox "Rock" EQ Preset

I recently helped a friend beta test a Winamp plugin, so I had to spend time in Windows. While listening to my music in Winamp, I chose the Rock preset in the equalizer. And my, I felt enlightened. The sound was at least ten times better than the flat sound Rhythmbox produces on my usual Ubuntu system. My music had been revived. When I went back to Ubuntu, I hated the sound. So I spent some time trying to get it sound good, as it did with Winamp. To cut to the chase, use the RBEQ plugin and set your equalizer like this:

Thursday, September 3, 2009

Folding@Home on Ubuntu Server

I recently started folding @ home on my Jaunty-based server (which runs 24/7 with not so much activity). What I have noticed is that they do not provide a proper init.d script for it. This is the default one they tell you to use: # chkconfig: 345 93 14 # description: will start FAH client as a service cd /path/to/folding ./fah6 -verbosity 9 < /dev/null > /dev/null 2>&1 & This doesn't seem to work for me, the process does not start. What I've found to work is this: ### BEGIN INIT INFO # Provides: fah # Required-Start: $local_fs $network $named # Required-Stop: $local_fs $network $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start Folding@Home client ### END INIT INFO # chkconfig: 345 93 14 # description: will start FAH client as a service cd /home/felix/fah/ ./fah6 -verbosity 9 < /dev/null > /dev/null 2>&1 & There you go. Now you have no reason to not run this :) Edit: No, it doesn't work. It seems init starts the script twice, which messes things up. I think this has something to do with runlevels, but I'm too tired to figure it out now. If anyone knows a solution, please comment.

Saturday, August 15, 2009

Ubuntu One

Ubuntu One is a file hosting service provided by Canonical (the company that develops Ubuntu). You are given 2GB for free and 10GB for $10/month. The way it works is that you create an account, install a client and associate it with your account. After that, the client will monitor your $HOME/Ubuntu One folder and synchronize its contents with the Ubuntu One servers. The main idea of it is that of syncing between computers -- you associate all your PCs/laptops with the same account and your files get automatically synced between them. However, I use it for another purpose -- backups. I back up my work and other stuff on Ubuntu One, 2GB is really enough (for me, at least). What's great is that they also provide a web interface to download / upload files from / to your account, so I can access my files wherever, whenever, from whatever. Don't jump head first, though. You might want to have a look at Dropbox, too. The main advantages are:
  • It has clients for more platforms (Windows, Mac, other Linux distros);
  • It is more badwidth efficient, as it only uploads diffs when overwriting a file (I'm not sure whether Ubuntu One does that too, or not);
  • It's a bit more mature
The only reason why I chose Ubuntu One over Dropbox is because I was sure it integrated well with Ubuntu and because I don't use any other OSes. Also, they are still in Beta, so they are constantly improving and adding features. The choice... is yours. [manic laugh]

Wednesday, August 12, 2009

Ubuntu: Home Sweet Home

Back to Ubuntu from my temporary Windows usage. Man, it's good to be back. Have to go restore all my backups now, buh bye.

Thursday, May 14, 2009

Upgrading to Ubuntu 9.04

1) The Desktop As always, I did a full reinstall on the desktop. I don't like having old packages and configuration files in my system, so I always to a fresh install no matter what. However, I have a /home partition, so all my settings, e-mails, documents, work is saved (I still do backups, just in case). Installing was a breeze (as always with Ubuntu), so here are my impressions (it's already been about two weeks since I updated), I'll start with the good ones. Boot time -- definitely improved. I had little faith in this as I saw it being advertised everywhere, but it seems that they have done quite a good job. My system definitely boots faster now (although I have yet to install additional startup software, like Apache, MySQL, VirtualBox, and the like). My bluetooth dongle is working again -- yay! The previous release had some buggy kernel module which rendered my dongle useless, but it seems it has been fixed. Finally, I can send stuff to my mobile phone without having to connect it via USB. Well, it still doesn't work perfectly, for example I can't send files from my phone to my PC, but otherwise everything works (even browsing the contents of the mobile phone on my PC). The new notifications are pretty cool, but only if you use a compositor, which I don't generally use. If you don't use a compositor, they suck. Thus, I have enabled metacity compositing (so I don't have to run Compiz). Ok, now with the bad ones: first off, what's with THE PINK!? Seriously, way too much pink in the new theme. I think that the 8.04 theme was the best (I love orange and brown). This theme is way too pink! Here's Transmission with no torrents: What the hell? That's so wrong. Anyway, on to the other bad things. For some reason, it seems Ubuntu uses more RAM than before, and I only have 512MB, which makes it constantly use 2-300MB swap, and that really overwhelms my hard drive. It may be because it's the first time I've installed the 64bit version (which uses a bit more RAM by definition, because memory pointers are twice as big). I've been having this PC for two years and a bit and I just found out a month ago it has a 64bit CPU :-\. Other than that, no huge improvement. Finally having Python 2.6 is pretty cool, it has some nice new features (like the json module). I'm waiting for a more substantial (and hopefully good looking) update with Karmic, although I might just switch to Archlinux in the mean time. 2) The Server Upgrading the server was a breeze. No conflicts, no problems, nothing. Smoo-ooth. Everything just works like before, I didn't need to change a thing -- Apache, MySQL, PHP, all functional. I didn't even have to change my small WSGI app, it just worked. All I had to do was just answer with "no" to all the "do you want me to overwrite this configuration file for you?" questions. Cool :)

Saturday, May 2, 2009

RhythmToWeb

Attention: RhythmToWeb has moved to Google Code

RhythmToWeb is a plugin for Rhythmbox (a music player for the GNOME desktop). It sends information about the currently playing song over the web. The information is sent as a series of GET variables: artist, title, album, genre, year, duration (seconds). The configuration dialog:
  • URL: This is the URL that is going to be called.
  • Interval: This is NOT the interval at which the URL will be called. This is the interval at which the plugin checks if the song changed (this has multiple advantages). The reason for polling at an interval is that this way you don't risk the server to be flooded if you change songs really quickly.
Installation
  1. Download: RhythmToWeb.tar.gz
  2. Extract the RhythmToWeb directory to ~/.gnome2/rhythmbox/plugins/
  3. (Re)start Rhythmbox, go to Edit → Plugins, find RhythmToWeb, enable it and configure it
If you have any problems with it (won't activate, crashes Rhythmbox, something doesn't work), run Rhythmbox like this: $ rhythmbox -D RhythmToWeb and send me the output, either as a comment on this post or on my email (it's in the plugin properties). As you may have guessed, I'm using this plugin for the widget in the sidebar of this blog (the "Now Playing" one). Thus, I will show the PHP script that is called when I change the song which creates a simple Javascript file: <?php $G = $_GET; function prep($var) { // Prepare a value to be included in a Javascript string $var = htmlentities($var, ENT_COMPAT, 'utf-8'); if (!get_magic_quotes_gpc()) $var = addslashes($var); return $var; } function test($var) { if ( strlen($var) && mb_strtolower($var) != 'unknown' && $var != '0' ) { return true; } return false; } $s = 's_nowplaying = "'; if (test($G['title'])) { $s .= '<b>Song:</b> ' . prep($G['title']) . '<br />'; } if (test($G['artist'])) { $s .= '<b>By:</b> ' . prep($G['artist']) . '<br />'; } if (test($G['album'])) { $s .= '<b>From:</b> ' . prep($G['album']) . '<br />'; } if (test($G['genre'])) { $s .= '<b>Genre:</b> ' . prep($G['genre']) . '<br />'; } if (test($G['year'])) { $s .= '<b>Year:</b> ' . prep($G['year']) . '<br />'; } if (test($G['duration'])) { $min = floor($G['duration'] / 60); $sec = $G['duration'] % 60; if ($sec < 10) $sec = '0' . $sec; $s .= '<b>Length:</b> ' . $min . ':' . $sec; } if (empty($G)) { $s .= 'Not playing anything.'; } $s .= '";'; $s .= <<<EOS if (document.getElementById && document.getElementById('nowplaying_info')) document.getElementById('nowplaying_info').innerHTML = s_nowplaying; else document.write(s_nowplaying); EOS; $fp = fopen('nowplaying.js', 'w'); fwrite($fp, $s); fclose($fp); ?> Then, in my blog I have a HTML widget with the following content: <span id="nowplaying_info">Loading...</span> <script src="http://znupi.ath.cx/felix/nowplaying/nowplaying.js" type="text/javascript"></script> And there you have it :). This is just an example, you could make a script that generates an image on which it writes that information. This way, you could include that image in your signature on forums or emails. Don't hesitate to ask questions either here or on my email address if you have them.

Friday, April 24, 2009

Transmission BitTorrent on a headless server

I never would have thought installing a WebUI-based torrent client could be so easy. I have a 24/7 running server, on Ubuntu 8.10 Server Edition, so I thought I should try to install a BitTorrent client so I can download torrents even when my PC is turned off, so I can add torrents while away etc. The client of choice was Transmission. I use this on the desktop, too, and the only down side I can find to it is that it doesn't yet support DHT trackerless downloading, which really speeds up your downloads. Anyway, they're working on it (from what I've heard). They never make this obvious anywhere, but to get Transmission up and running really fast, all you have to do is: $ sudo apt-get install transmission-cli $ transmission-daemon After that, just navigate to http://your-server:9091/ and there you have it! The only thing you should still do is install an init.d script so you can run Transmission as another user and automatically on system start-up, which is documented here (and pretty easy). Although the init.d script can't stop Transmission for me (I don't know why, it just hangs), I can always kill it ;)... or wait more than 5 seconds before doing that. Anyway, Transmission is incredibly easy to set up and incredibly efficient, but the Web UI lacks a few features. For example, you can't add a torrent by URL -- you have to download it from the torrent website and upload it to your server, which is a bit annoying. Also, you can't specify a download folder when adding a torrent, all torrents go to the default folder (which you can change, of course). But anyway, all around, it's a good app :).