
KDesktop transparency support
Various KDE 1.-4. Improvements
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
This patch adds support for real transparency to kdesktop. It adds two new
composite manager related features. To activate the features kdesktop has to
be started with the "--bg-transparency" option.
The first one allows you to change the opacity of the background image. This
works currently with the beryl transparent cube and will also work with
compiz once the transparent cube gets applied. To activate the feature add
the following to your kdesktoprc:
[Background Common]
BackgroundOpacity=90 (0 = fully transparent / 100 = opaque)
The second feature allows compiz (and later maybe other composite managers) to
tell kdesktop not to paint the background image
("_COMPIZ_WALLPAPER_SUPPORTED" x atom). In this case compiz is able to paint
a viewport dependent background or to make it even animated. This feature
looks for changes to the x atom, so that kdesktop will automatically switch
back to normal background if kwin gets started or compiz stops to render the
wallpaper.
This patch is against the current kde3 svn.
Regards
Dennis
javielillo
13 years ago
In my case I use Kubuntu:
1º) I install every dependency (build-essential, )
sudo aptitude install build-essential fakeroot debhelper debconf kdebase-dev kdelibs-dev
2º) downloading the source:
sudo apt-get build-dep kdebase
sudo apt-get source kdebase
3º) I go to the kdebase-3.5.8 source code sub-folder called kdesktop & I apply the patch (before I copied the patch inside that kdesktop folder)
4º) I patch it with the order:
patch -p1 < kdesktop-transparency.patch
5º) I get some questions to modify or not some original files. but 2 of them not exist in the kdesktop folder and can't continue patching (kdesktopapp.h and kdesktopapp.cpp). The solution? I create 2 text files without data with those 2 names & I continue patching without problems on every required file.
6º) I go to the main kdebase-3.5.8 folder & I write:
./configure
./make
7º) After a long process I get errors & can't continue compiling kcontrol or kconsole (depending if I compile first the full kdebase-3.5.8 package or only kdesktop) because I think that other things not have been compiled before. I do a "make clean" & I restart compiling, this time I try directly compiling into kdesktop folder "./make".
After few minutes I get similar errors like before.
My last attempt was go to every folder that was showed in every compilation error and execute the "make" in those folders. If more errors happen I visit those new folders & I compile, repeating the process until kdesktop show an error about:
./.libs/libkdeinit_kdesktop: undefined reference to `KDesktopApp::KDesktopApp(_XDisplay*, unsigned long, unsigned long)'
./.libs/libkdeinit_kdesktop: undefined reference to `KDesktopApp::KDesktopApp()'
collect2: ld returned 1 exit status
I remember in the past that I used kdebase from the official kde download website before to learn these steps & without success... why I can't compile :S ????
Report
javielillo
13 years ago
dpkg-buildpackage -rfakeroot -uc -b
If I get this working I would like help other newbies sharing the patch binaries or .deb files & sharing the steps of how to compile "without errors" :P
Report
Junon
13 years ago
I don't know whether this causes further problems, because currently the compiler's still doing its dirty work. But at least it doesn't stumble across konsole anymore.
A further, possibly Kubuntu-specific problem was caused by the location of the kbookmarknotifier.h file. Even with the correct KDE-prefix configured, /kdebase-3.5.8/konqueror/keditbookmarks/Makefile was created pointing to /usr/include/kbookmarknotifier.h instead of the correct /usr/include/kde/kbookmarknotifier.h path. Fixed by editing the Makefile's lines 980 and 981, replacing "$(includedir)/kbookmarknotifier.h" by "$(includedir)/kde/kbookmarknotifier.h". Let's see whether the make process finally finishes this time...
Report
Junon
13 years ago
"./.libs/libkdeinit_kdesktop: undefined reference to `KDesktopApp::KDesktopApp(_XDisplay*, unsigned long, unsigned long)'
./.libs/libkdeinit_kdesktop: undefined reference to `KDesktopApp::KDesktopApp()"
By comparing '~/kdebase-3.5.8/kdesktop/.libs/libkdeinit_kdesktop.la' to the already installed '/usr/lib/libkdeinit_kdesktop.la' I noticed that the latter references to libkdeinit_kdesktop.so instead of libkdeinit_kdesktop. Hence I did a "cp /usr/lib/libkdeinit_kdesktop.so ~/kdebase-3.5.8/kdesktop/.libs/" and modified lines 8 and 11 in '~/kdebase-3.5.8/kdesktop/.libs/libkdeinit_kdesktop.la' by adding the .so to every libkdeinit_kdesktop entry. Compiling kdesktop finished then, though I haven't tested if this breaks anything yet.
Report
Junon
13 years ago
Report
Dreid
13 years ago
Then, i went into kdesktop target dir and compiled missing .o manualy:
1. Added missing cpp to libkdeinit_kdesktop_la.all_cpp.cpp (append line #include "kdesktopapp.cpp")
2. Created moc file:
/usr/share/qt3/bin/moc ~/kdebase-3.5.8.dfsg.1/./kdesktop/kdesktopapp.h -o kdesktopapp.moc
After that, make completed successfully.
I plan to investigate what source file to edit for properly Makefile generation and post it as a patch :)
Report
votequimby
12 years ago
I have followed your steps repeatedly with the kdebase-3.5.8.dfsg.1 downloaded from the debian source website; yet my edits always result in 98_buildprep.diff failing whilst trying to build (works fine without edits).
The 98_buildprep log displays this:
Quote:Hunk #11 FAILED at 1454.
1 out of 11 hunks FAILED -- saving rejects to file kdesktop/Makefile.in.rej
Do you have any idea what i can do? I have been racking my head trying your steps over and over, with no success....
Report
javielillo
13 years ago
http://massmirror.com/05bc6f62c9e2f5006ff9730696922aba.html
Report
javielillo
13 years ago
Finally I made deb packages for Kubuntu Gusty, your explanation of how find the lines to modify was very precise.
Then the Kubuntu steps should be those:
1º) I install every dependency (build-essential, ...)
sudo aptitude install build-essential fakeroot debhelper debconf kdebase-dev kdelibs-dev
2º) Download the source (in my case the sources was downloaded & unpacked automatically in my home folder):
sudo apt-get build-dep kdebase
sudo apt-get source kdebase
3º) I go to the kdebase-3.5.8 source code sub-folder called kdesktop & I apply the patch (before I copied the patch inside that kdesktop folder, exactly in ~/kdebase-3.5.8/kdesktop/).
I patch it with the order:
patch -p1 < kdesktop-transparency.patch
Note: I don't know if is normal or not but I was forced to create manually 2 text files without data inside called kdesktopapp.h and kdesktopapp.cpp to continue patching the required files...
4º) Open the kdesktop/Makefile.in & edit the next things:
1. Find line starting with
"for file in minicli.cpp"
Quote:for file in minicli.cpp startupid.cpp kshadowengine.cpp kshadowsettings.cpp kdesktopshadowsettings.cpp kfileividesktop.cpp ; do \
and insert kdesktopapp.cpp into list of cpp-files (in my case was located at the line 1464).
Quote:for file in kdesktopapp.cpp minicli.cpp startupid.cpp kshadowengine.cpp kshadowsettings.cpp kdesktopshadowsettings.cpp kfileividesktop.cpp ; do \
2. to the end of line starting with
"libkdeinit_kdesktop_la.all_cpp.cpp:"
Quote:libkdeinit_kdesktop_la.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/minicli.cpp kdesktopsettings.h $(srcdir)/startupid.cpp klaunchsettings.h $(srcdir)/kshadowengine.cpp $(srcdir)/kshadowsettings.cpp $(srcdir)/kdesktopshadowsettings.cpp $(srcdir)/kfileividesktop.cpp krootwm.moc minicli.moc startupid.moc lockeng.moc desktop.moc pixmapserver.moc kdiconview.moc kcustommenu.moc bgmanager.moc xautolock.moc
add "kdesktopapp.moc" (in my case was located at the line 1460).
Quote:libkdeinit_kdesktop_la.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/minicli.cpp kdesktopsettings.h $(srcdir)/startupid.cpp klaunchsettings.h $(srcdir)/kshadowengine.cpp $(srcdir)/kshadowsettings.cpp $(srcdir)/kdesktopshadowsettings.cpp $(srcdir)/kfileividesktop.cpp krootwm.moc minicli.moc startupid.moc lockeng.moc desktop.moc pixmapserver.moc kdiconview.moc kcustommenu.moc bgmanager.moc xautolock.moc kdesktopapp.moc
3. Just before previous line add
Quote:kdesktopapp.moc: $(srcdir)/kdesktopapp.h
$(MOC) $(srcdir)/kdesktopapp.h -o kdesktopapp.moc
5º) After these changes on the kdebase folder build the deb packages, Dred wrote:
Quote:dpkg-buildpackage -rfakeroot -uc -b but I used Quote:dpkg-buildpackage -rsudo -uc -b (and because I made some wrong things I was forced to run "make distclean" command before the dpkg-buildpackage command)
6º) The new .deb packages are located on the home folder. I installed the new created package called kdesktop_3.5.8-0ubuntu2_i386.deb (where is located the changes):
sudo dpkg -i kdesktop_3.5.8-0ubuntu2_i386.deb
(in my case I was forced to downgrade from *ubuntu2.1_i386.deb packages to *ubuntu2_i386.deb using the command "sudo dpkg -i *.deb", installing ALL the .deb packages from the home folder. If you had other .deb files in the home folder be aware about what more will be installed :P )
7º) Go to the ~/.kde/share/config/ folder and edit the kdesktoprc file to include the next code:
Quote:[Background Common]
BackgroundOpacity=90 (0 = fully transparent / 100 = opaque)
8º) I made a script to kill & restart the kdesktop with the command "--bg-transparency" that xonestonex wrote. Save it in a text file with execution permission and copy it to the ~/.kde/Autostart/ folder to be loaded at the KDE start, the script code could be more optimized but works for me and I called it kdesktop-transparency.sh, test it before you copy the file into that folder to verify that works.
Quote:#!/bin/sh
# Kills KDesktop & after is re-launched with the command "kdesktop --bg-transparency".
# Should be loaded at the start of KDE load.
# Be sure that .kde/share/config/kdesktoprc has this new section:
# [Background Common]
# BackgroundOpacity=90 (0 = fully transparent / 100 = opaque)
local pid
pid=$(ps ax |grep "kdesktop " |grep -v grep|awk '{print $1;}')
echo -n "Killing Kdesktop (process $pid)... "
kill -9 $pid
echo "Killed."
kdesktop --bg-transparency 2> /dev/null
echo "Kdesktop ON with transparency support for Compiz's Wallpaper plugin)"
This script must be started before Compiz is loaded, then you could put the Compiz command at the end of the file or use the Fusion-icon after the script execution (I tried with success both methods).
If Compiz-Fusion not have the Wallpaper plugin visit the tutorial page for install additional plugins:
http://forum.compiz-fusion.org/showthread.php?t=5303
From the list of plugins we only need the wallpaper.tar.gz download (I no post the download link because it could be modified & here could become outdated/obsolete :P )
Here is the link to download the binaries for Kubuntu (I had to downgrade the KDE packages from *ubuntu2.1_i386.deb to *ubuntu2_i386.deb so I would like to try later how to build the latests sources):
http://massmirror.com/df3d3bf528463823e2a1466e8734a082.html
Happy holidays! ;-)
Report
Dreid
13 years ago
1. find line starting with
"for file in minicli.cpp"
and insert kdesktopapp.cpp into list of cpp-files
2. to the end of line starting with
"libkdeinit_kdesktop_la.all_cpp.cpp:"
add "kdesktopapp.moc"
3. Before previous line add
kdesktopapp.moc: $(srcdir)/kdesktopapp.h
$(MOC) $(srcdir)/kdesktopapp.h -o kdesktopapp.moc
After this corrections,
Quote:dpkg-buildpackage -rfakeroot -uc -b
worked for me.
PS: I'm using Debian, not kubuntu - line numbers in Makefile.in wouldn't match, so i don't post them.
One more time.
To make everything work in Debian:
1. apt-get everything
2. apply patch
3. edit one hunk in debian/patches/98_buildprep.diff started at line 182164 to look like this:
Quote:
@@ -1453,11 +1454,14 @@ libkdeinit_kdesktop_la.all_cc.cc: $(srcd
rm -f libkdeinit_kdesktop_la.all_cc.final libkdeinit_kdesktop_la.all_cc.files
#>+ 11
+kdesktopapp.moc: $(srcdir)/kdesktopapp.h
+ $(MOC) $(srcdir)/kdesktopapp.h -o kdesktopapp.moc
+
-libkdeinit_kdesktop_la.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/minicli.cpp kdesktopsettings.h $(srcdir)/startupid.cpp klaunchsettings.h $(srcdir)/kshadowengine.cpp $(srcdir)/kshadowsettings.cpp $(srcdir)/kdesktopshadowsettings.cpp $(srcdir)/kfileividesktop.cpp krootwm.moc minicli.moc startupid.moc lockeng.moc desktop.moc pixmapserver.moc kdiconview.moc kcustommenu.moc bgmanager.moc xautolock.moc
+libkdeinit_kdesktop_la.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/minicli.cpp kdesktopsettings.h $(srcdir)/startupid.cpp klaunchsettings.h $(srcdir)/kshadowengine.cpp $(srcdir)/kshadowsettings.cpp $(srcdir)/kdesktopshadowsettings.cpp $(srcdir)/kfileividesktop.cpp krootwm.moc minicli.moc startupid.moc lockeng.moc desktop.moc kdiconview.moc kcustommenu.moc pixmapserver.moc bgmanager.moc xautolock.moc kdesktopapp.moc
@echo 'creating libkdeinit_kdesktop_la.all_cpp.cpp ...'; \
rm -f libkdeinit_kdesktop_la.all_cpp.files libkdeinit_kdesktop_la.all_cpp.final; \
echo "#define KDE_USE_FINAL 1" >> libkdeinit_kdesktop_la.all_cpp.final; \
- for file in minicli.cpp startupid.cpp kshadowengine.cpp kshadowsettings.cpp kdesktopshadowsettings.cpp kfileividesktop.cpp ; do \
+ for file in kdesktopapp.cpp minicli.cpp startupid.cpp kshadowengine.cpp kshadowsettings.cpp kdesktopshadowsettings.cpp kfileividesktop.cpp ; do \
echo "#include \"$$file\"" >> libkdeinit_kdesktop_la.all_cpp.files; \
test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> libkdeinit_kdesktop_la.all_cpp.final; \
done; \
4. dpkg-buildpackage -rfakeroot -uc -b
Report
gettinther
13 years ago
--- kdesktop/lock/lockprocess.cc.orig 2007-09-26 21:39:57.000000000 +0200
+++ kdesktop/lock/lockprocess.cc 2007-09-26 21:34:42.000000000 +0200
@@ -417,7 +417,7 @@
{
Visual* visual = CopyFromParent;
XSetWindowAttributes attrs;
- int flags = 0;
+ int flags = CWOverrideRedirect;
#ifdef HAVE_GLXCHOOSEVISUAL
if( mOpenGLVisual )
{
@@ -461,6 +461,8 @@
}
}
#endif
+
+ attrs.override_redirect = 1;
Window w = XCreateWindow( x11Display(), RootWindow( x11Display(), x11Screen()),
x(), y(), width(), height(), 0, x11Depth(), InputOutput, visual, flags, &attrs );
create( w );
Report
gettinther
13 years ago
Sorry about that.
Report
qdlaty
13 years ago
could you share a way how to get different wallpapers under KDE and Compiz-Fusion?
I can not find a tip anywhere.
Thanks in advance.
Report
HTS
13 years ago
http://forums.gentoo-xeffects.org/viewtopic.php?f=14&t=495&p=2175#p2175
However, this does not explain how to patch the source as we are using some Gentoo specific way for doing this.
If you're happy to do so, you can download the source and apply the patch manually.
NB: "man patch" is your friend.
Report
McFarmer
13 years ago
I'm running gentoo too, so how did you patch kdesktop on gentoo? your forum-post isn't available anymore
Report
HTS
13 years ago
On Gentoo, there is an xeffects overlay that includes the patch. For more information, ask questions on the xeffects forums: http://gentoo-xeffects.org/forums/ in the relevant section. Thanks
Report
qdlaty
13 years ago
Thanks, I was missing the file: and :1.0 part in filename.
Finally, the friendship with "man patch" has payed off.
Report
HTS
13 years ago
Transparent background works modulo some repaint problems.
However, how do you tell beryl to paint different wallpapers on each face of the cube? I don't understand.
Report
HTS
13 years ago
compiz fusion wallpaper plugin.
Report
raven65az
13 years ago
Report
Superstoned
13 years ago
Anyway, I can give some hints:
When you have the sourcecode, you can apply this patch with the patch command:
Go to the source folder, do:
patch -p1 < [location&name_of_patch]
then compile and install.
Report
marcelkraan
13 years ago
Report
raven65az
13 years ago
How do I apply this patch?
Thanks
Raven
Report
xonestonex
13 years ago
Report