Gnome Keyboard Shortcuts

… and the Super key. I don’t know if everybody knew about this trick already, but it seems that Gnome has got this bug, that doesn’t let you bind keyboard shortcuts with the Super (windows key) combination, except the Super key itself (alone). Anyways, the work-around is using the Gnome Configuration Editor and just type in the combination in text. Browse to /apps/metacity/ (there are 4-5 sections).

If you don’t have the gconf-editor just yum install it (in Fedora):

yum install gconf-editor

Fedora Linux 10 Partitioning

Okay, so I had my Fedora 10 system running out of disk space a few days ago, so I started looking for solutions to re-partition my hard drive. Yeah, GParted seemed like a good one, but it hasn’t got the power to resize currently mounted partitions, nor to run batch-scripts like Symantec Partition Magic (windows) does. The structure of my hard-drive looked something like this in the exact same order physically:

  • Primary NTFS (C:)
  • Primary extended:
    • Linux /boot
    • Linux /
  • Primary Linux swap
  • Primary HP Recovery NTFS (D:)

The HP Recovery partition is the one used to recover my Windows Vista on C:. Anyways, I managed to resize the first primary NTFS with GParted, booted up my Windows Vista. Through Paragon Partition Manager I managed to move and resize the extended primary partition closer to the first primary C:, moving /boot and expanding /. And that was probably where I messed up.

I restarted my computer and GRUB refused to boot my Fedora Linux, stating that /sbin/init is not found. Alright, I booted back to Vista, opened Paragon Partition Manager and accidentally clicked on some button called "Boot Wizard" which popped out a dialog box saying "Complete!". And this is where the fun stuff began…

After another reboot, I realized that grub is dead, and instead I see a Paragon Boot Wizard asking me to pick either “Boot from C:” or “Boot from HP Recovery”. The first option didn’t work, so I booted HP Recovery. The Recovery program analyzed my system and recovered the Vista partition, together with the MBR. Okay, so now I can boot my brand new Vista :)) At this moment I quickly burned a Fedora 10 Live CD and restarted again.

I managed to recover my previous GRUB boot loader from the Live CD and noticed that my old linux filesystem was mounted in /media/- (tutorials stated that it should be mounted to /mnt/sysimage). Anyways, I tried to chroot /media/- which said that I’m missing /bin/bash, and an ls -a /media/-/bin got me shocked! It was almost empty. Jesus christ! Although the /home /usr /sbin and other directories were okay. So I backed up my home directory and reinstalled Fedora 10 in about 20 minutes (plus software installation for about an hour). Now I’m back online and happy (I still do experience some PulseAudio problems in Skype though).

Well, the bottom line is don’t use any windows partition editors, nor laptop recovery systems together with linux filesystems. I bet that the GParted Live CD would have done the job for me in minutes.

Thinking Subversion

Since I had to clean up all the mess in my SVN repo today, I’d like to show you some nifty tricks ;) First of all, I encourage all Windows users to forget about TortoiseSVN and all the other GUI versions, cause there’s nothing better than the good old plain-console subversion client. Just add it to your %PATH% system variable and you’ll be able to use svn commands from anywhere in the Windows command line.

Okay, cleaning up. During any cleanups and reordering subversion repos you’ll encounter with moving, renaming and deleting files. And here’s my favourite South Park phrase – “Just don’t mess up okay? You’re messing up too much!”. Do NOT delete, rename or move files thourgh your Windows explorer. The right way to do it is using SVN commands:

svn rename oldfile.php newfile.php
svn move oldfolderfile.php newfolderfile.php
svn remove unwantedfile.php

Yes, and the file will be removed/renamed/moved on your local working copy, then in the repo after you commit changes. Anyways, if you do mess up, you can always throw everything to your trashcan and start over with a fresh checkout (I’ve got a lot of temp folders full of these ;).

And of course property setting (propset) and removing (propdel) when it comes to svn:ignore properties. Properties in SVN are applied to the directory you pick and will not apply to its subdirectories, so be careful. Here’s how you set the svn:ignore property (for filename.php) on a folder:

svn propset svn:ignore "filename.php" folder

And here’s how you remove it:

svn propdel svn:ignore folder

That’s about all I had to say. Oh and don’t forget to cleanup sometimes:

svn cleanup

And since I’m a NetBeans fan, I just have to say that NetBeans IDE is just great when it comes to version control. It supports both CVS and SVN repos and it’s real quick at getting the job done if you split up your sources into NetBeans projects. It has an in-built repo browser, diff viewer and others. And it’s just a one-click-view-changes-and-commit ;) I love it. Go get yours: netbeans.org.