|
|
|
The releases of this section are outdated and will not be supported. The relating packages may work, but we encourage you to install a recent KDE release. This frequently answered questions are collected from the kde-cygwin mailing list and the kde-cygwin related sourceforge foren. If you don't find an answer for your problem here, please take a look directly into the mailing list and/or the foren. Index
The X Window System provides a way to execute programs
(including a graphical environment such as KDE) in a
general way when startx is executed. This is
in the form of two files (.xserverrc and
.xinitrc). Normally these reside in your
home directory and are used for starting server and
client related applications respectively. The
startkde script in the kde/bin
directory executes all the programs required by KDE in
one handy script. You can therefore start KDE along with
your X server by adding a line to execute
startkde to the .xinitrc file
in your home directory. below there are samples shown for
the relevant files.
$ echo "exec X -screen 0 1024x768x16 -engine 4 -ac \
-nowinkill -noreset -emulate3buttons 100" >~/.xserverrc
$ echo "/opt/kde2/bin/startkde" >~/.xinitrc
Once you have created the two files you can start KDE 2
on the base prompt with:
$ startx &
See related topic: \faqref[kde_icon]
Make a copy of the file cygwin.bat in the
cygwin root directory and call the new file
startkde2.bat. Next, edit the line that
reads bash --login -i and change it so it
reads bash --login -i -c "startx".
The startkde2.bat file can be used like
the regular cygwin.bat. You can copy the
file or create a shortcut to it on the desktop, the start
menu or anywhere else. NB: This assumes you have perfomed
the steps necessary to start KDE with X as described in
the answer to "How do I setup X to run
KDE?".
The ICE library included with the standard
Cygwin/XFree distribution does not export a number of
symbols required by KDE. For this reason, we have
released our own build of this library for use with
kde-cygwin. For further information see \faqref[start_kde]
The libXext.dll in the official XFree
distribution does not export this symbol, because it and
the X server do not support shared memory. For this
reason, we have released our own build of these files
available in the kde-x (XFree 4.2.0) or
kde-xlib (XFree 4.1.0) packages. For further
information see \faqref[minimal_kde2].
If you try to start kde applications and have got a message box
with the message "The Application failed to
initialize properly (0xc0000022)...", you have probably problems
with access rights on some executables or dynamic link libraries.
If you encounter such problems, try updating the executable access rights with
| $ chmod a+x /usr/X11R6/bin/*.exe /usr/X11R6/bin/*.dll /opt/kde2/bin/*.exe /opt/kde2/lib/*.dll |
If you get DCOP errors like this:
kdeinit: launch -> dcopserver --nosid
kdeinit: Launched DCOPServer, pid = 1912 result = 0
_KDE_IceTransmkdir: Owner of /tmp/.ICE-unix should be set to root
DCOPClient::attachInternal. Attach failed Could not open network socket
DCOPClient::attachInternal. Attach failed Could not open network socket
DCOPClient::attachInternal. Attach failed Could not open network socket
DCOPClient::attachInternal. Attach failed Could not open network socket
DCOPServer self-test failed.
Please make sure your paths are mounted in
binmode.
The cygwin default is to mount all paths in textmode
which causes an error with the dcop client.
To set all paths to binmode mounting you can change
the following registry key (tested ONLY under Windows NT
4.0):
HKEY_CURRENT_USER\Software\Cygnus
Solutions\Cygwin\mounts v2
Set the key "cygdrive flags" to the value "0x0a" (dec:
10).
There are only a few command and applications
applications, which are absolutly necessary to run kde2
applications. See below how to start for example
kate.
-
set kde related environment
$ export KDEDIR=/opt/kde2
$ export QTDIR=/usr/local/lib/qt2
$ export KDEHOME=$HOME/.kde2
$ export PATH=$KDEDIR/bin:$KDEDIR/lib:$QTDIR/bin:/usr/X11R6/bin:$PATH
$ export LTDL_LIBRARY_PATH=$KDEDIR/lib:$KDEDIR/bin:/usr/X11R6/bin
$ export LD_LIBRARY_PATH=$KDEDIR/lib:$KDEDIR/bin:/usr/X11R6/bin
$ export DISPLAY=$HOSTNAME:0
-
start xserver
X -screen 0 1024x768x16 -engine 4 -ac -nowinkill -noreset -emulate3buttons 100 &
-
start basic kde (this will launch dcopserver,
klauncher and kded)
kdeinit +kcminit [+kdesktop [+kicker]]
kwin &
note that kwin does not run in background, so you
have bring it explicity in the background, otherwise
your shell will be blocked.
-
start kde applications
kate
As above, and in addition:
- automake (www.cygwin.com)
- autoconf (www.cygwin.com)
- autoheader (www.cygwin.com)
- bison (www.cygwin.com)
- bzip2 (www.cygwin.com)
- cvs (www.cygwin.com)
- flex (www.cygwin.com)
- gawk (www.cygwin.com)
- gcc (>= 2.95.3-4) (http://kde-cygwin.sf.net/snapshots/)
- grep (www.cygwin.com)
- make (www.cygwin.com)
- perl (www.cygwin.com)
- pcre (www.cygwin.com)
- tar (www.cygwin.com)
- shellutils (www.cygwin.com)
- patched binutils (from kde-cygwin.sf.net)
- perl patch (from kde-cygwin.sf.net)
- patched libtool (from kde-cygwin.sf.net)
- qt-2.3.0-b3 (or greater) (from kde-cygwin.sf.net)
- kdelibs (from kde-cygwin.sf.net)
If the package uses IPC, you will also need:
- libutil from Cygwin inetutils package (1.3.3 or
greater)
You need to make sure you have cygipc
installed. Then type:
ln -s /usr/local/lib/libcygipc.a /usr/local/lib/libipc.a
The most announting problems are listed below.
- The KDE 2.2.x release uses a special libtool
release (pre 1.4) which isn't currently (and probably
will not be in the future) supported by the cygwin
release of libtool. Problems were found in the
dependency code, in the dll installing part and in the
libltdl, the dynamic library loading support.
-> mostly fixed in KDE 2.2.2 beta1
- Libltdl
- the dynamic library loading interface has configure
problems, which initial prevents proper function.
Currently a "after configuring patch" is nessesary.
- the lt_dlopen() call contains code to support
libtool dependencies and this is currently
recommended due to a problem in the cygwin library
fork() code, which can't remap dll's under different
adresses between. Using this feature slows down
dynamical loading of dll's very much.
To see this performance problem make an export
LTDL_DEBUG=1 before starting a kde app or for example
starting kdeinit, which causes delays between each
forked processes.
-> mostly fixed in KDE 2.2.2 beta
1
- The official binutils isn't ready for compiling kde
2.2.1 caused by problems with using static libs in
dll's and unwanted exported symbols from
dlls.
-> fixed in patched binutils-20020516
- The xfree server contains a bug, which causes a
server crash after starting kate. Exceed 6 for
example, works
-> fixed in xfree 4.2.0
- The current perl release 5.6.1 contains a bug
relating to the inplace editing feature. Currently an
explicit backup extension is recommended. A src and
binary patch for this release is provided on the
kde-cygwin download area. We hope that this patch will
be integrated into the next official perl
release.
- memory issues - The alpha release need very
much memory (about 250MB)
-> some improvements in KDE 2.2.2 beta 1
reached
- Runtime linking delays
The windows dll concept caused loading delays for
dll's and applications, especially for dlls with a huge
count of exported/imported symbols. The qt-dll of
the 2.3.1 release for example exports about 12000
symbols, which are almost used by the qt designer and
basic kde dll's like kdeui. One solution for runtime
linking delays are "rebasing", which means specifing an
explicity dll load adress for each dll and "rebinding",
putting fixed symbol addresses in dll's, who are
referencing the first one. Using this
technology speeds up application loading. We have
encountered loading improvements by about 20-40
%.
-> introduced first in KDE 2.2.2 beta1
- Is runs slow
One (but not the only) reason are the socket and
file io performance on cygwin. I have heard from a
developer, that using winsock directly makes some
noticable improvements. In some cases file
reading is less than ten time slower as using the msvc
runtine library.
KDE uses very extensivly unix domain sockets, so
bottlenecks in this place has a great influence of
general kde performance.
Researches has shown, that Cygwin's unix domain
sockets implementation, which is based on TCP/IP
sockets, are only half as fast as regular cygwin's
TCP/IP sockets. Thats not the major problem, the major
problem seems to me, that regular unix domain sockets
on a linux system are ten times faster compared with
the cygwin's implementation and because KDE is designed
using such a bandwidth, this sounds like a real
bottleneck.
xfree clients and server communicates over cygwins
TCP/IP stack, of which people has reported changing
performance factor between 2 and 10, depending of
network card state. A research in this area has shown,
that the xfree server is quite fast, but has some
communication overhead, which seems to depend of cygwin
unix domain sockets implementation. xfree supports for
example named pipe communication, but this isn't
implemented in cygwin yet due to the fact that named
pipe are not part of windows 9x.
One word at last: Many of the described problems
has to do with the cygwin layer and someone who read
this, may be thinking, that the cygwin emulation layer
plays the role of the bad boy in this "game", but that
isn't true. While analysing the source, I've got very
high respect with all, who has contributed to this
emulation layer (This is also true for the xfree server).
Mostly problems depends on the underlaying operation
system, which lacks support for some basic unix concepts
and emulating this isn't an easy task (for example unix
domain sockets).
See the platform section for further
informations.
If you got the message like this:
kio (KLauncher): knotify (pid 2824) up and running.
DCOP: register 'knotify' -> number of clients is now 3
DCOP: register 'anonymous-2824' -> number of clients is now 4
ObjectManager: Arts::X11GlobalComm - Language missing
MCOP ObjectManager: can't find implementation for Arts::X11GlobalComm.
assertion "skel" failed: file "core.cc", line 2016
KCrash: crashing.... crashRecursionCounter = 2
KCrash: Application Name = knotify path = <unknown> pid = 1704
You can fix this by adding a line
Language=C++
to the file ~/.mcoprc
Requirements:
- Please make sure, you have a full working cygwin
and xfree installation
- Don't use rebased or rebinded kde dll's or
applications, because this could result in segfault
problems
If you have rebased or rebinded delete the /opt/kde2
dir and reinstall all KDE packages without
rebasing and rebinding
Lets start:
-
set kde related environment
$ export KDEDIR=/opt/kde2
$ export QTDIR=/usr/local/lib/qt2
$ export KDEHOME=$HOME/.kde2
$ export PATH=$KDEDIR/bin:$KDEDIR/lib:$QTDIR/bin:/usr/X11R6/bin:$PATH
$ export LTDL_LIBRARY_PATH=$KDEDIR/lib:$KDEDIR/bin:/usr/X11R6/bin
$ export LD_LIBRARY_PATH=$KDEDIR/lib:$KDEDIR/bin:/usr/X11R6/bin
$ export DISPLAY=$HOSTNAME:0
-
start xserver
$ X -screen 0 1024x768x16 -engine 4 -ac -nowinkill -noreset -emulate3buttons 100 &
-
try to start dcopserver
$ dcopserver --nosid
afterwards the following lines should be printed
(note that the printed pid numbers
anonymous-xxxx are samples and may be
different for you):
_KDE_IceTransmkdir: Owner of /tmp/.ICE-unix should be set to root
DCOP: register 'anonymous-xxxx' -> number of clients is now 1
DCOPServer up and running.
DCOP: unregister 'anonymous-xxx'
additional the following files should be available
(part of the names may be different)
$ ls /tmp/.ICE-unix/ -l
total 0
srwxrwxrwx 1 1002 Kein 51 Jun 14 11:15 dcop2256-1024046152
$ ls al ~/.DCOP*
lrwxrwxrwx 1 1002 Kein 191 Jun 14 11:33 .DCOPserver_BRAMSCHE ->
/home/habacker/.DCOPserver_BRAMSCHE_BRAMSCHE-0
-rwxrwxrwx 1 1002 Kein 55 Jun 14 11:33 .DCOPserver_BRAMSCHE_BRAMSCHE-0
Possible errors:
\faqref[ICE_error]
\faqref[XShmAttach]
-
try to start kdeinit
$ kdeinit --no-dcop --no-kded
then the following lines should be printed
(note that xxxx and <hostname> are
placeholders):
kdeinit: launch -> klauncher (null)
kdeinit: Launched KLauncher, pid = xxxx result = 0
DCOP: register 'klauncher' -> number of clients is now 1
DCOP: unregister 'klauncher'
DCOP: register 'klauncher' -> number of clients is now 1
kdecore (KSocket): Trying to listen on Unix /home/xxxxx/.kde2/socket-
<hostname>/klauncherjjHrMb.slave-socket
DCOP: register 'anonymous-xxxx' -> number of clients is now 2
kdecore (KSocket): Socket bound: 7
DCOP: new daemon klauncher
DCOP: unregister 'anonymous-xxxx'
kdeinit: opened connection to <hostname>:0.0
-
try to start kded
$ kded
then the following lines should be
printed
DCOP: register 'kded' -> number of clients is now 1
DCOP: unregister 'kded'
DCOP: register 'kded' -> number of clients is now 1
DCOP: register 'anonymous-2180' -> number of clients is now 2
kded: Does not exist! (/home/xxx/.kde2/share/servicetypes/)
kded: Does not exist! (/home/xxx/.kde2/share/mimelnk/)
kded: Does not exist! (/home/xxx/.kde2/share/services/)
DCOP: register 'anonymous-2132' -> number of clients is now 3
kio (KLauncher): KLauncher: Got kdeinit_exec_wait('kbuildsycoca', ...)
kdeinit: Got EXEC_NEW 'kbuildsycoca' from launcher.
kdeinit: launch -> kbuildsycoca --incremental
library=kbuildsycoca.la: No file names kbuildsycoca.la found in paths.
Could not load library! Trying exec....
kio (KLauncher): kbuildsycoca (pid 2064) up and running.
DCOP: register 'kbuildsycoca' -> number of clients is now 4
kbuildsycoca: Recreating ksycoca file
kbuildsycoca: Database is up to date
kdeinit: PID 2064 terminated.
DCOP: unregister 'kbuildsycoca'
DCOP: unregister 'anonymous-2132'
kio (KLauncher): KLauncher: Got kdeinit_exec_wait('kconf_update', ...)
kdeinit: Got EXEC_NEW 'kconf_update' from launcher.
kdeinit: launch -> kconf_update ☺
kio (KLauncher): kconf_update (pid 2736) up and running.
kdeinit: PID 2736 terminated.
DCOP: new daemon kded
-
start kwin
$ kwin &
then the following lines should be printed (note
that the printed pid numbers anonymous-xxxx
are samples and may be different for
you):
DCOP: register 'anonymous-1380' -> number of clients is now 1
kio (KLauncher): KLauncher: Got start_service_by_desktop_name('knotify', ...)
kdeinit: Got EXEC_NEW 'knotify' from launcher.
kdeinit: launch -> knotify ☺
kio (KLauncher): knotify (pid 2056) up and running.
DCOP: register 'knotify' -> number of clients is now 2
DCOP: register 'anonymous-2056' -> number of clients is now 3
DCOP: unregister 'anonymous-1380'
DCOP: register 'anonymous-1380' -> number of clients is now 3
DCOP: unregister 'anonymous-1380'
DCOP: register 'kwin' -> number of clients is now 3
DCOP: new daemon knotify
DCOP: unregister 'anonymous-2056'
kdeinit: PID 2056 terminated.
If any of this messages are not
printed or looks different, than you have a problem with
this step, for which you should search the mailing lists
or the foren.
|