Linux - User friendly

From Blue-IT.org Wiki

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

Before you look for solutions here, you should have made yourself familiar with you default desktop environment. Most problems arise, because people don't know what they already have.

So go ahead and read the help files or consider watching the growing introductions via screencasts on the web.

Desktop

Fonts

Compiz settings manager

Install the gnome-compiz-manager to fine tune settings and hotkeys for your desktop:

apt-get install gnome-compiz-manager

Settings for compiz via gconf

gconftool --set \
/apps/compiz/general/allscreens/options/active_plugins \
--type list --list-type string \
'[gconf,png,svg,decoration,wobbly,fade,minimize,cube,\
  rotate,zoom,scale,move,place,switcher,screenshot,resize]'

You can use compizconfig-settings-manager for doing the same.

apt-get install compizconfig-settings-manager

Start the "Advanced Desktop Effect Settings" in teh systems menu or with

ccsm

Hotkeys for programs in Gnome

This can only be achieved with the gnome configuration editor.

  • Open the gconf-editor
  • locate apps > metacity > global_keybindings
  • the entries run_command_1 to run_command_12 can hold several characters for the <ALT> key, e.g. enter "F" into run_command_1' for a resulting <ALT>+<F>.
  • locate apps > metacity > keybinding_commands. Advice the command, e.g. command_1 gets the value firefox

This opens firefox, if you press <ALT>+<F>.

Xgl on Ubuntu

After install xserver-xgl on ubuntu the following message appears:

Xgl server setup changed

"The Xgl server will now be started automatically next time you login. It is no longer necessary to use any special X session to start Xgl, and such sessions will likely fail to work properly. Please select a regular session from your session manager next time you log in. To disable Xgl autostart for this user, create a file named ~/.config/xserver-xgl/disable."

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 8 - localized versions

All localized versions are available as "rpm", "debian" and "tar.gz" packages ;) on the official website - --Apos 22:55, 12 December 2007 (CET)

Look for the product "Acrobat" and the for the little icon that says "Get Acrobat Reader".

Acrobat Reader 7 - localized versions

Osolete with Acroread 8 - --Apos 22:55, 12 December 2007 (CET)

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.

  • Gutsy: only english version of Reader 8.x is working - Apos 12:23, 2 October 2007 (CEST)

Compile source package on debian based systems

  • Does not work for ubuntu gutsy - use the official deb package from the website instead. Apos 12:23, 2 October 2007 (CEST)

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 here 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 and/or Debian



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

For Debian based distributions there are two answers:

  • Automatix (due to older post this might break your system for feisty and former versions of ubuntu, but automatix for ubuntu gutsy will work --Apos 22:51, 26 November 2007 (CET))
  • Easy Ubuntu

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:

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.

ManDVD

Links

Time of writing: --Apos 21:11, 2 December 2007 (CET)

Error in dvd-slideshow

Search for the folowing line in /usr/bin/dvd-slideshow

vim /usr/bin/dvd-slideshow
ffmpeg -i "$tmpdir/audio1.wav" -y -vn -ab 192

and change "-ab 192" to "-ab 192k"

 ffmpeg -i "$tmpdir/audio1.wav" -y -vn -ab 192k