Linux on a Laptop

November 5, 2009

Do people really run any Linux distro full time on a laptop?  I’ve wanted to for so long, and just can’t get it to work how I need.  My problem, video.  I have an external monitor that I use with my Macbook when I’m in my office.  I leave my office and take my Macbook with me 3 – 4 times a day.  So, I have to unplug my monitor, and that’s where the problem arises.

With Windows and OS X, the machine automatically detects that I have unplugged my external monitor and moves all of my windows and menu bars back to my laptop screen.  Linux… it does nothing.  All windows and menu’s stay hidden on the now phantom monitor screen.   The only work around is to close everything and restart X.  Really a pain.

Is there anyway around this mess?


Firefox Themes

November 5, 2009

I can’t seem to find a theme that suites me.  I’ve tried the majority on the Firefox site, and nothing really makes me happy.  I just don’t like the default look of pretty much any browser out there.  I do like the mock-up’s I’ve seen of a potential Firefox 4, but who knows if those will make it to reality.

I’ve tried the personas, and they’re no good.  Does anyone have any suggestions for a real slick Firefox theme?


openSUSE Screen Size/Resolution on Virtualbox

October 22, 2009

In keeping with my posts on how to set the screen size of your machines in virtualbox, today I will show what is required to set it for the latest openSUSE 11.2 release candidate.  I would assume that this will still work once it has gone final.

So, here’s what to do:

1.  Install openSUSE 11.2 in virtualbox.

2.  Install the virtualbox guest additions in your new openSUSE installation.

3.  As root, edit your “/etc/X11/xorg.conf” file and remove this section from the very bottom:

Section “ServerLayout”
Identifier “Layout”
Screen  “vboxvideo”
Screen  “vmware”
Screen  “cirrus”
Screen  “fbdev”
Screen  “vesa”
EndSection

4.  Now add the following piece to the end of the file (basically replacing what you just deleted):

Section “Screen”
Identifier    ”Default Screen”
Monitor        ”Configured Monitor”
Device        ”Configured Video Device”
DefaultDepth    24
SubSection    ”Display”
Depth    24
Modes    ”1152×864″
EndSubSection
EndSection

Section “ServerLayout”
Identifier    ”Default Layout”
Screen        ”Default Screen”
EndSection

As you can see, I have used “1152×864″ for my resolution.  Adjust to match your desired resolution.

And that’s it!  Now just log out and back in to restart X and you should be good to go.


Flash 10.1 not x64 Compatible

October 5, 2009

Adobe has announced that Flash 10.1 will run the same version an all platforms (except for the iPhone of course!).  Well, they’ve also said it will not contain a 64 bit version… :(

The exact quote is:

When will 64-bit versions of Flash Player 10.1 be available?The 64-bit versions of Flash Player will not be in the initial release of Flash Player 10.1. We remain committed to bringing native 64-bit Flash Player to Windows and Mac in future, in addition to the currently available 64-bit alpha version of Flash Player 10 for Linux.

And the site link is:

http://labs.adobe.com/technologies/flashplayer10/

Well, maybe some day.


Juniper Network Connect VPN Linux 64 Bit

July 11, 2009

After much searching and reading, I am now able to successfully able to connect to my works Juniper VPN on my 64 Bit linux machine.  I hope this post finds it’s way out there fast because I couldn’t find single post that had these instructions.  So, here we go…

First you must know that I am doing this on Fedora 11.  I’m sure it will work on other distro’s, but the tutorial will be tailored to Fedora.  Now, there are a few things that you must install.  Number 1 is Sun’s Java, including the plugin.  Since the release of Java 1.6 update 12, there has been a native 64 bit Java browser plugin.  A great place for instructions how to install this is here:  http://www.my-guides.net/en/content/view/161/26/1/12/.  That’s all I will say about the Java setup.

Next, you need to install some 32 bit libraries.  On Fedora simply run:

yum install binutils.i586

For me, this installed 3 dependencies.  Namely: glibc.i686, nss-softokn-freebl.i586, zlib.i586.  It was pretty simple.  Now we’re ready to begin with the install of Network Connect.

You need to make sure xterm is installed.  If it’s not, install it.  Fedora it’s as simple as:

yum install xterm

Now just open Firefox and navigate to your VPN’s login page.  Once there, we need to download the certificate file.  To do this click on “Tools > Page Info > Security”.  Now you should see info about the sites security certificate.  Click on the button that says “View Certificate”.  Now you have even more info about the certificate.  Now click on the tab at the top of the window that says “Details”.  You should now see a button labeled “Export…”.  Click that.  You are now given a “Save certificate to file” dialog box.  First navigate to the location you would like to save it.  Then give it a name.  I went with “vpn_ssl.crt” and will assume that is your name for the rest of this tutorial.  Before you click Save, click on the drop down right above save that let’s you select the certificate type.  Choose “X.509 Certificate (DER)”.  Now click Save.

Next we need to note down the Realm for your system.  It should be listed ont he login page.  Here’s a screenshot of my company’s login page with the Realm being “VPN_Users”:

Just login here like normal, being sure to jot down your Realm somewhere.  You should now be taken through the process of installing and launching the Network Connect client.  If you have correctly installed the java plugin, you should not get any errors.  As a note, there should be a point where a terminal window opens and asks for your root password.  It’s ok, that’s part of the installation.  After everything appears to have loaded you will be taken to a screen saying you are connected.  Notice you do not have VPN access to anything in your office.  It doesn’t work out of the box on a 64 bit Linux operating system.

Don’t worry, we’re almost there.

Now open a terminal.  In your home directory you should now have “.juniper_networks”.  Change directories there.  If you’re new it’s just “cd .juniper_networks” without the quotes.  Now do the same into the “network_connect” folder.  When you issue “ls” you should see:

[josh@jeter network_connect]$ ls
installnc.log  installNC.sh  libncui.so  missing.info  ncdiag  NC.jar  ncsvc  ncsvc.log  version.txt  vpn.crt  xlaunchNC.sh

ncsvc is the file we’re going to work with.  To ensure it is executable issue:

./ncsvc –version

You should get a read out of your version of Network Connect.  For reference, mine is:

[josh@jeter network_connect]$ ./ncsvc –version
Juniper Network Connect Server for Linux.
Version         : 6.4
Release Version : 6.4-0-Build14063
Build Date/time : Mar 11 2009 09:29:32
Copyright 2001-2008 Juniper Networks

If the file is not executable, make it.  Issue “chmod 755 ncsvc”.  It my case it’s owned by root, so depending on your setup you can issue:

su -c ‘chmod 755 ncsvc’

Then provide your root password.  Now we just need to execute the file with the appropriate parameters.  That is:

./ncsvc -h <my.domain.com> -u <username> -p <password> -r <realm> -f <path/to/vpn_ssl.crt> -L 5

Here is an explanation:
-h:  The hostname of your server
-u:  Your username
-p:  Your password
-r:  Your systems Realm (noted from earlier)
-f:  Path to your vpn_ssl.crt file saved earlier
-L:  I put 5, but it’s just the logging level. Put 1 – 5 however you like.

Now, you should be connected.  I kept waiting for a confirmation that I was connected, but all you’ll get is:

Connecting to <my.domain.com> : 443

The terminal just sits blank after that.  So, in my case, I like to add a & to the end of the command to run it in the background but that’s up to you.

That’s it!  You should now be able to access machines in your office.  Good luck!


Fedora + KDE 4

July 4, 2009

I made the jump!  I switched over my main desktop, that has been Windows since it’s creation, to Fedora 11 with KDE 4.  So far so great.  I love the apps and Compiz-Fusion is awesome.  I really like where KDE 4 is heading.  I’ve gotten everything setup just write.  Ran a test of all apps I need to work, like scanning with my HP all-in-one, DVD burning, Music/Video playing, etc.  Here’s an initial screenshot after some basic setup:

I will post back here as my journey continues on day to day use of Fedora.  I also have to teach my wife how to do all of her stuff!


Windows 7 Libraries

March 28, 2009

So, Windows 7 will include a new feature called Libraries. At first this feature may be confusing (or may look like nothing new at all) but, once understood, it is actually very nice. For this explanation I will only be using a Documents Library to explain the concept.
Here is a screenshot of the default Library after install:

 Windows 7 Default Library

At first it looks like the regular old My Documents of Windows XP or the User Home of Windows Vista. However each "Folder" that you see is a library. A library is a collection of folders spread throughout your hard drive and presented in one easy-to-find location. Right click on a library and click on select Properties to see all of the folders included in one library.
Here’s a shot of that dialog box:

Windows 7 Library Properties

In this picture I have added the C: drive by clicking on the Include a folder… button. This just opens a window to brose to and select a folder for inclusion in the library. Notice the My Documents folder has a check mark. This means it is the "Save Location". Basically, if I drag and drop a document into the Documents library it will be physically stored in the Save Location. This location can be changed by select the desired window and clicking the Set save location button.

So what’s so great about this? Well, you can now partition your hard drive or install a second hard drive and have that new location show up in your home document repository. You will no longer need to try and remember where things are stored. They are all in one place, yet they’re not!

Another great thing about the new Library is the way that you can share them. You share a specific library by selecting it and clicking the Share button on the toolbar.

Here’s a shot:

 Windows 7 Library Share

Sharing a library means that you don’t have to share every folder that contains your documents or specific files. If you share your library then everything is available. What’s even greater is the ability to create a new library called Share. You can create a library specifically for sharing. Share it once and add folders that you want to share to that library. That means you don’t have to share multiple folders and remember what you have shared and what it’s share name is. Share the library and simply add folders to that library as you decide you want to share something.

As you can see, the default libraries include a Documents, Music, Videos, and Pictures. The concepts shared above apply to all of the libraries that exist. This is one feature that puts Windows 7 ahead of all previous versions!


Flash Player 10 Linux 64 bit

March 1, 2009

A native 64 bit Flash Player 10 for Linux is in the works.  I am running it on Fedora 10 now and it works great!  Here’s the link:

http://labs.adobe.com/downloads/flashplayer10.html

Just download the package and untar it in the “/usr/lib64/mozilla/plugins” directory.  Be sure to remove any other Flash Players that you have previously installed.


Windows 7 Beta

January 1, 2009

Ok, I got a hold of a beta version of Windows 7.  I quickly installed it into my VirtualBox and started looking around.  I must say that I’m not totally convinced I love it yet.  The taskbar is completely different and maybe not for the better.  Instead of the task bar showing each window that is open it has a "button" for each program that it is open. If you have more than one window open for a certain program you still only get one button.  You have to click on it to see the name of the window open.  Not as intuitive as the old way if you ask me.  Anyway, here are a few screenshots:

Initial Desktop:

Windows 7 Default Desktop

 

Windows 7 Default Library:

Windows 7 Default Library

 

Windows 7 My Computer:

Windows 7 My Computer

 

Windows 7 Start Menu:

Windows 7 Start Menu

 

Windows Media Player 12:

Windows Media Player 12

 

There are just a few screenshots.  To be honest, there is going to be a pretty big learning gap to really get a grasp on some of the features in this version.  The taskbar is a huge change.  The whole "Library" thing is completely new as well.  Basically it’s like a database of your files.  Instead of looking directly at the folder structure you just see your files organized by type.  You can share your Library as well so file sharing appears to have completely changed.

I will continue to work with this version and continue to post updates here about it.  I hope to get a hold of each beta/release candidate up until release.  I will keep you posted on what I find and what like/dislike.


Shrink VirtualBox VDI files

December 27, 2008

By defualt a VirtualBox VDI file will grow as you use the virtual OS.  Well, if you’re like me, you use the VM for testing things and end up deleting a lot of files from your VM that you don’t need to keep there.  This can end up causing your VDI files to fill up your host hard drive.  To remedy this we need to shrink the files.  Here’s what to do.

Linux Guest:

1)  Delete all files that you no longer need and be sure to empty the trash.  You might also want to empty out what you can from your /tmp directory.

2)  Run this command:

cat /dev/zero > zero.fill;sync;sleep 1;sync;rm -f zero.fill

3) After the previous command finishes, shut down the VM.

4) From the host machine (no matter the OS) run this command:

VBoxManage modifyvdi {path to vdi file} compact

**If VBoxManage is not in your path you may have to launch it from the directory that contains that file**

Windows Guest:

1) Delete all files that you no longer need and be sure to empty the trash.

2) Run the disc defragment utility.

3) Download and execute this file on the guest OS:

http://www.feyrer.de/g4u/nullfile-1.02.exe

4) After the previous executable finishes, shut down the VM.

5) From the host machine (no matter the OS) run this command:

VBoxManage modifyvdi {path to vdi file} compact

**If VBoxManage is not in your path you may have to launch it from the directory that contains that file**

That’s it! Your VDI file is now compacted.

———————————————————————————————————————-

Edit 01/24/2009:

As of Virtualbox 2.1 the “modifyvdi compact” command no longer works.  Here is the output from my attempt:

[!] FAILED calling a->virtualBox->FindHardDisk2(filepath, hardDisk.asOutParam()) at line 226!
[!] Primary RC  = VBOX_E_OBJECT_NOT_FOUND (0×80BB0001) – Object corresponding to the supplied arguments does not exist
[!] Full error info present: true , basic error info present: true
[!] Result Code = VBOX_E_OBJECT_NOT_FOUND (0×80BB0001) – Object corresponding to the supplied arguments does not exist
[!] Text        = Could not find a hard disk with location ‘opensuse.vdi’ in the media registry (‘C:\Users\Josh\.VirtualBox\VirtualBox.xml’)
[!] Component   = VirtualBox, Interface: IVirtualBox, {339abca2-f47a-4302-87f5-7bc324e6bbde}
[!] Callee      = IVirtualBox, {339abca2-f47a-4302-87f5-7bc324e6bbde}
Error: Shrink hard disk operation is not implemented!

There is a bug report on this here.  I will update as soon as any fix has been found.

———————————————————————————————————————-

It’s back!  Sometime around version 3 the compact command has returned… Shrink away.