Open midenok opened 10 years ago
Please, confirm.
Ok! I'll do it later.
Do you mean panel on my custom kde? That may be strange, but I can't find there any panel... I've tried to use both Xnest and Xephyr. By the way, as you said, Xephyr does have more pleasant appearance, but there are only some icons on black background. On the top there is some panel, but it has only two items "Activity Bar Settings" and "Unlock Panel" in right-click menu my_kde4_desktop_xephyr.png. After "Activity Bar Settings" is clicked, keyboard shortcut menu appears my_kde4_desktop_xephyr_2.png and there is not 'Only show tasks from the current screen' flag... So what's to be done?
I guess it is because some components are missing. You can still proceed pp. 1-4 on your main installation. Please, tell me the results.
I couldn't figure out how to determine the process that makes changes in ~/.kde ... How it should be done?
It depends on result from p. 3. Please, show me the diff (use Github Gist service).
Output of diff: https://gist.github.com/mechanician/c873edad177223684ca2
So, it's a showOnlyCurrentScreen
inside .kde/share/config/plasma-desktop-appletsrc
. There are several approaches to figure out which process makes changes:
try (as root):
lsof /home/mechanician/.kde/share/config/plasma-desktop-appletsrc
If it will not show anything, this means, that file is opened each time.
if 1. didn't help, try (as user):
rcfile=/home/mechanician/.kde/share/config/plasma-desktop-appletsrc
mv $rcfile $rcfile.bak
mkfifo $rcfile
Then try to change the setting. It should freeze (hahaha). Then use method from p.1.
Grep sources for showOnlyCurrentScreen
. The most reliable, though most boring (i.e. long) method.
grep -r showOnlyCurrentScreen path_to_sources
Supplement for p.1:
lsof +d /home/mechanician/.kde/share/config
will list all processes with open files inside that dir.
Obtained results are below:
~$ sudo lsof +d /home/mechanician/.kde/share/config
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
plasma-de 1739 mechanician 12w REG 8,1 37 1179881 /home/mechanician/.kde/share/config/plasma-desktop-appletsrc.lock
But: to alive panel I had to kill above process and after that resart plasma-desktop. May be there is more correct way to "break" created pipe?
So, what was the sequence in detail? You tried p.1 and found nothing? This means that process doesn't hold config open, right? Then you tried p.2 and this above result is from p.2? This strange because I see only .lock and no pipe!
Anyway, you found what was required. I thought they may be routed config through dbus to a special service and now I see that they modify it directly.
There is nothing wrong to kill a process. But, if you're curious, you could feed real config through pipe and see what happens:
rcfile=/home/mechanician/.kde/share/config/plasma-desktop-appletsrc
cat $rcfile.bak > $rcfile &
cat $rcfile > $rcfile.new
I don't think that it will work as expected, because seek() don't work on pipes. But it may unfreeze process and give you a chance to return back normal config.
I guess I know what's going on with absent pipe in lsof. Maybe open() is blocked unless both ends open it (3 variants: rw-rw, r-w or w-r). So the file was not open yet at that time -- hence no fd in lsof!
F.ex. if you did:
chmod o+w $rcfile
cu -l $rcfile
After that it may be plasma-desktop-appletsrc
appeared in lsof. cu -l
opens file for rw. But plasma-desktop
after successful open() would block on read() (since you don't feed anything through cu).
Exactly. Firstly I tried p.1 and there was nothing, so I went to p. 2. As you said, after cu -l
the pipe appeared in lsof:
~$ lsof /home/mechanician/.kde/share/config/plasma-desktop-appletsrc
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
plasma-de 2023 mechanician 18r FIFO 8,1 0t0 1179940 /home/mechanician/.kde/share/config/plasma-desktop-appletsrc
cu 3782 mechanician 3u FIFO 8,1 0t0 1179940 /home/mechanician/.kde/share/config/plasma-desktop-appletsrc
cu 3783 mechanician 3u FIFO 8,1 0t0 1179940 /home/mechanician/.kde/share/config/plasma-desktop-appletsrc
Great!
Regarding p.5 what branch did you compiled? KDE Workspace should contain necessary widget. Try to add it manually:
Difficult to say about branсh, but may be the following is what you asked... :
~/kde4/src/kde-workspace$ git branch
* 4.11
master
~/kde4/src/kde-baseapps$ git branch
* 4.13
master
About adding the widget manually: when 'add widget' is clicked nothing happens.
Please, ensure that files under kde-workspace/plasma/desktop/applets/tasks
was compiled and installed. It should create library plasma_applet_tasks.so
. As I suspect, key file there is plasma-tasks-default.desktop
which indicates applet presence. If it was installed to right place (and KDE knows where to find it) then it should work. Maybe, you could grep KDE error output for 'tasks'... Also, watch error output when you hit 'Add widgets'.
Yes, there are those files:
kde-workspace/lib/plasma_applet_tasks.so
kde-workspace/plasma/desktop/applets/tasks/plasma-tasks-default.desktop
How to check if the last one is installed to right place and KDE knows about it?
While Xephyr was working no any phrases with 'task' occurred in error output . But the following error is written to error output when 'Add widgets' is clicked:
kwin(9096) KWin::x11ErrorHandler: kwin: X Error ( "error: BadDamage [DAMAGE+0], request: XDamageDestroy[DAMAGE+2], resource: 0x1a00156" )
These locations are inside build tree. Where they are inside installation tree?
/home/mechanician/kde/installs/trunk/lib32/kde4/plasma_applet_tasks.so
/home/mechanician/kde/installs/trunk/share/kde4/services/plasma-tasks-default.desktop
Can you please examine with lsof
and strace
how plasma-desktop
behaves regarding /home/mechanician/kde/installs/trunk/share/kde4/services
? To successfully start plasma-desktop
under strace
you need to know environment and arguments. Copy environment from working process (/proc/<PID>/environ
, replace 0 with CR). Get arguments from /proc/<PID>/cmdline
. Then kill running process and spawn your own under strace
(don't forget to export
copied environment). Grep strace
output for all interesting items (/services/ dir, .desktop files). strace
can filter on certain syscalls (f.ex. -e trace=file
), refer to man page for details.
P.S. be ready to deal with respawners. KDE4 respawns plasma-desktop
when it get killed. Find parent of plasma-destop
and send him SIGSTOP
before killing plasma-desktop
. Use SIGCONT
to reactivate stopped process.
Please, confirm.
Hi! Sorry for the late answer. Actually now it is a lack of spare time: a lot of affairs must be accomplished. I'll continue the task as soon as I have some free time.
Great! Welcome back any time!
cp -a ~/.kde /tmp/
compare /tmp/.kde and ~/.kde:
Locate the changes reflected by flag change.
b write
, do the change, show the stack trace to me.