cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Learn all about how Alex on the Community team used Dropbox in college here!

Dropbox installs & integrations

Connect your tools and content together with help from the Dropbox Community. Join a discussion or post a question of your own to get started.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linux: install Dropbox daemon without graphical prompt (dropbox start --install)

Linux: install Dropbox daemon without graphical prompt (dropbox start --install)

jeanmonet
New member | Level 2

I'm trying to configure a Ansible script to install and configure Dropbox. One problem I'm running into is installing the daemon with "dropbox start --install". There doesn't seem to be any option to disable the graphical interface option if a display is available which prompts for a graphical confirmation before installing the daemon (and blocks my command-line process..). In the dropbox.py (https://www.dropbox.com/download?dl=packages/dropbox.py), this can be seen at the following line: line 290: GUI_AVAILABLE = os.environ.get("DISPLAY", '') and the if block that follows for the def download(). Would be nice to have this as an option for a pure command-line installation process.

3 Replies 3

Re: Linux: install Dropbox daemon without graphical prompt (dropbox start --install)

jeanmonet
New member | Level 2
Actually I just fixed this by settig the "DISPLAY" environment to empty string in Ansible with environment: DISPLAY: ""

Re: Linux: install Dropbox daemon without graphical prompt (dropbox start --install)

Здравко
Super Collaborator | Level 20

Hi @jeanmonet,

I'm not so sure what you ask for really. 🧐 Yes, GUI is used if available. What is a kind of problem this? 🤔 Wrong would be opposite, I tink.

If only the GUI's usage of the control script in install time is a issue, then just do it by hand. Use something like the pointed here:

cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -

It's actually the same (as install actions), but guaranteed without GUI!

Would be a bit more complicated if the problem is usage of the actual application without GUI (while it is available). Just make a wrapper script (bash, for example), which ensure the DISPLAY environment variable gets wiped out before actual run of Dropbox application. Something like:

#!/bin/bash
unset DISPLAY
/usr/bin/dropbox $@

Name this script 'dropbox' and put it earlier in the PATH than the default 'dropbox' (i.e. before '/usr/bin'). In such a way, Dropbox application (the daemon) will not use GUI (also the initial install action, the one you are citing in your post). That's it. 😉

Hope this gives an idea.

Re: Linux: install Dropbox daemon without graphical prompt (dropbox start --install)

jeanmonet
New member | Level 2

Hi @Здравко, thanks a lot for your response. Yes that's great. I went for the solution where the DISPLAY environment variable is set to null string when running the `dropbox start --install` command, which works as expected. The reason behind it is to install the daemon via Ansible (which is command-line only).

 

This is the code I'm using, in case anyone else finds it useful:

 

    - name: Download and install Dropbox daemon.
      expect:
        command: dropbox start --install
        responses:
          "(?m)^In order to use Dropbox, you must download the proprietary daemon.*$": "y"
      environment:
        DISPLAY: ""

 

However, I'd argue that this requires knowledge of the dropbox.py script. Initially I expected to have an option, something like `dropbox start --install --no-gui` that would gurantee installation via command line. But the above also works fine.

Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?