Composite windows on linux

Compositors in Linux

Compositors are a very important part of the aesthetics of any linux desktop environment. In this blog, we will be looking at the following:

What are Compositors

A compositor is a software which interacts with the window system as well as graphics in linux to produce:

  • Transparency in windows
  • Transition animations
  • Drop shadows around windows which give them a 3D effect
  • V sync: Waits for the display to update before updating the display

As you can see, using compositors in a linux desktop environment adds flavour to the aesthetics. Now let us see how they work.

How Compositors Work

The compositer causes an entire sub-tree of a window hierarchy to be rendered to an off-screen buffer. Applications can then take the contents of that buffer and do whatever they like.

The off-screen buffer can be automatically merged into the parent window or merged by external programs, called compositing managers. Maintaining a buffer like this makes it easy to add additional frames during a window state change, such as fade-in and fade-out animations. Each frame of each running application goes through the compositor.

When to use a Compositor

A compositor should be used if there is a need of transparency, transition animations, v-sync and similar aesthetic features. Note that most desktop environments (like gnome) come with their own integrated compositors. Even some window managers like Compiz, Enlightenment, KWin, Marco, Metacity, Muffin, Mutter, Xfwm, do compositing on their own.

You would need to install a compositor separately if you are using a minimalistic desktop environment of window manager such as dwm, i3 or awesome. In such a case, since the environment is bare-bones (in the order of 1 to 5 megabytes), it is not shipped with a compositor off the shelf. In such cases, compositors like compton or picom can be used.

When NOT to use a Compositor

The mechanism behind a compositor revolves around maintaining an off-screen buffer and passing that around different windows. While this might add a lot of effects to your window manager or desktop environment, it is NOT ideal during gaming, where it causes latency.

While gaming, not using a compositor might lead to the lack of v-sync (unless you turn v-sync on in-game) and a lot of screen tearing, but it does away with latency between frames. I would recommend turning the compositor off while gaming. The drawbacks can be avoided if hardware V-sync is used, but it requires altering the X11 config for synchronization at a graphics driver level. Specifically, enabling the ForceFullCompositionPipeline option for use with nvidia graphics (and TearFree option in the case of Intel) . In such a case, the compositor would not have to be turned off while gaming since v-sync will be offloaded to the graphics driver instead of the compositor itself. This would of course require the v-sync in the compositor to be turned off.

Compton

Compton is a light weight and standalone compositor for the X Window System. It is a fork of the xcompmgr-dana compositor, which in turn is a fork of the xcompmgr compositor.

In addition to xcompmgr-dana, it supports the OpenGL backend, as well as colored drop-shadows. It can be easily installed for your distribution using official repos. For debain it can be installed like this:

Exit fullscreen mode

Читайте также:  Файлы отвечающие за активацию windows

Compton can be added as a startup script for the window manager of your choice.

Picom

Although compton is a pretty solid standalone compositor for X11 but sadly it is not regularly maintained anymore. Picom is an active fork of compton which aims to battle the code complexity of compton in order to draw more developers into contributing to the project.

For getting started with picom, I recommend building it from source. For debain based systems, the following dependancies need to be installed and subsequently, the following commands can be used to build picom:

Exit fullscreen mode

Configuring the Compositor

Compositors like compton and picom are highly configurable. From customized colored drop shadows, to the amount of transparency can be set both globally, and for certain windows in specific.

A sample config for picom can be found in /etc/xdg/picom.conf . Here is a copy of the same. To get started, simply copy the configuration to

Exit fullscreen mode

All of the available options are mentioned in the comments. After making a change, simply edit the configuration and save. The compositor will reload automatically.

To add a compositor to your window manager, simply put the following line in your

Exit fullscreen mode

yshui / picom

A lightweight compositor for X11

picom

This is a development branch, bugs to be expected

This is forked from the original Compton because it seems to have become unmaintained.

The current battle plan of this fork is to refactor it to make the code possible to maintain, so potential contributors won’t be scared away when they take a look at the code.

We also try to fix bugs.

You can leave your feedbacks or thoughts in the discussion tab.

The original README can be found here

Call for testers

—experimental-backends

This flag enables the refactored/partially rewritten backends.

Currently, new backends feature better vsync with the xrender backend and improved input lag with the glx backend (for non-NVIDIA users). The performance should be on par with the old backends.

New backend features will only be implemented on the new backends from now on, and the old backends will eventually be phased out after the new…

chjj / compton

A compositor for X11.

Compton

Compton is a compositor for X, and a fork of xcompmgr-dana.

I was frustrated by the low amount of standalone lightweight compositors Compton was forked from Dana Jansens’ fork of xcompmgr and refactored. I fixed whatever bug I found, and added features I wanted. Things seem stable, but don’t quote me on it. I will most likely be actively working on this until I get the features I want. This is also a learning experience for me. That is, I’m partially doing this out of a desire to learn Xlib.

Источник

Composite windows on linux

KWin is an easy to use, but flexible, composited Window Manager for Xorg windowing systems (Wayland, X11) on Linux. Its primary usage is in conjunction with a Desktop Shell (e.g. KDE Plasma Desktop). KWin is designed to go out of the way; users should not notice that they use a window manager at all. Nevertheless KWin provides a steep learning curve for advanced features, which are available, if they do not conflict with the primary mission. KWin does not have a dedicated targeted user group, but follows the targeted user group of the Desktop Shell using KWin as it’s window manager.

  • a standalone window manager (c.f. openbox, i3) and does not provide any functionality belonging to a Desktop Shell.
  • a replacement for window managers designed for use with a specific Desktop Shell (e.g. GNOME Shell)
  • a minimalistic window manager
  • designed for use without compositing or for X11 network transparency, though both are possible.
Читайте также:  Видеоредакторы для линукс минт

Contributing to KWin

Please refer to the contributing document for everything you need to know to get started contributing to KWin.

Contacting KWin development team

  • mailing list: kwin@kde.org
  • IRC: #kde-kwin on irc.libera.chat

If you are an application developer having questions regarding windowing systems (either X11 or Wayland) please do not hesitate to contact us. Preferable through our mailing list. Ideally subscribe to the mailing list, so that your mail doesn’t get stuck in the moderation queue.

Please contact the support channels of your Linux distribution for user support. The KWin development team does not provide end user support.

Guidelines for new features

A new Feature can only be added to KWin if:

  • it does not violate the primary missions as stated at the start of this document
  • it does not introduce instabilities
  • it is maintained, that is bugs are fixed in a timely manner (second next minor release) if it is not a corner case.
  • it works together with all existing features
  • it supports both single and multi screen (xrandr)
  • it adds a significant advantage
  • it is feature complete, that is supports at least all useful features from competitive implementations
  • it is not a special case for a small user group
  • it does not increase code complexity significantly
  • it does not affect KWin’s license (GPLv2+)

All new added features are under probation, that is if any of the non-functional requirements as listed above do not hold true in the next two feature releases, the added feature will be removed again.

The same non functional requirements hold true for any kind of plugins (effects, scripts, etc.). It is suggested to use scripted plugins and distribute them separately.

About

Easy to use, but flexible, X Window Manager and Wayland Compositor

Источник

7 Best Free Compositing Window Managers

A window manager is software that manages the windows that applications bring up. For example, when you start an application, there will be a window manager running in the background, responsible for the placement and appearance of windows.

It is important not to confuse a window manager with a desktop environment. A desktop environment typically consists of icons, windows, toolbars, folders, wallpapers, and desktop widgets. They provide a collection of libraries and applications made to operate cohesively together. A desktop environment contains its own window manager.

There are a few different types of window managers. This article focuses on compositing window managers.

A compositing window manager, or compositor, is a window manager that provides applications with a separate and independent buffer for each window. The window manager then processes and combines, or composites, output from these separate buffers onto a common desktop. It also controls how they display and interact with each other, and with the rest of the desktop environment.

Compositing window managers may perform additional processing on buffered windows, applying 2D and 3D animated effects such as transparency, fading, scaling, duplicating, bending and contorting, shuffling, and redirecting applications. The addition of a virtual third dimension allows for features such as realistic shadows beneath windows, the appearance of distance and depth, live thumbnail versions of windows, and complex animations.

Here’s our recommendations. All of the software is free and open source goodness.

Источник

Можно ли размещать контейнеры Windows в linux?

можно ли это запустить Контейнеры Windows on Linux? Сценарий основан на решении, написанном в .NET (старая сеть) и пользователей Linux что хочет запустить это с Докером, чтобы обеспечить net462 написано API на localhost .

Я использую бета-версию от Докер для windows

Если нет, то почему windows может запускать контейнеры linux, а не и наоборот?

Читайте также:  2b2t minecraft windows 10 edition

Как прошло некоторое время и этот вопрос популярный. Я хотел бы добавить здесь одно замечание, что обходной путь заключается в использовании нового netstandard. Это позволило мне упаковать 4.6.2 framework в новую библиотеку.

6 ответов:

бонус: не имеет прямого отношения к вопросу, но теперь вы можете запускать не только сам контейнер linux, но и оркестратор, такой как kubernetes: https://blog.docker.com/2018/07/kubernetes-is-now-available-in-docker-desktop-stable-channel/

Обновлено в 2018 году:

оригинальный ответ в целом правильный, но несколько месяцев назад, докер добавили экспериментальная функция LCOW (официальный репозиторий github).

Не Докер для Windows уже работает Linux контейнеры? Вот именно. Docker для Windows может запускать контейнеры Linux или Windows с поддержкой для контейнеров Linux через виртуальную машину Hyper-V Moby Linux (начиная с Docker для Windows 17.10 эта виртуальная машина основана на LinuxKit).

установка для запуска контейнеров Linux с LCOW намного проще, чем предыдущая архитектура где виртуальная машина Hyper-V Linux запускает Докер Linux демон, вместе со всеми вашими контейнерами. С lcow, демон Docker запускается как процесс Windows (то же самое как и при запуске Docker Windows контейнеры), и каждый раз, когда вы запускаете докер контейнера Linux запуск минимального гипервизора Hyper-V под управлением виртуальной машины с Linux ядра, рунк и контейнер процессов, запущенных на вершине.

потому что есть только один демон Docker, и потому что этот демон сейчас работает на Windows, it скоро можно будет запускать Windows и Linux Контейнеры Docker бок о бок, в том же сетевом пространстве имен. Этот будет разблокировать много захватывающие сценарии развития и производства для Пользователи Docker в Windows.

Оригинал:

Как уже упоминалось в комментариях @PanagiotisKanavos, контейнеры не предназначены для виртуализации, и они используют ресурсы главной машины. В результате на данный момент контейнер windows не может работать «как есть» на машине linux.

но — вы можете сделать это с помощью VM — как это работает на windows. Вы можете установите Windows VM на вашем хосте linux, который позволит запускать контейнеры windows.

с ним, ИМХО запустить его таким образом на среде PROD не будет лучшей идеей.

и ответ предоставляет более подробную информацию.

нет, вы не можете запускать контейнеры windows непосредственно на Linux.

но Windows Server поставляется в комплекте с базовым образом ubuntu OS (после сентября 2016 бета-версии пакета обновления). Именно по этой причине вы можете запускать linux на windows, а не по-другому. Проверьте здесь. https://thenewstack.io/finally-linux-containers-really-will-run-windows-linuxkit/

вы можете переключаться между контейнерами ОС Linux и windows, щелкнув правой кнопкой мыши на ДОКере в меню лотка.

вы можете использовать контейнеры Windows внутри виртуальной машины (гостевая ОС должна соответствовать требованиям — Windows 10 Pro или Windows 2016).

вы можете использовать VirtualBox, просто включите интерфейс Hyper-V внутри системы / ускорения / паравиртуализации.

после этого, если Docker не запускается из-за ошибки, используйте «переключиться на контейнеры Windows. «в настройках.

(Это может быть перемещено в качестве комментария к принятому ответьте, но у меня недостаточно репутации, чтобы сделать это)

в отличие от виртуализации, контейнеризация использует одну и ту же ОС хоста. Таким образом, контейнер, построенный на linux, не может быть запущен на windows и наоборот.

в windows вы должны воспользоваться помощью виртуализации (с помощью Hyper-v), чтобы иметь ту же ОС, что и ОС ваших контейнеров, а затем вы должны иметь возможность запускать то же самое.

Docker для windows-это аналогичное приложение, которое построено на Hyper-v и помогает в запуске контейнера Linux docker в windows. Но насколько я знаю, нет ничего такого что помогает запускать контейнеры windows на linux.

вы можете запустить MSSQL и DOTNET на Linux, и, следовательно, внутри контейнеров Linux, в настоящее время.

контейнеры Windows не работают на Linux, а также вы не можете запускать контейнеры Linux на Windows напрямую.

Источник

Оцените статью