Setting up a planet

So, how does one set up a planet?

In case anyone thinks I’m nuts, I’m talking of setting up a planet like this (or this). A planet here is just a collection of blogs, and I’ll talk about how to set up one using the software called planet venus. To get started just download the tarball. Extract it into a directory of your choice (using tar zxvf venus.tgz), and you’ll see the directory structure as on the website. The documentation is quite detailed, but if you want a planet quickly, you won’t have to read most of it.

Here’s what I did: I made a directory and copied the file themes/classic_fancy/config.ini to this directory (you might prefer some other theme, in this case choose the appropriate config.ini). Edit the file accordingly; mostly you’d need to change the [planet] section. The other important settings to check are cache_directory and output_dir. It’s better to set the full path here and in the other places which require a directory (template_files) — this helps when running the cronjob later. All the generated files will be in output_dir. You can find the index.html.tmpl (index.html template) in the theme directory and the other templates (Atom, RSS feeds) in the themes/common directory.

Remember to put planet.css and other relevant images in the proper places, otherwise people will see an ugly page!

Now add the feeds which you would like to have in the planet in the following format:

[http://blah.wordpress.com/feed/] # This should be the feed url
name = My Name

You’re done! Now switch to the directory where you untarred the planet venus code and run python planet.py /path/to/config.ini. This will download the feeds, store them in the cache and generate the index.html, Atom and RSS feeds.

Finally set this thing to run as a cronjob (using crontab -e); the snippet below will make planet.py run hourly:

0 * * * * /usr/bin/python /full/path/to/planet.py /full/path/to/config.py
Advertisements

Arch setup II

So onto part II.

There are a few important things that one needs to remember when configuring Arch – one is that most of the configuration is done through plain old text files; no clumsy or hand-holding GUIs here to help you out. Secondly, most of the configuration files in Arch are in exactly the same place where you would expect them to, i.e. Arch interferes very little with /etc allowing programs to place the files there, without moving them to a special place. Most distributions keep a special system for managing configuration files, Debian has debconf, Gentoo has etc-update, Arch has none, and it needs none. When a configuration file is to be overwritten, Arch will give you a warning; if it does not you can be sure that it’ll not overwrite and instead the new config will be placed with a .pacnew extension.

I am a bit of a console freak, so first off I installed gpm. GPM is this really cool
program which allows you to use the mouse in the console. I did need to a do a bit of tweaking in /etc/conf.d/gpm and I added this line:
GPM_ARGS="-m /dev/input/mice -t imps2"

(other great console apps: irssi, centericq, and of course mutt!)

Another good thing that I like about Arch is its bleeding edge packages. The magic command
to sync up on the newest stuff is pacman -Syu. Also I made sure to install the latest version of pacman (version 3.0.4 as of writing). It seems a bit faster, the progressbar for installing also looks neater; of course there are lot of changes underhood too. The other good news for those wanting to try out Arch for the first time – they’ll release a 2007-05 version (codename Duke) soon with the new kernel 2.6.21. So wait a few days and download that instead of 0.8!

Then I installed slim (the simple login manager) and beryl, compositor-king. In Arch if you know the name of a package, then you can install it with pacman -S package. If you don’t sync frequently you can also tag a -y to it like pacman -Sy package. That’ll make sure you get the repositories refreshed with the changes (-y stands for refresh). You can also search for a package by this package -Ss whatever.

Arch has a few repositories. To put simply, a repository is a collection of binary packages maintained by Arch developers, or other members of the community. The official repositories are current, extra, unstable, testing, community. Out of these current and extra contain stable packages. testing contains the absolutely new stuff, and one that could (but never has, in my case) break your system (like say, a new kernel version or a new video graphics driver). unstable contains, well unstable code. I don’t use it and it doesn’t contain many packages anyway. community is a repo of software that users wrote PKGBUILDs for (I’ll be coming to what PKGBUILDs are, soon) and they have been voted or are important enough, that binary packages are provided for a few of them. (Did you know, that
anyone can upload packages to the Archlinux User Repository?)

If you want to enable some of those repositories, go to /etc/pacman.conf and uncomment out the repos you need, you can also add other repos if you want.

Installing stuff is a no-brainer as I told before. I quickly installed openoffice-base, pidgin, seahorse (manages GPG keys), muttng (grabbed a few configs from codemac, thanks codemac!), screen (the wonderful terminal multiplexer), nitrogen (a wallpaper setter), alunn (excellent notifier for new packages, quietly sits in systray), totem movie player, VLC, etc….

Now onto configuring NetworkManager. First I had to install the required packages (networkamanger and gnome-network-manager if you use GTK+/GNOME or knetworkmanager if you use KDE). Then you have to go to rc.conf and disable the interfaces which we want to use. You must also remember that your wireless card uses a different interface than your ethernet port. That you have to find out by trial-and-error. In my case it was eth2. So in my rc.conf, I now have:

  lo="lo 127.0.0.1"
  eth0="dhcp" #if you don't want dhcp put something like this:
  #eth0="eth0 192.168.1.3 netmask 255.255.255.0" where the first address is the IP you want
  eth2="dhcp"
  INTERFACES=(lo !eth0 !eth2)
  #
  # Routes to start at boot-up (in this order)
  # Declare each route then list in ROUTES
  #   - prefix an entry in ROUTES with a ! to disable it
  #
  gateway="default gw 192.168.1.1"
  ROUTES=(!gateway)

Then you need to install the appropriate drivers for your wireless card (if you haven’t done so already). My card is a Intel IPW3945ABG so I installed the ipw3945 package. For this driver, I also need to startup the ipw9345 daemon, so I added to the DAEMONS array. While using networkmanager, we have to disable the network script, so put a ! before it and also add dhcdbd and networkmanager to the DAEMONS array. Next time you reboot, NetworkManager will take over your network settings from rc.conf. So now my DAEMONS array looks like this:

  DAEMONS=(syslog-ng ipw3945d !network alsa dbus hal @powersaved @mpd dhcdbd netwo
  rkmanager @lastfmsubmitd @lastmp @netfs vsftpd crond slim)

(the @ before some daemons means that daemon will be started in the background)

To use the GNOME applet, you can put nm-applet --sm-disable in your .xinitrc or whatever system your DE uses to autostart apps on login. The reason --sm-disable is required is that otherwise nm-applet gets confused and multiple instances of it startup 😦

Lastly I configured mpd. For anyone who does not know, mpd is a daemon which plays your music in the background. So even if you kill X, your music goes on. There are many good frontends for it; I prefer Sonata which supports editing tags too.

Next time, I will write about how drop dead simple it is to make your own packages in Archlinux. Have a look at the wiki; and till next time happy pacman -Syu’ing!

Wheee! Huawei CDMA works in Gentoo!

Thanks to trichotillomania for the configuration settings 🙂

Well according to that blog, I should have got wvdial and configured it. Unfortunately wvstreams (on which wvdial depends) bombed out on me during the compilation :-(. Also, I didn’t use his method of modprobing everytime. I just went into the kernel configuration -> Device Drivers -> USB Support -> USB Serial Convertor Support, and ticked off USB Serial Console Device Support, USB Generic Serial Driver, and of course USB driver for GSM and CDMA modems 🙂 to be compiled into the kernel. So whenever I plug the modem in, auto-detection magic 🙂 No fuss. No scripts.

Then since wvdial didn’t work (didn’t compile) so I set off to use Gentoo’s recommended way: /etc/conf.d/net
I edited that file, put in a few settings (after reading their excellent documentation) and this is what I ended up with:


#[snippet only]
config_ppp0=("ppp")
link_ppp0="/dev/ttyUSB0"
username_ppp0='username'
password_ppp0='password'
pppd_ppp0=(
"defaultroute"
"usepeerdns"
"115200"
"modem crtscts"
# you can add more here: just look at /etc/conf.d/net.example!
)
phone_number_ppp0=("#777")
chat_ppp0=(
'ABORT' 'BUSY'
'ABORT' 'ERROR'
'ABORT' 'NO ANSWER'
'ABORT' 'NO CARRIER'
'ABORT' 'NO DIALTONE'
'ABORT' 'Invalid Login'
'ABORT' 'Login incorrect'
'TIMEOUT' '5'
'' 'ATZ'
'OK' 'AT' # Put your modem initialization string here
'OK' 'ATDT\T'
'TIMEOUT' '60'
'CONNECT' ''
'TIMEOUT' '5'
'~--' ''
)
# ^ blatantly copied from /etc/conf.d/net.example!

Thanks to all the people that have made GNU/Linux such a smashing success! Nowadays, linux support is so great, I really wonder why people use Windows at all. And Gentoo docs are of course unparalleled and unrivalled 🙂