[Solved] How do I make so that Thunar always starts at fixed coordinates on the desktop?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
[Solved] How do I make so that Thunar always starts at fixed coordinates on the desktop?
Well, the question is entirely in the title. I would be happy if I could do that without using Compiz or any other fancy manager of the same kind.
Thank you.
Thank you.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: How do I make so that Thunar always starts at fixed coordinates on the desktop?
Hi APSchmidt
You may control applications gui with wmctrl
Also there are xdotool, which some folks prefer more.
Or consider switch to nemo. Then you'll be able to position window by executing
Whatever option you choose, add it to
AFAIK thunar itself unable to set position for its window.
You may control applications gui with wmctrl
Also there are xdotool, which some folks prefer more.
Or consider switch to nemo. Then you'll be able to position window by executing
nemo --geometry ...
Whatever option you choose, add it to
~/.local/share/applications/Thunar.desktop
Re: How do I make so that Thunar always starts at fixed coordinates on the desktop?
Thank you for your answer.twerq wrote: ⤴Mon Jul 13, 2020 1:34 pmAFAIK thunar itself unable to set position for its window.
You may control applications gui with wmctrl
Also there are xdotool, which some folks prefer more. Or consider switch to nemo. Then you'll be able to position window by executingnemo --geometry ...
Whatever option you choose, add it to~/.local/share/applications/Thunar.desktop
Isn't there a file manager for Xfce that just remembers its last position and automatically starts at that position when started?
Re: How do I make so that Thunar always starts at fixed coordinates on the desktop?
I'm not aware of a way to select an exact screen position but this method always opens Thunar in the centre of the screen -
Settings Manager > Window Manager Tweaks > Placement > move the slider to Large
Settings Manager > Window Manager Tweaks > Placement > move the slider to Large
Re: How do I make so that Thunar always starts at fixed coordinates on the desktop?
I'm already using it. I remember trying it in Tricia but it never started Thunar where the windows were, even after saving the current session.
I just tried it again and it works!!! Thank you for nudging me into trying it again.
Re: How do I make so that Thunar always starts at fixed coordinates on the desktop?
Thanks for your suggestion. I use it already so that Firefox and Thunderbird (and many others) start centred on screen.
Re: How do I make so that Thunar always starts at fixed coordinates on the desktop?
So, I was using this and it worked well, until something happened that made me reconsider: viewtopic.php?f=57&t=325389
I'm back to not saving the current session and starting Thunar on login. That would be great if I could use a script setting the start position of each Thunar window though.
Re: [Solved] How do I make so that Thunar always starts at fixed coordinates on the desktop?
You should check viewtopic.php?p=1846201#p1846201. Get familiar with one of suggested options. Then just arrange your solution as script and add it to "Startup Applications" list.
Re: [Solved] How do I make so that Thunar always starts at fixed coordinates on the desktop?
I'm unable to do that.twerq wrote: ⤴Mon Jul 20, 2020 11:04 amYou should check viewtopic.php?p=1846201#p1846201. Get familiar with one of suggested options. Then just arrange your solution as script and add it to "Startup Applications" list.
Edit: I would have tried Devilspie but it's broken: https://www.mail-archive.com/ubuntu-bug ... 04443.html
Re: [Solved] How do I make so that Thunar always starts at fixed coordinates on the desktop?
Ok. Here is the example of how one can manipulate the application window.
I will try to help if some of the futher steps are not clear for you.
Re: [Solved] How do I make so that Thunar always starts at fixed coordinates on the desktop?
Thank you!twerq wrote: ⤴Tue Jul 21, 2020 5:59 amOk. Here is the example of how one can manipulate the application window.
I will try to help if some of the futher steps are not clear for you.
I can use the following commands after booting but I have no idea how to make them into a script, especially since Devilspie doesn't work. Basically, I need to store the windows IDs into variables and use these variables in the second command. It's very basic scripting but how do I do that?
Code: Select all
xdotool search --name "anne - gestionnaire de fichiers"
xdotool windowmove windowID 5 5 && xdotool windowmove windowID 5 5
Re: [Solved] How do I make so that Thunar always starts at fixed coordinates on the desktop?
You almost have got solution. Great!
will get windowID with name you set, then move it to x=5, y=5 and resize to 5x5. In one xdotool call!
Just check if it work for you as expected. Then modify xfce startup applications.
Fortunately
xdotool
can chain its actions. And
Code: Select all
xdotool search --name "anne - gestionnaire de fichiers" windowmove 5 5 windowsize 5 5
Just check if it work for you as expected. Then modify xfce startup applications.
Re: [Solved] How do I make so that Thunar always starts at fixed coordinates on the desktop?
The command works, thanks! I added it in Session and Startup; I'll see if it works next time I reboot.twerq wrote: ⤴Wed Jul 22, 2020 11:10 amFortunatelyxdotool
can chain its actions. Andwill get windowID with name you set, then move it to x=5, y=5 and resize to 5x5. In one xdotool call!Code: Select all
xdotool search --name "anne - gestionnaire de fichiers" windowmove 5 5 windowsize 5 5
Just check if it work for you as expected. Then modify xfce startup applications.
Re: [Solved] How do I make so that Thunar always starts at fixed coordinates on the desktop?
It doesn't work. I suspected so, I think the command fires before Thunar has opened a window on the desktop. I've modified the command into:
Code: Select all
sh -c "sleep 5; xdotool search --name 'anne - gestionnaire de fichiers' windowmove 5 5 windowsize 620 310"
Re: [Solved] How do I make so that Thunar always starts at fixed coordinates on the desktop?
I was right and now it works! For the other windows I could open, I use a launcher that contains the same command without the "sleep 5" part.APSchmidt wrote: ⤴Fri Jul 24, 2020 3:43 amIt doesn't work. I suspected so, I think the command fires before Thunar has opened a window on the desktop. I've modified the command into:
in the start launcher; I'll see tomorrow if it works or not.Code: Select all
sh -c "sleep 5; xdotool search --name 'anne - gestionnaire de fichiers' windowmove 5 5 windowsize 620 310"
Re: [Solved] How do I make so that Thunar always starts at fixed coordinates on the desktop?
Great! You acted proactively and now your system is a little more convenient.
Re: How do I make so that Thunar always starts at fixed coordinates on the desktop?
There is no Thunar.desktop at that place.
I'm back to this because I got another answer about that in another thread I started. There was an easier way, easier than the one I've been using so far:
1) create a script containing:
Code: Select all
#!/bin/bash
thunar &&
sh -c "xdotool search --name 'username - gestionnaire de fichiers' windowmove 5 5 windowsize 640 360"
2) then change the default command for Thunar in the applications list (thunar %F) by the full path to the script In my case:
Code: Select all
/home/username/.local/bin/thunar-home-positionneur