HOWTO KDE Desktop for the end-user

From Gentoo Linux Wiki

Jump to: navigation, search

Image:Klogo-official_100x100.png

K Desktop Environment

Location: HOWTO KDE Desktop for the end-user

KDE Pages

Install

  • KDE Desktop

Applications

Upgrading

Tips

Other


edit

[edit] Stable KDE

Before emerging kde, set languages for internationalization, i.e. for English and French Canadian:

File: /etc/make.conf
LINGUAS="en fr_CA"
# use kdeenablefinal only if you have a lot of memory
USE="hal kdeenablefinal"
Note: Please refer to HOWTO Update KDE 3.3 to KDE 3.4 for more information on installing KDE, especially for versions equal to or higher than 3.4.
Note: Do not set the use flag "kdeenablefinal" if using distcc. See USE Flags explained for more info.
Code: Emerge KDE & auto-mounting components
emerge kde
emerge dbus hal
rc-update add dbus default
rc-update add hald default
echo "exec startkde" > ~/.xinitrc

Setup the display manager

File: /etc/conf.d/xdm
DISPLAYMANAGER="kdm"
Code: Setting KDM to run automatically
rc-update add xdm default

Further reading is available in the Gentoo Handbook.


[edit] Unstable KDE

If you want the unstable kde, then instead of emerging the kde package, set your package.keywords file accordingly, then emerge kde-meta.

First of all you have to add only one line to /etc/portage/package.keywords:

kde-base/kde-meta

And then execute this script:

Code: unmask_kde-meta.sh
 #!/bin/bash
 retval=0
 emerge -vp kde-meta &>/dev/null
 retval=$?
 while  [[$retval == 1]] ; do
        package=$(emerge -vp kde-meta |grep "^\-" | cut -f 2 -d " " | head -n 1)
        atom="~"
        echo "unmasking package $package"
        echo "$atom$package" >> /etc/portage/package.keywords
        emerge -vp kde-meta &>/dev/null
        retval=$?
 done

or

Code: Emerging Unstable KDE
cd /usr/portage  # or wherever your PORTAGE_DIR is
for x in kde-*/*
  > do
  >    echo "${x} ~<arch>" >> /etc/portage/package.keywords #Replace <arch> with your architecture.
  > done
echo "sys-libs/pam ~<arch>" >> /etc/portage/package.keywords #Replace <arch> with your architecture.
echo "sys-apps/ivman ~<arch>" >> /etc/portage/package.keywords #Replace <arch> with your architecture.
emerge kde-meta

VeqIR's note: I have observed that it is best to run the second code block before the first, as the first code block sometimes tries to insert a line consisting of only "~" into package.keywords. If someone could verify this, it'd be appreciated.

Anupamsr note: I used this command to add every thing related to KDE 3 (i.e., all the stuff related to version number 3.x.x) It is to be noted that it is not calculated usig dependencies and so is not totally automatic. I used it to be completely sure.

Code: Unmasking KDE
 #!/bin/bash
 cd /usr/portage/kde-base
 ls */*3.*.* | sed 's/.ebuild//g' | sed 's/\// /g' | awk '{print "kde-libs/"$2" ~x86"}' | sed 's/-3.[0-9].[0-9]/ /g' | sed 's/-r[0-9]//g' | sed 's/  / /g' | uniq >> /etc/portage/package.keywords
 cd -


I just patched the first script a bit and it works for me now. Use it the same way as the first script, put "kde-base/kde-meta" into /etc/portage/package.keywords, and run it. This version of the script needs app-portage/eix. If anyone minds, just build a replacement for the eix command line in the workaround function. I've been a bit lazy, so it'll need a good bit of cleanup yet.

Code: unmask_kde-meta.sh
 #!/bin/bash
 retval=0
 START_PACKAGE="kde-base/kde-meta"
 EMERGE_COMMAND="emerge -vp --nospinner --color=n --quiet ${START_PACKAGE}"
 COMMENT_TO_ADD="# line added by $0, PID $$"
 ACCEPT_FLAG="~x86"

 function workaround {
 	package="~$(ACCEPT_KEYWORDS=${ACCEPT_FLAG} eix --nocolor --pure-packages --format-compact  '<category>()/<name>()-<bestshort>()' --compact -e $1 |sed -e 's/(~)//')
 }

 package="~some-category/some-package-0.0.1"
 pname="some-category/some-package"
 ${EMERGE_COMMAND} &>/dev/null
 retval=$?
 while  [[ $retval == 1 ]] ; do
 	lastpackage=$package
 	package=$(${EMERGE_COMMAND} | grep "\-" | cut -f 2 -d '"' | head -n 1)
 	if [[ "a$package" == "a" ]] ; then
 		echo "Error in the script? \$package would be empty."
 		exit -2;
 	fi
 	if [[ "$package" == "$lastpackage" ]] ; then
 		lastpname=$pname 
 		pname=$(echo "$package" |sed -e 's/\(\~\)\(.*\)\(\-[0-9].*\)/\2/')
 		workaround "$pname"
 		if [[ "$pname" == "$lastpname" ]] ; then
 			echo -e "The package cannot be merged, even after adding it to \
 your package.keywords file. \n 
 That probably means you need to check package.mask. \n \
 Please investigate $pname"
 			exit -1;
 		fi
 		
 		echo "Ok, that didn't work. Trying to add the latest available unstable version $package to package.keywords in   case the depending ebuild uses deprange."
 	fi
 	echo "adding package $package to /etc/portage/package.keywords"
 	echo "$package ${ACCEPT_FLAG} ${COMMENT_TO_ADD}" >> /etc/portage/package.keywords
 	${EMERGE_COMMAND} &>/dev/null
 	retval=$?
 done

 


[edit] Links

Personal tools