Showing posts with label linux. Show all posts
Showing posts with label linux. 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, February 18, 2010

Sleeping with Linux is dangerous

Seriously, using the sleep function with Linux is dangerous. I just put my laptop on sleep for a while, woke it up and apparently everything was fine. But only apparently, because the system fan (you know, the one that keeps your laptop from melting) lost its "medium" speed. That means that it wouldn't run unless it had to go on max. So, after half an hour of peace and quiet, the fan started running like hell, and the laptop was really heated up (it was like being near a radiator). Reboot the system and the "medium" speed works again. What if the max speed wouldn't work either? I wouldn't have noticed it and might have ended up with a brick. Sleeping with Linux is dangerous!!

Wednesday, November 18, 2009

Use ssh-copy-id on a different port

ssh-copy-id has known problems with handling non-standard ports (e.g. connecting to a different port than 22). To overcome this issue, use a command like: $ ssh-copy-id "user@host -p 6842"

Friday, August 14, 2009

PHP Server Uptime

This is a pretty simple way of getting the server uptime using PHP. Note that this only works on Linux (and probably other Unix-like OSes that store the machine uptime in /proc/uptime). Straight to the code: function get_uptime() { $file = @fopen('/proc/uptime', 'r'); if (!$file) return 'Opening of /proc/uptime failed!'; $data = @fread($file, 128); if ($data === false) return 'fread() failed on /proc/uptime!'; $upsecs = (int)substr($data, 0, strpos($data, ' ')); $uptime = Array ( 'days' => floor($data/60/60/24), 'hours' => $data/60/60%24, 'minutes' => $data/60%60, 'seconds' => $data%60 ); return $uptime; }

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 :)

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 :).