[X2Go-Dev] [X2Go-User] Kde4 and Plasma Mess - Is anyone working with it?

Helmer Teles helmer.teles at gmail.com
Wed Oct 17 10:22:13 CEST 2012


On Wednesday 17 October 2012 09:43:17 Mike Gabriel wrote:
> Hi Helmer,
> 
> I tested on KDE4 (4.8.4, Debian sid).
> 
> On Di 16 Okt 2012 17:32:03 CEST Helmer Teles wrote:
> > As anybody knows KDE4 has lots of problems with sizing and resizing of
> > plasma panels, screen geometry and other stuff as usal.
> 
> Same with GNOME3 btw.
> 

> 
> Please send the scripts to the x2go-dev list. Note: resizing of a
> plasma desktop works fine in KDE4 on Debian wheezy/sid.
> 
> > My problem is that for plasma to assume the new resolution you have
> > to kill it
> > and start-it once again after you change plasma-desktop-appletsrc
> > with the new
> > values. So, when  you do this after resuming the session, every time you
> > move/maximize/minimize a window they slow to a crawl.
> 
> ahaaaa... this is not so here... Note: there is quite a big difference
> between the Ubuntu KDE4 and the Debian KDE4. Ubuntu has (at least one)
> xrandr patches that break KDE4 nearly completely with X2Go (KWin
> crashes regularly).
> 

> > How to test/reproduce this sympton.
> > 
> > If you have a x2goserver installed with a kde4 session, kubuntu or other,
> > start a session, go to konsole and do:
> > 
> > kquitapp plasma-desktop &&  plasma-desktop &
> > 
> > after plasma start if you try to move any window around everything will be
> > allright and fast as before.
> 
> ok...
> 
> > After that do the same thing but after a x2gosuspend and in a runing
> > resumed session try to move your konsole window around the desktop, it
> > will lag like hell.
> > If you this on a real display on your laptop, or in a running session
> > everything will run fast as before.
> 
> Not so here on Debian. It must be some Ubuntu specific issue.
> 
> Greets,
> Mike

Hi, Mike,
hi list members.

I'm still debugging what the hell is going on.

what i have gathered so far is that is if i run the scripts inside a konsole 
after resuming the session, everything will work as fast as before.
If i run-it from any script from x2go scripts it has the problem of lagging a 
lot.
I think that it has to do with dbus.

All Scripts below. There are two kind of scripts: 

One is for locking the session after a user suspend the session for security 
concerns, i also developed a login gui  with lazarus so that a user has to 
enter his password before starting is session. 
The others are to resize kde panel and display geometry, also to adjust 
wallpaper to the screen. All of this things are not working in kubuntu when 
you connect with different resolutions. I'm testint in a kvm windows xp with 
rdp client with two different users, which one with is resolution.


Some of the scripts doesn't make sense to put here. :-D

/usr/local/bin/startkde

#!/bin/bash


fn_start_session()
{

/usr/local/bin/fn_resizepanel.sh
/usr/local/bin/fn_getmounts.sh &
/usr/bin/startkde
/usr/local/bin/fn_cleanpclocal.sh
/usr/local/bin/fn_cleanprinter.sh

}

fn_abort_session()
{

x2goterminate-session $MYSESSION

exit 0

}

MYSESSION=`x2golistsessions |cut -d '|' -f2`
SESSIONDP=`x2golistdesktops |cut -d : -f 2`
export DISPLAY=:${SESSIONDP}
xli  -fillscreen -onroot /usr/share/wallpapers/spikepwd.jpg &


# Call the login lazarus app
/usr/local/bin/Spikepwd
retval="$?"


if [ "$retval" == "0" ]; then fn_start_session
 else
  if [ "$retval" == "255" ]; then fn_abort_session
  fi
fi

exit 0
----------------------------------------------------------------------------------------------------------

/usr/local/bin/fn_post-resume.sh -> this one it is called at post-resume.d

#!/bin/bash


resize_screen()
{

SESSIONDP=`x2golistdesktops |cut -d : -f 2`
export DISPLAY=:${SESSIONDP}

/usr/lib/kde4/libexec/kscreenlocker --forcelock --showunlock --blank &

kquitapp plasma-desktop

sleep 2

/usr/local/bin/fn_resizepanel.sh

sleep 1

plasma-desktop
kdialog --passivepopup 'Por favor aguarde, a restaurar a sua sessão ... ' 10

}

resize_screen &
/usr/local/bin/fn_getmounts.sh

exit 0

P.S: this is the problem that i'm facing. if you open a konsole or xterm and 
call this script kwin will run greatly and fast, but when called from 
x2goscripts it lags when moving, minimizing, restoring windows

----------------------------------------------------------------------------------------------------------

pre-runcommand.d


#!/bin/bash


MYSESSION=`x2golistsessions |cut -d '|' -f2`
myCMD=`x2gocmdexitmessage $MYSESSION`

if [ "$myCMD" != "exec startkde" ]; then
 /usr/bin/logger -t HACKING_ATTEMPT $USER tried to  $myCMD
 x2goterminate-session $MYSESSION
fi

exit 0


----------------------------------------------------------------------------------------------------------

pre-suspend.d

#!/bin/bash


kdialog --passivepopup 'Por favor aguarde, a suspender a sua sessão actual ... 
' 5 &


/usr/local/bin/fn_cleanpclocal.sh
/usr/local/bin/fn_cleanprinter.sh

sleep 1

SESSIONDP=`x2golistdesktops |cut -d : -f 2`
export DISPLAY=:${SESSIONDP}

/usr/lib/kde4/libexec/kscreenlocker --dontlock --blank &

exit 0


----------------------------------------------------------------------------------------------------------
scripts end
----------------------------------------------------------------------------------------------------------

Been triying messing with dbus but to no avail till now.


All my testing till now, commented and not commentd but still the same 
problem.

-+++++++++ +++++  ~.bash_profile   +++++++++++++++++++++++++++++++++++++++++++
#!/bIn/bash



alias getdbus="export DBUS_SESSION_BUS_ADDRESS=`cat /proc/$(pidof 
kded4)/environ | tr '\0' '\n' | grep DBUS_SESSION_BUS_ADDRESS | cut -d '=' -
f2-`"


export $(cat /proc/$(pgrep "kded4" -u "$USER")/environ | grep -z 
"^DBUS_SESSION_BUS_ADDRESS=")

DID=`echo $DBUS_SESSION_BUS_ADDRESS |cut -d '=' -f 3 `

export DID


remember: whatever i do, this process always works when after resuming you 
open a konsole and exec fn_post-resume.sh

++++++++++++     fn_post-resume.sh desperate testing version  
+++++++++++++++++++++++++++++++++++++++++++



#!/bin/bash


. ~/.bash_profile


SESSIONDP=`x2golistdesktops | cut -d ":" -f 2`
export DISPLAY=:$SESSIONDP
#DBUS_SESSION_BUS_ADDRESS=`dbus-launch | grep ADDRESS`
#export $(dbus-launch)

#export $(cat /proc/$(pgrep "kded4" -u "$USER")/environ | grep -z 
"^DBUS_SESSION_BUS_ADDRESS=")
#DID=`echo $DBUS_SESSION_BUS_ADDRESS |cut -d '=' -f 3`
#export $DID


#/usr/lib/kde4/libexec/kscreenlocker --forcelock --showunlock --blank &
#/usr/lib/kde4/libexec/kscreenlocker --dontlock --blank &


#export DBUS_SESSION_BUS_ADDRESS=`cat /proc/$(pidof kded4)/environ | tr '\0' 
'\n' | grep DBUS_SESSION_BUS_ADDRESS | cut -d '=' -f2-`

qdbus org.kde.plasma-desktop /MainApplication quit

#kquitapp plasma-desktop

sleep 2

#/usr/local/bin/fn_resizepanel.sh

#sleep 2

#declare -x LD_LIBRARY_PATH="/usr/lib/nx/X11/Xinerama:/usr/lib/nx/X11"
#declare -x QT_GRAPHICSSYSTEM="native"
#export `dbus-launch | grep ADDRESS`
#export `dbus-launch | grep PID`
#export DBUS_SESSION_BUS_ADDRESS

#ck-launch-session dbus-launch  plasma-desktop

dbus-launch  --autolaunch $DID plasma-desktop            

#dbus-launch  plasma-desktop
#plasma-desktop &

kdialog --passivepopup 'Por favor aguarde, a restaurar a sua sessão ... ' 10

#/usr/local/bin/fn_getmounts.sh

exit 0


-- 


regards,

Helmer Teles 

http://hteles.wordpress.com

“Sent from My Linux Operating System”


Please don't send me proprietary file formats, use ISO standard ODF instead 
(ISO/IEC 26300)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20121017/497cd122/attachment.html>


More information about the x2go-dev mailing list