Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-06-17 01:30:30

cjsmall
Member
Registered: 2012-12-02
Posts: 57
LinuxFirefox 139.0

Can the Thunar file manager be sized and positioned?

Xubuntu 24.04.2
Thunar 4.18.8

Thunar does not support the X11 -geometry (or --geometry) argument.  I want to programmatically position two instances of the file manager at specific sizes and locations on my screen.  I've been using Nemo because it does support the --geometry spec which is great, but it has a bug that causes it to crash every time I mount my Samsung S10+ phone.  I'd replace Nemo with Thunar which does not have this problem,  if I could get control over the window size and position.  Any suggestions?

Offline

#2 2025-06-17 09:59:55

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,993
LinuxFirefox 139.0

Re: Can the Thunar file manager be sized and positioned?

You could use wmctrl:

thunar -w && wmctrl -r :ACTIVE: -e 0,100,100,1000,500

...where the "-e" parameters are GRAVITY, X, Y, WIDTH, HEIGHT.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2025-06-17 16:12:49

cjsmall
Member
Registered: 2012-12-02
Posts: 57
LinuxFirefox 139.0

Re: Can the Thunar file manager be sized and positioned?

My version of Thunar does not have a -w option and this command simply resizes and positions the terminal window from which it is launched.  I tried launching Thunar and then running:

wmctrl -r thunar  -e 0,100,100,1000,500

but nothing happens.  I found hidden Thunar options (--help-all) with a --class=CLASS and --name=NAME option and tried both, but xwininfo(1) reports neither and wnctrl does nothing with these assigned names.

So, while I like the fundamental idea, I still haven't found a way to grab control of a running Thunar instance, let alone distinguish between two instances so that they can be positioned differently.  Any further suggestions?

I'm still at a loss to understand why basic sizing and positioning (i.e., --geometry) is not provided as a fundamental capability of every display program in existence, or why it is actively being removed from programs that once possessed the capability.

Offline

#4 2025-06-17 17:46:13

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,993
LinuxFirefox 139.0

Re: Can the Thunar file manager be sized and positioned?

I'm using a newer version of thunar that supports the -w option.

Try these as alternatives:

thunar && wmctrl -r :ACTIVE: -e 0,100,100,1000,500
thunar & sleep 1 && wmctrl -r :ACTIVE: -e 0,100,100,1000,500

Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2025-06-17 20:58:56

cjsmall
Member
Registered: 2012-12-02
Posts: 57
LinuxFirefox 139.0

Re: Can the Thunar file manager be sized and positioned?

ToZ:  I had tried the first suggestion, but adding the sleep worked.  In my script that launches the file managers, U was also launching some other applications on the screen and this was causing problems, but I managed to resolve things with some additional sleep statements.  Thanks for all of your help.

The other issue here, which I immediately recognized with the :ACTIVE:argument you first suggested is that I have focus-follows-mouse enabled on my desktop, so if the mouse is not where the Thunar instance happens to pop-up on the screen, or if the mouse is in motion at the wrong time and place, the "active" window may not actually be the one launched with the command.  This is why I don't like the approach of separating the window sizing and positioning from the application itself.  I think a better design is to have each app communicate with the window manager directly so that there is no ambiguity in what needs to me done.

Anyway, your assistance is very much appreciated.  I'll be glad to not have Nemo crashing on me all the time!

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 545.43 KiB (Peak: 546.71 KiB) ]