meganz / MEGAsync

Easy automated syncing between your computers and your MEGA Cloud Drive
Other
1.64k stars 281 forks source link

Linux: Start in background #161

Open p3lim opened 6 years ago

p3lim commented 6 years ago

The only options when starting seem to be --version and --debug, there's no option to start in the background (not showing window when started).

I'm using v3.5.3 (dd89d0), and have to resort to this bash script after starting:

until xdotool search --onlyvisible ---class '^megasync$' ; do
    sleep .2
done
xdotool key Escape
polmr commented 6 years ago

Related issue here: https://github.com/meganz/MEGAsync/issues/142

p3lim commented 6 years ago

I highly suggest an option is put in to suppress that behavior, as you'd expect a window for an application, while the sync client is more of a service with a settings window.

polmr commented 6 years ago

What is your OS/desktop environment? that behaviour should only happen when no systray is available: we want the user to notice MEGAsync is running. If systray is available main UI won't pop up, since there already is an indicator that MEGAsync is running. If you are using Gnome Shell, we'd recommend you to use TopIcons Plus extension: https://extensions.gnome.org/extension/1031/topicons/

p3lim commented 6 years ago

i3wm + polybar, so no tray (intentional). I know the client is running because of the notifications from it, which is more than sufficient.

polmr commented 6 years ago

Ok, we'll consider adding a --do-not-startui-when-no-systray-available option. Also, if you wan't a non gui sync client you can also use MEGAcmd: https://mega.nz/cmd

p3lim commented 6 years ago

I do prefer having a GUI for status, but I'll take a look at it. Thanks for the consideration.

jjchico commented 6 years ago

+1 no-gui option. Yes, megacmd can do it, but it is another client that you have to install and configure separately. Also, megacmd does a lot more than megasync. I miss a simple command line interface when I need to start magasync remotely through ssh. A simple interface like the following would be great:

JohnnyKing94 commented 6 years ago

this would be great! +1

iljapanic commented 5 years ago

Any updates on this?

Wondering what is the best way to run megasync in the background on i3wm.

recolic commented 5 years ago

I'm looking for a MEGAsync daemon client for ArchLinux, because the megasync-daemon-git in AUR failed to compile, and megafuse-git crashes with SIGSEGV.

It's perfect if I can write a command in /etc/rc.local like this:

#!/bin/bash
# rc.local

something...

megasync --daemon --mount '/:/mnt/mega-cloud' --mount '//in:/mnt/mega-cloud-in' > /path/to/my/log/file.log 2>&1 & disown

Or write a megasync-daemon as a systemd service.

GUI is not allowed here because Xorg or Wayland may have not started yet, and it's really really unnecessary. I think that's what a linux app should do. (have a look at AWS s3! that's perfect!)

p-enel commented 4 years ago

Hi, what's the status on the no-gui option? I'm trying to start megasync on a distant computer that doesn't have a desktop started.

Surendrajat commented 3 years ago

Running megasync again minimizes the GUI so this is what I do in my i3-wm config:

exec --no-startup-id sleep 30 && megasync &
exec --no-startup-id sleep 33 && megasync &

It's annoying but it works.

pietryszak commented 2 years ago

Any update ? I use i3wm + polybar and option megasync --no-gui: do not open a GUI, even if one is available is very welcome.

MuhammadSawalhy commented 2 years ago

Folks are waiting for the --no-gui, or should we demonstrate for it.?! !!

For now, I will workaround it by double opening it so it will toggle

megasync && megasync
orkeilius commented 10 months ago

Another workaround : you can use the AppIndicator and KStatusNotifierItem Support extension (pre-installed on fedora) to support old system tray on gnome 40+ image