Linux - User friendly

From Blue-IT.org Wiki

Revision as of 10:21, 2 October 2007 by Apos (talk | contribs) (RPM packages)

The hints in this article mainly contain informations for the GNOME desktop, Debian and SuSE based systems.

Usefull programs

kill

Also on a linux system programs may hang or malfunction. But your linux system is still running o.k. The solution is to kill the program/process.

Every program running in linux has a certain program id. Some programs are running under multiple PID's, because they use more than one program instances. A single program is called process, it's id is called process id or PID.

There are two ways of killing a process:

  1. Within the graphical environment
  2. Using a terminal / console

xkill

The principle is: if you are killing the graphical application, you also kill all underlying (sub) processes.

This is done by simply pressing <ALT>+<F2>, then enter xkill. Your mouse pointer becomes a funny little pirate head. Pressing your right mouse button will kill the application under your curser, pressing the left will release xkill and do nothing.

Most desktop environments like gnome and kde have similar addons for their panels.

kill / top

If the problem is not solved - mostly reason for this is, that the program is running multiple processes - you have to open a terminal: xterm (almost every linux), gnome-terminal (gnome), konsole (kde). Now type top -u $USER for a comfortable environment or simply ps x -H -u $USER. -H shows, which processes are leading. If you are killing a leading' process, all subprocesses will be killed also.

In top, just press 'k' and enter the PID of the process. You are then ask to pass a number, that represents how to kill the process. -9 is sufficient for most cases.

If you like to kill processes manually in an xterm you identified via ps x -H , just enter kill -9 PID.

Mozilla - Firefox

  • Right click on your icon toolbox and add the following icons via drag and drop:
    • add new tab
    • print
    • ...
  • Change the default opening for pictures to your favorite application (e.g. /usr/gnome/bin/eog)

Horizontal scrolling

If you have a mouse, that has abilities for hoizontal scrolling.

In the address field of firefox simply enter:

about:config

Then search and double click for the entry:

mousewheel.horizscroll.withnokey.action

Change the value to

0

You are done.

Nautilus

  • Search for doc, sxw, png, tif, gif, ... files and assign your favorite application (e.g. /usr/gnome/bin/eog). You can do this by right klicking on them and choose the propertiers dialog to open. In the tab open with you'll find a list with the applications to assign.
  • In the program gconf-editor you can alter the behaviour of your desktop (apps->nautilus) or your favorite applications. But be careful what you change.

Acrobat Reader 7 - localized versions

RPM packages

Are avaiable at Adobe Website

Debian packages

From now on (--Apos 12:21, 2 October 2007 (CEST)) are avaiable at Adobe Website. Please choose the "different version" link for localised downloads.

Debian based systems

In the next few lines we do a little bit of terminal miracle. So be ready, open a terminal (konsole in KDE or gnome-terminal in Gnome desktop). Change to the directory where your browser downloads a file.

cd ~/WhereYour/Browser/Downloads

Known Bugs

The solution shown hear actually (--Apos 12:36, 19 September 2007 (CEST)) has two problems:

  1. There is no icon in the gnome-menu - you have to manually add it and assign the filetype .pdf and .PDF to /usr/bin/acroread. The latter is actually - if you used this manual to produce a debian/ubuntu package - a link to /usr/local/Adobe/Acrobat7.0/bin/acroread.
  2. Copy and paste seams not to be possible, since the characters transferred to the unix clipboard are not readable. This might be an UTF-8 problem on my ubuntu feisty?

Download a localized tgz package

We will build our own debian package.

If you are klicking on the little adobe reader sign at Adobe Website, you will be asked to

  • Select your version of Linux:

Choose the little link in the next line !

  • Choose a different version

When you click on choose a different version you can find all localized versions. Choose your language. Then choose to download your localized linux acrobat reader as a (.tar.gz) file.

Install Ldap2 and alien

apt-get install libldap2 alien fakeroot

Write a little script:

You can download the script here: build_acrobat.zip.

vim build_localized_adobe_reader_debian_package.sh
#!/bin/sh
#
# build_localized_adobe_reader_debian_package.sh
#
# Build a debian package for a localized Adobe Reader
#
if test $# -lt 3 
then 
  echo "Use three parameters."
  echo "  locale      - e.g. deu for german"
  echo "  version     - e.g. 7.0"
  echo "  subversion  - e.g. 9-1.i386"
  exit 1 
fi

# Three parmameters
# VER=7.0; SUB_VERSION=0-1.i386; LOCAL=deu
LOCAL=$1
VER=$2
SUB_VERSION=$3
ACRO_VERSION=${LOCAL}-${VER}.${SUB_VERSION} 
LIBDIR=/usr/lib
LDAP=$LIBDIR/libldap.so.2
LBER=$LIBDIR/liblber.so.2

cleanup () {
       # cleanup
       rm -rf usr
       rm -rf AdobeReader
       rm -rf AdobeReader_${ACRO_VERSION} 
}

# In case of Ctrl-C
canceled() {
    sync
    echo =================
    echo Program canceled.
    cleanup;
    exit 1
}

trap "canceled;" 2 15



if test -e $LDAP
then
       echo LDAP filecheck OK ...
else
       echo Please install ldap2 first.
       echo "   apt-get install libldap2"
       exit 1
fi


if test -e AdobeReader_${ACRO_VERSION}.tar.gz
then 
       echo Adobe filecheck OK ...
       cleanup;
else
       echo Wrong params for Adobe file.
       echo File AdobeReader_${ACRO_VERSION}.tar.gz does not exist.
       echo The following files might be correct.
       echo ;
       ls Adobe*.tar.gz
       echo ;
       exit 1
fi


tar zxvf AdobeReader_${ACRO_VERSION}.tar.gz
fakeroot mkdir -p usr/bin usr/local/Adobe/Acrobat${VER}
fakeroot tar -C usr/local/Adobe/Acrobat${VER} \
   -xvf AdobeReader/COMMON.TAR
fakeroot tar -C usr/local/Adobe/Acrobat${VER} \
   -xvf AdobeReader/ILINXR.TAR
fakeroot ln -s \
   /usr/local/Adobe/Acrobat7.0/bin/acroread usr/bin/acroread
fakeroot ln -s $LDAP \
   usr/local/Adobe/Acrobat7.0/Reader/intellinux/lib/libldap.so.2
fakeroot ln -s $LBER \
   usr/local/Adobe/Acrobat7.0/Reader/intellinux/lib/liblber.so.2
fakeroot tar zcvf AdobeReader_${ACRO_VERSION}.tgz ./usr
fakeroot alien AdobeReader_${ACRO_VERSION}.tgz
 
cleanup;

Run the script

sh build_localized_adobe_reader_debian_package.sh   7.0   9-1.i386   deu

Install the debian package

dpkg -i adobereader-YorLocale-7.0.Subversion-2_all.deb

Detailed Explanations how the script works

Unzip the file

tar xzvf AdobeReader_YourLocale-7.0.0.i386.tar.gz

Do the miracle

The filename AdobeReader_YourLocale-7.0.0.i386.tar.gz can be put apart to:

VER=7.0; SUB_VERSION=8-1.i386; LOCAL=YourLocale

E.g. the german version AdobeReader_deu-7.0.0-1.i386.tar.gz of acrobat reader has the major version 7.0, the the subversion 0-1, and was build to use with an i386 pc.


ACRO_VERSION=${LOCAL}-${VER}.${SUB_VERSION} 
tar zxvf AdobeReader_${ACRO_VERSION}.tar.gz
fakeroot mkdir -p usr/bin usr/local/Adobe/Acrobat${VER}
fakeroot tar -C usr/local/Adobe/Acrobat${VER} \
  -xvf AdobeReader/COMMON.TAR
fakeroot tar -C usr/local/Adobe/Acrobat${VER} \
  -xvf AdobeReader/ILINXR.TAR
fakeroot ln -s /usr/local/Adobe/Acrobat/bin/acroread \
  usr/bin/acroread
fakeroot ln -s /usr/lib/libldap.so.2 \
  usr/local/Adobe/Acrobat7.0/Reader/intellinux/lib/libldap.so
fakeroot ln -s /usr/lib/liblber.so.2 \
  usr/local/Adobe/Acrobat7.0/Reader/intellinux/lib/liblber.so
fakeroot tar zcvf AdobeReader_${ACRO_VERSION}.tgz ./usr
fakeroot alien AdobeReader_${ACRO_VERSION}.tgz 

The last step could take a few minutes. so be patient and get you a cup of coffee.

Cleanup

rm -rf usr rm -rf AdobeReader rm AdobeReader_LOCAL-7.0.0.tgz

Taken from Japanese Acrobat Reader .

Troubleshooting

Some things might be different in some debain based systems. Double check:

  • Did you use the correct parameters for the script
  • Right places an filenames of libldap.so.2 and liblber.so.2 both in you debian system and the downloaded

Multimedia, dvd and restricted codecs

General multimedia support

Ubuntu

A good introduction about related questions you'll find here:

Debian based

For Debian based distributions there are two answers:

This solves all problems releated to Windows audiocodecs, DVD playing, Flashplayer and others under debian.

Be aware and read carefully the legal rights notices about multimedia codecs and dvd protections - especially, if you are living in the USA.

SuSE

Please see here: SuSE 10 Multimedia files

Special Problems

Midi

Ubuntu e.g. won't play midi files per default. First install timidity and kmid

apt-get install timidity kmid

Then start the timidity server with

timidity -iA -B2,8 -Os

Start KMid and cinfigure it to use timidity alsa sequenzer for output.

Mplayer - DivX support

1. Purge totem (not toem xine) and totem-mozilla (plugins) from your PC. Locate all config files and delete them

locate totem | grep home/$USER | grep -v .desktop

The files should be in the .gconf directory.

2. Install totem-xine.

3. Go to the firefox plugins directory and make symlinks for divx to the mozilla plugins directory:

cd /usr/lib/firefox/plugins/
ln -s /usr/lib/mozilla/plugins/mplayerplug-in-dvx.xpt
ln -s /usr/lib/mozilla/plugins/mplayerplug-in-dvx.so

4. Switch on divx support in mplayers configuration dialog. Therefore just open a webpage with a quicktime or wmv movie and rightclick it for configuration.

5. Check you configuration on [1] or [2].

MPlayer - Opera support

Thanks to [3] in feisty this is very easy:

apt-get install mozplugger

This copies the needed files into /usr/lib/mozilla/plugins.