But, how do I set this in the application's
.desktop
file which resides in the autostart
folder? Cheers,
gostal
.desktop
file which resides in the autostart
folder? If you're using the compiz window manager then you can configure this is compiz' window rules, but for a solution that will work with most window managers and applications, replace the command in your autostart entry with this:
Code: Select all
bash -c 'xosview & for w in $(xdotool search --sync --onlyvisible --class xosview);do wmctrl -b toggle,sticky -ir $w;done'
Wow! Thanks! It would have taken me ages to come up with that.gm10 wrote: ⤴Tue Oct 29, 2019 7:05 am ...Code: Select all
bash -c 'xosview & for w in $(xdotool search --sync --onlyvisible --class xosview);do wmctrl -b toggle,sticky -ir $w;done'
Same here. The autostarting in itself was never the problem ...
Actually I've looked up his posting history, it's mostly off-topic, some is even about Windows. Usually that means it's a bot with marketing links getting edited in later and/or added to the signature, but the posting pattern does not quite match. Maybe they improved the software.
xdotool
is a program. Did I have it? No, so I installed it and learned that it basically allows you to do various mouse operations on the command line. Very clever. This is what's behind your statement that this method should work for most window managers and applications. And of course it worked in my new CentOS desktop sporting Mate 1.16. So cool! And I have no fears whatsoever regarding my Mint laptop. Thanks again, not only for the case in point but also for boosting my Linux knowledge.My apologies, I had mistakenly thought it was pre-installed on Mint. I could have given you a solution without using that program, but it would have been slightly longer.
Actually
xdotool
in that command is just used to collect the ids of all the windows created by programs with that name and more importantly wait for at least one such window to get created in the first place, which is important here since you're only just starting the program you are interested in.wmctrl
command, which implements _NET_WM_STATE_STICKY, which is part of freedesktop's standard for window managers to make windows sticky: https://standards.freedesktop.org/wm-sp ... 0472615568. Just like xdotool
, it's a convenience function, you could also have set the hint directly via xprop
. "most", because not all window managers (fully) implement that standard.You're quite welcome. Responding to you from my MATE 1.23.2 desktop, for it currently is my desktop of choice as well.
Of course I'm interested and your clarification is most welcome! The lines in the
xdotool
manpage that made me write what I did are these:My first thought was that you can programmatically move the mouse to the correct location and perform the mentioned mouse clicks but I realise that is not what's going on in your command line. It looks like it is theoretically possible, however, but it would involve more steps. Your method is far better usingxdotool lets you programatically (or manually) simulate keyboard input and mouse activity,
move and resize windows, etc. It does this using X11's XTEST extension and other Xlib
functions.
wmctrl
to control the window's sticky state. Are there any more cool window managing tools that I should now about?Couldn't/shouldn't you have asked them the question here then?
xprop
.I asked in this forum because I've got Mint on my laptop and the problem originated there. Besides, the CentOS fora are nowhere near as active.
No, the source code is proprietary so rebuilding is not an option and the vendor is sometimes hard pressed for support because we choose other OS-s than the one they support. Believe me, I would run Mint on my desktop if could because so far it's one of the best Linux experiences I've had. Clearly better than the mother distro. Perhaps I can persuade our support guys to go Mint instead of Ubuntu. There are more Mint lovers here, not just me.