mviereck / x11docker

Run GUI applications and desktops in docker and podman containers. Focus on security.
MIT License
5.62k stars 378 forks source link

Run the docker image for flameshot with the latest git master version of x11docker on Ubuntu 20.10. #318

Closed hongyi-zhao closed 3 years ago

hongyi-zhao commented 3 years ago

I noticed there is a docker image for flameshot on dockerhub and its github repo is located here. On Ubuntu 20.10, I try to launch it with the latest git master version of x11docker as shown below but failed:

$ docker pull manuellr/flameshot
$ x11docker manuellr/flameshot

Any hints/fixes for this problem are highly appreciated.

Regards, HY

eine commented 3 years ago
hongyi-zhao commented 3 years ago

I've tried to run it again with the following command:

$ x11docker -v manuellr/flameshot >& flameshot.log

See the full detailed logfile for more info.

mviereck commented 3 years ago

It seems the container starts up successfully. The log shows that flameshot is running. You might need to run with --hostdisplay --clipboard to make screenshots from the host X server.

The log shows that flameshot runs in Xephyr what does not make much sense for this application. flameshot should work as expected within the Xephyr window.

In general please describe what you expected to happen and what happened instead. In this case I had to figure out myself what flameshot is supposed to do and what you might have expected.

hongyi-zhao commented 3 years ago

It seems the container starts up successfully. The log shows that flameshot is running. You might need to run with --hostdisplay --clipboard to make screenshots from the host X server.

I tried again with the following options:

$ x11docker -v --hostdisplay --clipboard manuellr/flameshot &> flameshot.log

But still failed to see any icon of it and can't figure out how to use it on the host.

See the new flameshot.log file for more info.

The log shows that flameshot runs in Xephyr what does not make much sense for this application. flameshot should work as expected within the Xephyr window.

Obviously, flameshot is only a specific application/utility, and I just want to use it on my host with the service supplied by the container without installation it on the host, instead of logging into the container for using it.

In general please describe what you expected to happen and what happened instead. In this case I had to figure out myself what flameshot is supposed to do and what you might have expected.

Thanks for your instructions.

Regards, HY

mviereck commented 3 years ago

But still failed to see any icon of it and can't figure out how to use it on the host.

Does your desktop environment have a systray to show tray icons? IIRC Ubuntu uses Gnome 3 that does not provide a systray. Likely you need a Gnome systray extension.

hongyi-zhao commented 3 years ago

I really don't know what's the package name for the Gnome systray extension. See the following for the installed packages on my box:

$ dpkg --get-selections |grep  -i gnome-shell-extension
gnome-shell-extension-appindicator      install
gnome-shell-extension-desktop-icons     install
gnome-shell-extension-prefs         install
gnome-shell-extension-ubuntu-dock       install
mviereck commented 3 years ago

I don't have Gnome installed, so I can#t give instructions in detail. gnome-shell-extension-appindicator is likely the right package. The extension needs to be enabled in Gnome settings. If you don't succeed, try with an application like radiotray installed on host until you find a systray showing the radiotray icon.

hongyi-zhao commented 3 years ago

I don't have Gnome installed, so I can#t give instructions in detail.

What's your preferable DM?

gnome-shell-extension-appindicator is likely the right package. The extension needs to be enabled in Gnome settings. If you don't succeed, try with an application like radiotray installed on host until you find a systray showing the radiotray icon.

You'are right. I enabled it from within gnome-tweaks and can see the radiotray icon. But I still can't see the icon on host's systray for dockerized flameshot service when running it like the following:

$ x11docker --hostdisplay --clipboard manuellr/flameshot

mviereck commented 3 years ago

But I still can't see the icon on host's systray for dockerized flameshot service when running it like the following: $ x11docker --hostdisplay --clipboard manuellr/flameshot

I've downloaded the image, it works here quite well (Xfce). The systray icon appears, and the applications is useable. Not sure why it does not appear in Gnome. The systray in general often causes issues, it is an implementation mess.

What's your preferable DM?

I prefer and use the Xfce desktop. It is slim and fast, and its panel has many useful plugins and is highly configurable.

mviereck commented 3 years ago

Is the issue fixed for you? Can we close the ticket?

hongyi-zhao commented 3 years ago

I still can't figure out the workaround on Ubuntu 20.10. But at least you've given me some clues and possible alternatives.