Is there any way to force firefox to a certain geometry without a window manager?

StackOverflow https://stackoverflow.com/questions/9817273

  •  25-05-2021
  •  | 
  •  

سؤال

I want to run Firefox directly on top of X for a kiosk, but I can't get it to maximize so there is blank space off to the right.

As far as I know, Firefox does not support the standard --geometry option; several attempts at this were fruitless.

There used to be a javascript hack that resized the window, but a new "feature" breaks that as well.

هل كانت مفيدة؟

المحلول 2

I solved this by using a more suited window manager: matchbox. It automagically sets the window to the entire viewing field, and is very light-weight.

sudo apt-get install matchbox-window-manager

and in my kiosk session file:

while (true ) do
    matchbox-window-manager &
    firefox <my url here>
done;

Don't let their semi-unprofessional site turn you away--it works like a charm.

http://matchbox-project.org/

نصائح أخرى

Would Xnee help? Record pressing F11 and it could work?

There is a library which overrides Firefox window positioning. Every time Firefox requests a specific position of the window, the call gets modified to include your specified position.

  1. download and compile:

    wget http://www.ipsec.info/w/t/override-gtk-geometry.c
    gcc -Wall -fPIC -shared `pkg-config --cflags gtk+-3.0` -o override-gtk-geometry.so `pkg-config --libs gtk+-3.0` override-gtk-geometry.c
    
  2. run:

    IPSEC_OVERRIDE_X=10 IPSEC_OVERRIDE_Y=10 \
    IPSEC_OVERRIDE_W=300 IPSEC_OVERRIDE_H=300 \
    LD_PRELOAD=./override-gtk-geometry.so firefox
    
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top