nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
3.01k stars 791 forks source link

Eliminate GUI library dependencies for `nextcloudcmd` #1339

Open charlescurley opened 5 years ago

charlescurley commented 5 years ago

Expected behaviour

On a headerless machine, nextcloud-desktop-cmd should not require X11.

Actual behaviour

I cannot purge about 315 MB of X11 libraries because nextcloud-desktop-cmd requires them.

Steps to reproduce

  1. Install package nextcloud-desktop-cmd on debian 9.9 (stretch)
  2. Attempt to purge X11 libraries. E.g.:

for i in $( pre x11 | cut -f1 ) ; do echo $i ; apt purge $i ; done

nextcloud-desktop-cmd will be either in the list of dependencies to be removed or in the list of packages to be removed with "apt autoremove".

3.

Client configuration

Client version:

root@dzur:/crc/back/white.09# pre nextcl libnextcloudsync0 2.5.1-1~bpo9+1 amd64 nextcloud-desktop-cmd 2.5.1-1~bpo9+1 amd64 nextcloud-desktop-l10n 2.5.1-1~bpo9+1 all root@dzur:/crc/back/white.09#

Operating system:

debian 9.9 (stretch)

OS language:

English

Qt version used by client package (Linux only, see also Settings dialog):

5.7.1+dfsg-3+deb9u1

Client package (From Nextcloud or distro) (Linux only):

root@dzur:/crc/back/white.09# pre nextcl libnextcloudsync0 2.5.1-1~bpo9+1 amd64 nextcloud-desktop-cmd 2.5.1-1~bpo9+1 amd64 nextcloud-desktop-l10n 2.5.1-1~bpo9+1 all root@dzur:/crc/back/white.09#

Installation path of client:

/usr/bin/nextcloudcmd

Server configuration

Nextcloud version: Nextcloud 15.0.9

Storage backend (external storage):

Logs

Please use Gist (https://gist.github.com/) or a similar code paster for longer logs.

  1. Client logfile: Output of nextcloud --logwindow or nextcloud --logfile log.txt (On Windows using cmd.exe, you might need to first cd into the Nextcloud directory) (See also https://docs.nextcloud.com/desktop/2.3/troubleshooting.html#log-files)

  2. Web server error log:

  3. Server logfile: nextcloud log (data/nextcloud.log):

AnnoyingTechnology commented 4 years ago

Are there any plans to fix this issue ? Is there a way to compile the client without the GUI dependencies ?

I too need a NextCloud client on a headless Debian 9 server.

@charlescurley Have you found a workaround ? Thanks

charlescurley commented 4 years ago

On Tue, 12 Nov 2019 05:41:50 -0800 Julien notifications@github.com wrote:

@charlescurley Have you found a workaround ?

I have not.

-- Does anybody read signatures any more?

https://charlescurley.com https://charlescurley.com/blog/

mibuthu commented 4 years ago

Same problem on Debian 10 Buster

GieltjE commented 3 years ago

In my opinion there should be a cmd only package and a full desktop package, even on Gentoo we have to compile half of QT and some other useless packages.

cspiel1 commented 2 years ago

Here is the source code: https://github.com/nextcloud/desktop/tree/master/src/cmd

Building only nextcloudcmd is described in the top CMakeList.txt by setting BUILD_GUI=OFF.

I tried this build. There are a lot of Qt dependencies.

$ cmake -DBUILD_GUI=OFF -DBUILD_SHELL_INTEGRATION=OFF ..
...
-- The following OPTIONAL packages have been found:

 * Qt5Qml (required version >= 5.15.2)
 * Qt5QmlModels (required version >= 5.15.2)
 * Qt5Gui (required version >= 5.15.2)
 * Qt5Quick (required version >= 5.15.2)
 * Qt5WebChannel (required version >= 5.15.2)
 * Qt5Positioning (required version >= 5.15.2)
 * Qt5WebEngineCore (required version >= 5.15.2)
 * Qt5PrintSupport (required version >= 5.15.2)
 * Qt5WebEngineWidgets
 * Qt5WebEngine

-- The following REQUIRED packages have been found:

 * Inotify
 * OpenSSL (required version >= 1.1)
 * ZLIB
 * Qt5Network
 * Qt5Xml
 * Qt5Concurrent
 * Qt5Core
 * Qt5Keychain
 * PkgConfig
 * SQLite3 (required version >= 3.8.0)
 * Qt5WebSockets
 * Qt5Widgets
 * Qt5Svg
 * Qt5
...
$ make

This builds without any warnings on Ubuntu 21.10.

The result is definitely no GUI-less program.

$ ldd bin/nextcloudcmd 
    libnextcloudsync.so.0 => /home/cspiel/src/nextcloud-desktop/build/src/libsync/libnextcloudsync.so.0 (0x00007f34bce23000)
    libnextcloud_csync.so.0 => /home/cspiel/src/nextcloud-desktop/build/src/csync/libnextcloud_csync.so.0 (0x00007f34bcd61000)
...
    libQt5Widgets.so.5 => /lib/x86_64-linux-gnu/libQt5Widgets.so.5 (0x00007f34bb76d000)
    libQt5Gui.so.5 => /lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007f34bb091000)
...
    libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f34b867d000)
    libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f34b8649000)
...
    libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f34b8343000)
...
    libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f34b8190000)
    libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f34b813f000)
    libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f34b8137000)
...

Why this issue was closed? Is there a solution already? Are there any build options that solves this?

ziQ commented 2 years ago

This may not help the issue itself, but may be a quick workaround/alternative for other users like myself:

rclone (and rclone mount) works with Nextcloud Webdav. It is still pretty heavy, but at least not 315MB-with-GUI-heavy.

ThaDaVos commented 2 months ago

Any up date on this? The same for the closed issue about providing a separate download option? https://github.com/nextcloud/desktop/issues/1203

I am also looking for a headless solution and would rather use something provided by Nextcloud then mangling with WebDav myself