You are not logged in.

#1 2021-05-03 02:46:34

boredhero
Member
Registered: 2020-10-14
Posts: 4

How to force an application to be full screen (DE: GNOME WM: Mutter)

Hi, I have a java app that I am trying to get to be *completely* full screen, as in, you cannot exit the application if you try. Not sure what the best practices going about this are. If possible I'd like to have my machine autologin and then immediately launch the app in this state.

Offline

#2 2021-05-03 03:01:29

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 25,232

Re: How to force an application to be full screen (DE: GNOME WM: Mutter)

boredhero wrote:

If possible I'd like to have my machine autologin and then immediately launch the app in this state.

Then why are you using gnome / mutter?

Are you creating this app, or did someone else write it and you're trying to use it in this way?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2021-05-03 03:38:11

boredhero
Member
Registered: 2020-10-14
Posts: 4

Re: How to force an application to be full screen (DE: GNOME WM: Mutter)

Trilby wrote:
boredhero wrote:

If possible I'd like to have my machine autologin and then immediately launch the app in this state.

Then why are you using gnome / mutter?

Are you creating this app, or did someone else write it and you're trying to use it in this way?

Yes, this is my own app. However, it runs as root (I am aware this is a security issue but that isn't really a practical concern here). Getting it to run without X already working is a bug-laden mess due to the root requirement.

Offline

#4 2021-05-03 14:02:16

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 25,232

Re: How to force an application to be full screen (DE: GNOME WM: Mutter)

boredhero wrote:

Getting it to run without X already working is a bug-laden mess due to the root requirement.

I didn't suggest not using X11, just not gnome.  If you don't want the window managed, don't use a window manager, and certainly not a full DE.

Just launch your program from an xinitrc with xinit/startx and have it set it's geometry to the screen size.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2021-05-03 18:38:59

boredhero
Member
Registered: 2020-10-14
Posts: 4

Re: How to force an application to be full screen (DE: GNOME WM: Mutter)

Trilby wrote:
boredhero wrote:

Getting it to run without X already working is a bug-laden mess due to the root requirement.

I didn't suggest not using X11, just not gnome.  If you don't want the window managed, don't use a window manager, and certainly not a full DE.

Just launch your program from an xinitrc with xinit/startx and have it set it's geometry to the screen size.

Unrelated update: The application no longer needs root thanks to adding the user to some groups like uucp.

So I've tried doing that by making a systemd service but it never seems to actually start and I'm not really sure why:

fgstart.service:

[Unit]
Description=fgstart service
After=multi-user.target

[Service]
Type=idle
User=fg
ExecStart=/usr/bin/fgstart.sh
Restart=always
RestartSec=30

[Install]
WantedBy=multi-user.target

fgstart.sh (this command works to launch the app if I just type it in):

#!/bin/bash
startx -- -nocursor

and then my .xinitrc

#!/bin/sh
exec java -jar -Dcom.sun.javafx.isEmbedded=true -Dcom.sun.javafx.touch=true -Dcom.sun.javafx.virtualKeyboard=javafx -Djdk.gtk.version=2 fg_app.jar TestMode=true Res=1280x1024 Mode=TR IE="//localhost/envoy/system" EXT=None

(Ignore the args in the launch command that's just everything that the app requires to launch and display correctly, it works fine if you manually start it via startx -- -nocursor)
I need to just press the power button and have it automatically boot into this app with no login prompt or anything.

Offline

#6 2021-05-03 18:51:07

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 4,327

Re: How to force an application to be full screen (DE: GNOME WM: Mutter)

I wouldn't bother with a systemd service, just use...
https://wiki.archlinux.org/title/Xinit# … X_at_login

Also your ~/.xinitrc is missing some vital sections.....
https://wiki.archlinux.org/title/Xinit#xinitrc


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Online

#7 2021-05-03 19:44:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 25,232

Re: How to force an application to be full screen (DE: GNOME WM: Mutter)

boredhero wrote:

Ignore the args in the launch command that's just everything that the app requires to launch and display correctly, it works fine if you manually start it via startx -- -nocursor

So is the question posed in this thread solved?  If you need a systemd service, that is a different topic - though as above, I see no reason at all to have a systemd service.  If you must, it would at least have to be a user service (and there's no reason for the script middle man, a service file starting a script to run a single command seems silly when a service file can run the command directly).  But to meet your stated goals, you should just enabled autologin and automatic starting of X from your ~/.{bash_}profile as described in the wiki.

Last edited by Trilby (2021-05-03 19:45:35)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB