Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-09-17 23:03:19

advice1010
Member
Registered: 2023-02-19
Posts: 68

Way to set a program to launch in full screen mode

I apologize if this has already been asked before.
I see that Xfce offers hotkey Alt+F11 to apply full screen to any program, even if they don't offer within programs settings, which I really like.
I was wondering if there is any way within Xfce to be able to set specific programs to automatically load in this full screen mode?

I know there are third party tools but they don't do this smoothly because they open the window and then activate the hotkey.
(I believe I tried both wmcrl and xdotool, but in as mentioned would rather not use third party tool, like how Xfce does this)
Would like it to be a smooth open right into full screen mode if possible.

Thank You

Offline

#2 2023-09-18 23:24:06

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,060

Re: Way to set a program to launch in full screen mode

Unfortunately, Xfce doesn't have a built-in option to start a program fullscreen. You need to rely either on the app or a third-party tool.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Online

#3 2024-01-14 20:51:56

advice1010
Member
Registered: 2023-02-19
Posts: 68

Re: Way to set a program to launch in full screen mode

@ToZ
Thank you for the response.
As mentioned when I tried 3rd party apps like wmcrl, didn't really achieve this as smooth as I would like.
The program I was really looking to do this in only comes in gtk2 & qt5 versions so the following won't solve what I am looking for, but still curious.
By any chance do you know if there is a way to achieve this using gtk.css?
Came across the following link and it just got me wondering if this was possible.
https://docs.gtk.org/gtk3/method.Window.fullscreen.html
Just thinking maybe if there is a way to achieve this in gtk3, maybe this would mean that there is a way to achieve this in gtk2 using the .gtkrc2.0 file / widgets / environment variables.
Thanks again

Offline

#4 2024-01-14 21:06:35

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,060

Re: Way to set a program to launch in full screen mode

advice1010 wrote:

As mentioned when I tried 3rd party apps like wmcrl, didn't really achieve this as smooth as I would like.

Have a look at Devilspie or devilspie2. They can set windows to fullscreen.  If you want to just use wmctrl, you can try something like this:

APPNAME & sleep 1 && wmctrl -r :ACTIVE: -b add,fullscreen

By any chance do you know if there is a way to achieve this using gtk.css?

Unfortunately no - that's not what CSS is for.

Came across the following link and it just got me wondering if this was possible.
https://docs.gtk.org/gtk3/method.Window.fullscreen.html

That's if you're programming an app and you want it fullscreen - its a gtk function.

Just thinking maybe if there is a way to achieve this in gtk3, maybe this would mean that there is a way to achieve this in gtk2 using the .gtkrc2.0 file / widgets / environment variables.

You just need to use an EWMH-complaint tool like wmctrl or devilspie.

It may take some extra configuration though:

  • devilspie - you need to create a script and have "devilspie" constantly running (note it is easy using this tool to force all open windows fullscreen)

  • wmctrl - you'll need to update your .desktop files


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Online

#5 Yesterday 20:03:49

advice1010
Member
Registered: 2023-02-19
Posts: 68

Re: Way to set a program to launch in full screen mode

@ToZ
Thank you for this, some applications work perfectly with the “wmctrl” command you provided but others are not as smooth still.  I played around with the sleep timer which helps with some.
Still trying out different things, I was also able to use the command you provided and swap out the “wmctrl” with “xdotool” linked to hotkey I setup to take advantage of the XFCE full screen built in.

Offline

#6 Yesterday 20:04:55

advice1010
Member
Registered: 2023-02-19
Posts: 68

Re: Way to set a program to launch in full screen mode

QUESTION
I recently noticed something about fullscreen in XFCE that I was hoping someone would be able to explain / maybe be able to utilize.
I noticed that in XFCE if you....
-Open certain applications (I mention some below)
-Use the hotkey to activate XFCE fullscreen mode Alt+F11 (I think is the default)
-Then close the application using hotkey
-If you launch that application again XFCE somehow remembers that this application was in fullscreen and it loads it up in fullscreen again automatically!

At first this occurred with the first two programs I tested this on so I was excited, thinking all applications would be able to do this but unfortunately this is not the case.

WORKED
Featherpad (QT) works
Geany (GTK) works

DID NOT WORK
Thunar (thought it might be because of Thunar daemon)
Firefox
GIMP
Also the main program I was trying to get this to work on is a standalone QT based application that does not work either.

So somehow it appears to be possible to be able to launch an application in XFCEs fullscreen mode.
I was wondering if anyone knows what XFCE or those two programs above are using in this case / how this is even possible?

Thank You

Last edited by advice1010 (Yesterday 20:06:04)

Offline

#7 Yesterday 21:55:50

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,060

Re: Way to set a program to launch in full screen mode

The application itself would need to support saving and restoring position, in this case fullscreen. For featherpad, you can see it in its config.cpp file.

If you want to force other applications to start fullscreen, you'll need to use the tools/methods listed above.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Online

Board footer

Powered by FluxBB