Monday, 13 April 2009

How to Make your windows show up on the bottom in Ubuntu

Sometimes you will accidently add an applet to the bottom where your windows you go to when you minimize, or you may accidentlly delete the applet that displays the windows. This can be a major problem because, other than being extremely annoying it will cause you to not be able to maximize a window and have to reopen the application everytime you minimize it. Even worse it can casue you to lose your work if you are working in a program such as Open Office or GIMP.


First open up a terminal window: Applications > Accessories > Terminal

Enter the following command

killall gnome-panel

If there was an applet blocking your windows list that should have resolved the problem. If not read on.

Now Right click on the bottom panel and click "Add to Panel"

Scroll down to the bottom and click "Window List" then click add and click close.

Your windows should appear now.

Read More......

Sunday, 12 April 2009

How to Install Microsoft Office 2007 on Ubuntu Intrepid

This tutorial will explain How to Install Microsoft Office 2007 on Ubuntu Intrepid

Install Wine 1.16 from the old .deb archive

Open terminal and type the following command

winecfg

in a terminal and make sure the Windows version is set to XP

Run your Office setup in wine.

Using the command line, cd to the directory where your Office setup files are and run:

wine setup.exe

Using the GUI: Navigate to your Office setup files, right click on the setup.exe file and choose open with "wine windows program loader."

Click customize in the setup window and disable any features you do not want, and change any settings (name, organization, etc.), then click install.

Once the installation is complete close the window, and navigate to /home/username/.wine/drive_c/Program\ Files/Microsoft\ Office/Office12 and run any office programs to test (WINWORD.EXE, EXCEL.EXE, POWERPNT.EXE, MSPUB.EXE, etc.).

Re-enable the wine repository (steps to install repository here: http://www.winehq.org/download/deb), and update wine to the latest version.

Now just create links to these executables for easy access. Type this in the command box when making links to wine programs

wine "/pathtoexecutable/"

(replace "pathtoexecutable" with a valid file path).

Read More......

Tuesday, 7 April 2009

How to Install Hercules Classic Silver Webcam in Ubuntu 8.10

This tutorial will explain you how to Install Hercules Classic Silver Webcam in Ubuntu.This how-to assumes that you have not previously tried to load the gspca from source. If you have, you will need to clean up all the drivers that were installed previously.

For starters, you will know you have this webcam if, when you run the command:

$lsusb | grep 06f8:3004

You get:

Bus 001 Device 003: ID 06f8:3004 Guillemot Corp.

Since we will be build from source, we need to make sure we have all the tools:

$ sudo aptitude install build-essential

First we need to have a place to download and keep the source code. In this case we create a directory /opt/src for this, but you can just as easily use another location

$ sudo mkdir /opt/src

$ sudo chmod 777 /opt/src

$ cd /opt/src

The gspca source lives in the v4l-dvb project. This project uses Mercurial to allow for easy updating of source. So let's install Mercurial


$ sudo aptitude install mercurial

Using mercurial, download the most recent version of v4l-dvb:

$ hg clone http://linuxtv.org/hg/v4l-dvb

This will actively pull all the most recent source code for this project into a newly created directory called v4l-dvb. If you ever need to update the source just go to that directory and type

$ hg pull -u http://linuxtv.org/hg/v4l-dvb

Before we compile, we need to clean up any gspca stuff already on the system from the original install of 8.10. The drivers live in the specific folders for your kernel under /lib/modules. You can identify your kernel by

$ uname -r

and locate the /kernel/drivers/media/video/gspca folder. Or, you can use the below command to quickly remove them

$ sudo rm -r /lib/modules/`uname -r`/kernel/drivers/media/video/gspca

There are some modules we need to make sure are not loaded as well before compiling

$ sudo rmmod videodev

Check to see if any gspca modules are currently loaded

$ lsmod | grep gspca

If any are found, remove them by name:

$ sudo rmmod (name of mod here)

Now we are ready to compile. Go into the v4l-dvb directory

$ cd v4l-dvb

And compile:

$ make

This will take about 10 mins or so and will compile all the v4l drivers including TV capture card drivers and other stuff. I'm sure there's a way to only compile what we need, but I'm not smart enough to figure it out.

Once it's done compiling, install it with

$ sudo make install

Restart your system using the following command

$ sudo reboot

Once it reboots, your camera should be recognized. Run:

$ dmesg

and look for something like:

gspca: main v2.4.0 registered
gspca: probing 06f8:3004
sonixj: Sonix chip id: 11
spca: probe ok
gspca: probing 06f8:3004
gspca: probing 06f8:3004
usbcore: registered new interface driver sonixj
sonixj: registered

If you tried to use Skype, You may got very colorful static instead of a picture of Yours Truly. Starting Skype with:

$ LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype

fixed it.

A way to start Skype from the menu instead of command line using the following procedure

$ sudo gedit /usr/local/bin/skype

and paste the following two lines into the new file

#!/bin/bash
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype

save, then make it executable

$ sudo chmod a+x /usr/local/bin/skype

That's it!

Read More......

Sunday, 5 April 2009

Autodetecting and configuring multiple monitors in Ubuntu

A common problem for laptop users is that they use various display configurations. When traveling they use only the internal LCD panel, but in the office they use internal LCD panel + external display. It is pain to configure external display manually each time you plug it in.

This how to will give you instructions to create a shell script which will configure displays and Gnome panels according to the plugged in displays.

Install magnificent disper tool

Edit your sources.list file

sudo gedit /etc/apt/sources.list

add the following lines

deb http://ppa.launchpad.net/wvengen/ppa/ubuntu intrepid main
deb-src http://ppa.launchpad.net/wvengen/ppa/ubuntu intrepid main

Save and exit the file

Update the source list using the following command

sudo apt-get update

Install disper tool using the following command

sudo apt-get install disper

Note:- Currently disper supports nVidia only, but the author claims ATI support is possible to add by contributions.

Run the following command to autodetect displays and set the extended desktop

disper --displays=auto -e

Dispering displays is not enough. You probably want to move Gnome panels to your primary (external) display when it is plugged in.

Gnome architects have been clever. Gnome panel stores its settings in gconf registry. gconf registry is not just dummy storage backend; changing these values immediately reflect changes in applications using the registry. One of these applications is gnome-panel. This means that we can move the panels by editing its registry setting related to the monitor configuration.

Using gconf-editor command the critical settings can be found under:

/apps/panel/toplevels/bottom_panel_screen0/monitor
/apps/panel/toplevels/top_panel_screen0/monitor

Value = 0 -> panels on internal LCD
Value = 1 -> panels on External display

Let's make a little command line script which will

a) Detect and configure monitors

b) Move gnome-panels according to the connected display count

Open monitor.sh file

sudo gedit monitor.sh

add the following lines save and exit


#!/bin/sh
#
# Detect displays and move panels to the primary display
#

# disper command will detect and configure monitors
disper --displays=auto -e

# parse output from disper tool how many displays we have attached
# disper prints 2 lines per displer
lines=`disper -l|wc -l`

display_count=$((lines / 2))

echo $display_count

echo "Detected display count:" $display_count

# Make sure that we move panels to the correct display based
# on the display count
if [ $display_count = 1 ] ; then
echo "Moving panels to the internal LCD display"
gconftool-2 \
--set "/apps/panel/toplevels/bottom_panel_screen0/monitor" \
--type integer "0"
gconftool-2 \
--set "/apps/panel/toplevels/top_panel_screen0/monitor" \
--type integer "0"
else
echo "Moving panels to the external display"
gconftool-2 \
--set "/apps/panel/toplevels/bottom_panel_screen0/monitor" \
--type integer "1"
gconftool-2 \
--set "/apps/panel/toplevels/top_panel_screen0/monitor" \
--type integer "1"
fi


Add monitor.sh to your Startup Programs in System > Services menu, so it will be run each time you login to Gnome.

Read More......