Ubuntu 11.10

A few months ago I upgraded all my server editions from 10.0 to 11.10. Mostly to see and keep up with all the security updates that have been made in the packages, etc. I can report that while there were changes to several of the packages I did not have any major issues once I upgraded.

There was one major change that took place that I do not like. That change is in the verison of VIM that comes as a default. The version now is VIM Tiny which I despise coming from the full VIM. I usaally just remove VIM tiny right after I get my system installed by running

sudo apt-get remove vim-tiny
then installing
sudo apt-get install vim

Posted in Linux, Ubuntu, Ubuntu | Leave a comment

Where have I been!?

Its been a while since I have had any desire or information that I felt worthy of posting on my blog. Since I was laid off a year ago I have finally found another job. It only took me about 9 months, but things are getting better. Everyone always thinks that getting a new job solves everything instantly and that things are instantly better but thats the furthest thing from the truth. The reality is that once you get a job now you start playing the catch up game with everything and everyone. The money that you desperately need is now going towards all the things that you have to get caught up on leaving you with very little to actually work with.

So now begins the process of getting life back on track and having some kind of normal balance. I expect that wont fully happen until early next year. I am grateful for having a job and grateful to be hired by my new company which is a great place to be and work.

Now I will make an attempt to start posting new content and revitalize my blog.

Posted in Life | 1 Comment

Boot Ubuntu via virtualbox inside windows

This comes from a site: http://www.neowin.net/forum/topic/784138-howto-boot-existing-ubuntu-partition-using-virtualbox-inside-windows/

This is a tutorial I wrote up and posted up on my blog.

I recently got Windows 7 and Ubuntu running in a dualboot. However, since I’m using more of Windows now I figured I should probably find a way to run Ubuntu inside my Windows. VM’s are great, but it’d be better if I can actually boot into my existing Ubuntu partition. So I searched the web and kept on finding tutorials on how to boot existing XP partitions inside Windows. So I decided to extrapolate from those tutorials and work my way through it. I’ll be writing how I did it here.

Before we begin, you should have a dual boot setup. I will NOT be showing you how to setup a dual boot, if you need help plenty of other guides out there.

Step 1: Creating a grub boot iso

The grub iso file will allow you to specify which partition to boot into.

1. Boot into Ubuntu
2. We create the folders and copy the necessary files to setup an isoRun the command:

cd; mkdir -p iso/boot/grub; cp /usr/lib/grub/*-pc/stage2_eltorito /boot/grub/menu.lst iso/boot/grub

3. Configure your ~/iso/boot/grub menu.lst file to boot your target OS (in this case Ubuntu). Remove the “savedefault” option from your target entry if it exists.
4. We now create the bootable iso fileRun the command:

cd; mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o grub.iso iso

5. Move the iso to a location that’ll be accessable by your Windows partition

Step 2: Creating the .vmdk file

This creates a file which tells Virtualbox what partition to actually load as the harddrive. Unfortunately, unlike VMWare Workstation, Virtualbox does not support a GUI interface for selecting RAW hard disks as the “virtual hard drive”.

1. Boot into Windows
2. cd into the directory you installed virtualbox
3. We find the partition number that needs to be mountedRun the command:

VBoxManage.exe internalcommands listpartitions -rawdisk \\.\PhysicalDrive1

(where 1 is the number of the hard drive ubuntu is installed on. E.g. Master should be 0, you’re second hard-drive should be 1 etc…The output should be something like:

Number Type StartCHS EndCHS Size (MiB) Start (Sect)
1 0×07 0 /32 /33 1023/254/63 902023 2048
5 0×83 1023/254/63 1023/254/63 49677 1847346543
6 0×82 1023/254/63 1023/254/63 2164 1949086188

In this example, my Ubuntu partition is number 5 and the swap is number 6
4. We now create the VMDK file with the given informationRun the command:

VBoxManage.exe internalcommands createrawvmdk -filename C:\path\ubuntu.vmdk -rawdisk \\.\PhysicalDrive1 -partitions 5,6 -register

Step 3: Setup Virtualbox

Now everything should be ready to setup Virtualbox. Create a new virtual machine. Select the .vmdk file we just created as the hard drive and mount the grub.iso file we created at Step 1. If everything was successful Ubuntu should boot up nicely.

Posted in Linux, Ubuntu | Leave a comment

Changing hostnames on Ubuntu 10.10

There are 2 different ways you can change hostnames on Ubuntu 10.10.  One of them is just a temporary change until you reboot the computer, the other changes the hostname of the machine forever.  Here is how you do both.

To make a temporary change to the host name:
1. Start shell or terminal
2. at the prompt enter:
hostname whateveryournewnameis

This changes it to the new host name until you reboot.

To change it permanantley, do the following:
1. Start shell or terminal
2. at the prompt enter:
sudo vi /etc/hostname
3. This will open vi (text editor) and you can press the insert key, remove the old name and type in the new name
4. Press the esc key
5. Type:
:wq

The next time you restart the hostname will changed.

Posted in Linux, Ubuntu | Tagged , , | Leave a comment

Ubuntu 10.04 Thunderbird minimize to tray

Previously I have been using kdocker to minimize my Thunderbird to the tray area of my Ubuntu system. With 10.04 and Thunderbird 3 kdocker no longer works.

To correct that issue I started using a new program called Minimize to Tray Plus

This addon for Thunderbird works the same as kdocker but it actually works for 10.04 and Thunderbird 3.

Here is what I did to get the addon in my Thunderbird:

1. Start Thunderbird
2. Click on the Tools Menu
3. Click on addons
4. Click Get addons
5. Enter Minimize to Tray Plus
6. Download and restart Thunderbird

Posted in Linux | 1 Comment

Ubuntu: Replacement SH or shell

I have been using Ubuntu for a while and I love the fact that the terminal or shell is so versatile. What takes multiple steps in a GUI you can accomplish with a command from the command line. This is great, and especially so since you dont run the risk of using up your memory or any other resources on the machine but I often find myself wondering, is there a program that can make this better?  YUP i found it. Its called terminator. Its a shell terminal application that you can use instead of terminal or shell.  This one allows you to do mutliple tabs and split your screens horizontal or vertical depending on which you like. If your running a ton of terminal commands then this is a great thing.

Heres what I did to install it:

from a command line:

1. Sudo apt-get update
2. Sudo apt-get upgrade
(I always check for updates before I do an install of any new program. Its up to you to do that step)
3. Sudo apt-get install terminator
4. Let it install, then you can create an icon on the desktop or the shortcut bar along the top with application.

to run the application use:  terminator

Posted in Linux | Leave a comment

EVE Online

I have started to play the game EVE Online in the last week or so. I figured it would give me something else to do besides play World of Warcraft. Not that I dont like wow or anything, I just needed a change. So I started the trial account of EVE. I have to say that its pretty good. I have enjoyed playing it thus far and will probably get a membership to it for a little while. At least for a couple months. I find that its the opposite of wow. Which can be a good thing.

Posted in Life | Leave a comment

Ubuntu: Printing to Network Printer

I recently encountered an issue with a network printer that was rather perplexing.  I did not readily come to the correction until I had put some time into it.

Here was the situation:
We have a network printer that I added to my machine via the admin/printing section in ubuntu. I listed the printer in the network section, so I selected it and then hit apply.  It created the printer and I could print a test page, but anytime that I tried to print any other kind of document to it, the printer always told me that there was no connection to it.

The correction:
I finally removed the printer, copied the IP that it saw in the network listing for the printer and used the HP Jetdirect option instead of letting ubuntu install from the list of printers.  Now even though its not using a Jetdirect, I entered the IP address and left the default port and it now is allowing me to send my print jobs to it.

So the final verdict is:

If you have a network printer that is not attached to a machine, IE: the printer has its own printer ip, then use the Jetdirect option instead of letting ubuntu install the drivers.
—-
After 11 years of working for the same company I was laid off today. I find it interesting that 2 hours after I posted this I was unemployed for 9 months.

Posted in Linux, Ubuntu | Leave a comment

Ubuntu: Move active window to another monitor

If your like me, I have have 2 monitors attached to my Ubuntu workstation.  When using Windows you could always get programs like Multimon or Ultramon that allowed with the click of one button to move the currently active window to the other monitor and vice versa, but there has never been anything like that available for Linux.  Until now.  By utilizing a xdotool and a small bash script and keyboard shortcuts, you can accomplish the exact same thing as those programs do on Windows within your Linux desktop.  I will provide the directions on how I accomplished this on my system.

Step 1:

Check for xdo and install if required.  To check if you have it from a console or shell type:
xdotool windowmove `xdotool getwindowfocus` 100 100

The shell window should move a bit. If it does not then you need to type:
sudo apt-get install xdotool

Step 2:

Locate your screen information using the Nvidia Display Server settings.  From the terminal type:
nvidia-settings

Click on the right most display and then look at the position data on the right next to the Position section.  It will say something like +1680+0
You want to note those numbers.

Step 3:
Fire up your favorite text editor and make the bash script for movement.  Use the following code:

#!/bin/bash

if [ $1 -eq 2 ]
then
POS=”0 0″
else
POS=”1680 0″
fi

/usr/bin/xdotool windowmove `/usr/bin/xdotool getwindowfocus` $POS

exit 0

Within the second POS field enter the 2 numbers that you made a note of from the position section. In my case it was 1680 0

Enter exactly as 1680 0 without the + symbols

Save the file as a .sh
Make sure you make a note of what you call the file. I called mine movewindow.sh

Step 4:
Make the file executable. Type the following into your shell or terminal window.

sudo chmod +x /home/username/scripts/movewindow.sh
Use whatever the name of the file you saved

Step 5:

Create a keyboard shortcut for the bash file to move the window left and right. Go to System tab, preferences, then Keyboard shortcuts.
Click the add button at the bottom.
Make the name: Move window right
Make the command: /home/userloginname/movewindow.sh 1
The path is going to be the path to where you saved the file.  After the name of the file you want to put a number 1 at the end denoting that its the 1 monitor.
Press ok.

Click the add button at the bottom again and call it: Move window left
Make the command: /home/userloginname/movewindow.sh 2
The path is going to be the path to where you saved the file.  After the name of the file you want to put a number 2 at the end denoting that its the 2 monitor.
Press ok

Once both of those are created you can assign the keyboard command to be which ever combination you like. I used the window key and right and left arrow.

Now you can easily move the windows around your desktop.

Posted in Linux | Tagged , , , , , | 7 Comments

Ubuntu: PGP encrypt file

If you have already setup your PGP key within the system you can encrypt a file with your pgp key by doing the following command from a terminal or shell:

gpg -c filename

Posted in Linux | Leave a comment