27 May 2010

Firefox printing woes

So I was working on a webpage that included alot of generated content (aka content were I could not control the length) and firefox kept putting the page breaks in the middle of content instead of just before or just after. I tried implementing page-break-before: avoid; inside of the paragraph. I also tired page-break-inside: avoid;. However, both were to no avail.

The all at once it hit me! I was using floats to do the page layout with my divs! So I just switched from float:left; to display:inline-block; Then with a couple other minor changes to widths, Firefox was correctly inserting page breaks!

16 March 2010

Firefox 3.6 on Ubuntu Intrepid Ibex (8.10)

Here are the steps to install Firefox 3.6 on Ubuntu Intrepid Ibex (8.10)

  1. sudo vi /etc/apt/sources.list

  2. Add the following:
    deb http://ppa.launchpad.net/mozillateam/firefox-stable/ubuntu intrepid main
    deb-src http://ppa.launchpad.net/mozillateam/firefox-stable/ubuntu intrepid main

  3. Get the gpg key: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE49EC21

  4. Update apt-get: sudo apt-get update

  5. Install firefox 3.6: sudo apt-get install firefox


For other versions of Ubuntu check here:
Ubuntugeek

Ubuntu VNC

Yesterday, I decided that I wanted to add VNC to my Xubuntu server so that I could get a remote GUI as well as my normal SSH.

Throughout my trials and tribulations getting VNC installed, I learned one very important fact: there are 2 types of VNC. The first is one that shares your current X11 session. This is like remote desktops that tech support would use to fix problems. The second is one that spawns a new X11 session that is maintained by the vncserver.

Here is how to install the remote desktop version (from lifehacker):

1. Install packages. Code: sudo apt-get install x11vnc vnc-java
2. Set up a password for clients. Code: x11vnc -storepasswd
3. Open up ports 5800 and 5900 on your firewall
4. Run the terminal command: x11vnc -forever -usepw -httpdir /usr/share/vnc-java/ -httpport 5800 and add it for auto-starting in future sessions


Here is how to install the vncserver that spawns new sessions:

1. Install packages. Code: sudo apt-get install tightvncserver vnc-java
2. Set up a password for clients. Code: vncpasswd
3. Run the terminal command: tightvncserver :1 -geometry 1024x768 -depth 24 -httpd /usr/share/vnc-java/ -httpport 5800


Now since we enabled the java client, you can connect by just opening up a java-enabled browser and going to http://:5800
However, it appears to do some weird coloring/dithering. You can also connect a full vncviewer to :5901

Warnings:
  • VNC is not encrypted and should not be streamed over the internet without tunneling through a secure protocol (e.g. ssh).
Advanced Setup:


Drag and Drop not working:
  • To fix it run the below
  • sudo apt-get install libgtk2.0-0=2.20.0-0ubuntu4 libgtk2.0-bin=2.20.0-0ubuntu4 libgail18=2.20.0-0ubuntu4 libgail-common=2.20.0-0ubuntu4 gtk2-engines-pixbuf=2.20.0-0ubuntu4

28 February 2010

Compaq CQ61-420US Review

I have recently purchased a Compaq CQ61-420US from Staples for $399.

Specs:
  • Official Specs on HP's website
  • AMD Athlon II X2 M320 2.1GHz
  • 3GB DDR2 Memory
  • ATI Mobility Radeon HD 4200 Graphics (shared memory)
  • 250GB 7200 RPM Hard Drive

Pros:
  • Price
  • Keyboard has a dedicated number pad
  • Large bright 15.6" Display
  • Built in Wireless N support
  • Windows 7
  • Responsive, quick web browsing
  • Touchpad switch to turn off touchpad when using external mouse
  • Processor supports virtualization

Cons:
  • No latch to keep screen closed
  • Screen has a shiny finish instead of matte
  • Microsoft Office Nagware
  • Norton Anti-Virus Nagware
  • 3 DVD writable media to create backup disks
  • Keyboard has half size arrow keys
  • Keyboard is not backlit
  • No HDMI Out
  • No Bluetooth
  • No built in webcam
Overall:
I am very happy with my purchase. Most of the negatives are just things that are omitted to just keep the price low. The laptop excels at web browsing and word processing. It has average battery life at about 2 hours.

12 February 2010

Word to PDF conversion removes links

A fellow co-worker of mine was the problem that when converting a Word document to Adobe PDF a link to a webpage would become no longer clickable. Well as it turns out when using the File->Print to PDF option all links are removed and only the links that look like www.example.com are then made clickable.

However this is when we came across a second problem. Using the 'Adobe PDF'->'Convert to Adobe PDF', Adobe PDFmaker would then stop responding after Processing Tag Information. The correction for this was quite simply unchecking the option 'Enable accessibility and reflow with tagged PDF' in 'Adobe PDF'->'Change Conversion Settings'.

The document then converted like a charm, links and all.

08 February 2010

How to repair a Windows XP installation

I came across a problem where windows XP would not boot, but would blue screen giving me a stop error about a registry hive file being un-readable. I could boot into safe mode with networking by pressing F8 at boot, but even after using system restore the system would boot normally once and then the problem would reappear.

So I created a slipstreamed XP SP3 CD using Autostreamer and then followed these simple steps:
  1. Place the CD in your CD Drive.
  2. Reboot or Turn on your PC.
  3. Press a key when prompted to boot from CD.
  4. Press ENTER to setup windows. You DO NOT want to use the Recovery Console.
  5. Accept the License and have setup search for existing installs.
  6. Select the windows installation directory (normally C:\WINDOWS).
  7. Hit 'R' to repair this installation. If this option does NOT appear Exit Setup immediately!
Now since I was using a SP3 slipstreamed CD, I got several file not found errors that I just skipped, but the install worked great!

Warnings:
  • This will require you to type in your Windows CD Key, so make sure you have it ready before you begin.
  • Always backup your data before proceeding!