Wednesday, December 26, 2007

Ubuntu 7.10 Gutsy 64 bit - Desktop HOWTO

This tutorial describes how to configure a Ubuntu/Kubuntu 64 Bit Desktop for daily use.

Multimedia Codecs, Java, Flash

Flash and Java sun plugin do not work on Ubuntu 64 bits after running this comand, but fonts and codecs should work fine.

# java , fonts, codecs
# The ubuntu-restricted-extras package installs the Sun JDK, which requires the user to accept the Sun License.
sudo apt-get install ubuntu-restricted-extras

Java, Skype 1.4, Acrobat, GoogleEarth, Proprietary and Others

On Ubuntu goto to System->Administration->Software Sources->Third Party Software and select "Add". You can also edit /etc/apt/sources.list and add lines to the end of the file.

# Canonical repository (VMWare and DB2 Express)
# enable this on the Software Sources Management tool (tab third-party) from ubuntu or kubuntu menu

# Google Linux repository
deb http://dl.google.com/linux/deb/ stable non-free

# Miro - The free open-source video platform.
deb http://ftp.osuosl.org/pub/pculture.org/miro/linux/repositories/ubuntu gutsy/

# Virtual Box
deb http://www.virtualbox.org/debian gutsy non-free

# MediaTomb
deb http://apt.mediatomb.cc/ feisty main

# medibuntu repositories
# run this command to add this repository
sudo wget http://www.medibuntu.org/sources.list.d/gutsy.list -O /etc/apt/sources.list.d/medibuntu.list

To get the GPG key for Picasa and Virtual Box

# Google Key
wget -q -O - http://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

# Virtual Box Key
wget -q http://www.virtualbox.org/debian/innotek.asc -O- | sudo apt-key add -

# medibuntu Key
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update

# Mediatomb Key
wget http://apt.mediatomb.cc/key.asc -O- -q | sudo apt-key add -

For installation execute the following commands:

# Update the index of your repositories
sudo apt-get update


# Mediatomb UPnP MediaServer with a nice web user interface. Share your media with PS3 and XBOX devices.
sudo apt-get install mediatomb

# Acrobat Reader
sudo apt-get install acroread acroread-escript acroread-plugins

# Google Earth
sudo apt-get install googleearth

# Skype
sudo apt-get install skype-static

# Miro - The free open-source video platform.
sudo apt-get install miro

# help on configuration of proprietary drivers
sudo apt-get install restricted-manager

# KDE download manager
sudo apt-get install kget

# OSS voip, softphone, video conference tools
sudo apt-get install ekiga wengophone twinkle

# image and publishing tools
sudo apt-get install krita scribus inkscape karbon

# Kexi is considered as a long awaited Open Source competitor for Microsoft Access, Filemaker and Oracle Forms.
# Kivio is an easy to use diagramming and flowcharting application
# KPlato is a project management application.
sudo apt-get install kplato kivio kexi

### Advanced usage
# Very Fast Virtual Machine (faster than VMWare) and a very easy GUI
sudo apt-get install virtualbox

# visual partition editor
sudo apt-get install gparted

# Sun Java 64 bits, but does not include a firefox java plugin
sudo apt-get install sun-java6-jre

# a firefox java plugin that does not work very well
sudo apt-get install icedtea-java7-plugin

# If you need VPN support via knetworkmanager/network manager
sudo apt-get install network-manager-openvpn network-manager-pptp network-manager-vpnc

# To change the default JVM run the command below and select the relevant version.
# If you only have one JVM this step should not be required.
sudo update-alternatives --config java

Ubuntu Gutsy advanced stuff for Entreprise Software

This tutorial describes some advanced configuration for enterprise wireless network that is required for the place I work, and how to add some RPM compatibility to Ubuntu/Kubuntu systems.

TN3270 Emulation

Install this package as a replacement for TN3270 emulation in IBM Personal Communications

sudo apt-get install x3270

Bash (K|X|Ed)ubuntu Fix
As from Feisty Fawn (7.04) the default shell is Dash, not Bash. This can cause problems with installing things like IBM Websphere. To change back to Bash, perform the following commands: In the dialog select "No" to switch to the bash or select "Yes" to switch to the dash.

sudo dpkg-reconfigure dash
IBM DB2 UDB Database

Install
sudo dpkg-reconfigure alien
In general for IBM products you should also perform the steps on section:

* Bash (K|X|Ed)ubuntu Fix
* Installing on (K|X|Ed)ubuntu using RPM
of this tutorial.

To install DB2 UDB database on a ubuntu system read the official tutorial on The Linux Documentation Project web site. http://tldp.org/HOWTO/DB2-HOWTO/index.html

Enterprise Wireless in Gutsy

LEAP Authentication in wireless
Both (K|X|Ed)ubuntu Gutsy network manager and knetworkmanager support LEAP.

802.1x (EAP_TLS) Authentication in wireless
Ubuntu Gutsy network manager and knetworkmanager do not support 802.1x (EAP_TLS).

* Get your own PKI Digital Certificate
* Request an 802.1x (EAP_TLS) Wireless Client ID
This method allows you to connect to the enterprise network using userid + a certificate.

802.1x (EAP_TLS) - How to connect to EAP_TLS wireless
Since network manager or knetwork manager GUI does not support EAP_TLS auth mechanism, you can only connect to the network using the command line wpa_supplicant.

create file ~/tools/work_wireless/wpa_supplicant_work.conf
# ap_scan set to 2 is very important to make the wireless work in EAP_TLS environment
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=2
update_config=1
fast_reauth=1
network={
ssid="WORK_SSID"
scan_ssid=1
key_mgmt=IEEE8021X
eap=TLS
identity="USERID"
private_key="PATH_TO_CERTIFICATE_FILE"
private_key_passwd="CERTIFICATE_PASSWD"
}
create file ~/tools/work_wireless/enable_work_wireless.sh

# make sure you only have one wpa_supplicant and one dhclient process per device
# some times you need to start it twice
sudo wpa_cli terminate
sleep 1
sudo ifconfig ath0 down
sudo ifconfig eth0 down
sudo killall wpa_supplicant
sudo killall dhclient3 dhclient
sleep 1
sudo wpa_supplicant -c${HOME}/tools/ibm_wireless/wpa_supplicant_ibm.conf -Bw -Dwext -iath0
sleep 1
sudo dhclient ath0
run the shell file when ever you need to connect to work wireless.

Command line Wireless tools

To help figuring out what auth is support on your site
# list your ap and display auth info
iwlist scan
# For logs I usually kill NetworkManager and then run:
sudo NetworkManager --no-daemon
# Or
sudo NetworkManager --no-daemon > filename 2>&1
Development tools

# minimal dev stuff
sudo apt-get install build-essential devscripts fakeroot pbuilder
#C/C++/Shell KDE KDevelop IDE
sudo apt-get install build-essential kdevelop graphviz-cairo doxygen doxygen-doc cpp-doc c++-annotations gcc-doc glibc-doc libstdc++6-doc make-doc m4-doc stl-manual htdig htdig-doc gettext sgmltools-lite kbabel exuberant-ctags khelpcenter ark autoconf automake libtool kdevelop-doc cmake konsole ruby python alleyoop kcachegrind kcachegrind-converters kprof valgrind


Example how to build a deb package from source Add the source feeds using the adept GUI

sudo apt-get source knetworkmanager
sudo apt-get build-dep knetworkmanager
# include debug info in the binary
export DEB_BUILD_OPTIONS=nostrip
cd knetworkmanager-0.2ubuntu1
# build
sudo debuild
# lets you rebuild without starting all over, (no clean).
sudo debuild -nc
cd ..
sudo dpkg -i network-manager-kde_0.2ubuntu1-0ubuntu1_i386.deb


Installing on Ubuntu using RPM


Introduction

In Ubuntu is very easy add support for RPMs. The pre-reqs are required by IBM linux software, and probably other Redhat/Suse rpms.

Pre Reqs

# ***************************************************************************************
# The packages below install pre-reqs necessary for the common IBM rpms:
# python, perl, glade.so, pango.so, libstdc++.so.5, libXm.so.3
# ***************************************************************************************
# Gutsy
sudo apt-get install rpm
sudo apt-get install libfreetype6
sudo apt-get install python2.4-glade2
sudo apt-get install python2.4-gtk2
sudo apt-get install libstdc++5
sudo apt-get install libglade-gnome0
sudo apt-get install lesstif2
sudo apt-get install libmotif3 libmotif-dev
Install
sudo mkdir /var/lib/rpm
sudo rpmdb --initdb

# use rpm -iv to install a rpm
# use rpm -ev package to remove a rpm
# use rpm -qa to list all installed RPMs
# use rpm -ev package to remove a rpm

How to fix a xorg configuration
# Reply to all the questions
sudo dpkg-reconfigure xserver-xorg

# automatic
sudo dpkg-reconfigure -phigh xserver-xorg


Warning :)

I use these posts for self reference, so these tutorials might not be easy to follow.

Monday, December 24, 2007

Ubuntu 64 Bits on Shuttle SG33G5

Specs

Q6600 Quad core
2 SATA seagate 750Gb
1 DVD burner memorex
2 2Gb DDR2 Corsair


1 - Booting after install

I found some problems with Gutsy, installing it from the CD, it did not boot from the HD after installation was done.
When I changed the Bios from IDE to ACHI it worked fine.

2 - USB DVI switcher makes Gutsy stop booting process.

I have a DVI monitor switch for 4 computers with USB/mouse/sound switching support.
Gutsy does not boot if the USB cable is connected, it gets stuck after loading the kernel. I removed the USB cable from the DVI switcher, Plug in just a USB keyboard to the box. Booted again, and gutsy starts fine. After gutsy is started I plug the DVI switcher and it works just fine.

3 - Gutsy 32bit can only see 3.5Gb of memory. This is related with 32 bit limitations.

Fix: I installed the 64 it's version and all is fine.

Flash will give you some pain to get it working on gutsy 64 bit. So I used this method:
http://ossnotebook.blogspot.com/2007/12/ubuntu-710-gutsy-64-bit-mini-how.html

4 - Dual screen monitor

Run xrandr and add this to xorg.conf file

Section "Screen"
SubSection "Display"
>> Virtual 2048 2048

This command enabled Dual monitor support:
xrandr --output VGA --mode 1920x1200 --pos 0x0 --output TMDS-1 --mode 1280x720 --pos 0x1200

Helpfull link:
http://www.thinkwiki.org/wiki/Xorg_RandR_1.2

5 - Problems I still need help

- Have the HDMI port detect my HDTV native resolution
- Have sound output thru the HDMI cable directly to the TV.

6 - Updates

On Ubuntu 8.04 Hardy the sound thu HDMI works, it is detected as another alsa sound card.
I still have problem detecting 1080i resolution of my HD TV, but 720p works great.
And the new Monitor Resolution Settings tool works great to enable/disable and position the screens and select resolutions.

Ubuntu 25.04 desktop review and apps to install

Ubuntu 25.04 This new version of Ubuntu installs without a glitch in my ThinkPad X1 and Yoga 920, I setup this device with dual boot with wi...