Archive:Getting Started/Run/Full Session: Difference between revisions

From KDE TechBase
(minor updates)
m (Reverted edits by KennethMartinez (talk) to last revision by AnneW)
 
Line 94: Line 94:


[[Category:KDE4]]
[[Category:KDE4]]
== New Toilet System Transform Waste into Electricity ==
Scientists from Nanyang Technological University (NTU) have invented a new toilet system that will turn human waste into electricity and fertilisers and also reduce the amount of water needed for flushing by up to 90 per cent compared to current toilet systems in Singapore.
[[http://goodvillenews.com/New-Toilet-System-Transform-Waste-into-Electricity-zvQBzk.html New Toilet System Transform Waste into Electricity]]
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
== Teen Told to Clean His Room Finds Winning Lotto Ticket ==
A teenager from Midlothian has cleaned up on the National Lottery after finally cleaning up his messy bedroom. Ryan Kitchin scooped more than 50,000 after finding a winning lottery ticket in the room that his mother had been asking him to clean for weeks.
[[http://goodvillenews.com/Teen-Told-to-Clean-His-Room-Finds-Winning-Lotto-Ticket-AfWho8.html Teen Told to Clean His Room Finds Winning Lotto Ticket]]
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
== Why Have Good When You Can Have Better? ==
As I look back on my life, I realize that every time I thought I was being rejected from something good, I was actually being re-directed to something better. Steve Maraboli
[[http://goodvillenews.com/Why-Have-Good-When-You-Can-Have-Better-PdMtIo.html Why Have Good When You Can Have Better?]]
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
== How To Make Peace With Imperfection ==
If you look closely at a tree youll notice its knots and dead branches, just like our bodies. What we learn is that beauty and imperfection go together wonderfully. Matthew Fox
[[http://goodvillenews.com/How-To-Make-Peace-With-Imperfection-AOuD91.html How To Make Peace With Imperfection]]
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
== Awakening Our Collaborative Spirit ==
The physicist, David Bohm, while researching the lives of Einstein, Heisenberg, Pauli and Bohr, made a remarkable observation. Bohm noticed that their incredible breakthroughs took place through simple, open and honest conversation. He observed, for instance, that Einstein and his colleagues spent years freely meeting and conversing with each other.
[[http://goodvillenews.com/Awakening-Our-Collaborative-Spirit-AjXaD8.html Awakening Our Collaborative Spirit]]
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]

Latest revision as of 15:54, 31 July 2012

Full KDE 4 session

Using the login manager (a)

You can change your configuration so a normal login using your login manager (KDM, lightdm, whatever you choose) will end up starting your self-compiled KDE. To make sure that even the daemons started by the X login process (most notably dbus) use the correct files, create a file called .xsessionrc in your home folder, which sets up the environment:

export KDEDIR="$HOME/kde"

AddToPath() {
        eval "export $1=$2\${$1+:\$$1}" # prepend to existing path, if there is one
}

AddToPath PATH "$KDEDIR/bin"
AddToPath LD_LIBRARY_PATH "$KDEDIR/lib"
AddToPath QT_PLUGIN_PATH "$KDEDIR/lib/kde4/plugins:$KDEDIR/lib/qt4/plugins"
AddToPath PKG_CONFIG_PATH "$KDEDIR/lib/pkgconfig"
AddToPath CMAKE_PREFIX_PATH "$KDEDIR"
export XDG_DATA_DIRS="$KDEDIR/share:/usr/share"
export XDG_CONFIG_DIRS="$KDEDIR/etc/xdg:/etc/xdg"
export KDEDIRS="$KDEDIR"

Replace $HOME/kde in the example above with the prefix you are installing KDE4 into. If you want to, also add "export KDEHOME=$HOME/.kde4" to change the path KDE configuration is stored in. Finally, create a file called $HOME/.xsession which actually starts KDE:

exec startkde "$@"

However, even after following these steps, authentication of configuration changes using polkit (for example, changing the clock or the KDM settings) will not work. Unfortunately, you can not set up several KDE installations properly to allow this - you can change your system configuration so that your self-compiled KDE will be able to use polkit, but then this will stop working in the distribution-provided KDE, or another self-compiled KDE in a different prefix. To do so, create a file called /etc/dbus-1/system.d/kde-selfcompiled.conf with the following content:

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <includedir>/home/user/kde/etc/dbus-1/system.d</includedir>
  <servicedir>/home/user/kde/share/dbus-1/system-services</servicedir>

</busconfig>

Again, replace /home/user/kde by your installation prefix. In the login manager, make sure you select the "Standard" session.

Using the login manager (b)

The configuration method described above will hard-wire that user to always use your self-compiled KDE, no matter what you select in the login manager (selecting the distro-provided KDE may even result in funny effects). If you are using KDM (or a compatible login manager) and want to be able to select the session type before logging in, create a .desktop file in either $(kde-config --prefix)/share/apps/kdm/sessions/ or in /usr/share/xsessions/. The easiest thing to do is to copy an existing kde.desktop file and name it kde4.desktop. Open this new .desktop file in a text editor and change the Exec, TryExec and Name entries to look something like this:

Exec=$HOME/startkde-wrapper
TryExec=$HOME/startkde-wrapper
Name=KDE4 (self-compiled)

startkde-wrapper sets some environment variables which are required to make KDE run properly in a non-/usr environment:

#!/bin/sh
export KDEDIR="$HOME/kde"

AddToPath() {
        eval "export $1=$2\${$1+:\$$1}" # prepend to existing path, if there is one
}

AddToPath PATH "$KDEDIR/bin"
AddToPath LD_LIBRARY_PATH "$KDEDIR/lib"
AddToPath QT_PLUGIN_PATH "$KDEDIR/lib/kde4/plugins:$KDEDIR/lib/qt4/plugins"
AddToPath PKG_CONFIG_PATH "$KDEDIR/lib/pkgconfig"
AddToPath CMAKE_PREFIX_PATH "$KDEDIR"
export XDG_DATA_DIRS="$KDEDIR/share:/usr/share"
export XDG_CONFIG_DIRS="$KDEDIR/etc/xdg:/etc/xdg"
export KDEDIRS="$KDEDIR"
exec startkde "$@"

Replace $HOME/kde in the example above with the prefix you are installing KDE4 into.

After restarting the login manager (Alt+e in KDM) this new entry should appear in the sessions menu. However, since the new environment variables will not effect dbus in this setup, there might be some issues. The notes above regarding polkit also apply.

Directly starting X

You can also start a full KDE 4 desktop environment session from the command line, with something like this:

X :1 & export DISPLAY=:1
$HOME/startkde-wrapper

Using the startkde-wrapper from above. However, this again will not set up dbus and polkit properly to use the custom prefix.

Note
If the X server refuses the connection saying something like: Xlib: connection to ":1.0" refused by server, try X -ac :1 instead.