site  contact  subhomenews

Enhanced flip out of container

November 22, 2024 — BarryK

I posted recently about running Easy Daedalus in a container:

Alfons has tested it and reported success with apps installed in the Daedalus container.

He has made a request, that the clipboard contents be transferred between the main desktop and the container desktop. Yes, it is doable, but first I have to setup some infrastructure.

Currently, have to hit the key combination ALT+F6 to flip out of the container. First, thing, I want to have a button on the desktop to do that, as an alternative to typing that key combination. But before thinking about the button, need to think how the switch will be accomplished...

I want to create ALT+F6 programmatically, and xdotool immediately comes to mind. There was a lot of messing around trying different things, but ended up with a very simple implementation.

Here is the modification to /usr/local/easy_containers/ec-chroot, at line 143:

https://github.com/bkauler/woofq/commit/a27ec38e7ec618fdc0ff24915a7ed811479ac994

Here is the new /usr/local/easy_containers/flip-out-of-container:

https://github.com/bkauler/woofq/commit/2d71e1b487f6c1cc8a21247b4b618431d512967c

Inside the container, just write anything to /.flip-out-flg and you immediately get flipped back onto the Scarthgap desktop.

Usage of xdotool is very simple, just this:

xdotool key Alt_L+F6

...that sends the key combination to the current window, and from the Scarthgap desktop point-of-view, that is the Xephyr window.

Getting onto midnight. Will relax for awhile and tomorrow think about a "flip" button in the container desktop, and after that code to copy clipboard.   

Tags: easy