Archive:Getting Started/Run/Nested Session: Difference between revisions
Line 6: | Line 6: | ||
|} | |} | ||
Instead of using a full-blown new | Instead of using a full-blown new X session for developing software you can use Xephyr to run your development build of KDE 4 in a session parallell to your normal working session. | ||
You can also do this with xnest, but as xnest cannot handle extensions like Render many people prefer Xephyr. | You can also do this with xnest, but as xnest cannot handle extensions like Render many people prefer Xephyr. | ||
Line 12: | Line 12: | ||
{{Note|1=In some cases Xephyr/xnest will make the keyboard not work correctly because of [https://bugs.freedesktop.org/show_bug.cgi?id=19365 bug:19365]. The workaround is to run KDE on a standalone X as described below.}} | {{Note|1=In some cases Xephyr/xnest will make the keyboard not work correctly because of [https://bugs.freedesktop.org/show_bug.cgi?id=19365 bug:19365]. The workaround is to run KDE on a standalone X as described below.}} | ||
Assuming you setup your build enviroment following the instructions in [[Getting_Started/Build/Environment]], simply put the following script in {{path|~/kde/src/run_kde_nested}}. | |||
<code bash> | <code bash> | ||
#!/bin/bash | |||
Xephyr :1 -screen 1024x768 & | |||
sleep 3 | |||
export DISPLAY=:1 | export DISPLAY=:1 | ||
dbus-launch $KDEDIR/bin/startkde | |||
</code> | </code> | ||
And make this file executable. Entering the {{path|~/kde/src}} directory should setup the required enviroment variables, so do that before running the script. | |||
You can also use Xephyr with KDM via the Xdmcp protocol and simply a new KDE 4 session to KDM. | You can also use Xephyr with KDM via the Xdmcp protocol and simply a new KDE 4 session to KDM. | ||
Line 65: | Line 54: | ||
Xephyr -ac :1& | Xephyr -ac :1& | ||
Another option to try if you get lots of refused connection errors is you may need to grant assess to your kde-devel user to your X server. | Another option to try if you get lots of refused connection errors is you may need to grant assess to your kde-devel user to your X server. Do that using: | ||
xhost +local:kde-devel | xhost +local:kde-devel | ||
Line 75: | Line 64: | ||
<BR> | <BR> | ||
----- | ----- | ||
If you run into | If you run into | ||
Line 97: | Line 75: | ||
The above code assumes you work with user ''kde-devel''. | The above code assumes you work with user ''kde-devel''. | ||
----- | ----- | ||
[[Category:KDE4]] | [[Category:KDE4]] |
Revision as of 07:58, 1 June 2011
Getting_Started/Run/Nested_Session
Languages: عربي | Asturianu | Català | Česky | Kaszëbsczi | Dansk | Deutsch | English | Esperanto | Español | Eesti | فارسی | Suomi | Français | Galego | Italiano | 日本語 | 한국어 | Norwegian | Polski | Português Brasileiro | Română | Русский | Svenska | Slovenčina | Slovenščina | српски | Türkçe | Tiếng Việt | Українська | 简体中文 | 繁體中文
Nested KDE 4 Session
Instead of using a full-blown new X session for developing software you can use Xephyr to run your development build of KDE 4 in a session parallell to your normal working session.
You can also do this with xnest, but as xnest cannot handle extensions like Render many people prefer Xephyr.
Assuming you setup your build enviroment following the instructions in Getting_Started/Build/Environment, simply put the following script in ~/kde/src/run_kde_nested.
- !/bin/bash
Xephyr :1 -screen 1024x768 &
sleep 3
export DISPLAY=:1
dbus-launch $KDEDIR/bin/startkde
And make this file executable. Entering the ~/kde/src directory should setup the required enviroment variables, so do that before running the script.
You can also use Xephyr with KDM via the Xdmcp protocol and simply a new KDE 4 session to KDM.
On Kubuntu, you can enable it by changing
[Xdmcp]
- Whether KDM should listen to incoming XDMCP requests.
- Default is true
Enable=false
in /etc/kde3/kdm/kdmrc to
[Xdmcp]
- Whether KDM should listen to incoming XDMCP requests.
- Default is true
Enable=true
and adjust your /etc/kde3/kdm/Xaccess to allow your local machine access. Additionally you should make sure to set up a port blocking policy on all external interfaces for the Xdmcp port if you are doing this on a laptop or a PC in an untrusted environment.
If you are done, simply launch Xephyr:
Xephyr -query localhost :1 -host-cursor -screen 1024x768&
where -host-cursor tries to reuse the host's cursor and -screen sets the screen dimensions.
Xephyr -ac :1&
Another option to try if you get lots of refused connection errors is you may need to grant assess to your kde-devel user to your X server. Do that using:
xhost +local:kde-devel
If you do not have Xephyr, you can also use Xnest:
Xnest -ac :1& export DISPLAY=:1
If you run into
"Call to lnusertemp failed (temporary directories full?). Check your installation."
try this:
mkdir /var/tmp/kde-devel-kde4
The above code assumes you work with user kde-devel.