m1k1o / neko

A self hosted virtual browser that runs in docker and uses WebRTC.
https://neko.m1k1o.net/
Apache License 2.0
5.96k stars 449 forks source link

Un-minimizing Chrome #285

Closed innerop closed 1 year ago

innerop commented 1 year ago

Hi @m1k1o ,

I minimized Chrome and was not able to bring it back up unless I log out and login again.

Is there another way to bring it back up?

m1k1o commented 1 year ago

That would be the task of display manager (like kde or xfce), but for browser they are not installed. So there is no way of un-minimize anything. It would be nice to find some lightweight display manager, that either shows minimized programs or automatically un-minimizes them so that people do not end up stuck having their program minimized.

Actually, we are trying to hide window decoration (maximize, minimize and close button). But some programs such as google chrome show them anyway.

innerop commented 1 year ago

It's weird that Chrome is ignoring the window manager config for no decoration.

I see that you have a large section in openbox.xml

There is a large keyboard section in the included openbox.xml, so I can try the shortcuts for switching between apps and see if that brings it up after being minimized but I googled around and the shortcuts for toggling minimize/maxmize is

<keybind key="C-A-x">
  <action name="ToggleMaximize"/>
</keybind>
m1k1o commented 1 year ago

Thats a good idea, I didn't think of that. That configuration is largely only default one.

You can force chrome to use system title bars and borders this way: image

It is also requested in profile but maybe they changed that configuration over time and its not setting properly. https://github.com/m1k1o/neko/blob/b2080649ea50d942c3e9887813d867edbfc21052/.docker/google-chrome/preferences.json#L61

innerop commented 1 year ago

Hmm. So openbox is being loaded but that was turned off in google chrome itself. Fun! ok.

I'm not yet setup to do PRs, so feel free to change that.

innerop commented 1 year ago

@m1k1o

I set that to true and cleared docker cache and rebuilt the google-chrome docker (not the base tho) and docker-compose up, still i see the minimize, maximize and close buttons. Hmm.

innerop commented 1 year ago

Will close for now since it seems to be an issue with google chrome itself. May work fine for ungoogled-chrome or chromium or firefox et al.

m1k1o commented 1 year ago

There is a way, you need to have installed xdotool and then just xdotool windowminimize $(xdotool search --name chrome).

innerop commented 1 year ago

Ok, that's good to know. Sorry, I've got busy with a new project, and will circle back here when done. Thanks for this tip. I've never heard of xdotool.