Auto-start of Zotero on Linux, with _minimized_ window.
_[ Zotero 5.0-beta.172+8edd4b0 on Ubuntu 14.04 with FF 52.0.1 and LO 5.3.12]_
Hello everybody,
My setup works flawlessly. As I used Zotero pretty much all the time, I arranged for it to auto launch at boot time. However I'd like it to launch with a minimized window by default. How do I do that ?
Thank you.
-ced
Hello everybody,
My setup works flawlessly. As I used Zotero pretty much all the time, I arranged for it to auto launch at boot time. However I'd like it to launch with a minimized window by default. How do I do that ?
Thank you.
-ced
Mmhh....
Do you mean to "execute the app with the `-tray` flag" ?
If so should I include that in the `zotero.desktop` file ?
How should I go about doing this if the app is launched automatically at startup ?
Cheers,
-ced
Tx for the answer. I experimented (only on my time off) with reboots and the flag `-tray` as you recommend. Nothing doing. specifying this in the Startup app with either `~/pathtoZotero/zotero -tray` or `~/pathtoZotero/zotero --tray` is ineffectual. Zotero always launches and opens its window on the desktop. I am stumped... Any other idea welcome.
https://addons.mozilla.org/en-US/firefox/addon/firetray/
But some modification is necessary to make it installable for zotero 5.0:
1. Download the the extension as an xpi file.
2. Open the xpi file with archive manager.
3. Edit the file install.rdf to make it installable for zotero 5.0. (Change the maxVerision from 4.* to 5.* in the Zotero section)
4. Save the file and archive manager will ask you to update the file (choose update, of course).
Install the modified xpi file and restart zotero if needed. Then you can change the preference of FileTray and check the option "start application hidden to tray".
If you find it change the firefox icon to an ugly one, just replace the firefox icon in the xpi file (./chrome/skin/icons/linux/hicolor/22x22/apps/firefox.png) with the one in you system. (I use the one /usr/share/pixmaps/firefox.png.)
Tested in ubuntu 16.04 with zotero 5.0 beta.
The `wmctrl` route was promising (simple and lightweight). But apparently lightweight also means incomplete in that case. As incredible as it may sound, there is no `wmctrl` option to minimize any window at all. (someone, please shout if I'm wrong).
in the end, the cleanest most lightweight solution seems to be that of Jacob Vlijm's python script solution, at http://askubuntu.com/a/663288/72216.
The basic issue though is now the strange fact that `zotero` doesn't include any handle for the corresponding "launch-minimized" option on cli. I find it truly strange...
I summarized below the "minimize window" flags I tried, when launching from cli:
-tray
-starttotray
-startmin
-minimize
-minimized
-mini
-silent
-0
-small
plus all of the above with two hyphens instead of one. Result: zilch !
I don't think Zotero not having a minimize flag is all _that_ unusual. It's not like people ask for it a lot and if the default -tray from mozilla doesn't work, it'd likely have been a good chunk of work to implement.
UPDATE: Okay, I did it. It's here: https://github.com/LaserTron/FireTray
I even have a one line command there for lazy people to get the .xpi file instantly.
For those of you who, like me, want to keep Zotero in tray, there are some third party apps that do that:
Windows:
- TrayIt! (https://winaero.com/blog/minimize-apps-to-system-tray-notification-area-with-trayit/)
- RBTray, TrayEverything, Trayconizer (https://lifehacker.com/5061417/trayeverything-stashes-programs-in-the-system-tray)
Linux:
- you can make use of kdocker, because alltray is unsupported and does not work well anymore.
I've made a bash script for using kdocker with zotero here:
https://github.com/cyberalex4life/zotero-tray
Ubuntu Mate 18.04, Zotero 5.0.80
I can't immediately hide Zotero; the window must be known before I can minimize it, and before that happens it has already shown ¯\_(ツ)_/¯