linuxmint / warpinator

Share files across the LAN
GNU General Public License v3.0
1.21k stars 81 forks source link

Start minimized #101

Open melroy89 opened 3 years ago

melroy89 commented 3 years ago

By default Warpinator is not started minimized, which is very frustrating. I need to close this window on a daily basis, although I like this app I would to see the app minimized during start-up (so only visible in the notification area).

image

Thanks!

Regards, Melroy

mtwebster commented 3 years ago

Turning off "Start with the main window open" doesn't work?

image

melroy89 commented 3 years ago

No indeed that doesn't work. In fact this is the default setting (turned off main window) , right?

mtwebster commented 3 years ago

No, the default is to start with the window visible.

What distro is this and desktop? And how is this installed? What version? Thru package manager or flatpak?

melroy89 commented 3 years ago

Linux Mint, default installed. Linux mint 20.2 xfce. Or we at least installed it via apt.

mtwebster commented 3 years ago

I can't reproduce this on Mint xfce - that setting works.

Can you create a new user account and try there?

melroy89 commented 3 years ago

Giving you still some extra details: Warpinator v1.2.4 (uma). Settings menu looks like this:

image

mtwebster commented 3 years ago

Check ~/.config/autostart, /etc/xdg/autostart for any extra .desktop files that run warpinator.

There should only be a single one (warpinator-autostart.desktop) in /etc/xdg/autostart.

melroy89 commented 3 years ago

No desktop files in ~/.config/autostart. No extra desktop files in /etc/xdg/autostart..

File warpinator-autostart.desktop says:

Exec=warpinator --autostart

Maybe it's this line, that also trigger all the child widgets to show by default? https://github.com/linuxmint/warpinator/blob/master/src/warpinator.py#L1028

melroy89 commented 3 years ago

Actually quitting the app. And starting manually the command warpinator --autostart in my terminal, does result into minimized app. But somehow not during system start.. 😕 ..

mtwebster commented 3 years ago

If I start warpinator, even with 'start with window open' disabled, then try to start it again, it shows the window. This is expected, as the program is a singleton - subsequent calls to run warpinator execute this code, showing the window.

This is why I was suspecting it may be getting launched a second time by something. And the fact it works if you just start it from a terminal furthers that suspicion.

melroy89 commented 3 years ago

But I really only see the desktop file once:

image

Uhmmm very strange indeed!

mtwebster commented 3 years ago

Try:

Then log out and back in.

melroy89 commented 3 years ago

Yeah you right. This workaround with renaming to warpinator1 did indeed fix the problem. It starts in the background as expected.

Bottom line: Your assumption is correct. It does get started twice, BUT HOW!?!

mtwebster commented 3 years ago

I'm not really sure - those are the only two locations for autostart files as far as I know.

I did just try installing the flatpak, alongside mint's version. They can activate one another (because both attempt to have the same name in dbus). If you set both to autostart with no window, you'll get this same behavior. I assume you wouldn't have both installed for some reason.

At this point, for me, I'd start grepping for 'warpinator` in my home folders - I'm a bit stumped. The reason I suggested trying a new account earlier was to try to exclude anything in your home folder that may be causing this.

melroy89 commented 3 years ago

OK. I found out that 'Sessions and Startup' included warpinator as auto start application. So I unchecked this one.

image

Keep in mind that the /etc/xdg/autostart/warpinator-autostart.desktop file is still present, I'm assuming this result into starting Warpinator. Unchecking this box caused a new file in ~/.config/autostart/warpinator-autostart.desktop, having the content:

[Desktop Entry]
Hidden=true

Which now results in only starting the application once.

mtwebster commented 3 years ago

Warpinator shouldn't be shown in that list (it doesn't use that mechanism to control auto-starting) - maybe it's deliberate on the part of the xfce devs or a bug that it does show. But by disabling that, you've blocked the 'correct' desktop file from being used, and rogue launcher will be what's starting warpinator now.

None of this is actually hurting anything - if it works for you. I'm still curious what's causing it, but perhaps the reason may eventually become apparent. I'm also no XFCE expert, and it does many things slightly differently than Cinnamon and Mate, but in this area, the behavior should be consistent.

melroy89 commented 3 years ago

I also don't know how this application is landed here. And what is causing that in the first place.

If we understand that, we may found the root cause of this issue.