A man will die, but not his ideas.

Friday, December 29, 2006

Reminders to Self

Reminder to self.

Download the cups-pdf package:
sudo apt-get install cups-pdf
(or via Synaptic)

sudo chmod +s /usr/lib/cups/backend/cups-pdf

"In order to ensure CUPS-PDF is running with the required root privileges you have to make ‘root’ the owner of the cups-pdf backend and set the file permissions of the backend to 0700 (root only)."

In Gnome:
System > Administration > Printing
New Printer
Local Printer & Use A Detected Printer click on PDF Printer
Choose “Generic” as the manufacturer
Choose “postscript color printer rev3b”
Leave the driver set to “Standard (suggested)”

Printed documents are stored at ~/PDF

md5sum filename

Then compare resulting checksum with the one provided in the ".MD5" file. If they match, then the file has most probably been downloaded correctly with no errors.

Labels: ,

Posted by A :: 2:57 AM :: 2 Comments:

Post / Read Comments


Wednesday, December 27, 2006

Auto-Mounting Windows Shares in Ubuntu 6.10

OK, I finally managed to have Ubuntu running on my PC. And just so that no body jumps to conclusions, the issue was not resolved. I downloaded Edgy Eft Desktop CD and re-installed Ubuntu. Of course, I had to start configuring everything back the way it was. I have two NICs and share my Internet connection with my brother's PC via Firestarter. And among the things that I needed to configure was accessing the shared folders on his PC which was running Windows only. In order to not forget the process once again, and help others who might be looking for how to perform this, I'm listing the process here.

First, we need to install the smbfs package via apt-get or Synaptic. By the way, smbfs is not smbclient. Then we should create a file containing necessary credentials for accessing the shared folder. You could name the file anything you like (e.g. cred, smbcred, or sambapass). The file should contain the following fields:

username = windowsuser
password = windowspassword

You can use gEdit for editing the file. And by the way, in my case, I left the password and domain fields empty since they are not applicable.

Next, decide where you would like the shared folders to be mounted. I created a folder named "mounts" in my home directory and created a sub-directory for each shared drive on my brothers PC. Finally, we need to edit /etc/fstab so that we don't have to perform the mounting process every time we boot the machine. Before doing so, it is advisable that you create a backup copy of the file just in case.

In order to edit the file, you need to have root privileges. Thus, you could for example run gEdit via gksudo and provide the password. After that, you could open the fstab file from within gEdit and be able to edit its contents. What you need to add is a line for each shared drive/folder specifying were it should be mounted, file system type, what credentials are necessary for accessing the share, and setting the owner and group for all files in the share. For example:

// /home/informer2000/mounts/sliders-2_c smbfs credentials=/home/informer2000/sambapass,uid=informer2000,gid=informer2000 0 0

Please note that there should be no line breaks in the line (i.e. all the above should be in one line). Now, all you have to do is save the fstab file, open the terminal and type sudo mount -a and if everything went well you should be able to access the shares from the directories at which they are mounted. In addition, the mounting command is not required after that because they will be mounted automatically when Ubuntu starts.

Labels: ,

Posted by A :: 3:13 PM :: 2 Comments:

Post / Read Comments


Tuesday, December 26, 2006

A Frustrating Weekend - Part 2

OK, where was I?! Yes, I was sitting with frustration in front of a PC that continuously reboots...

So, now the assigned task that I re-installed Windows XP for was complete. But Ubuntu, which I use for working on my thesis, doesn't want to boot. I do have backups for my work, but I would like to gain back my system as it was. Ignoring this for a moment in order to not waste time, I decided I'll stick with Windows for a while for my work and ask around for a solution to my problem. Unfortunately, I did not get any successful answer even after posting the issue in the Ubuntu Forums. Everyone just keeps telling me to do things I already did (and mentioned in my previous post in the blog). And they keep insisting that I should install Windows first then Ubuntu. This is very impractical since, as we all know, Windows keeps crashing and continuously needs re-installation.

I found a very useful tool called Ext2 Installable File System (Ext2 IFS) for Windows which provides full access to Linux Ext2 volumes (read access and write access) from within Windows. So, I copied my Eclipse workspace and since I already had a copy of Eclipse present on my HDD from the previous Windows installation I only had to install the Java 2 SDK. Usually that wouldn't be a problem. However, since this was a very frustrating weekend, I was unable to find a copy of the 1.5 SDK in my CD collection! Imagine, me the Java fan not having a version of the SDK!!! I guess I must have erased the copy I had lying around on my HDD due to lack of storage space and forgot that I didn't put it on a CD. What made things worse is that, since the Internet connection was not working properly, it took a long time to download it and I wasted the day.

Well, I don't remember if that was the end of my problems during that weekend or not. But to make a long story short, I decided I should download Ubuntu 6.10 (Edgy Eft) and install it after backing up my data and configurations on my USB HDD, which a dear friend of mine has brought me as a gift. And in order not to make the same mistake twice, this time I'll make a separate partition for "/home" in case something like this ever happens again. I just hope that installing Edgy would solve the problem.

In the mean time, during my search to resolve the problem, I landed on the following very useful guide titled "How to install ANYTHING in Ubuntu!" by Simon Gray which I think might be very useful for new comers. By the way, later, I might consider moving to a KDE environment and switch to Kubuntu or Fedora Core just to make sure I'm not limiting myself to a single environment. But I guess that will happen when I find some time.

Posted by A :: 3:42 PM :: 0 Comments:

Post / Read Comments


Saturday, December 23, 2006

Play the Web with Songbird

I'm in a hurry and may edit this post later. But check this out. Now you can also listen to the songbird and not just talk to it like Oasis did.

Lower quality version of the screencast could be found on Google Video and Youtube. Here is the Youtube version:

...three, four
Talkin to the songbird yesterday
Flew me to a place not far away
She's a little pilot in my mind
Singin songs of love to pass the time
Gonna write a song so she can see
Give her all the love she gives to me
Talk of better days that have yet to come
Never felt this love from anyone

She's not anyone
She's not anyone
She's not anyone

A man can never dream these kind of things
Especially when she came and spread her wings
Whisper in my ear the things I'd like
Then she flew away into the night
Gonna write a song so she can see
Give her all the love she gives to me
Talk of better days that have yet to come
Never felt this love from anyone

She's not anyone
She's not anyone
She's not anyone

BTW, for all Oasis fans, the official Web site for the band can be found here, as if you didn't know already!

Posted by A :: 3:19 PM :: 0 Comments:

Post / Read Comments


Friday, December 22, 2006

A Frustrating Weekend

This weekend turned out to be the most frustrating weekend I've had during the past year. It started with my Internet connection which, as usual every now and then, had technical and non-technical difficulties. Next, I was made responsible for completing a task which required installing Visual Studio.NET 2005. And since I wasn't satisfied with Windows XP's performance (which I stopped using a some months ago), I decided I'll install a fresh copy. I can't say I didn't know that this is going to get me into trouble. But I thought I'll get things corrected quickly. Little did I know what was to come.

As I expected, Windows overwrote the MBR of the hard disk, erasing GRUB. OK, so how to recover from this and GRUB back in place?! I googled around and came up with the solution. I first had to boot from a LiveCD to access a Linux shell. I had an old copy of Knoppix 4.0 lying around, so I used that. Afterwards, I mounted my root partition to a directory which I created at "/mnt". Then changed root via "chroot" to the mount point. After that, I had two choices to restore GRUB: use "grub-install" or the GRUB shell.

The first option resulted in the "The file /boot/grub/stage1 cannot be read correctly." message. I later discovered I had to explicitly specify where the configuration files exist. Anyway, I read somewhere about the SystemRescueCD which contains many useful utilities for fixing problems if something went wrong with your disto. So, I downloaded the ISO image and since I didn't want to waste a blank CD for 100 MB, I decided I'll use my USB stick. So, I copied the necessary files and used syslinux to make the USB stick bootable and configured my BIOS to boot from it.

Everything went smooth and I got a shell from which I proceeded as before except that this time I used the GRUB shell option. First I set the root partition using "root (hd0,x)", where x is the partition number. Then I used "setup (hd0)" to setup GRUB in the MBR. The output indicated that the operation was successful so I rebooted. I was happy to see GRUB loading the stage1 and attempting to load stage1.5 when all the sudden, BOOM, the machine restarted automatically. This went on in a continuous loop.

To be continued...

Posted by A :: 8:42 PM :: 0 Comments:

Post / Read Comments


Sunday, December 17, 2006

Celebrating J2SE 6 in Egypt with the 1st JDC

Sun Microsystems finally announced the release of Java SE 6 (aka Mustang). I'm not sure if it was meant to be or just a coincidence. But the Egyptian Java User Group (EGJUG) is jointly organizing, along with the Egyptian Software Engineers Association (ESEA), the first Java Developers Conference (JDC) in Egypt, an event that I've long been waiting to see take place over here. It will be held in Cairo at Saraya Hall in Intercontinental City Stars Cairo on the 20th of January 2007. I will do my best and try not to miss the event. And if you are a Java developer in Egypt, I suggest you do the same. Register online:


Posted by A :: 9:14 PM :: 0 Comments:

Post / Read Comments


Creative Commons License
Unless otherwise expressly stated, all original material of whatever nature created by the blog's author and included in the "A man will die, but not his ideas." weblog and any related pages, including the weblog's archives, is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.

* Java and the Java Coffee Cup Logo are trademarks or registered trademarks of Sun Microsystems,Inc. in the U.S. and other countries.