You are not logged in.
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
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
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
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
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
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
Offline
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
Yes thank you.
Offline
Then please mark it as [SOLVED]...
https://gitlab.archlinux.org/archlinux/ … ow-to-post
Offline