Announcements
Do you have an idea for Dropbox Paper? Share it with us!

default

no

How to Install Linux Beta x86 64-bit

New member | Level 2

Hi

 

I have extracted downloaded DropBox Beta file under KDE Plasma but the extracted file is hidden then I do not see an install script?!?  I am after BTRFS support.

14 Replies

Re: How to Install Linux Beta x86 64-bit

Dropboxer

Hey there @fleamour

As a first step, could you please clarify for me if your OS fulfills the essential requirements and has the relevant environment to run the desktop app?

Let me know what you find!


Lusil
Community Moderator @ Dropbox
https://dropbox.com/support


Heart Did this post help you? If so, please give it a Like below. 
White check mark Did this post fix your issue/answer your question? If so please press the 'Accept as Solution' button to help others find it.
Arrows Counter Clock Still stuck? Ask me a question! (
Questions asked in the community will likely receive an answer within 4 hours!)

Reply
Loading...

Re: How to Install Linux Beta x86 64-bit

New member | Level 2
Hi
Well I do not have an ext4 partition, which is kinda the whole point of beta. I think I'll wait till stable release hits openSUSE repositories.
Reply
Loading...

Re: How to Install Linux Beta x86 64-bit

Dropboxer

Thanks for getting back to me, @fleamour.

Initially, please note that we are constantly creating and exploring new products and some of these products are still in development, which may be released in our beta versions. You can find more info about this in this article

Additionally, please bear in mind that in order to use the desktop app on a Linux OS, it needs to meet the minimum requirements mentioned - namely, Ubuntu 14.04 or higher, Fedora 21 or higher.

However, if you’d like to run the Dropbox app “headless” (using the command line only), you'll only need the Dropbox app essential requirements.

I hope this information helps to some extent!


Lusil
Community Moderator @ Dropbox
https://dropbox.com/support


Heart Did this post help you? If so, please give it a Like below. 
White check mark Did this post fix your issue/answer your question? If so please press the 'Accept as Solution' button to help others find it.
Arrows Counter Clock Still stuck? Ask me a question! (
Questions asked in the community will likely receive an answer within 4 hours!)

Reply
Loading...

Re: How to Install Linux Beta x86 64-bit

Star Collaborator | Level 18

Hi @fleamour,

If the only reason to use beta is FS restrictions, You can use different workarounds available. I already have one. Here I provide updated variant below. The update is that You don't need to install anything in advance, but in such case file browser integration will not be available. I would advise You to install the rpm package first. My script will detect this and only a patch will be applied.

#!/bin/bash
##############################################################################
#                    Workaround for Dropbox daemon
#                    -----------------------------
# Verified on Dropbox v77.4.131
# Just make it executable (if need, using
#   $ chmod a+x fix_dropbox
# ) and run it.
# Author: Здравко
#   www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790
##############################################################################

# Figure out the target places.
USR_HOME=`realpath ~`
USR_LOCAL="$USR_HOME/.local"
USR_LOCAL_BIN="$USR_LOCAL/bin"
USR_LOCAL_LIB="$USR_LOCAL/lib"
DRB_REPLACEMENT="$USR_LOCAL_BIN/dropbox"
DRB_FIX_LIB="$USR_LOCAL_LIB/libdropbox_ext4.so"
USR_PROFILE="$USR_HOME/.profile"

# Dropbox's components
DBX_SHELL_BASE="/usr/bin"
DBX_SHELL="$DBX_SHELL_BASE/dropbox"
DBX_WEB_SRC_BASE="https://www.dropbox.com/download?dl=packages"
DBX_SCRIPT_ALT="dropbox.py"
DBX_WEB_src="$DBX_WEB_SRC_BASE/$DBX_SCRIPT_ALT"
DBX_SHELL_ALT="$USR_LOCAL_BIN/$DBX_SCRIPT_ALT"

##############################################################################
# Precheck and fix up some prerequisites.

# Ensure target directories are on their place.
if [[ ! -d $USR_LOCAL_BIN ]]
then
  echo "The Directory \"$USR_LOCAL_BIN\" doesn't exist, going to create it."
  mkdir -p $USR_LOCAL_BIN
  if [[ $? -ne 0 || ! -d $USR_LOCAL_BIN ]]
  then
    echo "Directory \"$USR_LOCAL_BIN\" creation fail! Exit."
    exit 1
  fi
fi
if [[ ! -d $USR_LOCAL_LIB ]]
then
  echo "The Directory \"$USR_LOCAL_LIB\" doesn't exist, going to create it."
  mkdir -p $USR_LOCAL_LIB
  if [[ $? -ne 0 || ! -d $USR_LOCAL_LIB ]]
  then
    echo "Directory \"$USR_LOCAL_LIB\" creation fail! Exit."
    exit 1
  fi
fi

# Ensure backup for any existing files.
if [[ -e $DRB_REPLACEMENT ]]
then
  if [[ -f $DRB_REPLACEMENT ]]
  then
    echo "\"$DRB_REPLACEMENT\" already exist, going to back it up."
    mv --backup=t -T $DRB_REPLACEMENT "${DRB_REPLACEMENT}.backup"
    if [[ $? -ne 0 || -e $DRB_REPLACEMENT ]]
    then
      echo "Error backing up \"$DRB_REPLACEMENT\" file! Exit."
      exit 1
    fi
  else
    echo "$DRB_REPLACEMENT is not regular file! Exit."
    exit 1
  fi
fi
if [[ -e $DRB_FIX_LIB ]]
then
  if [[ -f $DRB_FIX_LIB ]]
  then
    echo "\"$DRB_FIX_LIB\" already exist, going to back it up."
    mv --backup=t -T $DRB_FIX_LIB "${DRB_FIX_LIB}.backup"
    if [[ $? -ne 0 || -e $DRB_FIX_LIB ]]
    then
      echo "Error backing up \"$DRB_FIX_LIB\" file! Exit."
      exit 1
    fi
  else
    echo "$DRB_FIX_LIB is not regular file! Exit."
    exit 1
  fi
fi

# Ensure writing permissions.
if [[ ! -w $USR_LOCAL_BIN || ! -x $USR_LOCAL_BIN ]]
then
  chmod u+rwx $USR_LOCAL_BIN
  if [[ $? -ne 0 ]]
  then
    echo "The Directory \"$USR_LOCAL_BIN\" is inaccessible! Exit."
    exit 1
  fi
fi
if [[ ! -w $USR_LOCAL_LIB || ! -x $USR_LOCAL_LIB ]]
then
  chmod u+rwx $USR_LOCAL_LIB
  if [[ $? -ne 0 ]]
  then
    echo "The Directory \"$USR_LOCAL_LIB\" is inaccessible! Exit."
    exit 1
  fi
fi

# Check for preinstalled dropbox shell script.
if [[ ! -e $DBX_SHELL || ! -x $DBX_SHELL ]]
then
  echo "Cannot find pre installed \"$DBX_SHELL\". Will trying alternative."
  DBX_SHELL_BASE="$USR_LOCAL_BIN"
  DBX_SHELL="$DBX_SHELL_ALT"
  # Ensure backup for existing control script.
  if [[ -e $DBX_SHELL_ALT ]]
  then
    if [[ -f $DBX_SHELL_ALT ]]
    then
      echo "\"$DBX_SHELL_ALT\" already exist, going to back it up."
      mv --backup=t -T $DBX_SHELL_ALT "${DBX_SHELL_ALT}.backup"
      if [[ $? -ne 0 || -e $DBX_SHELL_ALT ]]
      then
        echo "Error backing up \"$DBX_SHELL_ALT\" file! Exit."
        exit 1
      fi
    else
      echo "$DBX_SHELL_ALT is not regular file! Exit."
      exit 1
    fi
  fi
fi

##############################################################################
# Generate actual workaround components.

# Fetch Dropbox control script (if need).
if [[ "$DBX_SHELL" == "$DBX_SHELL_ALT" ]]
then
  if ! wget -q -O "$DBX_SHELL_ALT" "$DBX_WEB_SRC"
  then
    echo "Error while download \"$DBX_SHELL_ALT\" from \"$DBX_WEB_SRC\"! Exit."
    exit 1
  fi
  chmod a+x $DBX_SHELL_ALT
  echo "Dropbox control script: \"$DBX_SHELL_ALT\" - ready for use."
fi

# Fixer - source and building.
gcc -shared -fPIC -ldl -xc -o $DRB_FIX_LIB - << EndOfSrc
// Functions replacements
#define _GNU_SOURCE

#include <stdlib.h>
#include <sys/vfs.h>
#include <linux/magic.h>
#include <dlfcn.h>
#include <sys/statvfs.h>
#include <stdarg.h>

static int (*orig_statfs)(const char *path, struct statfs *buf) = NULL;
static int (*orig_statfs64)(const char *path, struct statfs64 *buf) = NULL;
static int (*orig_open64)(const char *pathname, int flags, ...) = NULL;

int statfs(const char *path, struct statfs *buf) {
  if (orig_statfs == NULL) {
    orig_statfs = dlsym(RTLD_NEXT, "statfs");
  }
  register int retval = orig_statfs(path, buf);
  if (retval == 0) {
    buf->f_type = EXT4_SUPER_MAGIC;
  }
  return retval;
}
 
int statfs64(const char *path, struct statfs64 *buf) {
  if (orig_statfs64 == NULL) {
    orig_statfs64 = dlsym(RTLD_NEXT, "statfs64");
  }
  register int retval = orig_statfs64(path, buf);
  if (retval == 0) {
    buf->f_type = EXT4_SUPER_MAGIC;
  }
  return retval;
}

int open64(const char *pathname, int flags, ...) {
  if (orig_open64 == NULL) {
    orig_open64 = dlsym(RTLD_NEXT, "open64");
  }
  register const char *p0 = "/proc/filesystems", *p1 = pathname;
  while(*p0 && *p1 && *p0 == *p1) ++p0, ++p1;
  if (*p0 == '\0' && *p1 == '\0') {
    return -1;
  }
  va_list arg;
  va_start(arg, flags);
  mode_t mode = va_arg (arg, int);
  va_end(arg);
  return orig_open64(pathname, flags, mode);
}
EndOfSrc
if [[ $? -ne 0 ]]
then
  echo "Error building \"$DRB_FIX_LIB\"! Exit."
  exit 2
fi
echo "\"$DRB_FIX_LIB\" - build and ready."

# Wrapper generating.
cat > $DRB_REPLACEMENT << WrapperHead
#!/bin/bash
if [ \$1 == "start" ]
then
  sleep 1
  patchpath=\`realpath \$0\`
  if echo \$(for i in \`ps -C dropbox -o pid\`
            do ls -l /proc/\$i/exe 2>/dev/null | grep -v \$patchpath
            done) | grep dropbox > /dev/null
  then
    timeout=300
    # Make sure there isn't any concurrent start operation in progress.
    $DBX_SHELL running
    while [[ \$? -eq 0 && \$timeout -ne 0 ]]
    do
      sleep 1
      ((--timeout))
      if echo \$(for i in \`ps -C dropbox -o pid\`
                do ls -l /proc/\$i/exe 2>/dev/null | grep -v \$patchpath
                done) | grep dropbox > /dev/null
      then
        $DBX_SHELL running
      fi
    done
    # If there is running application instance, force its stop.
    $DBX_SHELL running
    while [[ \$? -ne 0 && \$timeout -ne 0 ]]
    do
      $DBX_SHELL stop
      sleep 1
      ((--timeout))
      $DBX_SHELL running
    done
    # If something goes wrong...
    if [[ \$timeout -eq 0 ]]
    then
      # ...notify somehow about.
      title="Problem launching Dropbox"
      mainmsg="Possible existing application instance dead"
      submsg="Check that, clear and try start again"
      if which notify-send > /dev/null
      then notify-send --icon=dropbox "\$title" "<b>\$mainmsg\!</b>\n\$submsg."
      elif which zenity > /dev/null
      then zenity --error --title="\$title" --timeout=10 --width=380 \\
        --text="<span size=\"xx-large\"><b>\$mainmsg\!</b>\n\$submsg.</span>" \\
        2> /dev/null
      else echo "  \$title!"
        echo "\$mainmsg."
        echo "\$submsg."
      fi
      exit 1
    fi
  else sleep 100
  fi
fi
WrapperHead
declare -p | grep "declare -x LD_PRELOAD" > /dev/null
if [[ $? -ne 0 ]]
then
  echo "export LD_PRELOAD=$DRB_FIX_LIB" >> $DRB_REPLACEMENT
else
  echo "LD_PRELOAD=$DRB_FIX_LIB:\$LD_PRELOAD" >> $DRB_REPLACEMENT
fi
echo "$DBX_SHELL \$@" >> $DRB_REPLACEMENT
chmod a+x $DRB_REPLACEMENT
echo "\"$DRB_REPLACEMENT\" - generated."

# Environment check and fixup (if need).
echo ""
echo ""
(
IFS=:
for a in $PATH
do
  if [[ "$a" == "$USR_LOCAL_BIN" ]]
  then
    exit 0
  elif [[ "$a" == "$DBX_SHELL_BASE" ]]
  then
    break
  fi
done
exit 1
)
if [[ $? -ne 0 ]]
then
  echo "" >> $USR_PROFILE
  echo "" >> $USR_PROFILE
  echo "# Add $USR_LOCAL_BIN to \$PATH environment variable." >> $USR_PROFILE
  echo "# This addition is dedicated for Dropbox Workaround." >> $USR_PROFILE
  echo "# Remove theses lines when they are no more needed." >> $USR_PROFILE
  echo "PATH=\"$USR_LOCAL_BIN:\$PATH\"" >> $USR_PROFILE
  echo "" >> $USR_PROFILE
  echo "Your Dropbox is almost patched. You have to logout and login"
  echo " (or on Your opinion - restart), so all changes to take effect."
  echo "After Your next account login:"
fi
echo "Your Dropbox is already patched."
if [[ "$DBX_SHELL_BASE" == "$USR_LOCAL_BIN" ]]
then echo "Just type:"
else echo "Just start it from desktop GUI or type:"
fi
echo "\$ dropbox start"
echo "in console (append option -i, when launch for first time)."

Just copy above script (in the code block) in a file named 'fix_dropbox', for example. Make the file executable and lunch it. Could be need to terminate current desktop session and start a new one (logout/login - in fact), depending on the current system configuration. That's it. winking face

Note: Near script beginning (Dropbox's components declaration) the variable DBX_WEB_SRC's initialization is incorrectly changed (seems forum platform bug). Currently it's "DBX_WEB_src". Have to be "DBX_WEB_SRC". Correct this error on the local copy (until forum fixes this bug).

Reply
Loading...

Re: How to Install Linux Beta x86 64-bit

Star Collaborator | Level 18

I have no idea why, but seems the web platform does not accept some var names! On some places DBX_WEB_SRC is edited (not from me)! Be careful for automatic variable name change.

Reply
Loading...

Re: How to Install Linux Beta x86 64-bit

Star Collaborator | Level 18

Hi @Lusil,

Can You make a small correction in my code block above? In line 27 inside the code block, the forum environment erroneous replace "DBX_WEB_SRC" with "DBX_WEB_src". The environment don't let me correct this error. Please, just replace this variable name, without change anything else. If the system don't let You do this also (like me), flag this as forum bug.

Thanks in advance!

Reply
Loading...

Re: How to Install Linux Beta x86 64-bit

Dropboxer

Hey @Здравко, have a look if all looks good in your script and let me know if there's anything else I can help with. smiling face with halo


Lusil
Community Moderator @ Dropbox
https://dropbox.com/support


Heart Did this post help you? If so, please give it a Like below. 
White check mark Did this post fix your issue/answer your question? If so please press the 'Accept as Solution' button to help others find it.
Arrows Counter Clock Still stuck? Ask me a question! (
Questions asked in the community will likely receive an answer within 4 hours!)

Reply
Loading...

Re: How to Install Linux Beta x86 64-bit

Star Collaborator | Level 18

@Lusil, There isn't anything changed! face screaming in fear Did You check carefully? Probably this is a forum bug, as I have gessed above.

Edit: You have introduced new error insted correct the existing! You have set 'DBX_WEB_src_BASE' on place of 'DBX_WEB_SRC_BASE'.

Reply
Loading...

Re: How to Install Linux Beta x86 64-bit

Dropboxer

Have you tried refreshing the page by any chance? Could you send me a screenshot of the post and line that you're seeing? 

Thanks in advance, @Здравко


Lusil
Community Moderator @ Dropbox
https://dropbox.com/support


Heart Did this post help you? If so, please give it a Like below. 
White check mark Did this post fix your issue/answer your question? If so please press the 'Accept as Solution' button to help others find it.
Arrows Counter Clock Still stuck? Ask me a question! (
Questions asked in the community will likely receive an answer within 4 hours!)

Reply
Loading...
Installation and Desktop App Issues

Have a question? Our Dropbox Community is here to help!

Post your question or search for an answer below.


Learn more about using the Community by reading our Community Guidelines.


Hi anonymous,

If you need more help you can log a ticket with our Support Team here (expected response time 24 hours), or contact us on Twitter or Facebook.

For more info on available support options, see this article.

If you found the answer to your question, please 'like' the post to say thanks to the user!

How to Install Linux Beta x86 64-bit
707 Views
14 Replies
1 Like
Dropbox Design Research
Looking for Dropbox Paper users

If so, we're starting a design feedback group and we'd love for you to be a part of it. We have paid feedback opportunities - both in person and remotely - for English speaking users based in the US.

Interested? Take the short survey to let us know.

Take the survey
Who's talking
Top contributors to this post