Giter VIP home page Giter VIP logo

docker-kdesrc-build's Introduction

docker-kdesrc-build

This project aims to provide a lightweight and ready to use KDE development environment by wrapping the kdesrc-build tool in Docker.

This way, you can compile and work on the latest version of the KDE project and keep your main system clean of unwanted development packages.

You can run a KDE application on your current desktop by sharing your X server instance inside the Docker container

Moreover, you can run and try the entire Plasma Desktop in another tty !

Requirements

  • python >= 3.2
  • docopt
  • docker >= 1.5

Usage

Quick and simple

Just choose a distro as a base system for the container (archlinux is recommended, as it has the latest dependencies), and run the script :

./run.py --base archlinux

The script will do the following operations :

  • check for a Dockerfile-archlinux file
  • create a dir under $HOME/kdebuild/archlinux to be mounted under /work
  • build or update the Docker image archlinux-kdedev if necessary
  • mount bashrc as a volume (/home/kdedev/.bashrc)
  • mount kdesrc-buildrc as a volume (/home/kdedev/.kdesrc-buildrc)
  • run the container
  • run /bin/bash

You will find the kdesrc-build repository cloned in your home directory. You can run ./kdesrc-build/kdesrc-build to start the build.

Run the Plasma Desktop

1 - Using a shared X11 socket

To run an entire Plasma Desktop session, we need to create a new X server instance , running on a new tty, for example, tty8.

# startx -display :1 -- :1 vt8

Also you have to explicitly authorize access to allow clients inside the container to use this xserver instance :

# DISPLAY=':1' xhost +

Then, run the container and use the --display option to specify the right tty to be used by applications :

./run.py --base archlinux --display ':1'

Execute startkde from your install directory (which is /work by default)

Note that you should have build the workspace set first (kdesrc-build workspace)

Inside the container :

$ /work/install/bin/startplasma-x11

And the KDE desktop should be starting on tty8 !

2 - Using a VNC Server

Another method consist to run a Virtual FrameBuffer inside the container, as well as a VNC server to view it's content.

Run the environement :

./run.py --base archlinux 

Run the Xvfb server :

sudo Xvfb $DISPLAY +extension GLX +render -screen 0 1024x780x24 &

Run the VNC server :

sudo x11vnc -usepw -display $DISPLAY

Now you should inspect the container on the host

docker inspect <container name | ID>

and check for it's IP address:

"IPAddress": "172.17.0.10"

You can connect to the VNC server container-ip-address:5900 with a VNC client on the host !

Now you can run any applications, including startplasma-x11 !

3 Xephyr

Install Xephyr via package manager

Tune docker:

```sudo systemctl unmask docker.service```
```sudo systemctl unmask docker.socket```
```sudo systemctl restart docker.service```

Run Xephyr:

```Xephyr -screen 1024x768 :1```

Run the environment:

```./run.py --base opensuse --display ':1'```

Install dependencies in container:

```./kdesrc-build/kdesrc-build --initial-setup```

Start DBus & Plasma :

```sudo dbus-uuidgen --ensure && sudo mkdir -p /run/dbus/ && dbus-launch --sh-syntax > $HOME/dbusenv && source $HOME/dbusenv && /work/install/bin/startplasma-x11```

kdesrc-buildrc configuration

To configure kdesrc-buildrc, take a look at http://kdesrc-build.kde.org/documentation/

Use a specific version of Qt

If you want to change the Qt version used during the compilation, you can provide a the path to a Qt installation on the host with :

./run.py --base archlinux --qt /path/to/qt

This path will be mounted under /qt

Don't forget to change the qtdir variable in the kdesrc-buildrc

Dependencies installed

Archlinux Fedora OpenSUSE Ubuntu Neon
Frameworks
Workspace
Applications

docker-kdesrc-build's People

Contributors

wenzel avatar aashipov avatar suranc avatar carlonluca avatar vhanda avatar aitorpazos avatar megametres avatar kleag avatar manj38 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.