linux

Beryl 0.1.1 Released and in Gentoo Portage

[img_assist|nid=161|title=|desc=|link=url,http://|align=left|width=100|height=100]Beryl is now in Gentoo's official ebuild repository, portage. There are instructions on installing it for Gentoo as well as how to set up your nvidia graphics card if you have one. The beautiful thing about having a nVidia graphics card is that with the latest nVidia drivers (build 9625) you no longer need to install XGL. You just add the AddARGBGLXVisuals to your xorg.conf file and install the Beryl window manager and you get snazzy effects right out of the box. The other great thing is that you don't need to edit any other files on your computer. Just launch KDE for example, as usual, then run "beryl-manager" from a konsole window. You can change your window manager to beryl from the taskbar icon that shows up, restart beryl if it crashes, or switch back to kwin. You can also use emerald (the window-decorator) and change your emerald theme from the taskbar icon.

What is Beryl for? Well a lot of it is just eye-candy, like the spinning cube desktop for example. But some of it is really useful. In my opinion the most useful feature is the thing that imitates the Mac OS X Expose feature, that shows every window on your desktop and allows you to switch to the one you click on. You can invoke it with the F9 or F8 keys. The reveal desktop feature is pretty nice as well (activated with the F6 key).

Tags: 

Small Gotcha When Copying Paths With Subversion

I was trying to do an svn copy from a specific server path into a local working copy. I basically wanted to copy over the vanilla mediawiki-1.8.1 sources from my repository into a local directory (called trunk). Here is what I did:

svn copy svn+<a href="ssh://david@server/svn/repos/Projects/wiki/mediawiki/1.8.1">ssh://david@server/svn/repos/Projects/wiki/mediawiki/1.8.1</a> ./trunk

You would think that this would copy the contents of the 1.8.1 directory into the trunk directory. Wrong; it copies the 1.8.1 directory and its contents into the trunk directory, thus creating a 1.8.1 directory inside trunk. It took me forever to figure out why it was doing this instead of what I wanted it to do (which is to copy the contents of 1.8.1, not the 1.8.1 directory itself).

The problem was that the trunk directory already existed. If I removed the trunk directory, then it creates the trunk directory and copies the contents of the 1.8.1 directory into trunk.

In case anyone is curious, what I am doing is following the instructions from the svn book on how to maintain vendor branches.

Starting sshd With a Higher Nice Value

I wanted sshd on my MythTV box to start with a lower priority than other processes. Sometimes I do large transfers to this box over scp (although usually I use nfs). I tried:

nice -n 10 /usr/sbin/sshd ${myopts} ${SSHD_OPTS}

and

start-stop-daemon -N 10 --stop --quiet --pidfile /var/run/${SVCNAME}.pid --signal HUP

in my /etc/init.d/sshd startup script (in Gentoo) but that didn't work. Even after restarting sshd and logging out and back in again (via ssh) there were still sshd processes running at nice level 0. I think it's because sshd likes to spawn itself at priority 0 (rather than the priority of the parent process, not sure if that is standard or not, but whatever).

The solution I came up with was to run this as a cron job:

ps -o pid -C sshd --no-heading | xargs renice 10

This renices all processes named sshd to nice level 10. This can actually be run by the normal user (if you only log in via ssh as normal user) because the processes that get nice level 0 seem to be processes created by the normal user that you log in as.

Tags: 

ssmtp vs. postfix: no contest

Why ssmtp should be removed from gentoo:

  • ssmtp is no longer maintained upstream
  • Even its successor, bssmtp has been abandoned. The writer of bssmtp and maintainer of ssmtp said himself "I have now switched back to using Postfix on my laptop."

According to this page by the maintainer, the two advantages of ssmtp are:

  • it is light (doesn't matter if it's crap)
  • it is easy to configure (it appears that way at first, but it isn't necessarily so, if you check out the gentoo forums)

He continues by saying that it has loads of problems:

  • it doesn't fail in a nice way (this is huge, I was running into problem with ssmtp not obeying the rules in /etc/ssmtp/revaliases; the output in syslog looked the same as a succesful send, but the mail wasn't sent successfully and there is no debugging output or logging whatsoever. Compare that to postfix's excellent logging.)
  • it doesn't do local delivery
  • it doesn't queue messages.
  • there is no nice support for several network environments.

Let me recount my recent experiences. I wanted a simple outgoing mail server. Something that I would allow me to run the following:

echo test |mail -s "test mail sent to external" <a href="mailto:me@gmail.com">me@gmail.com</a>
echo test |mail -s "test mail sent to david" david
echo test |mail -s "test mail sent to root" root

and have all 3 message sent to <a href="mailto:me@gmail.com">me@gmail.com</a>. With ssmtp I never got this working after many, many hours of trying. In the end, the last two commands never worked, /etc/ssmtp/revaliases was not working for some reason. Maybe I goofed, but so what. Getting postfix to work was so damn easy. All I had to do with postfix was change relayhost in /etc/postfix/main.cf like so:

relayhost = smtp.vc.shawcable.net

and add a .forward files in the home directory of the root and david users, like so:

echo "<a href="mailto:me@gmail.com">me@gmail.com</a>" > /root/.forward
echo "<a href="mailto:me@gmail.com">me@gmail.com</a>" > /home/david/.forward

then,

/etc/init.d/postfix start
rc-update add postfix default

Presto! It all works! I am sure that there is an easy way to make local mail to all other users on my system get forwarded to gmail as well. Additionally, if I wanted to use gmail's smtp servers instead of shaw's I'm sure that would also be easy.

Let's look at smtp's setup for a bit.

In ssmtp.conf there is a "root=" options. There you can set "who gets all mail for userids less than 1000." The "mailhub=" option is simple enough and it like the relayhost option in postfix. The "hostname=" is the strangest option. You would think that it should be set to the hostname. According to many ssmtp howtos out there, it should be set to an email address. In this case I set it to my email address at shaw (which I don't use), again, according to many howtos. Then there is the revaliases file. In here you can re-route mail to local accounts to to external email addresses. Too bad it doesn't work. Although it does work for some users apparently. The main thing I didn't like about ssmtp config files were the lack of documentation in them compared to postfix's. I definitely will never be returning to ssmtp now that everything works with postfix (and only took 2 minutes to set up).

MythTV 0.20 Released

MythTV 0.20 was released today. I can't wait to install it and check out the new features. I completely rebuilt my MythTV box last week and it is totally kick-ass now. It has a new 250GB hard drive which allows me to record 100 hours of TV. Some other improvments I made were, setting up XvMC which allows my video card's GPU to help out with some of the MPEG-2 decoding (bringing my CPU usage from 20% to 10% during video playback). Thanks to the Hauppauge PVR-350 card my CPU usage during recording is nil. I also got a new video card with composite out rather than s-video. That fixed a problem with the flaky s-video connector I had (whereby it would slip out and cause the screen to go all fuzzy) and also fixed a problem I had with 3 vertical lines on the TV during playback. We also bought and expensive composite cable to make sure that there are no problems. Finally stuck everything in an Antec Sonata II case for maximum silencing and cooling (not to mention how cool the black case looks).

Now that I have 100 hours of recording space (compared to 3 hours before) I set up a whole bunch of movies to record using the movie list view. It is amazing how many great movies are playing on TV at 3 am. I've also got the CBC National, Simpsons, Seinfeld, and the Colbert Report recorded daily (at any time on any channel, excluding already seen episodes), countless documentary programs and other miscellaneous things like Saturday Night Live. I love watching the TV shows I want, when I want, without commercials, and at faster speed if I want without the audio pitch getting screwed up. For example, I often watch the National at 1.4x speed without commercials. This means I can watch the entire hour-long news in about 32 minutes. Pretty sweet eh?

Daniel Robbins Returning to Gentoo?

Crazy news tonight, that Daniel Robbins (gentoo founder) is returning to Gentoo. Gentoo rocks with or without him, but that would be awesome if he came back. No mention of it over on his blog yet, but I'll be sure to checking there over the next few days. Oops, I was wrong, there is an article on his blog. that apparently started it all. So looks like maybe he'll just be becoming a developer again, rather than resuming his former role of Chief Architect.

Here's all the info I have about the bug about it (grabbed from an IRC bot):

http://bugs.gentoo.org/145649 nor, P2, All, christel@gentoo.org->recruiters@gentoo.org, NEW, pending, New Developer: Daniel Robbins (drobbins)(kingtaco, due soon)

Also, Gentoo 2006.1 was released today. Doesn't really mean much to me as my systems are always updated on a daily basis. I kind of wished they had made gcc-4.1.1 stable on x86 prior to the 2006.1 release so that more users could have had a crack at it.

There is already one review written about it.

Tags: 

Coloured diff in Linux with Subversion

To get coloured diff, install colordiff (http://colordiff.sourceforge.net/) and then you can make some aliases like below:

alias svndiff="svn diff --diff-cmd=colordiff"
alias diff="colordiff -u"

Note that I didn't need the -u (unified diff) option for subversion because it does it by default.

If you pipe your diff through less, the output will be all screwed up, this can easily be fixed by using less -r. I aliased it like this:

alias less="less -r"

Pages

Subscribe to RSS - linux