Categories
Tech Tips

How to reduce size of VirtualBox VDI file

Scenario:

VirtualBox version = 4.0.12
Guest OS = Win 7
Host OS = Linux Mint 9 Isadora (based on Ubuntu)

Perform these tasks on all the Win 7 local hard-disks:

  1. chkdsk /F
  2. defrag /X
  3. sdelete -z

Shutdown the Win 7 VM, then run this command on Mint:

$ VBoxManage modifyhd win7.vdi --compact

That freed up 5GB of space for me, a 20% reduction.

Categories
Misc Quotes Our Society Tech Encounters

The only ideology I really despise and dislike is the kind that is about exclusion of other ones

In an interview with Argentina’s La Pagina, Linux founder Linus Torvalds shares his view of Linux ideology.

Q: What ideology has Linux?

A: I don’t think there is an ideology, and I don’t think there *should* be an ideology. And the important part of that is the “an” – I think there can be *many* ideologies.  I do it for my own reasons, other people do it for _their_ own reasons. I think the world is a complicated place, and people are interesting and complicated animals that do things for complex reasons. And that’s why I don’t think there should be “an ideology”. I think it’s really refreshing to see people working on Linux because they believe they can make the world a better place by spreading technology and making it available to people more widely – and they think that open source is a good way to do that. That’s _one_ ideology. I think it’s a great one. It isn’t really why I started doing Linux myself, but it warms my heart to see Linux used that way. But I _also_ think that it’s great to see all the commercial companies that use open source simply because it’s good for business. That’s a totally different ideology, and I think that’s a perfectly good ideology too. The world would be a _much_ worse place if we didn’t have companies doing things for money. So the only ideology I really despise and dislike is the kind that is about exclusion of other ones. I despise people whose ideology is about “the one true ideology”, and not following that particular set of moral guidelines is “evil” or “wrong”. That’s just small-minded and stupid, to me. So the important part about open source is not the ideology – it’s just that everybody can use it for their own needs and for their own reasons. The copyright license is there to keep that openness alive, and to make sure that the project doesn’t fragment into people who hide their improvements from each other and then have to re-implement each others changes – but it’s not there to enforce some ideology.

Categories
Tech Tips

AutoHotkey alternatives for Linux

For those of you looking for AutoHotkey alternatives for Linux, check these out:
  • compiz – OpenGL window and compositing manager
  • autokey – desktop automation utility
  • wmctrl – control an EWMH/NetWM compatible X Window Manager
  • setxkbmap – set the keyboard using the X Keyboard Extension
  • xmodmap – utility for modifying keymaps and pointer button mappings in X
  • xdotool – simulate X11 keyboard/mouse input
  • xvkbd – software virtual keyboard for X11
  • xbindkeys – a grabbing keys program for X
  • xte – Generates fake input using the XTest extension
  • xmacro – Record/play keystrokes and mouse movements in X displays

What tools do you use? Share your tips…

Categories
Tech Tips

Fix outdated/corrupted EPEL repo metadata

yum update failed in RHEL (Red Hat Enterprise Linux) server 5.5 with EPEL repo added:

[root@server ~]# yum update
Loaded plugins: rhnplugin, security
Skipping security plugin, no data
Setting up Update Process
Resolving Dependencies
Skipping security plugin, no data
--> Running transaction check
---> Package cups.x86_64 1:1.3.7-18.el5_5.8 set to be updated
---> Package cups-libs.i386 1:1.3.7-18.el5_5.8 set to be updated
---> Package cups-libs.x86_64 1:1.3.7-18.el5_5.8 set to be updated
---> Package pam.i386 0:0.99.6.2-6.el5_5.2 set to be updated
---> Package pam.x86_64 0:0.99.6.2-6.el5_5.2 set to be updated
---> Package pam-devel.i386 0:0.99.6.2-6.el5_5.2 set to be updated
---> Package pam-devel.x86_64 0:0.99.6.2-6.el5_5.2 set to be updated
---> Package yum.noarch 0:3.2.22-26.el5_5.1 set to be updated
http://mirror01.idc.hinet.net/EPEL/5/x86_64/repodata/b205b049dc386d8d09316372f16b4371cef514bb-filelists.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://ftp.riken.jp/Linux/fedora/epel/5/x86_64/repodata/b205b049dc386d8d09316372f16b4371cef514bb-filelists.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.yandex.ru/epel/5/x86_64/repodata/b205b049dc386d8d09316372f16b4371cef514bb-filelists.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://ftp.kddilabs.jp/Linux/packages/fedora/epel/5/x86_64/repodata/b205b049dc386d8d09316372f16b4371cef514bb-filelists.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://sulawesi.idrepo.or.id/epel/5/x86_64/repodata/b205b049dc386d8d09316372f16b4371cef514bb-filelists.sqlite.bz2: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error: failure: repodata/b205b049dc386d8d09316372f16b4371cef514bb-filelists.sqlite.bz2 from epel: [Errno 256] No more mirrors to try.
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest

Fixed with:

yum clean metadata
yum clean dbcache
yum update
Categories
Tech Tips

How to Split the GNU screen in half horizontally?

1. Create two screen sessions
2. Ctrl+a S to split in half
3. Ctrl+a TAB to move to bottom half
4. Ctrl+a ” to select session
5. Ctrl+a Q to return to full size screen