https://wiki.archlinux.org/api.php?action=feedcontributions&user=Aleksozolins&feedformat=atomArchWiki - User contributions [en]2024-03-29T11:15:27ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_7)&diff=763504Lenovo ThinkPad X1 Carbon (Gen 7)2023-01-08T18:45:05Z<p>Aleksozolins: Service name has been changed from lenovo_fix.service to throttled.service. Made the change.</p>
<hr />
<div>[[Category:Lenovo]]<br />
[[ja:Lenovo ThinkPad X1 Carbon (Gen 7)]]<br />
{| class="wikitable" style="float: right;"<br />
|-<br />
! Hardware !! PCI/USB ID !! Working?<br />
|-<br />
| Video || {{ic|8086:3ea0}} || {{Yes}}<br />
|-<br />
| Wireless || {{ic|8086:9df0}} || {{Yes}}<br />
|-<br />
| Ethernet || {{ic|8086:15be}} || {{Yes}}<br />
|-<br />
| Mobile broadband || || {{Yes}}<br />
|-<br />
| Audio || {{ic|8086:9dc8}} || {{Yes}}<br />
|-<br />
| Touchpad || {{ic|06cb:cd8b}} || {{Yes}}<br />
|-<br />
| TrackPoint || {{ic|06cb:cd8b}} || {{Yes}}<br />
|-<br />
| Camera || {{ic|13d3:56ba}} || {{Yes}}<br />
|-<br />
| Fingerprint reader || {{ic|06cb:00bd}} || {{Yes}}<br />
|-<br />
| Bluetooth || {{ic|8087:0aaa}} || {{Yes}}<br />
|-<br />
| NFC || || {{No}}<br />
|}<br />
<br />
== Firmware ==<br />
<br />
{{Warning|There are reports that enrolling custom Secure Boot keys may brick this machine because of firmware bugs.}} <br />
<br />
The most convenient way to install Arch Linux is by disabling "Secure Boot" {{ic|Security -> Secure Boot - Set to "Disabled"}}. However it is possible to self-sign your kernel and boot with it enabled. For further information have a look at the [[Secure Boot]] article.<br />
<br />
In case your {{ic|efivars}} are not properly set it is most likely due to you not being booted into [[UEFI]]. Should the problem persist be sure to consult the [[UEFI#UEFI variables]] section.<br />
<br />
=== Updates ===<br />
<br />
==== Automatic (Linux Vendor Firmware Service) ====<br />
<br />
[https://blogs.gnome.org/hughsie/2018/08/06/please-welcome-lenovo-to-the-lvfs/ In August of 2018 Lenovo has joined] the [https://fwupd.org/ Linux Vendor Firmware Service (LVFS)] project, which enables firmware updates from within the OS.<br />
BIOS updates (and possibly other firmware such as the Thunderbolt controller) can be queried for and installed through [[fwupd]].<br />
<br />
If your thunderbolt port is unstable after upgrading with fwupd, you can visit the [https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-7th-gen-type-20qd-20qe/downloads/driver-list Lenovo ThinkPad X1 Carbon (Gen 7) driver website] and upgrade the thunderbolt firmware manually.<br />
<br />
==== Manual (fwupdmgr) ====<br />
<br />
Lenovo may in the future provide cabinet files that can be directly installed with fwupdmgr.<br />
Check for Linux {{ic|.cab}} files from the [https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-7th-gen-type-20qd-20qe/downloads Lenovo ThinkPad X1 Carbon (Gen 7) driver website].<br />
<br />
#Make sure the AC adapter is firmly connected to the target computer.<br />
#Launch Terminal.<br />
#Move to the directory where the cabinet file was placed.<br />
#Run {{ic|fwupdmgr install xxxxxxxx.cab}} to schedule firmware update.<br />
#Restart the system.<br />
#The computer will be restarted and the UEFI BIOS will be updated.<br />
<br />
=== Sleep/Suspend ===<br />
<br />
The BIOS has two "Sleep State" options, Windows and Linux, which you can find in at {{ic|Config -> Power -> Sleep State}}. The Linux option is the traditional S3 power state where all hardware components are turned off except for the RAM, and it should work normally. The Windows option is a newer software-based "modern standby" which works on Linux (despite the name). One possible benefit to the Windows sleep state is faster wake up time, and one possible drawback is increased power usage.<br />
<br />
Mark Pearson, a Lenovo employee, [https://forums.lenovo.com/t5/Fedora/Fedora-32-Workstation-image-for-Thinkpad-P1G2/m-p/5042732?page=1#5156832 recommends using the "Windows" sleep state option] as it is better supported on modern Intel processors. The same is true for other modern Thinkpads [https://forums.lenovo.com/t5/Other-Linux-Discussions/T14-AMD-battery-drain-in-standby-Linux/m-p/5037674?page=3#5189273 except for AMD models] (as of November 2020).<br />
<br />
=== S3 Suspend Bug with Bluetooth Devices ===<br />
<br />
Occasionally your Thinkpad will wake up immediately after suspending with certain [[bluetooth]] devices added. To prevent this, remove the devices or disable [[bluetooth]] before suspending.<br />
<br />
=== BIOS configurations ===<br />
<br />
* {{ic|Config -> Thunderbolt BIOS Assist Mode - Set to "Enabled"}}. When disabled, on Linux, power usage appears to be significantly higher because of a substantial number of CPU wakeups during s2idle.<br />
<br />
{{tip| You may need to disable Kernel DMA protection in {{ic|Security -> Virtualization -> Kernel DMA Protection - Set to "Disabled"}}}}<br />
<br />
=== Firmware issues ===<br />
<br />
The following issues can all be resolved by upgrading the firmware with fwupdmgr (''see [[#Updates|#BIOS Updates]]''), but there may be alternative manual/temporary fixes.<br />
<br />
==== Touchpad issues ====<br />
<br />
Due to a bug in a touchpad firmware, the touchpad might not work with following logs in [[dmesg]]:<br />
{{bc|<br />
[ 4.499490] i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration<br />
[...]<br />
[ 12.668795] i2c_hid i2c-SYNA8005:00: failed to set a report to device.<br />
[ 13.678765] i2c_designware i2c_designware.1: controller timed out<br />
}}<br />
<br />
==== Freeze when suspending ====<br />
<br />
There are reports of the system freezing after initiating a suspend or hibernate. A temporary fix is to add {{ic|1=snd_hda_intel.dmic_detect=0}} to your kernel parameters. see [https://www.reddit.com/r/archlinux/comments/e5oe4p/systemctl_suspend_causes_freeze/fa8mzft/]. This temporary fix is somehow disable the microphone, use this at your own risk<br />
<br />
==== Power management/Throttling issues ====<br />
<br />
A [https://web.archive.org/web/20191114160718/https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/td-p/4028489/highlight/true bug] causes the CPU to consume less power than under Windows and throttle at 80°C instead of 97°. <br />
<br />
Lenovo has confirmed the issue, [https://web.archive.org/web/20191115170150/https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4534535/highlight/true#M13642 explained the cause] and published [https://web.archive.org/web/20191114160928/https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4535310/highlight/true#M13653 updates for the embedded controller and the BIOS] to LVFS .<br />
<br />
The alternative fix is to install {{Pkg|throttled}}, then [[start/enable]] {{ic|throttled.service}}.<br />
<br />
== Audio ==<br />
<br />
This laptop requires {{Pkg|sof-firmware}} and {{Pkg|alsa-ucm-conf}} in order for the soundcard to work. See [[ALSA firmware]].<br />
<br />
If you are still having issues, add the following: <br />
<br />
{{hc|/etc/modprobe.d/blacklist.conf|<br />
blacklist snd_hda_intel<br />
blacklist snd_soc_skl<br />
}}<br />
<br />
and [[append]] the following: <br />
<br />
{{hc|/etc/pulse/default.pa|2=<br />
load-module module-alsa-sink device=hw:0,0 channels=4<br />
load-module module-alsa-source device=hw:0,7 channels=4<br />
}}<br />
<br />
Afterwards, reboot.<br />
<br />
=== Clicking/cracking noise when using headphones ===<br />
<br />
If you are hearing clicking/cracking noises when using headphones, this command helped me. I have to run it after each restart.<br />
<br />
# hda-verb /dev/snd/hwC0D0 0x1d SET_PIN_WIDGET_CONTROL 0x0<br />
<br />
=== Clicking/cracking noise when using speakers ===<br />
<br />
The newest alsa-ucm-conf is missing the speakers configuration. Downgrade it to 1.2.3-2.<br />
<br />
# downgrade alsa-ucm-conf<br />
<br />
=== Microphone ===<br />
<br />
On version 5.3 and newer the SOF firmware can be enabled, see [[{{TALKPAGENAME}}#Microphone|Talk#Microphone]].<br />
<br />
If you are having issues getting the microphone to be detected, see the troubleshooting section in [[#Audio]].<br />
<br />
== Camera ==<br />
<br />
=== Secondary IR ===<br />
<br />
Some models of this laptop include a second infrared (IR) [[webcam]] (originally to be used with Windows Hello) which is uncovered by the privacy slider. {{ic|v4l2-ctl --list-devices}} will show all available video devices. The IR emitter can be manipulated using [https://github.com/PetePriority/chicony-ir-toggle chicony-ir-toggle].<br />
<br />
Facial authentication can be archived using [[Howdy]].<br />
<br />
== Function Keys ==<br />
<br />
In the firmware configuration it is possible to swap the {{ic|Ctrl}} and {{ic|Fn}} keys.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Key<br />
! Visible?<sup>1</sup><br />
! Marked?<sup>2</sup><br />
! Effect<br />
|-<br />
| {{ic|Fn+Esc}} || {{No}} || {{Yes}} || Toggles Fn lock<br />
|-<br />
| {{ic|Fn+F1}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioMute}}<br />
|-<br />
| {{ic|Fn+F2}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioLowerVolume}}<br />
|-<br />
| {{ic|Fn+F3}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioRaiseVolume}}<br />
|-<br />
| {{ic|Fn+F4}} || {{Yes}} || {{Yes}} || {{ic|XF86AudioMicMute}}<br />
|-<br />
| {{ic|Fn+F5}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessDown}}<br />
|-<br />
| {{ic|Fn+F6}} || {{Yes}} || {{Yes}} || {{ic|XF86MonBrightnessUp}}<br />
|-<br />
| {{ic|Fn+F7}} || {{Yes}} || {{Yes}} || {{ic|XF86Display}}<br />
|-<br />
| {{ic|Fn+F8}} || {{Yes}} || {{Yes}} || {{ic|XF86WLAN}}<br />
|-<br />
| {{ic|Fn+F9}} || {{Yes}} || {{Yes}} || {{ic|XF86Tools}}<br />
|-<br />
| {{ic|Fn+F10}} || {{Yes}} || {{Yes}} || {{ic|XF86Bluetooth}}<br />
|-<br />
| {{ic|Fn+F11}} || {{No}} || {{Yes}} || No Effect<br />
|-<br />
| {{ic|Fn+F12}} || {{Yes}} || {{Yes}} || {{ic|XF86Favorites}}<br />
|}<br />
<br />
# The key is visible to {{ic|xev}} and similar tools.<br />
# The physical key has a symbol on it, which describes its function.<br />
<br />
== Fingerprint sensor ==<br />
<br />
An official Lenovo firmware with Linux support is available from [[fwupd]]. After installing fwupd, you can update the Synaptics Prometheus driver for the fingerprint sensor:<br />
<br />
# fwupdmgr refresh<br />
# fwupdmgr get-updates<br />
Prometheus Fingerprint Reader Device Update:<br />
New version: 10.01.3158804<br />
New features and enhancements: Support Linux system<br />
# fwupdmgr update<br />
<br />
To use the fingerprint sensor, follow the instructions from [[Fprint]].<br />
<br />
If you had previously installed the testing version of this driver from lvfs-testing, there should be no issues updating to this driver version from the main repository.<br />
<br />
== Mobile broadband ==<br />
<br />
The Fibocom LTE module has Linux support once switched to USB mode; see [https://forums.lenovo.com/t5/Other-Linux-Discussions/How-To-Configure-X1-Carbon-Gen-7-on-Debian-FingerPrint-4G-Modem/td-p/4550327] and [https://github.com/abrasive/xmm7360]<br />
<br />
== Disabling red LED in ThinkPad logo ==<br />
<br />
You can temporarily disable the red LED in the ThinkPad logo on the cover:<br />
<br />
1. Enable writing to the embedded controller registers by adding the kernel parameter {{ic|1=ec_sys.write_support=1}}. <br />
If you use UEFI boot, you can add this parameter in {{ic|/boot/efi/loader/entries/arch.conf}} under "options".<br />
<br />
2. Disable the LED with this command: <br />
<br />
# echo -n -e "\x0a" | dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null<br />
<br />
This would need to be run after each suspend/reboot to be permanent.<br />
<br />
== See also ==<br />
<br />
* https://www.thinkwiki.org/wiki/ThinkWiki<br />
* [https://gist.github.com/greigdp/bb70fbc331a0aaf447c2d38eacb85b8f Dell XPS 13 9370 quirks]: Some pointers on getting Watt usage down to ~2W, Intel video powersaving features might be interesting, see also the [[Intel graphics]] page for interesting power-saving options.<br />
* [https://01.org/blogs/rzhang/2015/best-practice-debug-linux-suspend/hibernate-issues Intel Blog: Best practice to debug Linux* suspend/hibernate issues], including the [https://github.com/01org/pm-graph pm-graph] tool to analyze power usage during suspend<br />
* [https://forums.linuxmint.com/viewtopic.php?t=91453 How to fix volume control (ALSA problem)] This is where the volume fix came from originally.<br />
* [https://docs.microsoft.com/en-us/windows/win32/power/system-power-states Windows System Power States]<br />
* [https://docs.kernel.org/admin-guide/pm/sleep-states.html System Sleep States at kernel.org]</div>Aleksozolinshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon_(Gen_6)&diff=763503Lenovo ThinkPad X1 Carbon (Gen 6)2023-01-08T18:43:35Z<p>Aleksozolins: Service name has been updated from lenovo_fix.service to throttled.service. Made the correction.</p>
<hr />
<div>[[Category:Lenovo]]<br />
[[ja:Lenovo ThinkPad X1 Carbon (Gen 6)]]<br />
{{Laptop style|Hardware table needs IDs and sections needs some cleanup}}<br />
<br />
{| class="wikitable" style="float: right;"<br />
|-<br />
! Hardware !! PCI/USB ID !! Working?<br />
|-<br />
| GPU || || {{Yes}}<br />
|-<br />
| Wireless || || {{Yes}}<br />
|-<br />
| Ethernet || || {{Yes}}<br />
|-<br />
| Mobile broadband || || {{Yes}}<br />
|-<br />
| Audio || || {{Yes}}<br />
|-<br />
| Touchpad || || {{Yes}}<br />
|-<br />
| TrackPoint || || {{Yes}}<br />
|-<br />
| Webcam || || {{Yes}}<br />
|-<br />
| Fingerprint Reader || || {{Yes}}<br />
|-<br />
| Bluetooth || || {{Yes}}<br />
|-<br />
| NFC || || {{No}}<br />
|-<br />
| microSD card reader || || {{Yes}}<br />
|-<br />
| Thunderbolt || || {{Yes}}<br />
|}<br />
<br />
The Lenovo ThinkPad X1 Carbon, 6th generation is an ultrabook introduced in early 2018. It comes in several variants({{ic|20KH*}} and {{ic|20KG*}}) and features a 14" screen, 8th-gen Intel Core processors and integrated [[Intel graphics|Intel UHD 620 graphics]].<br />
<br />
To ensure you have this version, [[install]] the package {{Pkg|dmidecode}} and run:<br />
<br />
{{hc|# dmidecode -s system-version|ThinkPad X1 Carbon 6th}}<br />
<br />
== Firmware ==<br />
<br />
The most convenient way to install Arch Linux is by disabling "Secure Boot" {{ic|Security -> Secure Boot - Set to "Disabled"}}. However it is possible to self-sign your kernel and boot with it enabled. For further information, have a look at the [[Secure Boot]] article.<br />
<br />
In case your {{ic|efivars}} are not properly set it is most likely due to you not being booted into [[UEFI]]. Should the problem persist be sure to consult the [[UEFI#UEFI variables]] section.<br />
<br />
=== Updates ===<br />
<br />
{{Note|In the BIOS setup menu under {{ic|Security -> UEFI BIOS Update Option}}, both {{ic|Flash BIOS Updating by End-Users}} and {{ic|Windows UEFI Firmware Update}} [https://github.com/fwupd/fwupd/issues/856#issuecomment-440967709 must be enabled] at the time of an update.}}<br />
<br />
==== Automatic (Linux Vendor Firmware Service) ====<br />
<br />
[https://blogs.gnome.org/hughsie/2018/08/06/please-welcome-lenovo-to-the-lvfs/ In August of 2018 Lenovo has joined] the [https://fwupd.org/ Linux Vendor Firmware Service(LVFS)] project, which enables firmware updates from within the OS.<br />
BIOS updates (and other firmware such as the Thunderbolt controller) can be queried for and installed through [[fwupd]].<br />
<br />
==== Manual (fwupdmgr) ====<br />
<br />
Lenovo provides a cabinet file that can be directly installed with fwupdmgr.<br />
Take the most recent {{ic|.cab}} file from the [https://pcsupport.lenovo.com/fr/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-6th-gen-type-20kh-20kg/downloads Lenovo ThinkPad X1 Carbon (Gen 6) driver website].<br />
<br />
#Make sure the AC adapter is firmly connected to the target computer.<br />
#Launch Terminal.<br />
#Move to the directory where the cabinet file was placed.<br />
#Run {{ic|fwupdmgr install xxxxxxxx.cab}} to schedule firmware update.<br />
#Restart the system.<br />
#The computer will be restarted and the UEFI BIOS will be updated.<br />
<br />
==== Manual (El Torito) ====<br />
<br />
Download the [https://pcsupport.lenovo.com/fr/en/products/LAPTOPS-AND-NETBOOKS/THINKPAD-X-SERIES-LAPTOPS/THINKPAD-X1-CARBON-6TH-GEN-TYPE-20KH-20KG/downloads/DS502281 latest BIOS update ISO]. Obtain {{aur|geteltorito}} and run {{ic|geteltorito.pl -o bios-update.img n23ur12w.iso}} on the downloaded ISO file to create a valid [[wikipedia:El_Torito_(CD-ROM_standard)|El Torito]] image file, then flash this file on a USB drive via {{ic|dd}} like you would flash [[USB flash installation media|Arch installation media]]. For further information see [[Flashing BIOS from Linux#Bootable optical disk emulation|flashing BIOS from Linux]].<br />
<br />
The ThinkPad X1 Carbon supports setting a custom splash image at the earliest boot stage (instead of the red "Lenovo" logo), more information can be found in the {{ic|README.TXT}} located in the {{ic|FLASH}} folder of the update image. This only needs to be done once, as subsequent UEFI upgrades will ask whether you wish to keep your custom logo.<br />
<br />
Once the USB drive is flashed, the logo file can be placed in to the root directory of the flash drive.<br />
<br />
== Fingerprint reader ==<br />
<br />
The [https://aur.archlinux.org/packages/python-validity-git/ python-validity] driver available via AUR allows to use the fingerprint reader as usual using fprintd.<br />
<br />
== Bluetooth ==<br />
<br />
See [https://200ok.ch/posts/2018-12-17_making_bluetooth_work_on_lenovo_x1_carbon_6th_gen_with_linux.html this blog post] for improvements to reliability.<br />
<br />
== IR Camera ==<br />
<br />
See [[Howdy]] for logging in with the IR camera. The {{ic|frame_width}} and {{ic|frame_height}} must be set to {{ic|400}} for the IR emitters to turn on.<br />
<br />
== NFC ==<br />
<br />
Connected via I2C, support was discussed in the [https://github.com/nfc-tools/libnfc/issues/455 libnfc project].<br />
<br />
== Battery Stats and Charge Limit ==<br />
<br />
[[Install]] the {{Pkg|tlp}} package and show battery stats from command line:<br />
<br />
# tlp-stat -b<br />
<br />
{{Note|{{ic|cycle_count}} will show {{ic|unsupported}} for a brand new battery until it has completed at least 1 full discharge/charge cycle.}}<br />
<br />
To prolong battery lifetime, you can limit battery charging to a maximum of 80% and start charging only if SoC (state of charge) is below 79%:<br />
<br />
# tpacpi-bat -s ST 1 79 # Start charging if battery below 79%<br />
# tpacpi-bat -s SP 1 80 # Stop charging if battery above 80%<br />
# tpacpi-bat -s IC 1 0 # Disable charging entirely<br />
<br />
For making the changes permanent, you can edit {{ic|/etc/tlp.conf}}. Please refer to the [[TLP]] article for more information and GUI tools.<br />
<br />
== Suspend ==<br />
<br />
Since BIOS version 1.30, the X1 Carbon supports S3 mode when enabled in the BIOS menu (choose "Linux" sleep mode instead of the default "Windows 10"). See [[#Automatic (Linux Vendor Firmware Service)]] for instructions to update and verify your BIOS version.<br />
<br />
=== Enabling S3 ===<br />
<br />
To enable S3 support, make sure you have at least BIOS version 1.30 installed. Then, go into the BIOS configuration, and {{ic|Config -> Power -> Sleep State - Set to "Linux"}}. This should make S3 available. To verify, after making the changes in the BIOS configuration, boot into Linux, and run:<br />
<br />
# dmesg | grep -i "ACPI: PM: (supports"<br />
<br />
to make sure that S3 is now available.<br />
<br />
=== S3 Suspend Bug with Bluetooth Devices ===<br />
<br />
Occasionally your Thinkpad will wake up immediately or a few seconds after suspending with certain [[Bluetooth]] devices added. To prevent this, remove the devices or disable [[Bluetooth]] before suspending.<br />
<br />
=== Disabling the memory card reader ===<br />
<br />
You might also need to disable the Realtek memory card reader (which appears to use a constant 2-3 W) either via the BIOS or via<br />
<br />
# printf 2-3 > /sys/bus/usb/drivers/usb/unbind<br />
<br />
=== BIOS configurations ===<br />
<br />
{{ic|Config -> Thunderbolt BIOS Assist Mode - Set to "Enabled"}}. When disabled, on Linux, power usage appears to be significantly higher because of a substantial number of CPU wakeups during s2idle.<br />
<br />
=== Suspend fails ===<br />
<br />
If the machine starts entering suspend but comes back online immediately when anything is plugged through USB-C, showing the following errors: <br />
<br />
{{hc|# journalctl -p err -u systemd-suspend|<br />
Failed to suspend system. System resumed again: Device or resource busy<br />
}}<br />
<br />
{{hc|# dmesg -Tl err|<br />
[Mon Nov 11 20:18:03 2019] PM: pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -16<br />
[Mon Nov 11 20:18:03 2019] PM: dpm_run_callback(): pci_pm_suspend+0x0/0x130 returns -16<br />
[Mon Nov 11 20:18:03 2019] PM: Device 0000:00:14.0 failed to suspend async: error -16<br />
[Mon Nov 11 20:18:04 2019] PM: Some devices failed to suspend, or early wake event detected <br />
}}<br />
<br />
Block USB devices from waking up the computer.<br />
<br />
Check that {{ic|grep XHC /proc/acpi/wakeup}} shows {{ic|enabled}}. If yes, disable XHC wakeup with:<br />
<br />
# echo XHC > /proc/acpi/wakeup<br />
<br />
One you have verified this fixes the issue, [[create]] the following systemd unit file and [[enable]] the service.<br />
<br />
[Unit]<br />
Description=Fixes failing suspend by disabling wakeup through USB<br />
<br />
[Service]<br />
ExecStart=/bin/bash -c 'grep --silent '^XHC.*disabled' /proc/acpi/wakeup || echo XHC > /proc/acpi/wakeup'<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
<br />
== Power management/Throttling ==<br />
<br />
Due to wrong configured power management registers the CPU may consume a lot less power than under Windows and the thermal throttling occurs at 80°C (97°C when using Windows, see [https://www.reddit.com/r/thinkpad/comments/870u0a/t480s_linux_throttling_bug/ T480s throttling bug]).<br />
<br />
There is a [https://forums.lenovo.com/t5/Linux-Discussion/T480s-low-cTDP-and-trip-temperature-in-Linux/td-p/4028489 post in the official Lenovo forum] to inform Lenovo about this issue.<br />
<br />
=== Using thermald ===<br />
<br />
A fix has reportedly been applied in {{Pkg|thermald}} 2.4.3 according to [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4028489?page=47#5273704 this long running discussion]. The aforementioned thread also contains links to the patch which was developed by Lenovo.<br />
<br />
As of {{Pkg|thermald}} 2.4.3 and Linux 5.12 it [https://forums.lenovo.com/t5/Other-Linux-Discussions/X1C6-T480s-low-cTDP-and-trip-temperature-in-Linux/m-p/4028489?page=49#5319619 appears] to be enough to just use thermald with no further workarounds.<br />
<br />
=== Using throttled ===<br />
<br />
Alternatively, a package has been written to address the problem until Lenovo completes the [https://www.notebookcheck.net/Lenovo-admits-ThinkPad-CPU-throttling-problem-when-running-Linux-fix-in-development.435549.0.html OS agnostic fix] for the X1C6.<br />
<br />
Install {{Pkg|throttled}}, then [[start/enable]] {{ic|throttled.service}}<br />
<br />
The script also supports more advance thermal/performance features including CPU undervolting. See the [https://github.com/erpalma/throttled repository] {{ic|README.md}} for details.<br />
<br />
{{Note|If you installed {{Pkg|thermald}}, it may conflict with the throttling fix in this package. Consider disabling it.}}<br />
<br />
== Audio ==<br />
<br />
=== Microphone distorted due to automatic adjustment ===<br />
<br />
If your microphone volume creeps up automatically and causes the sound to be distorted, you can fix it by disabling mic boost.<br />
See [[PulseAudio/Troubleshooting#Microphone distorted due to automatic adjustment|Pulse Audio]] for details.<br />
<br />
=== Built-in speakers low volume ===<br />
<br />
If your ThinkPad X1 Carbon (Gen 6) built-in speakers are limited to a maximum of about 20% volume even though the volume is set at 100%, try adding the following parameter to the {{ic|snd_hda_intel}} module, which can be set through a file in {{ic|/etc/modprobe.d/}}, e.g.: <br />
<br />
{{hc|/etc/modprobe.d/alsa-base.conf|2=<br />
options snd-hda-intel model=nofixup<br />
}}<br />
<br />
{{Note|This stops the LEDs on the mute and mic-mute buttons from working.}}<br />
<br />
== Wireless WAN / LTE ==<br />
<br />
ThinkPad X1 Carbon (Gen 6) is exclusively shipped with a Fibocom L850-GL LTE modem, which is currently not supported out of the box under Linux.<br />
<br />
It is normally impossible to swap the LTE modem for a supported one due to BIOS-level restrictions ("whitelists" of allowed M.2 expansion cards) implemented in all modern Lenovo laptops. However, a method has been found to configure any Sierra Wireless EM73xx/EM74xx modem to "evade" the whitelist checks, so these modems can be used normally.<br />
<br />
Take a look at [[ThinkPad mobile Internet#Getting around BIOS-level whitelist restrictions|ThinkPad mobile internet: Getting around BIOS-level whitelist restrictions]] for instructions.<br />
<br />
See also the work done in [https://github.com/abrasive/xmm7360 github: Tools for the Fibocom L850-GL / Intel XMM7360 LTE modem], [https://github.com/juhovh/xmm7360_usb github: Kernel module for Fibocom L850-GL / Intel XMM7360 LTE modem] and [https://forums.lenovo.com/t5/Other-Linux-Discussions/WWAN-Fibocom-L850-GL-and-Linux-support/td-p/4318903 Lenovo Forums: WWAN Fibocom L850-GL and Linux support].<br />
<br />
See also [https://github.com/abrasive/xmm7360 MBIM-Switch] and [https://github.com/juhovh/xmm7360_usb kernel-module].<br />
<br />
=== WWAN / LTE GUI ===<br />
<br />
Install [[NetworkManager]] and {{Pkg|network-manager-applet}} to make your life easier founding the correct APN for your SIM card.<br />
<br />
== Function keys ==<br />
<br />
* {{ic|Fn+4}} sends {{ic|XF86Sleep}} (puts computer to sleep by default)<br />
* {{ic|Fn+S}} sends {{ic|Alt_L+Sys_Req}}<br />
* {{ic|Fn+P}} sends {{ic|Pause}}<br />
* {{ic|Fn+B}} sends {{ic|Control_L+Break}}<br />
* {{ic|Fn+K}} sends {{ic|Scroll_Lock}}<br />
* {{ic|Fn+Space}} toggles the keyboard backlight<br />
* The function key by itself sends {{ic|XF86WakeUp}} (wakes computer from sleep by default)<br />
<br />
=== Special buttons ===<br />
<br />
Some special buttons are not supported by X server due to keycode number limit.<br />
<br />
{| class="wikitable" style="text-align:center"<br />
|-<br />
! Key combination !! Scancode !! Keycode !! Note<br />
|-<br />
| {{ic|Fn+F11}} || {{ic|0x49}} || {{ic|374}} {{ic|KEY_KEYBOARD}} || Not recognized in [[Wayland]]<br />
|-<br />
| {{ic|Fn+F12}} || {{ic|0x45}} || {{ic|364}} {{ic|KEY_FAVORITES}} || Recognized correctly on [[Wayland]]<br />
|}<br />
<br />
You can remap unsupported keys so that they can be detected and mapped in X using [[Map scancodes to keycodes|udev hwdb]]:<br />
<br />
Note that {{ic|prog1}} and {{ic|prog2}} map to {{ic|KEY_PROG1}} and {{ic|KEY_PROG2}} in {{ic|/usr/include/linux/input-event-codes.h}}. You can use any key code with a defined value less than 255. The keycode hwdb expects is the lowercased text following {{ic|KEY_}} in the above input event codes header file. eg: {{ic|KEY_COFFEE}} would be {{ic|coffee}}.<br />
<br />
{{hc|/etc/udev/hwdb.d/90-thinkpad-keyboard.hwdb|<nowiki><br />
evdev:name:ThinkPad Extra Buttons:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*<br />
KEYBOARD_KEY_49=prog1<br />
KEYBOARD_KEY_45=prog2<br />
</nowiki>}}<br />
<br />
To make the changes take effect:<br />
<br />
# udevadm hwdb --update<br />
# udevadm trigger --sysname-match="event*"<br />
<br />
=== Disabling red LED in ThinkPad logo ===<br />
<br />
To disable the red LED in the ThinkPad logo on the cover:<br />
<br />
# Enable writing to the embedded controller registers by adding the kernel parameter {{ic|1=ec_sys.write_support=1}}. If you use UEFI boot, you can add this parameter in {{ic|/boot/efi/loader/entries/arch.conf}} under "options".<br />
# Then, you can disable directly the LED with this command: <br />
<br />
# printf '\x0a' | dd of=/sys/kernel/debug/ec/ec0/io bs=1 seek=12 count=1 conv=notrunc 2> /dev/null<br />
<br />
To disable the LED at startup, you can create a systemd service:<br />
<br />
{{hc|/etc/systemd/system/led.service|2=<br />
Description=Disabling ThinkPad LED<br />
<br />
[Service]<br />
ExecStart=sh -c "printf '\x0a' {{!}} dd of=/sys/kernel/debug/ec/ec0/io bs=1 seek=12 count=1 conv=notrunc 2> /dev/null"<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}} <br />
<br />
[[Enable/start]] {{ic|led.service}}<br />
<br />
== Graphics ==<br />
<br />
=== Intel GPU firmware ===<br />
<br />
On Wayland [[Intel graphics#Enable GuC / HuC firmware loading|enabling GuC/HuC firmware loading]] can cause issues with the GPU hanging. These issues can be reflected by various crashes or freezes of graphical processes. <br />
<br />
In [[dmesg]] the following can be observed:<br />
<br />
kernel: [drm] GPU HANG: ecode 9:0:0x85dffffd, in chrome [18418], reason: hang on rcs0, action: reset<br />
kernel: [drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.<br />
kernel: [drm] Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel<br />
kernel: [drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue.<br />
kernel: [drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it.<br />
kernel: [drm] GPU crash dump saved to /sys/class/drm/card0/error<br />
kernel: i915 0000:00:02.0: Resetting rcs0 for hang on rcs0<br />
<br />
Do not enable GuC / HuC firmware loading, at least on Wayland. See https://bugs.freedesktop.org/show_bug.cgi?id=108717.<br />
<br />
=== Screen tearing ===<br />
<br />
See [[Intel graphics#Tearing]].<br />
<br />
=== Wayland not available in GDM ===<br />
<br />
Enable [[Kernel mode setting#Early KMS start|early KMS]] if GDM does not show the Wayland option.<br />
<br />
=== HDR display color calibration ===<br />
<br />
For models with the 1440p HDR display, the default color profile can be corrected under Gnome using an ICC calibration provided by [https://www.notebookcheck.net/Lenovo-ThinkPad-X1-Carbon-2018-WQHD-HDR-i7-Laptop-Review.284682.0.html notebookcheck.net's review].<br />
<br />
$ wget <nowiki>https://www.notebookcheck.net/uploads/tx_nbc2/B140QAN02_0.icm</nowiki><br />
$ colormgr import-profile B140QAN02_0.icm<br />
<br />
This will import the ICC profile, and next you will need to activate it for your display. Find your display's object path:<br />
<br />
$ colormgr get-devices | sed -rn 's/Object Path:\s*(.*eDP1.*)/\1/p'<br />
<br />
And your new color profile object path:<br />
<br />
$ colormgr get-profiles | grep -4 -i B140QAN02<br />
<br />
And finally activate the profile and set it as the default for this display:<br />
<br />
$ colormgr device-add-profile <device object id> <profile object id><br />
$ colormgr device-make-profile-default <device object id> <profile object id><br />
<br />
You can verify the profile is active by running {{ic|colormgr get-devices}}.<br />
<br />
== TrackPoint and Touchpad issues ==<br />
<br />
Some models of the 6th generation X1 Carbon seem to have issues with the TrackPoint and Touchpad working at the same time.<br />
<br />
To get the TrackPoint and Touchpad to work at the same time, add {{ic|1=synaptics_intertouch=1}} to the {{ic|psmouse}} [[kernel module]] options: <br />
<br />
{{hc|/etc/modprobe.d/psmouse.conf|2=<br />
options psmouse synaptics_intertouch=1<br />
}}<br />
<br />
When using [[TLP]] with default power saving settings, there might be occasional hiccups such as dropouts of tap-to-click functionality for the Touchpad, as well as the TrackPoint not surviving suspends and needing to be re-initialized.<br />
<br />
Reconnecting a dead trackpad can be done via the following command:<br />
<br />
# printf none > /sys/bus/serio/devices/serio1/drvctl<br />
# printf reconnect > /sys/bus/serio/devices/serio1/drvctl<br />
<br />
== Thunderbolt dock ==<br />
<br />
=== Plugable USB-C Mini Docking Station with 85W Power Delivery UD-CAM ===<br />
<br />
If you are using an external plugable [https://plugable.com/products/ud-cam/ UD-CAM] thunderbolt dock connected to the laptop through its USB-C thunderbolt port, you might experience random disconnections (external monitor, bluetooth and ethernet) with this kind of error in ''dmesg'' : <br />
{{bc|pcieport 0000:05:00.0: BAR 13: no space for [io size 0x3000]}} <br />
<br />
It should be noted that {{Pkg|bolt}} is not working with this [https://plugable.com/products/ud-cam/ UD-CAM] dock.<br />
<br />
To avoid random disconnection, proceed as followed by editing the bios and [[TLP]]<br />
<br />
==== Bios settings ====<br />
<br />
You should then look at your bios settings : <br />
* Wake by thunderbolt : enable <br />
* Security level : no security<br />
* Pre-boot ACL option : enable<br />
<br />
==== TLP blacklisting devices from USB autosuspend ====<br />
<br />
If you are using [[TLP]] you have to edit {{ic|/etc/tlp.conf}} and make sure that you exclude all dock devices from USB autosuspend as follow: <br />
<br />
USB_DENYLIST=="0000:1111 2222:3333 4444:5555"<br />
<br />
Then reboot and your dock should work correctly.<br />
<br />
=== Lenovo dock ===<br />
<br />
Some problems can be caused by outdated dock firmware. Updates are not supplied by LVFS, use "Firmware for Windows" from the dock support page.<br />
<br />
=== DisplayLink ===<br />
<br />
If you want to continue using the [[Intel graphics]] for your primary and HDMI displays, change its config file numerical prefix so that it precedes the [[DisplayLink]] configuration. For example, rather than naming it {{ic|/etc/X11/xorg.conf.d/20-intel.conf}} instead name it {{ic|/usr/share/X11/xorg.conf.d/19-intel.conf}}.<br />
<br />
== Full-disk encryption ==<br />
<br />
=== LUKS: Ramdisk module ===<br />
<br />
With LUKS for root, enable [[Kernel mode setting#Early KMS start|early KMS]] to be able to display the password prompt.<br />
<br />
=== OPAL: Hardware based full-disk encryption ===<br />
<br />
See [[Self-encrypting drives]] (Confirmed working)<br />
<br />
== NVMe disk failure ==<br />
<br />
There is an [https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-carbon-6th-gen-type-20kh-20kg/solutions/ht513927 issue] with the NVMe disk installed in ThinkPad X1 Carbon (Gen 6) resulting in device failure. Be sure to update firmware or reach out to Lenovo support for replacement.<br />
<br />
== See also ==<br />
<br />
* [https://www.reddit.com/r/thinkpad/comments/870u0a/t480s_linux_throttling_bug/ T480s throttling bug], affects X1C6 as well<br />
* [https://forums.lenovo.com/t5/Linux-Discussion/T480s-low-cTDP-and-trip-temperature-in-Linux/td-p/4028489 Lenovo forums: T480s low cTDP and trip temperature in Linux]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=236367 Thread: TrackPoint/Touchpad issues, 20KG model]<br />
* [https://unix.stackexchange.com/a/431820 StackExchange: Success with enabling RMI4 config flags for Touchpad and TrackPoint]<br />
* [https://patchwork.kernel.org/patch/10324633/ Kernel patch - Input: elantech - add support for SMBus devices]<br />
* [https://patchwork.kernel.org/patch/10330857/ Kernel patch - Input: synaptics - add Lenovo 80 series ids to SMBus]<br />
* [[Kernel mode setting#Early KMS start|Early KMS start]]: Adding i915 to ramdisk<br />
* https://www.thinkwiki.org/wiki/ThinkWiki<br />
* [https://www.thinkwiki.org/wiki/Category:X1_Carbon_(6th_Gen) ThinkWiki X1 Carbon 6th Gen page]<br />
* Benjamin Tissoires, kernel maintainer of peripherals, has explained how input bugs get fixed in his talk [https://www.youtube.com/watch?v=Bl_0xYxcYd8 Tools to debug a broken input device] ([https://www.x.org/wiki/Events/XDC2015/Program/tissoires_input_debug_tools.html Slides]), especially interesting are slides 16 onward.<br />
* [https://gist.github.com/greigdp/bb70fbc331a0aaf447c2d38eacb85b8f Dell XPS 13 9370 quirks]: Some pointers on getting Watt usage down to ~2W, Intel video powersaving features might be interesting, see also the [[Intel graphics]] page for interesting power-saving options.<br />
* [[Dell XPS 13 (9360)]]: Shares some hardware with the X1C6<br />
* [https://01.org/blogs/rzhang/2015/best-practice-debug-linux-suspend/hibernate-issues Intel Blog: Best practice to debug Linux* suspend/hibernate issues], including the [https://github.com/01org/pm-graph pm-graph] tool to analyze power usage during suspend<br />
* [https://github.com/ejmg/an-idiots-guide-to-installing-arch-on-a-lenovo-carbon-x1-gen-6 A comprehensive example Arch install for the X1C6]</div>Aleksozolinshttps://wiki.archlinux.org/index.php?title=Dropbox&diff=606273Dropbox2020-04-16T00:21:27Z<p>Aleksozolins: /* Autostart on login with systemd */ comma not needed</p>
<hr />
<div>[[Category:File sharing]]<br />
[[de:Dropbox]]<br />
[[it:Dropbox]]<br />
[[ja:Dropbox]]<br />
[[ru:Dropbox]]<br />
[[zh-hans:Dropbox]]<br />
[[zh-hant:Dropbox]]<br />
{{Related articles start}}<br />
{{Related|Synchronization and backup programs}}<br />
{{Related|Syncthing}}<br />
{{Related articles end}}<br />
[https://www.dropbox.com Dropbox] is a file sharing system with a GNU/Linux client. Use it to transparently sync files across computers and architectures. Simply drop files into your {{ic|~/Dropbox}} folder, and they will automatically sync to your centralized repository.<br />
<br />
<br />
== Installation ==<br />
<br />
=== AUR ===<br />
<br />
{{AUR|dropbox}} can be [[install]]ed. As a last resort, the Dropbox website has instructions for a [https://www.dropbox.com/install?os=lnx headless install via command line].<br />
<br />
# After installing the package, you can start Dropbox from your application menu or run {{ic|dropbox}} from the command-line. The client icon will appear in the system tray.<br />
# A pop-up will notify you that Dropbox is running from an unsupported location. Click on ''Don't ask again'' since you know that you have installed it from AUR rather than from the official homepage.<br />
# Eventually a pop-up will ask you to log in to your Dropbox account or create a new account. Enter your credentials.<br />
# After some time you will see a "Welcome to Dropbox" pop-up, which will give you the opportunity to view a short tour of Dropbox.<br />
# Press the "Finish and go to My Dropbox".<br />
<br />
=== Optional packages ===<br />
<br />
{| class="wikitable"<br />
|command-line interface<br />
|{{AUR|dropbox-cli}}<br />
|-<br />
|[[GNOME/Files]] integration<br />
|{{AUR|nautilus-dropbox}}<br />
|-<br />
|[[Nemo]] integration<br />
|{{AUR|nemo-dropbox}}<br />
|-<br />
|[[Thunar]] integration<br />
|{{AUR|thunar-dropbox}}<br />
|-<br />
|[[Dolphin]] integration<br />
|{{pkg|dolphin-plugins}}<br />
|-<br />
|Caja integration<br />
|{{AUR|caja-dropbox}}<br />
|-<br />
|[[KDE]] client<br />
|{{AUR|kfilebox}}<br />
|}<br />
<br />
Note that in order to access the GUI and the settings, the only way is via a tray icon. You need an X panel with a system tray or a standalone [[List of applications#System tray|system tray application]] for that.<br />
<br />
=== Prevent automatic updates ===<br />
<br />
Since at least version 2.4.6 (see comments around 2013-11-06 on [https://aur.archlinux.org/packages/dropbox/?comments=all AUR]), Dropbox has had an auto-update capability which downloads a new binary to the {{ic|~/.dropbox-dist/}} folder. The service then attempts to hand over control to this binary and dies, causing systemd to re-start the service, generating a conflict and an endless loop of log-filling, CPU-eating misery. <br />
<br />
A workaround is to prevent Dropbox from downloading the automatic update by creating the {{ic|~/.dropbox-dist/}} folder and making it read-only:<br />
<br />
$ rm -rf ~/.dropbox-dist<br />
$ install -dm0 ~/.dropbox-dist<br />
<br />
This appears to be necessary for modern Dropbox clients to operate successfully from systemd on arch.<br />
<br />
Also see the [https://www.dropboxforum.com/hc/en-us/community/posts/202917115-dropbox-will-not-start-under-systemd-on-linux relevant Dropbox forum post].<br />
<br />
== Autostart ==<br />
<br />
In the Dropbox preferences, under the "General" tab there should be a "Start Dropbox on system startup" checkbox. Try checking this box and seeing if Dropbox starts automatically.<br />
<br />
If that does not work, uncheck the box and use one of the following methods instead:<br />
<br />
=== Autostart with your WM/DE ===<br />
<br />
For [[KDE]] users, no further steps are required, as KDE saves running applications when logging out and restarts them automatically. Similarly for [[Xfce]] users, Dropbox will be restarted automatically next time you login since the {{ic|dropbox.desktop}} file has been placed in {{ic|~/.config/autostart}}.<br />
<br />
For [[Cinnamon]] users, it's recommended to start Dropbox client by configuring Startup Applications with a little delay (Cinnamon issue [https://github.com/linuxmint/Cinnamon/issues/4396 #4396]). Starting Dropbox with systemd works, running in background, but there's is no icon on systray due to some Cinnamon bugs ([https://github.com/linuxmint/Cinnamon/issues/481 #481], [https://github.com/linuxmint/Cinnamon/issues/2846 #2846]).<br />
<br />
If that does not work, you can start the Dropbox sync client along with your window manager by adding {{Ic|/usr/bin/dropbox &}} to your [[xinitrc]] (or {{ic|~/.config/openbox/autostart}}, depending on your setup).<br />
<br />
=== Autostart on boot with systemd ===<br />
<br />
{{Note|If ''systemd'' keeps restarting Dropbox, see [[#Prevent automatic updates]].}}<br />
<br />
To have Dropbox automatically start when your system boots, simply [[enable]] the systemd service, passing your username as the instance identifier. The service unit to be enabled takes the format {{ic|dropbox@''username''}}.<br />
<br />
By default, running the service does not give you an icon in the system tray because it does not know which X display to use. If you want to have tray support, you must [[edit]] the provided service:<br />
<br />
{{hc|# systemctl edit dropbox@''username''|<nowiki><br />
[Service]<br />
Environment=DISPLAY=:0<br />
</nowiki>}}<br />
<br />
Note that with the above edit Dropbox will fail to start unless an X session is launched.<br />
<br />
=== Autostart on login with systemd ===<br />
<br />
To have Dropbox automatically start when you log in, simply [[enable]] the [[systemd/User|user service]].<br />
<br />
If you want Dropbox to appear in your system tray, you will need to [[edit]] the service unit so that it knows which X display the system tray is in:<br />
<br />
{{hc|$ systemctl --user edit dropbox|<nowiki><br />
[Service]<br />
Environment=DISPLAY=:0<br />
</nowiki>}}<br />
<br />
Note that with the above edit Dropbox will fail to start unless an X session is launched.<br />
<br />
== Accessing the files without installing a sync client ==<br />
<br />
If all you need is basic access to the files in your Dropbox, you can use the web interface at https://www.dropbox.com/ to upload and download files to your Dropbox. This can be a viable alternative to running a Dropbox daemon and mirroring all the files on your own machine.<br />
<br />
Alternatively, the [[AUR]] package {{AUR|droxi}} provides a command-line interface to Dropbox similar to the GNU {{ic|ftp}} client.<br />
<br />
== Encrypting your Dropbox files ==<br />
<br />
If you want to store sensitive data in your Dropbox, you should encrypt it before doing so. Syncing to Dropbox is encrypted, but all files are (for the time being) stored on the server unencrypted just as you put them in your Dropbox.<br />
<br />
* Dropbox works with [[TrueCrypt]], and after you initially uploaded the TrueCrypt volume to Dropbox, performance is quite okay, because Dropbox has a working binary diff.<br />
<br />
* Another possibility is to use [[EncFS]], which has the advantage that all files are encrypted separately, i.e. you do not have to determine in advance the size of the content you want to encrypt and your encrypted directory grows and shrinks while you add/delete/modify files in it. You can also mount an encrypted volume at startup using the {{ic|-S}} option of {{Ic|encfs}} to avoid having to input the passphrase, but note that your encrypted files are not secure from someone who has direct access to your computer.<br />
<br />
* A third option is to use [[gocryptfs]]. It is similar to EncFS, except that gocryptfs uses authenticated encryption, for protecting both confidentiality and integrity (tamper-resistance) of the data.<br />
<br />
=== Setup EncFS with Dropbox ===<br />
<br />
Follow the Wiki instructions to install [[EncFS]].<br />
<br />
Assuming you have set your Dropbox directory as {{ic|~/Dropbox}}:<br />
<br />
Create a folder. Files you want synced to Dropbox will go in here.<br />
$ mkdir ~/Private<br />
<br />
Run the following and enter a password when asked:<br />
$ encfs ~/Dropbox/Encrypted ~/Private<br />
<br />
Your secure folder is ready for use; creating any file inside {{ic|~/Private}} will automatically encrypt it into {{ic|~/Dropbox/Encrypted}}, which will then be synced to your cloud storage.<br />
<br />
To mount your EncFS folder on every boot, follow the instructions in the [[EncFS#User_friendly_mounting|EncFS]] wiki page.<br />
<br />
{{Tip|Consider using the {{ic|ENCFS6_CONFIG}} variable and moving the {{ic|.encfs6.xml}} file to another location (like a USB stick), to help ensure that your encrypted data and the means to realistically decrypt it do not exist together online.}}<br />
<br />
== Multiple Dropbox instances ==<br />
<br />
If you need to separate or distinguish your data, personal and work usage for example, you can subscribe to Dropbox with different email addresses and have their directories synced by different Dropbox instances running on a single machine.<br />
<br />
The basic principle and general how-to are described in the [http://www.dropboxwiki.com/Multiple_Instances_On_Unix Dropbox Wiki].<br />
<br />
To summarize, you can setup new or additional instances with:<br />
<br />
{{bc|<nowiki><br />
mkdir /path/to/.dropbox-alt-1<br />
HOME=/path/to/.dropbox-alt-1 /usr/bin/dropbox start -i<br />
</nowiki>}}<br />
<br />
Once that is done, stop any Dropbox instance still running and start them like this:<br />
<br />
{{bc|<nowiki><br />
HOME=/path/to/.dropbox-alt-1 /path/to/.dropbox-alt-1/.dropbox-dist/dropboxd<br />
HOME=/path/to/.dropbox-alt-2 /path/to/.dropbox-alt-2/.dropbox-dist/dropboxd<br />
</nowiki>}}<br />
<br />
Pay attention to use different {{ic|.../.dropbox-dist/dropboxd}} binaries. Even when setting a custom HOME value, the {{ic|/opt/dropbox/dropbox}} or {{ic|/opt/dropbox/dropboxd}} wrappers allow only one instance and when started they will kill the one already running.<br />
<br />
== Dropbox on laptops ==<br />
<br />
Dropbox itself is pretty good at dealing with connectivity problems. If you have a laptop and roam between different network environments, Dropbox will have problems reconnecting if you do not restart it. '''Try one of the methods described below first,''' if for some reason the problem remains, you may try one of these hackish solutions: [https://bbs.archlinux.org/viewtopic.php?pid=790905], [https://bbs.archlinux.org/viewtopic.php?pid=1012343#p1012343].<br />
<br />
{{Note|When using any of these methods, you need to prevent Dropbox from doing a standard autostart by unchecking ''Dropbox - Preferences - General - Start Dropbox on system startup''. This prevents Dropbox from creating the {{ic|~/.config/autostart/dropbox.desktop}} file and thus from starting twice.}}<br />
<br />
=== Using netctl ===<br />
<br />
For [[netctl]], use {{ic|ExecUpPost}} and {{ic|ExecDownPre}} respectively in every network profile you use, or for example in {{ic|/etc/netctl/interfaces/wlan0}} to start Dropbox automatically whenever profile on {{ic|wlan0}} is active. Add '|| true' to your command to make sure [[netctl]] will bring up your profile, although Dropbox fails to start.<br />
<br />
ExecUpPost="''any other code''; su -c 'DISPLAY=:0 /usr/bin/dropbox &' ''your_user'' || true"<br />
ExecDownPre="''any other code''; killall dropbox"<br />
<br />
Obviously, {{ic|''your_user''}} has to be edited and {{ic|''any other code'';}} can be omitted if you do not have any. The above will make sure that Dropbox is running only if there is a network profile active.<br />
<br />
=== Using NetworkManager ===<br />
<br />
For [[NetworkManager]], use its [[NetworkManager#Network services with NetworkManager dispatcher|dispatcher]] feature. <br />
<br />
Create the following file:<br />
{{hc|/etc/NetworkManager/dispatcher.d/10-dropbox.sh|<nowiki><br />
#!/bin/sh<br />
USER=''your_user''<br />
status=$2<br />
case $status in<br />
up)<br />
su -c 'DISPLAY=:0 /usr/bin/dropbox & ' $USER<br />
;;<br />
down)<br />
killall dropbox<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
or, for the systemd alternative:<br />
<br />
{{hc|/etc/NetworkManager/dispatcher.d/10-dropbox.sh|<nowiki><br />
#!/bin/sh<br />
USER=''your_user''<br />
status=$2<br />
<br />
case $status in<br />
up)<br />
systemctl start dropbox@$USER.service<br />
;;<br />
down)<br />
systemctl stop dropbox@USER.service<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
Do not forget to change scripts to be owned by root and to make them executable.<br />
<br />
=== Using wicd ===<br />
<br />
Create {{ic|/etc/wicd/scripts/postconnect/dropbox}}:<br />
#!/usr/bin/env bash<br />
su -c 'DISPLAY=:0 /usr/bin/dbus-launch dropbox &' your_username<br />
<br />
or, if you use Dropbox with systemd:<br />
<br />
#!/usr/bin/env bash<br />
systemctl restart dropbox@<user><br />
<br />
Create {{ic|/etc/wicd/scripts/postdisconnect/dropbox}}:<br />
#!/usr/bin/env bash<br />
killall dropbox<br />
<br />
or, if you use Dropbox with systemd:<br />
<br />
#!/usr/bin/env bash<br />
systemctl stop dropbox@<user><br />
<br />
Do not forget to make the above scripts executable.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Using Dropbox with non-ext4 filesystems ===<br />
<br />
{{Note|In July, 2019, Dropbox Client build 77.3.127 added support for [[ZFS]], [[eCryptfs]], [[XFS]] and [[Btrfs]].[https://www.dropboxforum.com/t5/Desktop-client-builds/Beta-Build-77-3-127/td-p/354660] It once dropped support for all file systems except plain [[Ext4]] in November, 2018.[https://www.dropboxforum.com/t5/Syncing-and-uploads/Dropbox-client-warns-me-that-it-ll-stop-syncing-in-Nov-why/m-p/290065/highlight/true#M42255]}}<br />
<br />
Workarounds have been created, see for example {{AUR|dropbox-fix2}}. These workarounds are based on substituting the filesystem detection functions by the use of LD_PRELOAD.<br />
<br />
It is also possible to create an ext4 formatted [[sparse file]] within a non-ext4 filesystem. It can then be mounted to the desired location for the Dropbox folder. On btrfs systems, it's recommended to [[Btrfs#Disabling_CoW|disable copy-on-write]].<br />
<br />
=== Dropbox keeps saying Downloading files ===<br />
<br />
But in fact now files are synced with your box. This problem is likely to appear when your Dropbox folder is located on a NTFS partition whose mount path contains spaces, or permissions are not set for that partition. See more in the [https://bbs.archlinux.org/viewtopic.php?id=153368 forums]. To resolve the problem pay attention to your entry in {{ic|/etc/fstab}}. Avoid spaces in the mount path and set write permissions with the "default_permissions" option:<br />
<br />
UUID=01CD2ABB65E17DE0 /run/media/username/Windows ntfs-3g uid=username,gid=users,default_permissions 0 0<br />
<br />
=== Change the Dropbox location from the installation wizard ===<br />
<br />
Some users experience the problem during setting-up Dropbox that they cannot select a Dropbox folder other than {{ic|/home/username/Dropbox}}. In this case when the window for changing the path is shown , hit {{ic|Ctrl+l}}, enter the location (e.g. /mnt/data/Dropbox) and click on the ''Choose'' or ''Open'' button.<br />
<br />
=== Context menu entries in file manager do not work ===<br />
<br />
Several file managers such as Thunar, GNOME Files or its fork Nemo come with extensions that provide context menu entries for files and folders inside your Dropbox. Most of them will result in a browser action such as opening the file or folder in dropbox.com or sharing the link. If you experience these entries not working, then it is likely you have not set the {{ic|$BROWSER}} variable which Dropbox requires. See [[Environment variables]] for details.<br />
<br />
=== Connecting... ===<br />
<br />
It may happen that Dropbox cannot connect successfully because it was loaded before an internet connection was established. This can happen on wireless connections, or fast loading machines on wired networks. The best solution to this problem, for wired and wireless connections, is [[#Dropbox on laptops]] which will ensure that Dropbox is started only after the connection is established. <br />
<br />
An alternative solution, for those not using netctl or NetworkManager, is to delay the startup of Dropbox:<br />
<br />
* {{ic|cp ~/.config/autostart/dropbox.desktop ~/.config/autostart/dropbox-delayed.desktop}}<br />
* Prevent Dropbox from doing a standard autostart by unchecking Dropbox - Preferences - General - Start Dropbox on system startup. This removes {{ic|~/.config/autostart/dropbox.desktop}}.<br />
* Edit {{ic|~/.config/autostart/dropbox-delayed.desktop}} and replace {{ic|1=Exec=dropbox}} with {{ic|1=Exec=bash -c "sleep ''timeout'' && dropbox"}}. Tweak the ''timeout'' parameter, the value of {{ic|3}} is a good start.<br />
<br />
=== Dropbox does not start - "This is usually because of a permission error" ===<br />
<br />
==== Check permissions ====<br />
<br />
Make sure that you own Dropbox's directories before running the application. This includes<br />
*{{ic|~/.dropbox}} - Dropbox's configuration directory<br />
*{{ic|~/Dropbox}} - Dropbox's download directory (default)<br />
You can ensure this by changing their owner with {{ic|chown -R}}.<br />
<br />
This error could also be caused by {{ic|/var}} being full.<br />
<br />
==== Re-linking your account ====<br />
<br />
[https://www.dropbox.com/help/72 Dropbox's FAQ] suggests that this error may be caused by misconfiguration and is fixed by (re)moving the current configuration folder<br />
# mv ~/.dropbox ~/.dropbox.old<br />
and restarting Dropbox.<br />
<br />
==== Errors caused by running out of space ====<br />
<br />
A common error that might happen is that there is no more available space on your {{ic|/tmp}} and {{ic|/var}} partitions. If this happens, Dropbox will crash on startup with the following error in its log:<br />
<br />
Exception: Not a valid FileCache file<br />
<br />
A detailed story of such an occurrence can be found in the [https://bbs.archlinux.org/viewtopic.php?pid=973458 forums]. Make sure there is enough space available before launching Dropbox.<br />
<br />
Another case is when the root partition is full:<br />
<br />
OperationalError: database or disk is full<br />
<br />
Check to see the available space on partitions with {{ic|df}}.<br />
<br />
==== Locale caused errors ====<br />
<br />
Try starting {{Ic|dropbox}} with this code:<br />
<br />
LANG=$LOCALE<br />
dropbox<br />
<br />
(You can also use a different value for LANG; it must be in the format "en_US.UTF-8")<br />
This helps when running from a Bash script or Bash shell where {{ic|/etc/rc.d/functions}} has been loaded<br />
<br />
==== Filesystem monitoring problem ====<br />
<br />
If you have a lot of files to sync in your Dropbox folder, you might get the following error:<br />
<br />
Unable to monitor filesystem<br />
Please run: echo 100000 | sudo tee /proc/sys/fs/inotify/max_user_watches and restart Dropbox to correct the problem.<br />
<br />
This can be fixed easily by adding<br />
<br />
fs.inotify.max_user_watches = 100000<br />
<br />
to {{ic|/etc/sysctl.d/99-sysctl.conf}} and then reload the kernel parameters<br />
<br />
# sysctl --system<br />
<br />
=== Proxy settings ===<br />
<br />
The easiest way to set Dropbox's proxy settings is by defining them manually in the Proxies tab of the Preferences window. Alternatively, you can also set it to 'Auto-detect' and then export your proxy server to the http_proxy env variable prior to starting Dropbox (HTTP_PROXY is also usable)<br />
<br />
{{bc|<nowiki>env http_proxy=http://your.proxy.here:port /usr/bin/dropbox</nowiki>}}<br />
<br />
or<br />
<br />
{{bc|<nowiki><br />
export http_proxy=http://your.proxy.here:port<br />
/usr/bin/dropbox<br />
</nowiki>}}<br />
<br />
{{Note|Dropbox will only use proxy settings of the form {{ic|<nowiki>http://your.proxy.here:port</nowiki>}}, not {{ic|<nowiki>your.proxy.here:port</nowiki>}} as some other applications do.}}<br />
<br />
=== Missing tray icon in GNOME ===<br />
<br />
GNOME 3.26 removed support for tray icons in [https://bugzilla.gnome.org/show_bug.cgi?id=785956 bug 785956] which will prevent the Dropbox icon from showing. To restore tray icons an appropriate extension such as [https://extensions.gnome.org/extension/615/appindicator-support/ App Indicator] needs to be installed.</div>Aleksozolinshttps://wiki.archlinux.org/index.php?title=Dropbox&diff=606272Dropbox2020-04-16T00:21:05Z<p>Aleksozolins: /* Autostart on boot with systemd */ comma not needed</p>
<hr />
<div>[[Category:File sharing]]<br />
[[de:Dropbox]]<br />
[[it:Dropbox]]<br />
[[ja:Dropbox]]<br />
[[ru:Dropbox]]<br />
[[zh-hans:Dropbox]]<br />
[[zh-hant:Dropbox]]<br />
{{Related articles start}}<br />
{{Related|Synchronization and backup programs}}<br />
{{Related|Syncthing}}<br />
{{Related articles end}}<br />
[https://www.dropbox.com Dropbox] is a file sharing system with a GNU/Linux client. Use it to transparently sync files across computers and architectures. Simply drop files into your {{ic|~/Dropbox}} folder, and they will automatically sync to your centralized repository.<br />
<br />
<br />
== Installation ==<br />
<br />
=== AUR ===<br />
<br />
{{AUR|dropbox}} can be [[install]]ed. As a last resort, the Dropbox website has instructions for a [https://www.dropbox.com/install?os=lnx headless install via command line].<br />
<br />
# After installing the package, you can start Dropbox from your application menu or run {{ic|dropbox}} from the command-line. The client icon will appear in the system tray.<br />
# A pop-up will notify you that Dropbox is running from an unsupported location. Click on ''Don't ask again'' since you know that you have installed it from AUR rather than from the official homepage.<br />
# Eventually a pop-up will ask you to log in to your Dropbox account or create a new account. Enter your credentials.<br />
# After some time you will see a "Welcome to Dropbox" pop-up, which will give you the opportunity to view a short tour of Dropbox.<br />
# Press the "Finish and go to My Dropbox".<br />
<br />
=== Optional packages ===<br />
<br />
{| class="wikitable"<br />
|command-line interface<br />
|{{AUR|dropbox-cli}}<br />
|-<br />
|[[GNOME/Files]] integration<br />
|{{AUR|nautilus-dropbox}}<br />
|-<br />
|[[Nemo]] integration<br />
|{{AUR|nemo-dropbox}}<br />
|-<br />
|[[Thunar]] integration<br />
|{{AUR|thunar-dropbox}}<br />
|-<br />
|[[Dolphin]] integration<br />
|{{pkg|dolphin-plugins}}<br />
|-<br />
|Caja integration<br />
|{{AUR|caja-dropbox}}<br />
|-<br />
|[[KDE]] client<br />
|{{AUR|kfilebox}}<br />
|}<br />
<br />
Note that in order to access the GUI and the settings, the only way is via a tray icon. You need an X panel with a system tray or a standalone [[List of applications#System tray|system tray application]] for that.<br />
<br />
=== Prevent automatic updates ===<br />
<br />
Since at least version 2.4.6 (see comments around 2013-11-06 on [https://aur.archlinux.org/packages/dropbox/?comments=all AUR]), Dropbox has had an auto-update capability which downloads a new binary to the {{ic|~/.dropbox-dist/}} folder. The service then attempts to hand over control to this binary and dies, causing systemd to re-start the service, generating a conflict and an endless loop of log-filling, CPU-eating misery. <br />
<br />
A workaround is to prevent Dropbox from downloading the automatic update by creating the {{ic|~/.dropbox-dist/}} folder and making it read-only:<br />
<br />
$ rm -rf ~/.dropbox-dist<br />
$ install -dm0 ~/.dropbox-dist<br />
<br />
This appears to be necessary for modern Dropbox clients to operate successfully from systemd on arch.<br />
<br />
Also see the [https://www.dropboxforum.com/hc/en-us/community/posts/202917115-dropbox-will-not-start-under-systemd-on-linux relevant Dropbox forum post].<br />
<br />
== Autostart ==<br />
<br />
In the Dropbox preferences, under the "General" tab there should be a "Start Dropbox on system startup" checkbox. Try checking this box and seeing if Dropbox starts automatically.<br />
<br />
If that does not work, uncheck the box and use one of the following methods instead:<br />
<br />
=== Autostart with your WM/DE ===<br />
<br />
For [[KDE]] users, no further steps are required, as KDE saves running applications when logging out and restarts them automatically. Similarly for [[Xfce]] users, Dropbox will be restarted automatically next time you login since the {{ic|dropbox.desktop}} file has been placed in {{ic|~/.config/autostart}}.<br />
<br />
For [[Cinnamon]] users, it's recommended to start Dropbox client by configuring Startup Applications with a little delay (Cinnamon issue [https://github.com/linuxmint/Cinnamon/issues/4396 #4396]). Starting Dropbox with systemd works, running in background, but there's is no icon on systray due to some Cinnamon bugs ([https://github.com/linuxmint/Cinnamon/issues/481 #481], [https://github.com/linuxmint/Cinnamon/issues/2846 #2846]).<br />
<br />
If that does not work, you can start the Dropbox sync client along with your window manager by adding {{Ic|/usr/bin/dropbox &}} to your [[xinitrc]] (or {{ic|~/.config/openbox/autostart}}, depending on your setup).<br />
<br />
=== Autostart on boot with systemd ===<br />
<br />
{{Note|If ''systemd'' keeps restarting Dropbox, see [[#Prevent automatic updates]].}}<br />
<br />
To have Dropbox automatically start when your system boots, simply [[enable]] the systemd service, passing your username as the instance identifier. The service unit to be enabled takes the format {{ic|dropbox@''username''}}.<br />
<br />
By default, running the service does not give you an icon in the system tray because it does not know which X display to use. If you want to have tray support, you must [[edit]] the provided service:<br />
<br />
{{hc|# systemctl edit dropbox@''username''|<nowiki><br />
[Service]<br />
Environment=DISPLAY=:0<br />
</nowiki>}}<br />
<br />
Note that with the above edit Dropbox will fail to start unless an X session is launched.<br />
<br />
=== Autostart on login with systemd ===<br />
<br />
To have Dropbox automatically start when you log in, simply [[enable]] the [[systemd/User|user service]].<br />
<br />
If you want Dropbox to appear in your system tray, you will need to [[edit]] the service unit so that it knows which X display the system tray is in:<br />
<br />
{{hc|$ systemctl --user edit dropbox|<nowiki><br />
[Service]<br />
Environment=DISPLAY=:0<br />
</nowiki>}}<br />
<br />
Note that with the above edit, Dropbox will fail to start unless an X session is launched.<br />
<br />
== Accessing the files without installing a sync client ==<br />
<br />
If all you need is basic access to the files in your Dropbox, you can use the web interface at https://www.dropbox.com/ to upload and download files to your Dropbox. This can be a viable alternative to running a Dropbox daemon and mirroring all the files on your own machine.<br />
<br />
Alternatively, the [[AUR]] package {{AUR|droxi}} provides a command-line interface to Dropbox similar to the GNU {{ic|ftp}} client.<br />
<br />
== Encrypting your Dropbox files ==<br />
<br />
If you want to store sensitive data in your Dropbox, you should encrypt it before doing so. Syncing to Dropbox is encrypted, but all files are (for the time being) stored on the server unencrypted just as you put them in your Dropbox.<br />
<br />
* Dropbox works with [[TrueCrypt]], and after you initially uploaded the TrueCrypt volume to Dropbox, performance is quite okay, because Dropbox has a working binary diff.<br />
<br />
* Another possibility is to use [[EncFS]], which has the advantage that all files are encrypted separately, i.e. you do not have to determine in advance the size of the content you want to encrypt and your encrypted directory grows and shrinks while you add/delete/modify files in it. You can also mount an encrypted volume at startup using the {{ic|-S}} option of {{Ic|encfs}} to avoid having to input the passphrase, but note that your encrypted files are not secure from someone who has direct access to your computer.<br />
<br />
* A third option is to use [[gocryptfs]]. It is similar to EncFS, except that gocryptfs uses authenticated encryption, for protecting both confidentiality and integrity (tamper-resistance) of the data.<br />
<br />
=== Setup EncFS with Dropbox ===<br />
<br />
Follow the Wiki instructions to install [[EncFS]].<br />
<br />
Assuming you have set your Dropbox directory as {{ic|~/Dropbox}}:<br />
<br />
Create a folder. Files you want synced to Dropbox will go in here.<br />
$ mkdir ~/Private<br />
<br />
Run the following and enter a password when asked:<br />
$ encfs ~/Dropbox/Encrypted ~/Private<br />
<br />
Your secure folder is ready for use; creating any file inside {{ic|~/Private}} will automatically encrypt it into {{ic|~/Dropbox/Encrypted}}, which will then be synced to your cloud storage.<br />
<br />
To mount your EncFS folder on every boot, follow the instructions in the [[EncFS#User_friendly_mounting|EncFS]] wiki page.<br />
<br />
{{Tip|Consider using the {{ic|ENCFS6_CONFIG}} variable and moving the {{ic|.encfs6.xml}} file to another location (like a USB stick), to help ensure that your encrypted data and the means to realistically decrypt it do not exist together online.}}<br />
<br />
== Multiple Dropbox instances ==<br />
<br />
If you need to separate or distinguish your data, personal and work usage for example, you can subscribe to Dropbox with different email addresses and have their directories synced by different Dropbox instances running on a single machine.<br />
<br />
The basic principle and general how-to are described in the [http://www.dropboxwiki.com/Multiple_Instances_On_Unix Dropbox Wiki].<br />
<br />
To summarize, you can setup new or additional instances with:<br />
<br />
{{bc|<nowiki><br />
mkdir /path/to/.dropbox-alt-1<br />
HOME=/path/to/.dropbox-alt-1 /usr/bin/dropbox start -i<br />
</nowiki>}}<br />
<br />
Once that is done, stop any Dropbox instance still running and start them like this:<br />
<br />
{{bc|<nowiki><br />
HOME=/path/to/.dropbox-alt-1 /path/to/.dropbox-alt-1/.dropbox-dist/dropboxd<br />
HOME=/path/to/.dropbox-alt-2 /path/to/.dropbox-alt-2/.dropbox-dist/dropboxd<br />
</nowiki>}}<br />
<br />
Pay attention to use different {{ic|.../.dropbox-dist/dropboxd}} binaries. Even when setting a custom HOME value, the {{ic|/opt/dropbox/dropbox}} or {{ic|/opt/dropbox/dropboxd}} wrappers allow only one instance and when started they will kill the one already running.<br />
<br />
== Dropbox on laptops ==<br />
<br />
Dropbox itself is pretty good at dealing with connectivity problems. If you have a laptop and roam between different network environments, Dropbox will have problems reconnecting if you do not restart it. '''Try one of the methods described below first,''' if for some reason the problem remains, you may try one of these hackish solutions: [https://bbs.archlinux.org/viewtopic.php?pid=790905], [https://bbs.archlinux.org/viewtopic.php?pid=1012343#p1012343].<br />
<br />
{{Note|When using any of these methods, you need to prevent Dropbox from doing a standard autostart by unchecking ''Dropbox - Preferences - General - Start Dropbox on system startup''. This prevents Dropbox from creating the {{ic|~/.config/autostart/dropbox.desktop}} file and thus from starting twice.}}<br />
<br />
=== Using netctl ===<br />
<br />
For [[netctl]], use {{ic|ExecUpPost}} and {{ic|ExecDownPre}} respectively in every network profile you use, or for example in {{ic|/etc/netctl/interfaces/wlan0}} to start Dropbox automatically whenever profile on {{ic|wlan0}} is active. Add '|| true' to your command to make sure [[netctl]] will bring up your profile, although Dropbox fails to start.<br />
<br />
ExecUpPost="''any other code''; su -c 'DISPLAY=:0 /usr/bin/dropbox &' ''your_user'' || true"<br />
ExecDownPre="''any other code''; killall dropbox"<br />
<br />
Obviously, {{ic|''your_user''}} has to be edited and {{ic|''any other code'';}} can be omitted if you do not have any. The above will make sure that Dropbox is running only if there is a network profile active.<br />
<br />
=== Using NetworkManager ===<br />
<br />
For [[NetworkManager]], use its [[NetworkManager#Network services with NetworkManager dispatcher|dispatcher]] feature. <br />
<br />
Create the following file:<br />
{{hc|/etc/NetworkManager/dispatcher.d/10-dropbox.sh|<nowiki><br />
#!/bin/sh<br />
USER=''your_user''<br />
status=$2<br />
case $status in<br />
up)<br />
su -c 'DISPLAY=:0 /usr/bin/dropbox & ' $USER<br />
;;<br />
down)<br />
killall dropbox<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
or, for the systemd alternative:<br />
<br />
{{hc|/etc/NetworkManager/dispatcher.d/10-dropbox.sh|<nowiki><br />
#!/bin/sh<br />
USER=''your_user''<br />
status=$2<br />
<br />
case $status in<br />
up)<br />
systemctl start dropbox@$USER.service<br />
;;<br />
down)<br />
systemctl stop dropbox@USER.service<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
Do not forget to change scripts to be owned by root and to make them executable.<br />
<br />
=== Using wicd ===<br />
<br />
Create {{ic|/etc/wicd/scripts/postconnect/dropbox}}:<br />
#!/usr/bin/env bash<br />
su -c 'DISPLAY=:0 /usr/bin/dbus-launch dropbox &' your_username<br />
<br />
or, if you use Dropbox with systemd:<br />
<br />
#!/usr/bin/env bash<br />
systemctl restart dropbox@<user><br />
<br />
Create {{ic|/etc/wicd/scripts/postdisconnect/dropbox}}:<br />
#!/usr/bin/env bash<br />
killall dropbox<br />
<br />
or, if you use Dropbox with systemd:<br />
<br />
#!/usr/bin/env bash<br />
systemctl stop dropbox@<user><br />
<br />
Do not forget to make the above scripts executable.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Using Dropbox with non-ext4 filesystems ===<br />
<br />
{{Note|In July, 2019, Dropbox Client build 77.3.127 added support for [[ZFS]], [[eCryptfs]], [[XFS]] and [[Btrfs]].[https://www.dropboxforum.com/t5/Desktop-client-builds/Beta-Build-77-3-127/td-p/354660] It once dropped support for all file systems except plain [[Ext4]] in November, 2018.[https://www.dropboxforum.com/t5/Syncing-and-uploads/Dropbox-client-warns-me-that-it-ll-stop-syncing-in-Nov-why/m-p/290065/highlight/true#M42255]}}<br />
<br />
Workarounds have been created, see for example {{AUR|dropbox-fix2}}. These workarounds are based on substituting the filesystem detection functions by the use of LD_PRELOAD.<br />
<br />
It is also possible to create an ext4 formatted [[sparse file]] within a non-ext4 filesystem. It can then be mounted to the desired location for the Dropbox folder. On btrfs systems, it's recommended to [[Btrfs#Disabling_CoW|disable copy-on-write]].<br />
<br />
=== Dropbox keeps saying Downloading files ===<br />
<br />
But in fact now files are synced with your box. This problem is likely to appear when your Dropbox folder is located on a NTFS partition whose mount path contains spaces, or permissions are not set for that partition. See more in the [https://bbs.archlinux.org/viewtopic.php?id=153368 forums]. To resolve the problem pay attention to your entry in {{ic|/etc/fstab}}. Avoid spaces in the mount path and set write permissions with the "default_permissions" option:<br />
<br />
UUID=01CD2ABB65E17DE0 /run/media/username/Windows ntfs-3g uid=username,gid=users,default_permissions 0 0<br />
<br />
=== Change the Dropbox location from the installation wizard ===<br />
<br />
Some users experience the problem during setting-up Dropbox that they cannot select a Dropbox folder other than {{ic|/home/username/Dropbox}}. In this case when the window for changing the path is shown , hit {{ic|Ctrl+l}}, enter the location (e.g. /mnt/data/Dropbox) and click on the ''Choose'' or ''Open'' button.<br />
<br />
=== Context menu entries in file manager do not work ===<br />
<br />
Several file managers such as Thunar, GNOME Files or its fork Nemo come with extensions that provide context menu entries for files and folders inside your Dropbox. Most of them will result in a browser action such as opening the file or folder in dropbox.com or sharing the link. If you experience these entries not working, then it is likely you have not set the {{ic|$BROWSER}} variable which Dropbox requires. See [[Environment variables]] for details.<br />
<br />
=== Connecting... ===<br />
<br />
It may happen that Dropbox cannot connect successfully because it was loaded before an internet connection was established. This can happen on wireless connections, or fast loading machines on wired networks. The best solution to this problem, for wired and wireless connections, is [[#Dropbox on laptops]] which will ensure that Dropbox is started only after the connection is established. <br />
<br />
An alternative solution, for those not using netctl or NetworkManager, is to delay the startup of Dropbox:<br />
<br />
* {{ic|cp ~/.config/autostart/dropbox.desktop ~/.config/autostart/dropbox-delayed.desktop}}<br />
* Prevent Dropbox from doing a standard autostart by unchecking Dropbox - Preferences - General - Start Dropbox on system startup. This removes {{ic|~/.config/autostart/dropbox.desktop}}.<br />
* Edit {{ic|~/.config/autostart/dropbox-delayed.desktop}} and replace {{ic|1=Exec=dropbox}} with {{ic|1=Exec=bash -c "sleep ''timeout'' && dropbox"}}. Tweak the ''timeout'' parameter, the value of {{ic|3}} is a good start.<br />
<br />
=== Dropbox does not start - "This is usually because of a permission error" ===<br />
<br />
==== Check permissions ====<br />
<br />
Make sure that you own Dropbox's directories before running the application. This includes<br />
*{{ic|~/.dropbox}} - Dropbox's configuration directory<br />
*{{ic|~/Dropbox}} - Dropbox's download directory (default)<br />
You can ensure this by changing their owner with {{ic|chown -R}}.<br />
<br />
This error could also be caused by {{ic|/var}} being full.<br />
<br />
==== Re-linking your account ====<br />
<br />
[https://www.dropbox.com/help/72 Dropbox's FAQ] suggests that this error may be caused by misconfiguration and is fixed by (re)moving the current configuration folder<br />
# mv ~/.dropbox ~/.dropbox.old<br />
and restarting Dropbox.<br />
<br />
==== Errors caused by running out of space ====<br />
<br />
A common error that might happen is that there is no more available space on your {{ic|/tmp}} and {{ic|/var}} partitions. If this happens, Dropbox will crash on startup with the following error in its log:<br />
<br />
Exception: Not a valid FileCache file<br />
<br />
A detailed story of such an occurrence can be found in the [https://bbs.archlinux.org/viewtopic.php?pid=973458 forums]. Make sure there is enough space available before launching Dropbox.<br />
<br />
Another case is when the root partition is full:<br />
<br />
OperationalError: database or disk is full<br />
<br />
Check to see the available space on partitions with {{ic|df}}.<br />
<br />
==== Locale caused errors ====<br />
<br />
Try starting {{Ic|dropbox}} with this code:<br />
<br />
LANG=$LOCALE<br />
dropbox<br />
<br />
(You can also use a different value for LANG; it must be in the format "en_US.UTF-8")<br />
This helps when running from a Bash script or Bash shell where {{ic|/etc/rc.d/functions}} has been loaded<br />
<br />
==== Filesystem monitoring problem ====<br />
<br />
If you have a lot of files to sync in your Dropbox folder, you might get the following error:<br />
<br />
Unable to monitor filesystem<br />
Please run: echo 100000 | sudo tee /proc/sys/fs/inotify/max_user_watches and restart Dropbox to correct the problem.<br />
<br />
This can be fixed easily by adding<br />
<br />
fs.inotify.max_user_watches = 100000<br />
<br />
to {{ic|/etc/sysctl.d/99-sysctl.conf}} and then reload the kernel parameters<br />
<br />
# sysctl --system<br />
<br />
=== Proxy settings ===<br />
<br />
The easiest way to set Dropbox's proxy settings is by defining them manually in the Proxies tab of the Preferences window. Alternatively, you can also set it to 'Auto-detect' and then export your proxy server to the http_proxy env variable prior to starting Dropbox (HTTP_PROXY is also usable)<br />
<br />
{{bc|<nowiki>env http_proxy=http://your.proxy.here:port /usr/bin/dropbox</nowiki>}}<br />
<br />
or<br />
<br />
{{bc|<nowiki><br />
export http_proxy=http://your.proxy.here:port<br />
/usr/bin/dropbox<br />
</nowiki>}}<br />
<br />
{{Note|Dropbox will only use proxy settings of the form {{ic|<nowiki>http://your.proxy.here:port</nowiki>}}, not {{ic|<nowiki>your.proxy.here:port</nowiki>}} as some other applications do.}}<br />
<br />
=== Missing tray icon in GNOME ===<br />
<br />
GNOME 3.26 removed support for tray icons in [https://bugzilla.gnome.org/show_bug.cgi?id=785956 bug 785956] which will prevent the Dropbox icon from showing. To restore tray icons an appropriate extension such as [https://extensions.gnome.org/extension/615/appindicator-support/ App Indicator] needs to be installed.</div>Aleksozolinshttps://wiki.archlinux.org/index.php?title=Dropbox&diff=606270Dropbox2020-04-16T00:10:34Z<p>Aleksozolins: /* Autostart on login with systemd */ better wording</p>
<hr />
<div>[[Category:File sharing]]<br />
[[de:Dropbox]]<br />
[[it:Dropbox]]<br />
[[ja:Dropbox]]<br />
[[ru:Dropbox]]<br />
[[zh-hans:Dropbox]]<br />
[[zh-hant:Dropbox]]<br />
{{Related articles start}}<br />
{{Related|Synchronization and backup programs}}<br />
{{Related|Syncthing}}<br />
{{Related articles end}}<br />
[https://www.dropbox.com Dropbox] is a file sharing system with a GNU/Linux client. Use it to transparently sync files across computers and architectures. Simply drop files into your {{ic|~/Dropbox}} folder, and they will automatically sync to your centralized repository.<br />
<br />
<br />
== Installation ==<br />
<br />
=== AUR ===<br />
<br />
{{AUR|dropbox}} can be [[install]]ed. As a last resort, the Dropbox website has instructions for a [https://www.dropbox.com/install?os=lnx headless install via command line].<br />
<br />
# After installing the package, you can start Dropbox from your application menu or run {{ic|dropbox}} from the command-line. The client icon will appear in the system tray.<br />
# A pop-up will notify you that Dropbox is running from an unsupported location. Click on ''Don't ask again'' since you know that you have installed it from AUR rather than from the official homepage.<br />
# Eventually a pop-up will ask you to log in to your Dropbox account or create a new account. Enter your credentials.<br />
# After some time you will see a "Welcome to Dropbox" pop-up, which will give you the opportunity to view a short tour of Dropbox.<br />
# Press the "Finish and go to My Dropbox".<br />
<br />
=== Optional packages ===<br />
<br />
{| class="wikitable"<br />
|command-line interface<br />
|{{AUR|dropbox-cli}}<br />
|-<br />
|[[GNOME/Files]] integration<br />
|{{AUR|nautilus-dropbox}}<br />
|-<br />
|[[Nemo]] integration<br />
|{{AUR|nemo-dropbox}}<br />
|-<br />
|[[Thunar]] integration<br />
|{{AUR|thunar-dropbox}}<br />
|-<br />
|[[Dolphin]] integration<br />
|{{pkg|dolphin-plugins}}<br />
|-<br />
|Caja integration<br />
|{{AUR|caja-dropbox}}<br />
|-<br />
|[[KDE]] client<br />
|{{AUR|kfilebox}}<br />
|}<br />
<br />
Note that in order to access the GUI and the settings, the only way is via a tray icon. You need an X panel with a system tray or a standalone [[List of applications#System tray|system tray application]] for that.<br />
<br />
=== Prevent automatic updates ===<br />
<br />
Since at least version 2.4.6 (see comments around 2013-11-06 on [https://aur.archlinux.org/packages/dropbox/?comments=all AUR]), Dropbox has had an auto-update capability which downloads a new binary to the {{ic|~/.dropbox-dist/}} folder. The service then attempts to hand over control to this binary and dies, causing systemd to re-start the service, generating a conflict and an endless loop of log-filling, CPU-eating misery. <br />
<br />
A workaround is to prevent Dropbox from downloading the automatic update by creating the {{ic|~/.dropbox-dist/}} folder and making it read-only:<br />
<br />
$ rm -rf ~/.dropbox-dist<br />
$ install -dm0 ~/.dropbox-dist<br />
<br />
This appears to be necessary for modern Dropbox clients to operate successfully from systemd on arch.<br />
<br />
Also see the [https://www.dropboxforum.com/hc/en-us/community/posts/202917115-dropbox-will-not-start-under-systemd-on-linux relevant Dropbox forum post].<br />
<br />
== Autostart ==<br />
<br />
In the Dropbox preferences, under the "General" tab there should be a "Start Dropbox on system startup" checkbox. Try checking this box and seeing if Dropbox starts automatically.<br />
<br />
If that does not work, uncheck the box and use one of the following methods instead:<br />
<br />
=== Autostart with your WM/DE ===<br />
<br />
For [[KDE]] users, no further steps are required, as KDE saves running applications when logging out and restarts them automatically. Similarly for [[Xfce]] users, Dropbox will be restarted automatically next time you login since the {{ic|dropbox.desktop}} file has been placed in {{ic|~/.config/autostart}}.<br />
<br />
For [[Cinnamon]] users, it's recommended to start Dropbox client by configuring Startup Applications with a little delay (Cinnamon issue [https://github.com/linuxmint/Cinnamon/issues/4396 #4396]). Starting Dropbox with systemd works, running in background, but there's is no icon on systray due to some Cinnamon bugs ([https://github.com/linuxmint/Cinnamon/issues/481 #481], [https://github.com/linuxmint/Cinnamon/issues/2846 #2846]).<br />
<br />
If that does not work, you can start the Dropbox sync client along with your window manager by adding {{Ic|/usr/bin/dropbox &}} to your [[xinitrc]] (or {{ic|~/.config/openbox/autostart}}, depending on your setup).<br />
<br />
=== Autostart on boot with systemd ===<br />
<br />
{{Note|If ''systemd'' keeps restarting Dropbox, see [[#Prevent automatic updates]].}}<br />
<br />
To have Dropbox automatically start when your system boots, simply [[enable]] the systemd service, passing your username as the instance identifier. The service unit to be enabled takes the format {{ic|dropbox@''username''}}.<br />
<br />
By default, running the service does not give you an icon in the system tray because it does not know which X display to use. If you want to have tray support, you must [[edit]] the provided service:<br />
<br />
{{hc|# systemctl edit dropbox@''username''|<nowiki><br />
[Service]<br />
Environment=DISPLAY=:0<br />
</nowiki>}}<br />
<br />
Note that with the above edit, Dropbox will fail to start unless an X session is launched.<br />
<br />
=== Autostart on login with systemd ===<br />
<br />
To have Dropbox automatically start when you log in, simply [[enable]] the [[systemd/User|user service]].<br />
<br />
If you want Dropbox to appear in your system tray, you will need to [[edit]] the service unit so that it knows which X display the system tray is in:<br />
<br />
{{hc|$ systemctl --user edit dropbox|<nowiki><br />
[Service]<br />
Environment=DISPLAY=:0<br />
</nowiki>}}<br />
<br />
Note that with the above edit, Dropbox will fail to start unless an X session is launched.<br />
<br />
== Accessing the files without installing a sync client ==<br />
<br />
If all you need is basic access to the files in your Dropbox, you can use the web interface at https://www.dropbox.com/ to upload and download files to your Dropbox. This can be a viable alternative to running a Dropbox daemon and mirroring all the files on your own machine.<br />
<br />
Alternatively, the [[AUR]] package {{AUR|droxi}} provides a command-line interface to Dropbox similar to the GNU {{ic|ftp}} client.<br />
<br />
== Encrypting your Dropbox files ==<br />
<br />
If you want to store sensitive data in your Dropbox, you should encrypt it before doing so. Syncing to Dropbox is encrypted, but all files are (for the time being) stored on the server unencrypted just as you put them in your Dropbox.<br />
<br />
* Dropbox works with [[TrueCrypt]], and after you initially uploaded the TrueCrypt volume to Dropbox, performance is quite okay, because Dropbox has a working binary diff.<br />
<br />
* Another possibility is to use [[EncFS]], which has the advantage that all files are encrypted separately, i.e. you do not have to determine in advance the size of the content you want to encrypt and your encrypted directory grows and shrinks while you add/delete/modify files in it. You can also mount an encrypted volume at startup using the {{ic|-S}} option of {{Ic|encfs}} to avoid having to input the passphrase, but note that your encrypted files are not secure from someone who has direct access to your computer.<br />
<br />
* A third option is to use [[gocryptfs]]. It is similar to EncFS, except that gocryptfs uses authenticated encryption, for protecting both confidentiality and integrity (tamper-resistance) of the data.<br />
<br />
=== Setup EncFS with Dropbox ===<br />
<br />
Follow the Wiki instructions to install [[EncFS]].<br />
<br />
Assuming you have set your Dropbox directory as {{ic|~/Dropbox}}:<br />
<br />
Create a folder. Files you want synced to Dropbox will go in here.<br />
$ mkdir ~/Private<br />
<br />
Run the following and enter a password when asked:<br />
$ encfs ~/Dropbox/Encrypted ~/Private<br />
<br />
Your secure folder is ready for use; creating any file inside {{ic|~/Private}} will automatically encrypt it into {{ic|~/Dropbox/Encrypted}}, which will then be synced to your cloud storage.<br />
<br />
To mount your EncFS folder on every boot, follow the instructions in the [[EncFS#User_friendly_mounting|EncFS]] wiki page.<br />
<br />
{{Tip|Consider using the {{ic|ENCFS6_CONFIG}} variable and moving the {{ic|.encfs6.xml}} file to another location (like a USB stick), to help ensure that your encrypted data and the means to realistically decrypt it do not exist together online.}}<br />
<br />
== Multiple Dropbox instances ==<br />
<br />
If you need to separate or distinguish your data, personal and work usage for example, you can subscribe to Dropbox with different email addresses and have their directories synced by different Dropbox instances running on a single machine.<br />
<br />
The basic principle and general how-to are described in the [http://www.dropboxwiki.com/Multiple_Instances_On_Unix Dropbox Wiki].<br />
<br />
To summarize, you can setup new or additional instances with:<br />
<br />
{{bc|<nowiki><br />
mkdir /path/to/.dropbox-alt-1<br />
HOME=/path/to/.dropbox-alt-1 /usr/bin/dropbox start -i<br />
</nowiki>}}<br />
<br />
Once that is done, stop any Dropbox instance still running and start them like this:<br />
<br />
{{bc|<nowiki><br />
HOME=/path/to/.dropbox-alt-1 /path/to/.dropbox-alt-1/.dropbox-dist/dropboxd<br />
HOME=/path/to/.dropbox-alt-2 /path/to/.dropbox-alt-2/.dropbox-dist/dropboxd<br />
</nowiki>}}<br />
<br />
Pay attention to use different {{ic|.../.dropbox-dist/dropboxd}} binaries. Even when setting a custom HOME value, the {{ic|/opt/dropbox/dropbox}} or {{ic|/opt/dropbox/dropboxd}} wrappers allow only one instance and when started they will kill the one already running.<br />
<br />
== Dropbox on laptops ==<br />
<br />
Dropbox itself is pretty good at dealing with connectivity problems. If you have a laptop and roam between different network environments, Dropbox will have problems reconnecting if you do not restart it. '''Try one of the methods described below first,''' if for some reason the problem remains, you may try one of these hackish solutions: [https://bbs.archlinux.org/viewtopic.php?pid=790905], [https://bbs.archlinux.org/viewtopic.php?pid=1012343#p1012343].<br />
<br />
{{Note|When using any of these methods, you need to prevent Dropbox from doing a standard autostart by unchecking ''Dropbox - Preferences - General - Start Dropbox on system startup''. This prevents Dropbox from creating the {{ic|~/.config/autostart/dropbox.desktop}} file and thus from starting twice.}}<br />
<br />
=== Using netctl ===<br />
<br />
For [[netctl]], use {{ic|ExecUpPost}} and {{ic|ExecDownPre}} respectively in every network profile you use, or for example in {{ic|/etc/netctl/interfaces/wlan0}} to start Dropbox automatically whenever profile on {{ic|wlan0}} is active. Add '|| true' to your command to make sure [[netctl]] will bring up your profile, although Dropbox fails to start.<br />
<br />
ExecUpPost="''any other code''; su -c 'DISPLAY=:0 /usr/bin/dropbox &' ''your_user'' || true"<br />
ExecDownPre="''any other code''; killall dropbox"<br />
<br />
Obviously, {{ic|''your_user''}} has to be edited and {{ic|''any other code'';}} can be omitted if you do not have any. The above will make sure that Dropbox is running only if there is a network profile active.<br />
<br />
=== Using NetworkManager ===<br />
<br />
For [[NetworkManager]], use its [[NetworkManager#Network services with NetworkManager dispatcher|dispatcher]] feature. <br />
<br />
Create the following file:<br />
{{hc|/etc/NetworkManager/dispatcher.d/10-dropbox.sh|<nowiki><br />
#!/bin/sh<br />
USER=''your_user''<br />
status=$2<br />
case $status in<br />
up)<br />
su -c 'DISPLAY=:0 /usr/bin/dropbox & ' $USER<br />
;;<br />
down)<br />
killall dropbox<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
or, for the systemd alternative:<br />
<br />
{{hc|/etc/NetworkManager/dispatcher.d/10-dropbox.sh|<nowiki><br />
#!/bin/sh<br />
USER=''your_user''<br />
status=$2<br />
<br />
case $status in<br />
up)<br />
systemctl start dropbox@$USER.service<br />
;;<br />
down)<br />
systemctl stop dropbox@USER.service<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
Do not forget to change scripts to be owned by root and to make them executable.<br />
<br />
=== Using wicd ===<br />
<br />
Create {{ic|/etc/wicd/scripts/postconnect/dropbox}}:<br />
#!/usr/bin/env bash<br />
su -c 'DISPLAY=:0 /usr/bin/dbus-launch dropbox &' your_username<br />
<br />
or, if you use Dropbox with systemd:<br />
<br />
#!/usr/bin/env bash<br />
systemctl restart dropbox@<user><br />
<br />
Create {{ic|/etc/wicd/scripts/postdisconnect/dropbox}}:<br />
#!/usr/bin/env bash<br />
killall dropbox<br />
<br />
or, if you use Dropbox with systemd:<br />
<br />
#!/usr/bin/env bash<br />
systemctl stop dropbox@<user><br />
<br />
Do not forget to make the above scripts executable.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Using Dropbox with non-ext4 filesystems ===<br />
<br />
{{Note|In July, 2019, Dropbox Client build 77.3.127 added support for [[ZFS]], [[eCryptfs]], [[XFS]] and [[Btrfs]].[https://www.dropboxforum.com/t5/Desktop-client-builds/Beta-Build-77-3-127/td-p/354660] It once dropped support for all file systems except plain [[Ext4]] in November, 2018.[https://www.dropboxforum.com/t5/Syncing-and-uploads/Dropbox-client-warns-me-that-it-ll-stop-syncing-in-Nov-why/m-p/290065/highlight/true#M42255]}}<br />
<br />
Workarounds have been created, see for example {{AUR|dropbox-fix2}}. These workarounds are based on substituting the filesystem detection functions by the use of LD_PRELOAD.<br />
<br />
It is also possible to create an ext4 formatted [[sparse file]] within a non-ext4 filesystem. It can then be mounted to the desired location for the Dropbox folder. On btrfs systems, it's recommended to [[Btrfs#Disabling_CoW|disable copy-on-write]].<br />
<br />
=== Dropbox keeps saying Downloading files ===<br />
<br />
But in fact now files are synced with your box. This problem is likely to appear when your Dropbox folder is located on a NTFS partition whose mount path contains spaces, or permissions are not set for that partition. See more in the [https://bbs.archlinux.org/viewtopic.php?id=153368 forums]. To resolve the problem pay attention to your entry in {{ic|/etc/fstab}}. Avoid spaces in the mount path and set write permissions with the "default_permissions" option:<br />
<br />
UUID=01CD2ABB65E17DE0 /run/media/username/Windows ntfs-3g uid=username,gid=users,default_permissions 0 0<br />
<br />
=== Change the Dropbox location from the installation wizard ===<br />
<br />
Some users experience the problem during setting-up Dropbox that they cannot select a Dropbox folder other than {{ic|/home/username/Dropbox}}. In this case when the window for changing the path is shown , hit {{ic|Ctrl+l}}, enter the location (e.g. /mnt/data/Dropbox) and click on the ''Choose'' or ''Open'' button.<br />
<br />
=== Context menu entries in file manager do not work ===<br />
<br />
Several file managers such as Thunar, GNOME Files or its fork Nemo come with extensions that provide context menu entries for files and folders inside your Dropbox. Most of them will result in a browser action such as opening the file or folder in dropbox.com or sharing the link. If you experience these entries not working, then it is likely you have not set the {{ic|$BROWSER}} variable which Dropbox requires. See [[Environment variables]] for details.<br />
<br />
=== Connecting... ===<br />
<br />
It may happen that Dropbox cannot connect successfully because it was loaded before an internet connection was established. This can happen on wireless connections, or fast loading machines on wired networks. The best solution to this problem, for wired and wireless connections, is [[#Dropbox on laptops]] which will ensure that Dropbox is started only after the connection is established. <br />
<br />
An alternative solution, for those not using netctl or NetworkManager, is to delay the startup of Dropbox:<br />
<br />
* {{ic|cp ~/.config/autostart/dropbox.desktop ~/.config/autostart/dropbox-delayed.desktop}}<br />
* Prevent Dropbox from doing a standard autostart by unchecking Dropbox - Preferences - General - Start Dropbox on system startup. This removes {{ic|~/.config/autostart/dropbox.desktop}}.<br />
* Edit {{ic|~/.config/autostart/dropbox-delayed.desktop}} and replace {{ic|1=Exec=dropbox}} with {{ic|1=Exec=bash -c "sleep ''timeout'' && dropbox"}}. Tweak the ''timeout'' parameter, the value of {{ic|3}} is a good start.<br />
<br />
=== Dropbox does not start - "This is usually because of a permission error" ===<br />
<br />
==== Check permissions ====<br />
<br />
Make sure that you own Dropbox's directories before running the application. This includes<br />
*{{ic|~/.dropbox}} - Dropbox's configuration directory<br />
*{{ic|~/Dropbox}} - Dropbox's download directory (default)<br />
You can ensure this by changing their owner with {{ic|chown -R}}.<br />
<br />
This error could also be caused by {{ic|/var}} being full.<br />
<br />
==== Re-linking your account ====<br />
<br />
[https://www.dropbox.com/help/72 Dropbox's FAQ] suggests that this error may be caused by misconfiguration and is fixed by (re)moving the current configuration folder<br />
# mv ~/.dropbox ~/.dropbox.old<br />
and restarting Dropbox.<br />
<br />
==== Errors caused by running out of space ====<br />
<br />
A common error that might happen is that there is no more available space on your {{ic|/tmp}} and {{ic|/var}} partitions. If this happens, Dropbox will crash on startup with the following error in its log:<br />
<br />
Exception: Not a valid FileCache file<br />
<br />
A detailed story of such an occurrence can be found in the [https://bbs.archlinux.org/viewtopic.php?pid=973458 forums]. Make sure there is enough space available before launching Dropbox.<br />
<br />
Another case is when the root partition is full:<br />
<br />
OperationalError: database or disk is full<br />
<br />
Check to see the available space on partitions with {{ic|df}}.<br />
<br />
==== Locale caused errors ====<br />
<br />
Try starting {{Ic|dropbox}} with this code:<br />
<br />
LANG=$LOCALE<br />
dropbox<br />
<br />
(You can also use a different value for LANG; it must be in the format "en_US.UTF-8")<br />
This helps when running from a Bash script or Bash shell where {{ic|/etc/rc.d/functions}} has been loaded<br />
<br />
==== Filesystem monitoring problem ====<br />
<br />
If you have a lot of files to sync in your Dropbox folder, you might get the following error:<br />
<br />
Unable to monitor filesystem<br />
Please run: echo 100000 | sudo tee /proc/sys/fs/inotify/max_user_watches and restart Dropbox to correct the problem.<br />
<br />
This can be fixed easily by adding<br />
<br />
fs.inotify.max_user_watches = 100000<br />
<br />
to {{ic|/etc/sysctl.d/99-sysctl.conf}} and then reload the kernel parameters<br />
<br />
# sysctl --system<br />
<br />
=== Proxy settings ===<br />
<br />
The easiest way to set Dropbox's proxy settings is by defining them manually in the Proxies tab of the Preferences window. Alternatively, you can also set it to 'Auto-detect' and then export your proxy server to the http_proxy env variable prior to starting Dropbox (HTTP_PROXY is also usable)<br />
<br />
{{bc|<nowiki>env http_proxy=http://your.proxy.here:port /usr/bin/dropbox</nowiki>}}<br />
<br />
or<br />
<br />
{{bc|<nowiki><br />
export http_proxy=http://your.proxy.here:port<br />
/usr/bin/dropbox<br />
</nowiki>}}<br />
<br />
{{Note|Dropbox will only use proxy settings of the form {{ic|<nowiki>http://your.proxy.here:port</nowiki>}}, not {{ic|<nowiki>your.proxy.here:port</nowiki>}} as some other applications do.}}<br />
<br />
=== Missing tray icon in GNOME ===<br />
<br />
GNOME 3.26 removed support for tray icons in [https://bugzilla.gnome.org/show_bug.cgi?id=785956 bug 785956] which will prevent the Dropbox icon from showing. To restore tray icons an appropriate extension such as [https://extensions.gnome.org/extension/615/appindicator-support/ App Indicator] needs to be installed.</div>Aleksozolinshttps://wiki.archlinux.org/index.php?title=Dropbox&diff=606269Dropbox2020-04-16T00:10:12Z<p>Aleksozolins: /* Autostart on boot with systemd */ better wording</p>
<hr />
<div>[[Category:File sharing]]<br />
[[de:Dropbox]]<br />
[[it:Dropbox]]<br />
[[ja:Dropbox]]<br />
[[ru:Dropbox]]<br />
[[zh-hans:Dropbox]]<br />
[[zh-hant:Dropbox]]<br />
{{Related articles start}}<br />
{{Related|Synchronization and backup programs}}<br />
{{Related|Syncthing}}<br />
{{Related articles end}}<br />
[https://www.dropbox.com Dropbox] is a file sharing system with a GNU/Linux client. Use it to transparently sync files across computers and architectures. Simply drop files into your {{ic|~/Dropbox}} folder, and they will automatically sync to your centralized repository.<br />
<br />
<br />
== Installation ==<br />
<br />
=== AUR ===<br />
<br />
{{AUR|dropbox}} can be [[install]]ed. As a last resort, the Dropbox website has instructions for a [https://www.dropbox.com/install?os=lnx headless install via command line].<br />
<br />
# After installing the package, you can start Dropbox from your application menu or run {{ic|dropbox}} from the command-line. The client icon will appear in the system tray.<br />
# A pop-up will notify you that Dropbox is running from an unsupported location. Click on ''Don't ask again'' since you know that you have installed it from AUR rather than from the official homepage.<br />
# Eventually a pop-up will ask you to log in to your Dropbox account or create a new account. Enter your credentials.<br />
# After some time you will see a "Welcome to Dropbox" pop-up, which will give you the opportunity to view a short tour of Dropbox.<br />
# Press the "Finish and go to My Dropbox".<br />
<br />
=== Optional packages ===<br />
<br />
{| class="wikitable"<br />
|command-line interface<br />
|{{AUR|dropbox-cli}}<br />
|-<br />
|[[GNOME/Files]] integration<br />
|{{AUR|nautilus-dropbox}}<br />
|-<br />
|[[Nemo]] integration<br />
|{{AUR|nemo-dropbox}}<br />
|-<br />
|[[Thunar]] integration<br />
|{{AUR|thunar-dropbox}}<br />
|-<br />
|[[Dolphin]] integration<br />
|{{pkg|dolphin-plugins}}<br />
|-<br />
|Caja integration<br />
|{{AUR|caja-dropbox}}<br />
|-<br />
|[[KDE]] client<br />
|{{AUR|kfilebox}}<br />
|}<br />
<br />
Note that in order to access the GUI and the settings, the only way is via a tray icon. You need an X panel with a system tray or a standalone [[List of applications#System tray|system tray application]] for that.<br />
<br />
=== Prevent automatic updates ===<br />
<br />
Since at least version 2.4.6 (see comments around 2013-11-06 on [https://aur.archlinux.org/packages/dropbox/?comments=all AUR]), Dropbox has had an auto-update capability which downloads a new binary to the {{ic|~/.dropbox-dist/}} folder. The service then attempts to hand over control to this binary and dies, causing systemd to re-start the service, generating a conflict and an endless loop of log-filling, CPU-eating misery. <br />
<br />
A workaround is to prevent Dropbox from downloading the automatic update by creating the {{ic|~/.dropbox-dist/}} folder and making it read-only:<br />
<br />
$ rm -rf ~/.dropbox-dist<br />
$ install -dm0 ~/.dropbox-dist<br />
<br />
This appears to be necessary for modern Dropbox clients to operate successfully from systemd on arch.<br />
<br />
Also see the [https://www.dropboxforum.com/hc/en-us/community/posts/202917115-dropbox-will-not-start-under-systemd-on-linux relevant Dropbox forum post].<br />
<br />
== Autostart ==<br />
<br />
In the Dropbox preferences, under the "General" tab there should be a "Start Dropbox on system startup" checkbox. Try checking this box and seeing if Dropbox starts automatically.<br />
<br />
If that does not work, uncheck the box and use one of the following methods instead:<br />
<br />
=== Autostart with your WM/DE ===<br />
<br />
For [[KDE]] users, no further steps are required, as KDE saves running applications when logging out and restarts them automatically. Similarly for [[Xfce]] users, Dropbox will be restarted automatically next time you login since the {{ic|dropbox.desktop}} file has been placed in {{ic|~/.config/autostart}}.<br />
<br />
For [[Cinnamon]] users, it's recommended to start Dropbox client by configuring Startup Applications with a little delay (Cinnamon issue [https://github.com/linuxmint/Cinnamon/issues/4396 #4396]). Starting Dropbox with systemd works, running in background, but there's is no icon on systray due to some Cinnamon bugs ([https://github.com/linuxmint/Cinnamon/issues/481 #481], [https://github.com/linuxmint/Cinnamon/issues/2846 #2846]).<br />
<br />
If that does not work, you can start the Dropbox sync client along with your window manager by adding {{Ic|/usr/bin/dropbox &}} to your [[xinitrc]] (or {{ic|~/.config/openbox/autostart}}, depending on your setup).<br />
<br />
=== Autostart on boot with systemd ===<br />
<br />
{{Note|If ''systemd'' keeps restarting Dropbox, see [[#Prevent automatic updates]].}}<br />
<br />
To have Dropbox automatically start when your system boots, simply [[enable]] the systemd service, passing your username as the instance identifier. The service unit to be enabled takes the format {{ic|dropbox@''username''}}.<br />
<br />
By default, running the service does not give you an icon in the system tray because it does not know which X display to use. If you want to have tray support, you must [[edit]] the provided service:<br />
<br />
{{hc|# systemctl edit dropbox@''username''|<nowiki><br />
[Service]<br />
Environment=DISPLAY=:0<br />
</nowiki>}}<br />
<br />
Note that with the above edit, Dropbox will fail to start unless an X session is launched.<br />
<br />
=== Autostart on login with systemd ===<br />
<br />
To have Dropbox automatically start when you log in, simply [[enable]] the [[systemd/User|user service]].<br />
<br />
If you want Dropbox to appear in your system tray, you will need to [[edit]] the service unit so that it knows which X display the system tray is in:<br />
<br />
{{hc|$ systemctl --user edit dropbox|<nowiki><br />
[Service]<br />
Environment=DISPLAY=:0<br />
</nowiki>}}<br />
<br />
Note that with the above edit, the systemd service will fail to start unless an X session is launched.<br />
<br />
== Accessing the files without installing a sync client ==<br />
<br />
If all you need is basic access to the files in your Dropbox, you can use the web interface at https://www.dropbox.com/ to upload and download files to your Dropbox. This can be a viable alternative to running a Dropbox daemon and mirroring all the files on your own machine.<br />
<br />
Alternatively, the [[AUR]] package {{AUR|droxi}} provides a command-line interface to Dropbox similar to the GNU {{ic|ftp}} client.<br />
<br />
== Encrypting your Dropbox files ==<br />
<br />
If you want to store sensitive data in your Dropbox, you should encrypt it before doing so. Syncing to Dropbox is encrypted, but all files are (for the time being) stored on the server unencrypted just as you put them in your Dropbox.<br />
<br />
* Dropbox works with [[TrueCrypt]], and after you initially uploaded the TrueCrypt volume to Dropbox, performance is quite okay, because Dropbox has a working binary diff.<br />
<br />
* Another possibility is to use [[EncFS]], which has the advantage that all files are encrypted separately, i.e. you do not have to determine in advance the size of the content you want to encrypt and your encrypted directory grows and shrinks while you add/delete/modify files in it. You can also mount an encrypted volume at startup using the {{ic|-S}} option of {{Ic|encfs}} to avoid having to input the passphrase, but note that your encrypted files are not secure from someone who has direct access to your computer.<br />
<br />
* A third option is to use [[gocryptfs]]. It is similar to EncFS, except that gocryptfs uses authenticated encryption, for protecting both confidentiality and integrity (tamper-resistance) of the data.<br />
<br />
=== Setup EncFS with Dropbox ===<br />
<br />
Follow the Wiki instructions to install [[EncFS]].<br />
<br />
Assuming you have set your Dropbox directory as {{ic|~/Dropbox}}:<br />
<br />
Create a folder. Files you want synced to Dropbox will go in here.<br />
$ mkdir ~/Private<br />
<br />
Run the following and enter a password when asked:<br />
$ encfs ~/Dropbox/Encrypted ~/Private<br />
<br />
Your secure folder is ready for use; creating any file inside {{ic|~/Private}} will automatically encrypt it into {{ic|~/Dropbox/Encrypted}}, which will then be synced to your cloud storage.<br />
<br />
To mount your EncFS folder on every boot, follow the instructions in the [[EncFS#User_friendly_mounting|EncFS]] wiki page.<br />
<br />
{{Tip|Consider using the {{ic|ENCFS6_CONFIG}} variable and moving the {{ic|.encfs6.xml}} file to another location (like a USB stick), to help ensure that your encrypted data and the means to realistically decrypt it do not exist together online.}}<br />
<br />
== Multiple Dropbox instances ==<br />
<br />
If you need to separate or distinguish your data, personal and work usage for example, you can subscribe to Dropbox with different email addresses and have their directories synced by different Dropbox instances running on a single machine.<br />
<br />
The basic principle and general how-to are described in the [http://www.dropboxwiki.com/Multiple_Instances_On_Unix Dropbox Wiki].<br />
<br />
To summarize, you can setup new or additional instances with:<br />
<br />
{{bc|<nowiki><br />
mkdir /path/to/.dropbox-alt-1<br />
HOME=/path/to/.dropbox-alt-1 /usr/bin/dropbox start -i<br />
</nowiki>}}<br />
<br />
Once that is done, stop any Dropbox instance still running and start them like this:<br />
<br />
{{bc|<nowiki><br />
HOME=/path/to/.dropbox-alt-1 /path/to/.dropbox-alt-1/.dropbox-dist/dropboxd<br />
HOME=/path/to/.dropbox-alt-2 /path/to/.dropbox-alt-2/.dropbox-dist/dropboxd<br />
</nowiki>}}<br />
<br />
Pay attention to use different {{ic|.../.dropbox-dist/dropboxd}} binaries. Even when setting a custom HOME value, the {{ic|/opt/dropbox/dropbox}} or {{ic|/opt/dropbox/dropboxd}} wrappers allow only one instance and when started they will kill the one already running.<br />
<br />
== Dropbox on laptops ==<br />
<br />
Dropbox itself is pretty good at dealing with connectivity problems. If you have a laptop and roam between different network environments, Dropbox will have problems reconnecting if you do not restart it. '''Try one of the methods described below first,''' if for some reason the problem remains, you may try one of these hackish solutions: [https://bbs.archlinux.org/viewtopic.php?pid=790905], [https://bbs.archlinux.org/viewtopic.php?pid=1012343#p1012343].<br />
<br />
{{Note|When using any of these methods, you need to prevent Dropbox from doing a standard autostart by unchecking ''Dropbox - Preferences - General - Start Dropbox on system startup''. This prevents Dropbox from creating the {{ic|~/.config/autostart/dropbox.desktop}} file and thus from starting twice.}}<br />
<br />
=== Using netctl ===<br />
<br />
For [[netctl]], use {{ic|ExecUpPost}} and {{ic|ExecDownPre}} respectively in every network profile you use, or for example in {{ic|/etc/netctl/interfaces/wlan0}} to start Dropbox automatically whenever profile on {{ic|wlan0}} is active. Add '|| true' to your command to make sure [[netctl]] will bring up your profile, although Dropbox fails to start.<br />
<br />
ExecUpPost="''any other code''; su -c 'DISPLAY=:0 /usr/bin/dropbox &' ''your_user'' || true"<br />
ExecDownPre="''any other code''; killall dropbox"<br />
<br />
Obviously, {{ic|''your_user''}} has to be edited and {{ic|''any other code'';}} can be omitted if you do not have any. The above will make sure that Dropbox is running only if there is a network profile active.<br />
<br />
=== Using NetworkManager ===<br />
<br />
For [[NetworkManager]], use its [[NetworkManager#Network services with NetworkManager dispatcher|dispatcher]] feature. <br />
<br />
Create the following file:<br />
{{hc|/etc/NetworkManager/dispatcher.d/10-dropbox.sh|<nowiki><br />
#!/bin/sh<br />
USER=''your_user''<br />
status=$2<br />
case $status in<br />
up)<br />
su -c 'DISPLAY=:0 /usr/bin/dropbox & ' $USER<br />
;;<br />
down)<br />
killall dropbox<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
or, for the systemd alternative:<br />
<br />
{{hc|/etc/NetworkManager/dispatcher.d/10-dropbox.sh|<nowiki><br />
#!/bin/sh<br />
USER=''your_user''<br />
status=$2<br />
<br />
case $status in<br />
up)<br />
systemctl start dropbox@$USER.service<br />
;;<br />
down)<br />
systemctl stop dropbox@USER.service<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
Do not forget to change scripts to be owned by root and to make them executable.<br />
<br />
=== Using wicd ===<br />
<br />
Create {{ic|/etc/wicd/scripts/postconnect/dropbox}}:<br />
#!/usr/bin/env bash<br />
su -c 'DISPLAY=:0 /usr/bin/dbus-launch dropbox &' your_username<br />
<br />
or, if you use Dropbox with systemd:<br />
<br />
#!/usr/bin/env bash<br />
systemctl restart dropbox@<user><br />
<br />
Create {{ic|/etc/wicd/scripts/postdisconnect/dropbox}}:<br />
#!/usr/bin/env bash<br />
killall dropbox<br />
<br />
or, if you use Dropbox with systemd:<br />
<br />
#!/usr/bin/env bash<br />
systemctl stop dropbox@<user><br />
<br />
Do not forget to make the above scripts executable.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Using Dropbox with non-ext4 filesystems ===<br />
<br />
{{Note|In July, 2019, Dropbox Client build 77.3.127 added support for [[ZFS]], [[eCryptfs]], [[XFS]] and [[Btrfs]].[https://www.dropboxforum.com/t5/Desktop-client-builds/Beta-Build-77-3-127/td-p/354660] It once dropped support for all file systems except plain [[Ext4]] in November, 2018.[https://www.dropboxforum.com/t5/Syncing-and-uploads/Dropbox-client-warns-me-that-it-ll-stop-syncing-in-Nov-why/m-p/290065/highlight/true#M42255]}}<br />
<br />
Workarounds have been created, see for example {{AUR|dropbox-fix2}}. These workarounds are based on substituting the filesystem detection functions by the use of LD_PRELOAD.<br />
<br />
It is also possible to create an ext4 formatted [[sparse file]] within a non-ext4 filesystem. It can then be mounted to the desired location for the Dropbox folder. On btrfs systems, it's recommended to [[Btrfs#Disabling_CoW|disable copy-on-write]].<br />
<br />
=== Dropbox keeps saying Downloading files ===<br />
<br />
But in fact now files are synced with your box. This problem is likely to appear when your Dropbox folder is located on a NTFS partition whose mount path contains spaces, or permissions are not set for that partition. See more in the [https://bbs.archlinux.org/viewtopic.php?id=153368 forums]. To resolve the problem pay attention to your entry in {{ic|/etc/fstab}}. Avoid spaces in the mount path and set write permissions with the "default_permissions" option:<br />
<br />
UUID=01CD2ABB65E17DE0 /run/media/username/Windows ntfs-3g uid=username,gid=users,default_permissions 0 0<br />
<br />
=== Change the Dropbox location from the installation wizard ===<br />
<br />
Some users experience the problem during setting-up Dropbox that they cannot select a Dropbox folder other than {{ic|/home/username/Dropbox}}. In this case when the window for changing the path is shown , hit {{ic|Ctrl+l}}, enter the location (e.g. /mnt/data/Dropbox) and click on the ''Choose'' or ''Open'' button.<br />
<br />
=== Context menu entries in file manager do not work ===<br />
<br />
Several file managers such as Thunar, GNOME Files or its fork Nemo come with extensions that provide context menu entries for files and folders inside your Dropbox. Most of them will result in a browser action such as opening the file or folder in dropbox.com or sharing the link. If you experience these entries not working, then it is likely you have not set the {{ic|$BROWSER}} variable which Dropbox requires. See [[Environment variables]] for details.<br />
<br />
=== Connecting... ===<br />
<br />
It may happen that Dropbox cannot connect successfully because it was loaded before an internet connection was established. This can happen on wireless connections, or fast loading machines on wired networks. The best solution to this problem, for wired and wireless connections, is [[#Dropbox on laptops]] which will ensure that Dropbox is started only after the connection is established. <br />
<br />
An alternative solution, for those not using netctl or NetworkManager, is to delay the startup of Dropbox:<br />
<br />
* {{ic|cp ~/.config/autostart/dropbox.desktop ~/.config/autostart/dropbox-delayed.desktop}}<br />
* Prevent Dropbox from doing a standard autostart by unchecking Dropbox - Preferences - General - Start Dropbox on system startup. This removes {{ic|~/.config/autostart/dropbox.desktop}}.<br />
* Edit {{ic|~/.config/autostart/dropbox-delayed.desktop}} and replace {{ic|1=Exec=dropbox}} with {{ic|1=Exec=bash -c "sleep ''timeout'' && dropbox"}}. Tweak the ''timeout'' parameter, the value of {{ic|3}} is a good start.<br />
<br />
=== Dropbox does not start - "This is usually because of a permission error" ===<br />
<br />
==== Check permissions ====<br />
<br />
Make sure that you own Dropbox's directories before running the application. This includes<br />
*{{ic|~/.dropbox}} - Dropbox's configuration directory<br />
*{{ic|~/Dropbox}} - Dropbox's download directory (default)<br />
You can ensure this by changing their owner with {{ic|chown -R}}.<br />
<br />
This error could also be caused by {{ic|/var}} being full.<br />
<br />
==== Re-linking your account ====<br />
<br />
[https://www.dropbox.com/help/72 Dropbox's FAQ] suggests that this error may be caused by misconfiguration and is fixed by (re)moving the current configuration folder<br />
# mv ~/.dropbox ~/.dropbox.old<br />
and restarting Dropbox.<br />
<br />
==== Errors caused by running out of space ====<br />
<br />
A common error that might happen is that there is no more available space on your {{ic|/tmp}} and {{ic|/var}} partitions. If this happens, Dropbox will crash on startup with the following error in its log:<br />
<br />
Exception: Not a valid FileCache file<br />
<br />
A detailed story of such an occurrence can be found in the [https://bbs.archlinux.org/viewtopic.php?pid=973458 forums]. Make sure there is enough space available before launching Dropbox.<br />
<br />
Another case is when the root partition is full:<br />
<br />
OperationalError: database or disk is full<br />
<br />
Check to see the available space on partitions with {{ic|df}}.<br />
<br />
==== Locale caused errors ====<br />
<br />
Try starting {{Ic|dropbox}} with this code:<br />
<br />
LANG=$LOCALE<br />
dropbox<br />
<br />
(You can also use a different value for LANG; it must be in the format "en_US.UTF-8")<br />
This helps when running from a Bash script or Bash shell where {{ic|/etc/rc.d/functions}} has been loaded<br />
<br />
==== Filesystem monitoring problem ====<br />
<br />
If you have a lot of files to sync in your Dropbox folder, you might get the following error:<br />
<br />
Unable to monitor filesystem<br />
Please run: echo 100000 | sudo tee /proc/sys/fs/inotify/max_user_watches and restart Dropbox to correct the problem.<br />
<br />
This can be fixed easily by adding<br />
<br />
fs.inotify.max_user_watches = 100000<br />
<br />
to {{ic|/etc/sysctl.d/99-sysctl.conf}} and then reload the kernel parameters<br />
<br />
# sysctl --system<br />
<br />
=== Proxy settings ===<br />
<br />
The easiest way to set Dropbox's proxy settings is by defining them manually in the Proxies tab of the Preferences window. Alternatively, you can also set it to 'Auto-detect' and then export your proxy server to the http_proxy env variable prior to starting Dropbox (HTTP_PROXY is also usable)<br />
<br />
{{bc|<nowiki>env http_proxy=http://your.proxy.here:port /usr/bin/dropbox</nowiki>}}<br />
<br />
or<br />
<br />
{{bc|<nowiki><br />
export http_proxy=http://your.proxy.here:port<br />
/usr/bin/dropbox<br />
</nowiki>}}<br />
<br />
{{Note|Dropbox will only use proxy settings of the form {{ic|<nowiki>http://your.proxy.here:port</nowiki>}}, not {{ic|<nowiki>your.proxy.here:port</nowiki>}} as some other applications do.}}<br />
<br />
=== Missing tray icon in GNOME ===<br />
<br />
GNOME 3.26 removed support for tray icons in [https://bugzilla.gnome.org/show_bug.cgi?id=785956 bug 785956] which will prevent the Dropbox icon from showing. To restore tray icons an appropriate extension such as [https://extensions.gnome.org/extension/615/appindicator-support/ App Indicator] needs to be installed.</div>Aleksozolinshttps://wiki.archlinux.org/index.php?title=Dropbox&diff=606267Dropbox2020-04-16T00:09:27Z<p>Aleksozolins: /* Autostart on login with systemd */ Added a note to make it clear that editing the systemd unit with the above change will cause Dropbox to not start unless an X session is launched.</p>
<hr />
<div>[[Category:File sharing]]<br />
[[de:Dropbox]]<br />
[[it:Dropbox]]<br />
[[ja:Dropbox]]<br />
[[ru:Dropbox]]<br />
[[zh-hans:Dropbox]]<br />
[[zh-hant:Dropbox]]<br />
{{Related articles start}}<br />
{{Related|Synchronization and backup programs}}<br />
{{Related|Syncthing}}<br />
{{Related articles end}}<br />
[https://www.dropbox.com Dropbox] is a file sharing system with a GNU/Linux client. Use it to transparently sync files across computers and architectures. Simply drop files into your {{ic|~/Dropbox}} folder, and they will automatically sync to your centralized repository.<br />
<br />
<br />
== Installation ==<br />
<br />
=== AUR ===<br />
<br />
{{AUR|dropbox}} can be [[install]]ed. As a last resort, the Dropbox website has instructions for a [https://www.dropbox.com/install?os=lnx headless install via command line].<br />
<br />
# After installing the package, you can start Dropbox from your application menu or run {{ic|dropbox}} from the command-line. The client icon will appear in the system tray.<br />
# A pop-up will notify you that Dropbox is running from an unsupported location. Click on ''Don't ask again'' since you know that you have installed it from AUR rather than from the official homepage.<br />
# Eventually a pop-up will ask you to log in to your Dropbox account or create a new account. Enter your credentials.<br />
# After some time you will see a "Welcome to Dropbox" pop-up, which will give you the opportunity to view a short tour of Dropbox.<br />
# Press the "Finish and go to My Dropbox".<br />
<br />
=== Optional packages ===<br />
<br />
{| class="wikitable"<br />
|command-line interface<br />
|{{AUR|dropbox-cli}}<br />
|-<br />
|[[GNOME/Files]] integration<br />
|{{AUR|nautilus-dropbox}}<br />
|-<br />
|[[Nemo]] integration<br />
|{{AUR|nemo-dropbox}}<br />
|-<br />
|[[Thunar]] integration<br />
|{{AUR|thunar-dropbox}}<br />
|-<br />
|[[Dolphin]] integration<br />
|{{pkg|dolphin-plugins}}<br />
|-<br />
|Caja integration<br />
|{{AUR|caja-dropbox}}<br />
|-<br />
|[[KDE]] client<br />
|{{AUR|kfilebox}}<br />
|}<br />
<br />
Note that in order to access the GUI and the settings, the only way is via a tray icon. You need an X panel with a system tray or a standalone [[List of applications#System tray|system tray application]] for that.<br />
<br />
=== Prevent automatic updates ===<br />
<br />
Since at least version 2.4.6 (see comments around 2013-11-06 on [https://aur.archlinux.org/packages/dropbox/?comments=all AUR]), Dropbox has had an auto-update capability which downloads a new binary to the {{ic|~/.dropbox-dist/}} folder. The service then attempts to hand over control to this binary and dies, causing systemd to re-start the service, generating a conflict and an endless loop of log-filling, CPU-eating misery. <br />
<br />
A workaround is to prevent Dropbox from downloading the automatic update by creating the {{ic|~/.dropbox-dist/}} folder and making it read-only:<br />
<br />
$ rm -rf ~/.dropbox-dist<br />
$ install -dm0 ~/.dropbox-dist<br />
<br />
This appears to be necessary for modern Dropbox clients to operate successfully from systemd on arch.<br />
<br />
Also see the [https://www.dropboxforum.com/hc/en-us/community/posts/202917115-dropbox-will-not-start-under-systemd-on-linux relevant Dropbox forum post].<br />
<br />
== Autostart ==<br />
<br />
In the Dropbox preferences, under the "General" tab there should be a "Start Dropbox on system startup" checkbox. Try checking this box and seeing if Dropbox starts automatically.<br />
<br />
If that does not work, uncheck the box and use one of the following methods instead:<br />
<br />
=== Autostart with your WM/DE ===<br />
<br />
For [[KDE]] users, no further steps are required, as KDE saves running applications when logging out and restarts them automatically. Similarly for [[Xfce]] users, Dropbox will be restarted automatically next time you login since the {{ic|dropbox.desktop}} file has been placed in {{ic|~/.config/autostart}}.<br />
<br />
For [[Cinnamon]] users, it's recommended to start Dropbox client by configuring Startup Applications with a little delay (Cinnamon issue [https://github.com/linuxmint/Cinnamon/issues/4396 #4396]). Starting Dropbox with systemd works, running in background, but there's is no icon on systray due to some Cinnamon bugs ([https://github.com/linuxmint/Cinnamon/issues/481 #481], [https://github.com/linuxmint/Cinnamon/issues/2846 #2846]).<br />
<br />
If that does not work, you can start the Dropbox sync client along with your window manager by adding {{Ic|/usr/bin/dropbox &}} to your [[xinitrc]] (or {{ic|~/.config/openbox/autostart}}, depending on your setup).<br />
<br />
=== Autostart on boot with systemd ===<br />
<br />
{{Note|If ''systemd'' keeps restarting Dropbox, see [[#Prevent automatic updates]].}}<br />
<br />
To have Dropbox automatically start when your system boots, simply [[enable]] the systemd service, passing your username as the instance identifier. The service unit to be enabled takes the format {{ic|dropbox@''username''}}.<br />
<br />
By default, running the service does not give you an icon in the system tray because it does not know which X display to use. If you want to have tray support, you must [[edit]] the provided service:<br />
<br />
{{hc|# systemctl edit dropbox@''username''|<nowiki><br />
[Service]<br />
Environment=DISPLAY=:0<br />
</nowiki>}}<br />
<br />
Note that with the above edit, the systemd service will fail to start unless an X session is launched.<br />
<br />
=== Autostart on login with systemd ===<br />
<br />
To have Dropbox automatically start when you log in, simply [[enable]] the [[systemd/User|user service]].<br />
<br />
If you want Dropbox to appear in your system tray, you will need to [[edit]] the service unit so that it knows which X display the system tray is in:<br />
<br />
{{hc|$ systemctl --user edit dropbox|<nowiki><br />
[Service]<br />
Environment=DISPLAY=:0<br />
</nowiki>}}<br />
<br />
Note that with the above edit, the systemd service will fail to start unless an X session is launched.<br />
<br />
== Accessing the files without installing a sync client ==<br />
<br />
If all you need is basic access to the files in your Dropbox, you can use the web interface at https://www.dropbox.com/ to upload and download files to your Dropbox. This can be a viable alternative to running a Dropbox daemon and mirroring all the files on your own machine.<br />
<br />
Alternatively, the [[AUR]] package {{AUR|droxi}} provides a command-line interface to Dropbox similar to the GNU {{ic|ftp}} client.<br />
<br />
== Encrypting your Dropbox files ==<br />
<br />
If you want to store sensitive data in your Dropbox, you should encrypt it before doing so. Syncing to Dropbox is encrypted, but all files are (for the time being) stored on the server unencrypted just as you put them in your Dropbox.<br />
<br />
* Dropbox works with [[TrueCrypt]], and after you initially uploaded the TrueCrypt volume to Dropbox, performance is quite okay, because Dropbox has a working binary diff.<br />
<br />
* Another possibility is to use [[EncFS]], which has the advantage that all files are encrypted separately, i.e. you do not have to determine in advance the size of the content you want to encrypt and your encrypted directory grows and shrinks while you add/delete/modify files in it. You can also mount an encrypted volume at startup using the {{ic|-S}} option of {{Ic|encfs}} to avoid having to input the passphrase, but note that your encrypted files are not secure from someone who has direct access to your computer.<br />
<br />
* A third option is to use [[gocryptfs]]. It is similar to EncFS, except that gocryptfs uses authenticated encryption, for protecting both confidentiality and integrity (tamper-resistance) of the data.<br />
<br />
=== Setup EncFS with Dropbox ===<br />
<br />
Follow the Wiki instructions to install [[EncFS]].<br />
<br />
Assuming you have set your Dropbox directory as {{ic|~/Dropbox}}:<br />
<br />
Create a folder. Files you want synced to Dropbox will go in here.<br />
$ mkdir ~/Private<br />
<br />
Run the following and enter a password when asked:<br />
$ encfs ~/Dropbox/Encrypted ~/Private<br />
<br />
Your secure folder is ready for use; creating any file inside {{ic|~/Private}} will automatically encrypt it into {{ic|~/Dropbox/Encrypted}}, which will then be synced to your cloud storage.<br />
<br />
To mount your EncFS folder on every boot, follow the instructions in the [[EncFS#User_friendly_mounting|EncFS]] wiki page.<br />
<br />
{{Tip|Consider using the {{ic|ENCFS6_CONFIG}} variable and moving the {{ic|.encfs6.xml}} file to another location (like a USB stick), to help ensure that your encrypted data and the means to realistically decrypt it do not exist together online.}}<br />
<br />
== Multiple Dropbox instances ==<br />
<br />
If you need to separate or distinguish your data, personal and work usage for example, you can subscribe to Dropbox with different email addresses and have their directories synced by different Dropbox instances running on a single machine.<br />
<br />
The basic principle and general how-to are described in the [http://www.dropboxwiki.com/Multiple_Instances_On_Unix Dropbox Wiki].<br />
<br />
To summarize, you can setup new or additional instances with:<br />
<br />
{{bc|<nowiki><br />
mkdir /path/to/.dropbox-alt-1<br />
HOME=/path/to/.dropbox-alt-1 /usr/bin/dropbox start -i<br />
</nowiki>}}<br />
<br />
Once that is done, stop any Dropbox instance still running and start them like this:<br />
<br />
{{bc|<nowiki><br />
HOME=/path/to/.dropbox-alt-1 /path/to/.dropbox-alt-1/.dropbox-dist/dropboxd<br />
HOME=/path/to/.dropbox-alt-2 /path/to/.dropbox-alt-2/.dropbox-dist/dropboxd<br />
</nowiki>}}<br />
<br />
Pay attention to use different {{ic|.../.dropbox-dist/dropboxd}} binaries. Even when setting a custom HOME value, the {{ic|/opt/dropbox/dropbox}} or {{ic|/opt/dropbox/dropboxd}} wrappers allow only one instance and when started they will kill the one already running.<br />
<br />
== Dropbox on laptops ==<br />
<br />
Dropbox itself is pretty good at dealing with connectivity problems. If you have a laptop and roam between different network environments, Dropbox will have problems reconnecting if you do not restart it. '''Try one of the methods described below first,''' if for some reason the problem remains, you may try one of these hackish solutions: [https://bbs.archlinux.org/viewtopic.php?pid=790905], [https://bbs.archlinux.org/viewtopic.php?pid=1012343#p1012343].<br />
<br />
{{Note|When using any of these methods, you need to prevent Dropbox from doing a standard autostart by unchecking ''Dropbox - Preferences - General - Start Dropbox on system startup''. This prevents Dropbox from creating the {{ic|~/.config/autostart/dropbox.desktop}} file and thus from starting twice.}}<br />
<br />
=== Using netctl ===<br />
<br />
For [[netctl]], use {{ic|ExecUpPost}} and {{ic|ExecDownPre}} respectively in every network profile you use, or for example in {{ic|/etc/netctl/interfaces/wlan0}} to start Dropbox automatically whenever profile on {{ic|wlan0}} is active. Add '|| true' to your command to make sure [[netctl]] will bring up your profile, although Dropbox fails to start.<br />
<br />
ExecUpPost="''any other code''; su -c 'DISPLAY=:0 /usr/bin/dropbox &' ''your_user'' || true"<br />
ExecDownPre="''any other code''; killall dropbox"<br />
<br />
Obviously, {{ic|''your_user''}} has to be edited and {{ic|''any other code'';}} can be omitted if you do not have any. The above will make sure that Dropbox is running only if there is a network profile active.<br />
<br />
=== Using NetworkManager ===<br />
<br />
For [[NetworkManager]], use its [[NetworkManager#Network services with NetworkManager dispatcher|dispatcher]] feature. <br />
<br />
Create the following file:<br />
{{hc|/etc/NetworkManager/dispatcher.d/10-dropbox.sh|<nowiki><br />
#!/bin/sh<br />
USER=''your_user''<br />
status=$2<br />
case $status in<br />
up)<br />
su -c 'DISPLAY=:0 /usr/bin/dropbox & ' $USER<br />
;;<br />
down)<br />
killall dropbox<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
or, for the systemd alternative:<br />
<br />
{{hc|/etc/NetworkManager/dispatcher.d/10-dropbox.sh|<nowiki><br />
#!/bin/sh<br />
USER=''your_user''<br />
status=$2<br />
<br />
case $status in<br />
up)<br />
systemctl start dropbox@$USER.service<br />
;;<br />
down)<br />
systemctl stop dropbox@USER.service<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
Do not forget to change scripts to be owned by root and to make them executable.<br />
<br />
=== Using wicd ===<br />
<br />
Create {{ic|/etc/wicd/scripts/postconnect/dropbox}}:<br />
#!/usr/bin/env bash<br />
su -c 'DISPLAY=:0 /usr/bin/dbus-launch dropbox &' your_username<br />
<br />
or, if you use Dropbox with systemd:<br />
<br />
#!/usr/bin/env bash<br />
systemctl restart dropbox@<user><br />
<br />
Create {{ic|/etc/wicd/scripts/postdisconnect/dropbox}}:<br />
#!/usr/bin/env bash<br />
killall dropbox<br />
<br />
or, if you use Dropbox with systemd:<br />
<br />
#!/usr/bin/env bash<br />
systemctl stop dropbox@<user><br />
<br />
Do not forget to make the above scripts executable.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Using Dropbox with non-ext4 filesystems ===<br />
<br />
{{Note|In July, 2019, Dropbox Client build 77.3.127 added support for [[ZFS]], [[eCryptfs]], [[XFS]] and [[Btrfs]].[https://www.dropboxforum.com/t5/Desktop-client-builds/Beta-Build-77-3-127/td-p/354660] It once dropped support for all file systems except plain [[Ext4]] in November, 2018.[https://www.dropboxforum.com/t5/Syncing-and-uploads/Dropbox-client-warns-me-that-it-ll-stop-syncing-in-Nov-why/m-p/290065/highlight/true#M42255]}}<br />
<br />
Workarounds have been created, see for example {{AUR|dropbox-fix2}}. These workarounds are based on substituting the filesystem detection functions by the use of LD_PRELOAD.<br />
<br />
It is also possible to create an ext4 formatted [[sparse file]] within a non-ext4 filesystem. It can then be mounted to the desired location for the Dropbox folder. On btrfs systems, it's recommended to [[Btrfs#Disabling_CoW|disable copy-on-write]].<br />
<br />
=== Dropbox keeps saying Downloading files ===<br />
<br />
But in fact now files are synced with your box. This problem is likely to appear when your Dropbox folder is located on a NTFS partition whose mount path contains spaces, or permissions are not set for that partition. See more in the [https://bbs.archlinux.org/viewtopic.php?id=153368 forums]. To resolve the problem pay attention to your entry in {{ic|/etc/fstab}}. Avoid spaces in the mount path and set write permissions with the "default_permissions" option:<br />
<br />
UUID=01CD2ABB65E17DE0 /run/media/username/Windows ntfs-3g uid=username,gid=users,default_permissions 0 0<br />
<br />
=== Change the Dropbox location from the installation wizard ===<br />
<br />
Some users experience the problem during setting-up Dropbox that they cannot select a Dropbox folder other than {{ic|/home/username/Dropbox}}. In this case when the window for changing the path is shown , hit {{ic|Ctrl+l}}, enter the location (e.g. /mnt/data/Dropbox) and click on the ''Choose'' or ''Open'' button.<br />
<br />
=== Context menu entries in file manager do not work ===<br />
<br />
Several file managers such as Thunar, GNOME Files or its fork Nemo come with extensions that provide context menu entries for files and folders inside your Dropbox. Most of them will result in a browser action such as opening the file or folder in dropbox.com or sharing the link. If you experience these entries not working, then it is likely you have not set the {{ic|$BROWSER}} variable which Dropbox requires. See [[Environment variables]] for details.<br />
<br />
=== Connecting... ===<br />
<br />
It may happen that Dropbox cannot connect successfully because it was loaded before an internet connection was established. This can happen on wireless connections, or fast loading machines on wired networks. The best solution to this problem, for wired and wireless connections, is [[#Dropbox on laptops]] which will ensure that Dropbox is started only after the connection is established. <br />
<br />
An alternative solution, for those not using netctl or NetworkManager, is to delay the startup of Dropbox:<br />
<br />
* {{ic|cp ~/.config/autostart/dropbox.desktop ~/.config/autostart/dropbox-delayed.desktop}}<br />
* Prevent Dropbox from doing a standard autostart by unchecking Dropbox - Preferences - General - Start Dropbox on system startup. This removes {{ic|~/.config/autostart/dropbox.desktop}}.<br />
* Edit {{ic|~/.config/autostart/dropbox-delayed.desktop}} and replace {{ic|1=Exec=dropbox}} with {{ic|1=Exec=bash -c "sleep ''timeout'' && dropbox"}}. Tweak the ''timeout'' parameter, the value of {{ic|3}} is a good start.<br />
<br />
=== Dropbox does not start - "This is usually because of a permission error" ===<br />
<br />
==== Check permissions ====<br />
<br />
Make sure that you own Dropbox's directories before running the application. This includes<br />
*{{ic|~/.dropbox}} - Dropbox's configuration directory<br />
*{{ic|~/Dropbox}} - Dropbox's download directory (default)<br />
You can ensure this by changing their owner with {{ic|chown -R}}.<br />
<br />
This error could also be caused by {{ic|/var}} being full.<br />
<br />
==== Re-linking your account ====<br />
<br />
[https://www.dropbox.com/help/72 Dropbox's FAQ] suggests that this error may be caused by misconfiguration and is fixed by (re)moving the current configuration folder<br />
# mv ~/.dropbox ~/.dropbox.old<br />
and restarting Dropbox.<br />
<br />
==== Errors caused by running out of space ====<br />
<br />
A common error that might happen is that there is no more available space on your {{ic|/tmp}} and {{ic|/var}} partitions. If this happens, Dropbox will crash on startup with the following error in its log:<br />
<br />
Exception: Not a valid FileCache file<br />
<br />
A detailed story of such an occurrence can be found in the [https://bbs.archlinux.org/viewtopic.php?pid=973458 forums]. Make sure there is enough space available before launching Dropbox.<br />
<br />
Another case is when the root partition is full:<br />
<br />
OperationalError: database or disk is full<br />
<br />
Check to see the available space on partitions with {{ic|df}}.<br />
<br />
==== Locale caused errors ====<br />
<br />
Try starting {{Ic|dropbox}} with this code:<br />
<br />
LANG=$LOCALE<br />
dropbox<br />
<br />
(You can also use a different value for LANG; it must be in the format "en_US.UTF-8")<br />
This helps when running from a Bash script or Bash shell where {{ic|/etc/rc.d/functions}} has been loaded<br />
<br />
==== Filesystem monitoring problem ====<br />
<br />
If you have a lot of files to sync in your Dropbox folder, you might get the following error:<br />
<br />
Unable to monitor filesystem<br />
Please run: echo 100000 | sudo tee /proc/sys/fs/inotify/max_user_watches and restart Dropbox to correct the problem.<br />
<br />
This can be fixed easily by adding<br />
<br />
fs.inotify.max_user_watches = 100000<br />
<br />
to {{ic|/etc/sysctl.d/99-sysctl.conf}} and then reload the kernel parameters<br />
<br />
# sysctl --system<br />
<br />
=== Proxy settings ===<br />
<br />
The easiest way to set Dropbox's proxy settings is by defining them manually in the Proxies tab of the Preferences window. Alternatively, you can also set it to 'Auto-detect' and then export your proxy server to the http_proxy env variable prior to starting Dropbox (HTTP_PROXY is also usable)<br />
<br />
{{bc|<nowiki>env http_proxy=http://your.proxy.here:port /usr/bin/dropbox</nowiki>}}<br />
<br />
or<br />
<br />
{{bc|<nowiki><br />
export http_proxy=http://your.proxy.here:port<br />
/usr/bin/dropbox<br />
</nowiki>}}<br />
<br />
{{Note|Dropbox will only use proxy settings of the form {{ic|<nowiki>http://your.proxy.here:port</nowiki>}}, not {{ic|<nowiki>your.proxy.here:port</nowiki>}} as some other applications do.}}<br />
<br />
=== Missing tray icon in GNOME ===<br />
<br />
GNOME 3.26 removed support for tray icons in [https://bugzilla.gnome.org/show_bug.cgi?id=785956 bug 785956] which will prevent the Dropbox icon from showing. To restore tray icons an appropriate extension such as [https://extensions.gnome.org/extension/615/appindicator-support/ App Indicator] needs to be installed.</div>Aleksozolinshttps://wiki.archlinux.org/index.php?title=Dropbox&diff=606266Dropbox2020-04-16T00:08:28Z<p>Aleksozolins: /* Autostart on boot with systemd */ Added a note since it's not clear that making the edit to the systemd until will cause it to fail unless an X session is launched.</p>
<hr />
<div>[[Category:File sharing]]<br />
[[de:Dropbox]]<br />
[[it:Dropbox]]<br />
[[ja:Dropbox]]<br />
[[ru:Dropbox]]<br />
[[zh-hans:Dropbox]]<br />
[[zh-hant:Dropbox]]<br />
{{Related articles start}}<br />
{{Related|Synchronization and backup programs}}<br />
{{Related|Syncthing}}<br />
{{Related articles end}}<br />
[https://www.dropbox.com Dropbox] is a file sharing system with a GNU/Linux client. Use it to transparently sync files across computers and architectures. Simply drop files into your {{ic|~/Dropbox}} folder, and they will automatically sync to your centralized repository.<br />
<br />
<br />
== Installation ==<br />
<br />
=== AUR ===<br />
<br />
{{AUR|dropbox}} can be [[install]]ed. As a last resort, the Dropbox website has instructions for a [https://www.dropbox.com/install?os=lnx headless install via command line].<br />
<br />
# After installing the package, you can start Dropbox from your application menu or run {{ic|dropbox}} from the command-line. The client icon will appear in the system tray.<br />
# A pop-up will notify you that Dropbox is running from an unsupported location. Click on ''Don't ask again'' since you know that you have installed it from AUR rather than from the official homepage.<br />
# Eventually a pop-up will ask you to log in to your Dropbox account or create a new account. Enter your credentials.<br />
# After some time you will see a "Welcome to Dropbox" pop-up, which will give you the opportunity to view a short tour of Dropbox.<br />
# Press the "Finish and go to My Dropbox".<br />
<br />
=== Optional packages ===<br />
<br />
{| class="wikitable"<br />
|command-line interface<br />
|{{AUR|dropbox-cli}}<br />
|-<br />
|[[GNOME/Files]] integration<br />
|{{AUR|nautilus-dropbox}}<br />
|-<br />
|[[Nemo]] integration<br />
|{{AUR|nemo-dropbox}}<br />
|-<br />
|[[Thunar]] integration<br />
|{{AUR|thunar-dropbox}}<br />
|-<br />
|[[Dolphin]] integration<br />
|{{pkg|dolphin-plugins}}<br />
|-<br />
|Caja integration<br />
|{{AUR|caja-dropbox}}<br />
|-<br />
|[[KDE]] client<br />
|{{AUR|kfilebox}}<br />
|}<br />
<br />
Note that in order to access the GUI and the settings, the only way is via a tray icon. You need an X panel with a system tray or a standalone [[List of applications#System tray|system tray application]] for that.<br />
<br />
=== Prevent automatic updates ===<br />
<br />
Since at least version 2.4.6 (see comments around 2013-11-06 on [https://aur.archlinux.org/packages/dropbox/?comments=all AUR]), Dropbox has had an auto-update capability which downloads a new binary to the {{ic|~/.dropbox-dist/}} folder. The service then attempts to hand over control to this binary and dies, causing systemd to re-start the service, generating a conflict and an endless loop of log-filling, CPU-eating misery. <br />
<br />
A workaround is to prevent Dropbox from downloading the automatic update by creating the {{ic|~/.dropbox-dist/}} folder and making it read-only:<br />
<br />
$ rm -rf ~/.dropbox-dist<br />
$ install -dm0 ~/.dropbox-dist<br />
<br />
This appears to be necessary for modern Dropbox clients to operate successfully from systemd on arch.<br />
<br />
Also see the [https://www.dropboxforum.com/hc/en-us/community/posts/202917115-dropbox-will-not-start-under-systemd-on-linux relevant Dropbox forum post].<br />
<br />
== Autostart ==<br />
<br />
In the Dropbox preferences, under the "General" tab there should be a "Start Dropbox on system startup" checkbox. Try checking this box and seeing if Dropbox starts automatically.<br />
<br />
If that does not work, uncheck the box and use one of the following methods instead:<br />
<br />
=== Autostart with your WM/DE ===<br />
<br />
For [[KDE]] users, no further steps are required, as KDE saves running applications when logging out and restarts them automatically. Similarly for [[Xfce]] users, Dropbox will be restarted automatically next time you login since the {{ic|dropbox.desktop}} file has been placed in {{ic|~/.config/autostart}}.<br />
<br />
For [[Cinnamon]] users, it's recommended to start Dropbox client by configuring Startup Applications with a little delay (Cinnamon issue [https://github.com/linuxmint/Cinnamon/issues/4396 #4396]). Starting Dropbox with systemd works, running in background, but there's is no icon on systray due to some Cinnamon bugs ([https://github.com/linuxmint/Cinnamon/issues/481 #481], [https://github.com/linuxmint/Cinnamon/issues/2846 #2846]).<br />
<br />
If that does not work, you can start the Dropbox sync client along with your window manager by adding {{Ic|/usr/bin/dropbox &}} to your [[xinitrc]] (or {{ic|~/.config/openbox/autostart}}, depending on your setup).<br />
<br />
=== Autostart on boot with systemd ===<br />
<br />
{{Note|If ''systemd'' keeps restarting Dropbox, see [[#Prevent automatic updates]].}}<br />
<br />
To have Dropbox automatically start when your system boots, simply [[enable]] the systemd service, passing your username as the instance identifier. The service unit to be enabled takes the format {{ic|dropbox@''username''}}.<br />
<br />
By default, running the service does not give you an icon in the system tray because it does not know which X display to use. If you want to have tray support, you must [[edit]] the provided service:<br />
<br />
{{hc|# systemctl edit dropbox@''username''|<nowiki><br />
[Service]<br />
Environment=DISPLAY=:0<br />
</nowiki>}}<br />
<br />
Note that with the above edit, the systemd service will fail to start unless an X session is launched.<br />
<br />
=== Autostart on login with systemd ===<br />
<br />
To have Dropbox automatically start when you log in, simply [[enable]] the [[systemd/User|user service]].<br />
<br />
If you want Dropbox to appear in your system tray, you will need to [[edit]] the service unit so that it knows which X display the system tray is in:<br />
<br />
{{hc|$ systemctl --user edit dropbox|<nowiki><br />
[Service]<br />
Environment=DISPLAY=:0<br />
</nowiki>}}<br />
<br />
== Accessing the files without installing a sync client ==<br />
<br />
If all you need is basic access to the files in your Dropbox, you can use the web interface at https://www.dropbox.com/ to upload and download files to your Dropbox. This can be a viable alternative to running a Dropbox daemon and mirroring all the files on your own machine.<br />
<br />
Alternatively, the [[AUR]] package {{AUR|droxi}} provides a command-line interface to Dropbox similar to the GNU {{ic|ftp}} client.<br />
<br />
== Encrypting your Dropbox files ==<br />
<br />
If you want to store sensitive data in your Dropbox, you should encrypt it before doing so. Syncing to Dropbox is encrypted, but all files are (for the time being) stored on the server unencrypted just as you put them in your Dropbox.<br />
<br />
* Dropbox works with [[TrueCrypt]], and after you initially uploaded the TrueCrypt volume to Dropbox, performance is quite okay, because Dropbox has a working binary diff.<br />
<br />
* Another possibility is to use [[EncFS]], which has the advantage that all files are encrypted separately, i.e. you do not have to determine in advance the size of the content you want to encrypt and your encrypted directory grows and shrinks while you add/delete/modify files in it. You can also mount an encrypted volume at startup using the {{ic|-S}} option of {{Ic|encfs}} to avoid having to input the passphrase, but note that your encrypted files are not secure from someone who has direct access to your computer.<br />
<br />
* A third option is to use [[gocryptfs]]. It is similar to EncFS, except that gocryptfs uses authenticated encryption, for protecting both confidentiality and integrity (tamper-resistance) of the data.<br />
<br />
=== Setup EncFS with Dropbox ===<br />
<br />
Follow the Wiki instructions to install [[EncFS]].<br />
<br />
Assuming you have set your Dropbox directory as {{ic|~/Dropbox}}:<br />
<br />
Create a folder. Files you want synced to Dropbox will go in here.<br />
$ mkdir ~/Private<br />
<br />
Run the following and enter a password when asked:<br />
$ encfs ~/Dropbox/Encrypted ~/Private<br />
<br />
Your secure folder is ready for use; creating any file inside {{ic|~/Private}} will automatically encrypt it into {{ic|~/Dropbox/Encrypted}}, which will then be synced to your cloud storage.<br />
<br />
To mount your EncFS folder on every boot, follow the instructions in the [[EncFS#User_friendly_mounting|EncFS]] wiki page.<br />
<br />
{{Tip|Consider using the {{ic|ENCFS6_CONFIG}} variable and moving the {{ic|.encfs6.xml}} file to another location (like a USB stick), to help ensure that your encrypted data and the means to realistically decrypt it do not exist together online.}}<br />
<br />
== Multiple Dropbox instances ==<br />
<br />
If you need to separate or distinguish your data, personal and work usage for example, you can subscribe to Dropbox with different email addresses and have their directories synced by different Dropbox instances running on a single machine.<br />
<br />
The basic principle and general how-to are described in the [http://www.dropboxwiki.com/Multiple_Instances_On_Unix Dropbox Wiki].<br />
<br />
To summarize, you can setup new or additional instances with:<br />
<br />
{{bc|<nowiki><br />
mkdir /path/to/.dropbox-alt-1<br />
HOME=/path/to/.dropbox-alt-1 /usr/bin/dropbox start -i<br />
</nowiki>}}<br />
<br />
Once that is done, stop any Dropbox instance still running and start them like this:<br />
<br />
{{bc|<nowiki><br />
HOME=/path/to/.dropbox-alt-1 /path/to/.dropbox-alt-1/.dropbox-dist/dropboxd<br />
HOME=/path/to/.dropbox-alt-2 /path/to/.dropbox-alt-2/.dropbox-dist/dropboxd<br />
</nowiki>}}<br />
<br />
Pay attention to use different {{ic|.../.dropbox-dist/dropboxd}} binaries. Even when setting a custom HOME value, the {{ic|/opt/dropbox/dropbox}} or {{ic|/opt/dropbox/dropboxd}} wrappers allow only one instance and when started they will kill the one already running.<br />
<br />
== Dropbox on laptops ==<br />
<br />
Dropbox itself is pretty good at dealing with connectivity problems. If you have a laptop and roam between different network environments, Dropbox will have problems reconnecting if you do not restart it. '''Try one of the methods described below first,''' if for some reason the problem remains, you may try one of these hackish solutions: [https://bbs.archlinux.org/viewtopic.php?pid=790905], [https://bbs.archlinux.org/viewtopic.php?pid=1012343#p1012343].<br />
<br />
{{Note|When using any of these methods, you need to prevent Dropbox from doing a standard autostart by unchecking ''Dropbox - Preferences - General - Start Dropbox on system startup''. This prevents Dropbox from creating the {{ic|~/.config/autostart/dropbox.desktop}} file and thus from starting twice.}}<br />
<br />
=== Using netctl ===<br />
<br />
For [[netctl]], use {{ic|ExecUpPost}} and {{ic|ExecDownPre}} respectively in every network profile you use, or for example in {{ic|/etc/netctl/interfaces/wlan0}} to start Dropbox automatically whenever profile on {{ic|wlan0}} is active. Add '|| true' to your command to make sure [[netctl]] will bring up your profile, although Dropbox fails to start.<br />
<br />
ExecUpPost="''any other code''; su -c 'DISPLAY=:0 /usr/bin/dropbox &' ''your_user'' || true"<br />
ExecDownPre="''any other code''; killall dropbox"<br />
<br />
Obviously, {{ic|''your_user''}} has to be edited and {{ic|''any other code'';}} can be omitted if you do not have any. The above will make sure that Dropbox is running only if there is a network profile active.<br />
<br />
=== Using NetworkManager ===<br />
<br />
For [[NetworkManager]], use its [[NetworkManager#Network services with NetworkManager dispatcher|dispatcher]] feature. <br />
<br />
Create the following file:<br />
{{hc|/etc/NetworkManager/dispatcher.d/10-dropbox.sh|<nowiki><br />
#!/bin/sh<br />
USER=''your_user''<br />
status=$2<br />
case $status in<br />
up)<br />
su -c 'DISPLAY=:0 /usr/bin/dropbox & ' $USER<br />
;;<br />
down)<br />
killall dropbox<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
or, for the systemd alternative:<br />
<br />
{{hc|/etc/NetworkManager/dispatcher.d/10-dropbox.sh|<nowiki><br />
#!/bin/sh<br />
USER=''your_user''<br />
status=$2<br />
<br />
case $status in<br />
up)<br />
systemctl start dropbox@$USER.service<br />
;;<br />
down)<br />
systemctl stop dropbox@USER.service<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
Do not forget to change scripts to be owned by root and to make them executable.<br />
<br />
=== Using wicd ===<br />
<br />
Create {{ic|/etc/wicd/scripts/postconnect/dropbox}}:<br />
#!/usr/bin/env bash<br />
su -c 'DISPLAY=:0 /usr/bin/dbus-launch dropbox &' your_username<br />
<br />
or, if you use Dropbox with systemd:<br />
<br />
#!/usr/bin/env bash<br />
systemctl restart dropbox@<user><br />
<br />
Create {{ic|/etc/wicd/scripts/postdisconnect/dropbox}}:<br />
#!/usr/bin/env bash<br />
killall dropbox<br />
<br />
or, if you use Dropbox with systemd:<br />
<br />
#!/usr/bin/env bash<br />
systemctl stop dropbox@<user><br />
<br />
Do not forget to make the above scripts executable.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Using Dropbox with non-ext4 filesystems ===<br />
<br />
{{Note|In July, 2019, Dropbox Client build 77.3.127 added support for [[ZFS]], [[eCryptfs]], [[XFS]] and [[Btrfs]].[https://www.dropboxforum.com/t5/Desktop-client-builds/Beta-Build-77-3-127/td-p/354660] It once dropped support for all file systems except plain [[Ext4]] in November, 2018.[https://www.dropboxforum.com/t5/Syncing-and-uploads/Dropbox-client-warns-me-that-it-ll-stop-syncing-in-Nov-why/m-p/290065/highlight/true#M42255]}}<br />
<br />
Workarounds have been created, see for example {{AUR|dropbox-fix2}}. These workarounds are based on substituting the filesystem detection functions by the use of LD_PRELOAD.<br />
<br />
It is also possible to create an ext4 formatted [[sparse file]] within a non-ext4 filesystem. It can then be mounted to the desired location for the Dropbox folder. On btrfs systems, it's recommended to [[Btrfs#Disabling_CoW|disable copy-on-write]].<br />
<br />
=== Dropbox keeps saying Downloading files ===<br />
<br />
But in fact now files are synced with your box. This problem is likely to appear when your Dropbox folder is located on a NTFS partition whose mount path contains spaces, or permissions are not set for that partition. See more in the [https://bbs.archlinux.org/viewtopic.php?id=153368 forums]. To resolve the problem pay attention to your entry in {{ic|/etc/fstab}}. Avoid spaces in the mount path and set write permissions with the "default_permissions" option:<br />
<br />
UUID=01CD2ABB65E17DE0 /run/media/username/Windows ntfs-3g uid=username,gid=users,default_permissions 0 0<br />
<br />
=== Change the Dropbox location from the installation wizard ===<br />
<br />
Some users experience the problem during setting-up Dropbox that they cannot select a Dropbox folder other than {{ic|/home/username/Dropbox}}. In this case when the window for changing the path is shown , hit {{ic|Ctrl+l}}, enter the location (e.g. /mnt/data/Dropbox) and click on the ''Choose'' or ''Open'' button.<br />
<br />
=== Context menu entries in file manager do not work ===<br />
<br />
Several file managers such as Thunar, GNOME Files or its fork Nemo come with extensions that provide context menu entries for files and folders inside your Dropbox. Most of them will result in a browser action such as opening the file or folder in dropbox.com or sharing the link. If you experience these entries not working, then it is likely you have not set the {{ic|$BROWSER}} variable which Dropbox requires. See [[Environment variables]] for details.<br />
<br />
=== Connecting... ===<br />
<br />
It may happen that Dropbox cannot connect successfully because it was loaded before an internet connection was established. This can happen on wireless connections, or fast loading machines on wired networks. The best solution to this problem, for wired and wireless connections, is [[#Dropbox on laptops]] which will ensure that Dropbox is started only after the connection is established. <br />
<br />
An alternative solution, for those not using netctl or NetworkManager, is to delay the startup of Dropbox:<br />
<br />
* {{ic|cp ~/.config/autostart/dropbox.desktop ~/.config/autostart/dropbox-delayed.desktop}}<br />
* Prevent Dropbox from doing a standard autostart by unchecking Dropbox - Preferences - General - Start Dropbox on system startup. This removes {{ic|~/.config/autostart/dropbox.desktop}}.<br />
* Edit {{ic|~/.config/autostart/dropbox-delayed.desktop}} and replace {{ic|1=Exec=dropbox}} with {{ic|1=Exec=bash -c "sleep ''timeout'' && dropbox"}}. Tweak the ''timeout'' parameter, the value of {{ic|3}} is a good start.<br />
<br />
=== Dropbox does not start - "This is usually because of a permission error" ===<br />
<br />
==== Check permissions ====<br />
<br />
Make sure that you own Dropbox's directories before running the application. This includes<br />
*{{ic|~/.dropbox}} - Dropbox's configuration directory<br />
*{{ic|~/Dropbox}} - Dropbox's download directory (default)<br />
You can ensure this by changing their owner with {{ic|chown -R}}.<br />
<br />
This error could also be caused by {{ic|/var}} being full.<br />
<br />
==== Re-linking your account ====<br />
<br />
[https://www.dropbox.com/help/72 Dropbox's FAQ] suggests that this error may be caused by misconfiguration and is fixed by (re)moving the current configuration folder<br />
# mv ~/.dropbox ~/.dropbox.old<br />
and restarting Dropbox.<br />
<br />
==== Errors caused by running out of space ====<br />
<br />
A common error that might happen is that there is no more available space on your {{ic|/tmp}} and {{ic|/var}} partitions. If this happens, Dropbox will crash on startup with the following error in its log:<br />
<br />
Exception: Not a valid FileCache file<br />
<br />
A detailed story of such an occurrence can be found in the [https://bbs.archlinux.org/viewtopic.php?pid=973458 forums]. Make sure there is enough space available before launching Dropbox.<br />
<br />
Another case is when the root partition is full:<br />
<br />
OperationalError: database or disk is full<br />
<br />
Check to see the available space on partitions with {{ic|df}}.<br />
<br />
==== Locale caused errors ====<br />
<br />
Try starting {{Ic|dropbox}} with this code:<br />
<br />
LANG=$LOCALE<br />
dropbox<br />
<br />
(You can also use a different value for LANG; it must be in the format "en_US.UTF-8")<br />
This helps when running from a Bash script or Bash shell where {{ic|/etc/rc.d/functions}} has been loaded<br />
<br />
==== Filesystem monitoring problem ====<br />
<br />
If you have a lot of files to sync in your Dropbox folder, you might get the following error:<br />
<br />
Unable to monitor filesystem<br />
Please run: echo 100000 | sudo tee /proc/sys/fs/inotify/max_user_watches and restart Dropbox to correct the problem.<br />
<br />
This can be fixed easily by adding<br />
<br />
fs.inotify.max_user_watches = 100000<br />
<br />
to {{ic|/etc/sysctl.d/99-sysctl.conf}} and then reload the kernel parameters<br />
<br />
# sysctl --system<br />
<br />
=== Proxy settings ===<br />
<br />
The easiest way to set Dropbox's proxy settings is by defining them manually in the Proxies tab of the Preferences window. Alternatively, you can also set it to 'Auto-detect' and then export your proxy server to the http_proxy env variable prior to starting Dropbox (HTTP_PROXY is also usable)<br />
<br />
{{bc|<nowiki>env http_proxy=http://your.proxy.here:port /usr/bin/dropbox</nowiki>}}<br />
<br />
or<br />
<br />
{{bc|<nowiki><br />
export http_proxy=http://your.proxy.here:port<br />
/usr/bin/dropbox<br />
</nowiki>}}<br />
<br />
{{Note|Dropbox will only use proxy settings of the form {{ic|<nowiki>http://your.proxy.here:port</nowiki>}}, not {{ic|<nowiki>your.proxy.here:port</nowiki>}} as some other applications do.}}<br />
<br />
=== Missing tray icon in GNOME ===<br />
<br />
GNOME 3.26 removed support for tray icons in [https://bugzilla.gnome.org/show_bug.cgi?id=785956 bug 785956] which will prevent the Dropbox icon from showing. To restore tray icons an appropriate extension such as [https://extensions.gnome.org/extension/615/appindicator-support/ App Indicator] needs to be installed.</div>Aleksozolinshttps://wiki.archlinux.org/index.php?title=MariaDB&diff=587082MariaDB2019-10-23T19:56:20Z<p>Aleksozolins: replaced _ with - twice... It was a wrong command.</p>
<hr />
<div>[[Category:Relational DBMSs]]<br />
[[cs:MySQL]]<br />
[[de:MySQL]]<br />
[[es:MySQL]]<br />
[[fr:MariaDB]]<br />
[[it:MySQL]]<br />
[[ja:MariaDB]]<br />
[[ru:MySQL]]<br />
[[sr:MySQL]]<br />
[[zh-hans:MariaDB]]<br />
{{Related articles start}}<br />
{{Related|phpMyAdmin}}<br />
{{Related|Adminer}}<br />
{{Related|JDBC and MySQL}}<br />
{{Related|Open Database Connectivity}}<br />
{{Related articles end}}<br />
[[Wikipedia:MariaDB|MariaDB]] is a reliable, high performance and full-featured database server which aims to be an 'always Free, backward compatible, drop-in' replacement of [[MySQL]]. Since 2013 MariaDB is Arch Linux's default implementation of MySQL.[https://www.archlinux.org/news/mariadb-replaces-mysql-in-repositories/]<br />
<br />
== Installation ==<br />
<br />
[https://mariadb.com/ MariaDB] is the [https://www.archlinux.org/news/mariadb-replaces-mysql-in-repositories/ default implementation] of MySQL in Arch Linux, provided with the {{Pkg|mariadb}} package.<br />
<br />
{{Tip|<br />
* If the database (in {{ic|/var/lib/mysql}}) resides on a [[Btrfs]] file system, you should consider disabling [[Btrfs#Copy-on-Write (CoW)|Copy-on-Write]] for the directory before creating any database.<br />
* If the database resides on a [[ZFS]] file system, you should consult [[ZFS#Databases]] before creating any database.<br />
}}<br />
<br />
Install {{Pkg|mariadb}}, afterwards run the following command '''before starting''' the {{ic|mariadb.service}}:<br />
<br />
# mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql<br />
<br />
{{Note|For security reasons, the systemd service file contains {{ic|1=ProtectHome=true}}, which prevents MariaDB from accessing files under the {{ic|/home}}, {{ic|/root}} and {{ic|/run/user}} hierarchies. The {{ic|datadir}} has to be in an accessible location and [[chown|owned]] by the {{ic|mysql}} user and group.<br />
You can modify this behavior by creating a supplementary service file as described here: https://mariadb.com/kb/en/mariadb/systemd/}}<br />
<br />
Now the {{ic|mariadb.service}} can be started and/or enabled with [[systemd#Using units|systemd]].<br />
<br />
{{Tip|If you use something different from {{ic|/var/lib/mysql}} for your data dir, you need to set {{Ic|1=datadir=<YOUR_DATADIR>}} under section {{Ic|[mysqld]}} of your {{Ic|/etc/my.cnf.d/server.cnf}}.}}<br />
<br />
To simplify administration, you might want to install a [[MySQL#Graphical tools|front-end]].<br />
<br />
== Configuration ==<br />
<br />
{{Out of date|The main /etc/my.cnf configuration file is now splitted into various files in /etc/my.cnf.d/ dir.}}<br />
<br />
Once you have started the MySQL server and added a root account, you may want to change the default configuration.<br />
<br />
To log in as {{ic|root}} on the MySQL server, use the following command:<br />
$ mysql -u root -p<br />
<br />
=== Improve security ===<br />
<br />
The {{ic|mysql_secure_installation}} command will interactively guide you through a number of recommended security measures at the database level:<br />
# mysql_secure_installation<br />
<br />
=== Add user ===<br />
<br />
Creating a new user takes two steps: create the user; grant privileges. In the below example, the user ''monty'' with ''some_pass'' as password is being created, then granted full permissions to the database ''mydb'': <br />
<br />
{{hc|$ mysql -u root -p|<br />
MariaDB> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';<br />
MariaDB> GRANT ALL PRIVILEGES ON mydb.* TO 'monty'@'localhost';<br />
MariaDB> FLUSH PRIVILEGES;<br />
MariaDB> quit}}<br />
<br />
=== Configuration files ===<br />
<br />
''MariaDB'' configuration options are read from the following files in the given order (according to {{ic|mysqld --help --verbose | tail -20}} output):<br />
<br />
/etc/my.cnf /etc/my.cnf.d/ ~/.my.cnf<br />
<br />
Depending on the scope of the changes you want to make (system-wide, user-only...), use the corresponding file. See [https://mariadb.com/kb/en/library/configuring-mariadb-with-option-files/ this entry] of the Knowledge Base for more information.<br />
<br />
=== Grant remote access ===<br />
<br />
{{Warning|This is not considered as best practice and may cause security issues. Consider using [[Secure Shell]], [[VNC]] or [[VPN]], if you want to maintain the MySQL-server outside and/or inside your LAN.}}<br />
<br />
If you want to access your MySQL server from other LAN hosts, you have to edit the following lines in {{ic|/etc/my.cnf.d/server.cnf}}:<br />
<br />
[mysqld]<br />
...<br />
#skip-networking<br />
bind-address = <some ip-address><br />
...<br />
<br />
Grant any MySQL user remote access (example for root):<br />
<br />
$ mysql -u root -p<br />
<br />
Check current users with remote access privileged:<br />
<br />
SELECT User, Host FROM mysql.user WHERE Host <> 'localhost';<br />
<br />
Now grant remote access for your user (here root)::<br />
<br />
GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.1.%' IDENTIFIED BY 'my_optional_remote_password' WITH GRANT OPTION;<br />
<br />
You can change the '%' wildcard to a specific host if you like. The password can be different from user's main password.<br />
<br />
=== Disable remote access ===<br />
<br />
The MySQL server is accessible from the network by default. If MySQL is only needed for the localhost, you can improve security by not listening on TCP port 3306. To refuse remote connections, uncomment the following line in {{ic|/etc/my.cnf.d/server.cnf}}:<br />
<br />
skip-networking<br />
<br />
You will still be able to log in from the localhost.<br />
<br />
=== Enable auto-completion ===<br />
<br />
{{Note|Enabling this feature can make the client initialization longer.}}<br />
<br />
The MySQL client completion feature is disabled by default. To enable it system-wide edit {{ic|/etc/mysql/my.cnf}}, and replace {{ic|no-auto-rehash}} by {{ic|auto-rehash}} (or add if it doesn't exist). Note that this must be placed under {{ic|mysql}} and not {{ic|mysqld}}. Completion will be enabled next time you run the MySQL client.<br />
<br />
=== Using UTF8MB4 ===<br />
<br />
{{Warning|Before changing the character set be sure to create a backup first.}}<br />
<br />
{{Note|<br />
* The {{Pkg|mariadb}} package already uses {{ic|utf8mb4}} as charset and {{ic|utf8mb4_unicode_ci}} as collation. Users using the default (character) settings may want to skip this section.<br />
* UTF8MB4 is recommended over UTF-8 since it allows full Unicode support [https://mathiasbynens.be/notes/mysql-utf8mb4] [https://stackoverflow.com/questions/30074492/what-is-the-difference-between-utf8mb4-and-utf8-charsets-in-mysql].}}<br />
<br />
[[Append]] the following values to the main configuration file located at {{ic|/etc/mysql/my.cnf}}:<br />
<br />
{{bc|<nowiki><br />
[client]<br />
default-character-set = utf8mb4<br />
<br />
[mysqld]<br />
collation_server = utf8mb4_unicode_ci<br />
character_set_server = utf8mb4<br />
<br />
[mysql]<br />
default-character-set = utf8mb4<br />
</nowiki>}}<br />
<br />
[[Restart]] {{ic|mariadb.service}} to apply the changes.<br />
<br />
See [[#Database maintenance]] to optimize and check the database health.<br />
<br />
=== Increase character limit ===<br />
<br />
{{Out of date|As of 10.3.1 this section is no longer applicable. All 3 options are now enabled by default. {{ic|innodb_file_format}} and {{ic|innodb_large_prefix}} are deprecated and can no longer be used. The mariadb service will fail to start if either are included in {{ic|my.cnf}} ([https://mariadb.com/kb/en/library/innodb-system-variables/#innodb_file_format source])}}<br />
<br />
{{Note|The character-limit depends on the character-set in use [http://mechanics.flite.com/blog/2014/07/29/using-innodb-large-prefix-to-avoid-error-1071/] [https://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_large_prefix] [https://easyengine.io/tutorials/mysql/enable-innodb-file-per-table/].}}<br />
<br />
For InnoDB execute the following commands to support a higher character-limit:<br />
<br />
mysql> set global innodb_file_format = BARRACUDA;<br />
Query OK, 0 rows affected (0.00 sec)<br />
<br />
mysql> set global innodb_file_per_table = ON;<br />
Query OK, 0 rows affected (0.00 sec)<br />
<br />
mysql> set global innodb_large_prefix = ON;<br />
Query OK, 0 rows affected (0.00 sec)<br />
<br />
[[Append]] the following lines in {{ic|/etc/mysql/my.cnf}} to always use a higher character-limit:<br />
<br />
[mysqld]<br />
innodb_file_format = barracuda<br />
innodb_file_per_table = 1<br />
innodb_large_prefix = 1<br />
<br />
[[Restart]] {{ic|mariadb.service}} to apply the changes.<br />
<br />
On table creating append the {{ic|ROW_FORMAT}} as seen in the example:<br />
<br />
mysql> create table if not exists products (<br />
-> day date not null,<br />
-> product_id int not null,<br />
-> dimension1 varchar(500) not null,<br />
-> dimension2 varchar(500) not null,<br />
-> unique index unique_index (day, product_id, dimension1, dimension2)<br />
-> ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;<br />
Query OK, 0 rows affected (0.02 sec)<br />
<br />
=== Using a TMPFS for tmpdir ===<br />
<br />
The directory used by MySQL for storing temporary files is named ''tmpdir''. For example, it is used to perform disk based large sorts, as well as for internal and explicit temporary tables.<br />
<br />
Create the directory with appropriate permissions:<br />
<br />
# mkdir -pv /var/lib/mysqltmp<br />
# chown mysql:mysql /var/lib/mysqltmp<br />
<br />
Find the id and gid of the {{ic|mysql}} user and group:<br />
<br />
$ id mysql<br />
uid=27(mysql) gid=27(mysql) groups=27(mysql)<br />
<br />
Add to your {{ic|/etc/fstab}} file.<br />
<br />
tmpfs /var/lib/mysqltmp tmpfs rw,gid=27,uid=27,size=100M,mode=0750,noatime 0 0<br />
<br />
Add to your {{ic|/etc/mysql/my.cnf}} file under the {{ic|mysqld}} group:<br />
<br />
tmpdir = /var/lib/mysqltmp<br />
<br />
Then reboot or ( shutdown mysql, mount the tmpdir, start mysql ).<br />
<br />
=== Time zone tables ===<br />
<br />
Although time zone tables are created during the installation, they are not automatically populated. They need to be populated if you are planning on using CONVERT_TZ() in SQL queries.<br />
<br />
To populate the time zone tables with all the time zones:<br />
<br />
$ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql<br />
<br />
Optionally, you may populate the table with specific time zone files:<br />
<br />
$ mysql_tzinfo_to_sql <timezone_file> <timezone_name> | mysql -u root -p mysql<br />
<br />
== Database maintenance ==<br />
<br />
=== Upgrade databases on major releases ===<br />
<br />
Upon a major version release of {{Pkg|mariadb}} (for example mariadb-10.1.10-1 to mariadb-10.1.18-1), it is wise to upgrade databases:<br />
<br />
$ mysql_upgrade -u root -p<br />
<br />
To upgrade from 10.1.x to 10.3.x:<br />
<br />
* keep the 10.1.x database daemon running<br />
* upgrade the package<br />
* run {{ic|mysql_upgrade}} (from the new package version) against the old still-running daemon. This will produce some error messages; however, the upgrade will succeed.<br />
* restart the daemon, so the 10.3.x daemon runs.<br />
<br />
Alternatively, stop the (old) daemon, run the (new) daemon in safe mode, run {{ic|mysql_upgrade}} against that, and then start the (new) daemon as described below in [[#Unable to run mysql upgrade because MySQL cannot start|troubleshooting]].<br />
<br />
=== Checking, optimizing and repairing databases ===<br />
<br />
{{Pkg|mariadb}} ships with {{ic|mysqlcheck}} which can be used to check, repair, and optimize tables within databases from the shell. See the mysqlcheck man page for more. Several command tasks are shown:<br />
<br />
To check all tables in all databases:<br />
<br />
$ mysqlcheck --all-databases -u root -p -c<br />
<br />
To analyze all tables in all databases:<br />
<br />
$ mysqlcheck --all-databases -u root -p -a<br />
<br />
To repair all tables in all databases:<br />
<br />
$ mysqlcheck --all-databases -u root -p -r<br />
<br />
To optimize all tables in all databases:<br />
<br />
$ mysqlcheck --all-databases -u root -p -o<br />
<br />
== Backup ==<br />
<br />
There are various [https://mariadb.com/kb/en/mariadb/documentation/backing-up-and-restoring/ tools and strategies] to back up your databases.<br />
<br />
If you are using the default InnoDB storage engine, a [https://mariadb.com/kb/en/mariadb/documentation/clients-and-utilities/backup-restore-and-import/mysqldump/#examples suggested] way of backing up all your bases online while provisioning for [https://dev.mysql.com/doc/refman/5.6/en/password-security-user.html point-in-time recovery] (also known as “roll-forward,” when you need to restore an old backup and replay the changes that happened since that backup) is to execute the following command:<br />
<br />
$ mysqldump --single-transaction --flush-logs --master-data=2 --all-databases -u root -p > all_databases.sql<br />
<br />
This will prompt for '''MariaDB's''' root user's password, which was defined during database [[#Configuration]].<br />
<br />
Specifying the password on the command line is [https://dev.mysql.com/doc/refman/5.6/en/password-security-user.html strongly discouraged], as it exposes it to discovery by other users through the use of {{ic|ps aux}} or other techniques. Instead, the aforementioned command will prompt for the specified user's password, concealing it away.<br />
<br />
=== Compression ===<br />
<br />
As SQL tables can get pretty large, it is recommended to pipe the output of the aforementioned command in a compression utility like {{Pkg|gzip}}:<br />
<br />
$ mysqldump --single-transaction --flush-logs --master-data=2 --all-databases -u root -p | gzip > all_databases.sql.gz<br />
<br />
Decompressing the backup thus created and reloading it in the server is achieved by doing:<br />
<br />
$ zcat all_databases.sql.gz | mysql -u root -p<br />
<br />
This will recreate and repopulate all the databases previously backed up (see [https://stackoverflow.com/questions/23180963/restore-all-mysql-database-from-a-all-database-sql-gz-file#comment35453351_23180977 this] or [http://www.linuxquestions.org/questions/linux-server-73/how-to-restore-mysqldump-all-databases-backup-892922/ this]).<br />
<br />
=== Non-interactive ===<br />
<br />
If you want to setup non-interactive backup script for use in [[cron]] jobs or [[Systemd/cron_functionality|systemd timers]], see [https://dev.mysql.com/doc/refman/5.6/en/option-files.html option files] and [https://stackoverflow.com/a/9293090 this illustration] for ''mysqldump''.<br />
<br />
Basically you should add the following section to the relevant [[#Configuration_files|configuration file]]:<br />
<br />
{{bc|1=<br />
[mysqldump]<br />
user=mysqluser<br />
password=secret<br />
}}<br />
<br />
Mentioning a user here is optional, but doing so will free you from having to mention it on the command line. If you want to set this for all tools, including {{ic|mysql}}, use the {{ic|[client]}} group.<br />
<br />
==== Example script ====<br />
<br />
The database can be dumped to a file for easy backup. The following shell script will do this for you, creating a {{ic|db_backup.gz}} file in the same directory as the script, containing your database dump:<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
<br />
THISDIR=$(dirname $(readlink -f "$0"))<br />
<br />
mysqldump --single-transaction --flush-logs --master-data=2 --all-databases \<br />
| gzip > $THISDIR/db_backup.gz<br />
echo 'purge master logs before date_sub(now(), interval 7 day);' | mysql<br />
</nowiki>}}<br />
<br />
See also the official {{ic|mysqldump}} page in the [http://dev.mysql.com/doc/refman/5.6/en/mysqldump.html MySQL] and [https://mariadb.com/kb/en/mariadb/documentation/clients-and-utilities/backup-restore-and-import/mysqldump MariaDB] manuals.<br />
<br />
=== Holland Backup ===<br />
<br />
A python-based software package named [http://hollandbackup.org/ Holland Backup] is available in [[AUR]] to automate all of the backup work. It supports direct mysqldump, LVM snapshots to tar files (mysqllvm), LVM snapshots with mysqldump (mysqldump-lvm), and {{pkg|xtrabackup}} methods to extract the data. The Holland framework supports a multitude of options and is highly configurable to address almost any backup situation.<br />
<br />
The main {{AUR|holland}} and {{AUR|holland-common}} packages provide the core framework; one of the sub-packages ({{AUR|holland-mysqldump}}, {{AUR|holland-mysqllvm}} and/or {{AUR|holland-xtrabackup}} must be installed for full operation. Example configurations for each method are in the {{ic|/usr/share/doc/holland/examples/}} directory and can be copied to {{ic|/etc/holland/backupsets/}}, as well as using the {{ic|holland mk-config}} command to generate a base config for a named provider.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Unable to run mysql_upgrade because MySQL cannot start ===<br />
<br />
Try run MySQL in safemode:<br />
<br />
# mysqld_safe --datadir=/var/lib/mysql/<br />
<br />
And then run:<br />
<br />
# mysql_upgrade -u root -p<br />
<br />
=== Reset the root password ===<br />
<br />
{{Out of date|This procedure does not work in MariaDB 1.4, and there are different instructions in [https://mariadb.com/kb/en/library/authentication-from-mariadb-104/#cookbook MariaDB KnowledgeBase]}}<br />
<br />
Stop {{ic|mariadb.service}}. Issue the following command:<br />
<br />
# mysqld_safe --skip-grant-tables &<br />
<br />
Connect to the mysql server. Issue the following command:<br />
<br />
# mysql -u root<br />
<br />
Change root password:<br />
<br />
mysql> use mysql;<br />
mysql> UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';<br />
mysql> FLUSH PRIVILEGES;<br />
mysql> exit<br />
<br />
Start {{ic|mariadb.service}}.<br />
<br />
=== Check and repair all tables ===<br />
<br />
Check and auto repair all tables in all databases, [http://dev.mysql.com/doc/refman/5.7/en/mysqlcheck.html see more]:<br />
<br />
# mysqlcheck -A --auto-repair -u root -p<br />
<br />
=== Optimize all tables ===<br />
<br />
Forcefully optimize all tables, automatically fixing table errors that may come up.<br />
<br />
# mysqlcheck -A --auto-repair -f -o -u root -p<br />
<br />
=== OS error 22 when running on ZFS ===<br />
<br />
If using MySQL databases on [[ZFS]], the error '''InnoDB: Operating system error number 22 in a file operation''' may occur.<br />
<br />
A workaround is to disable ''aio_writes'' in {{ic|/etc/mysql/my.cnf}}:<br />
<br />
{{hc|/etc/mysql/my.cnf|2=<br />
[mysqld]<br />
innodb_use_native_aio = 0}}<br />
<br />
=== Cannot login through CLI, but phpmyadmin works well ===<br />
<br />
This may happen if you are using a long (>70-75) password. As for 5.5.36, for some reason, mysql CLI cannot handle that much characters in readline mode. So, if you are planning to use the recommended password input mode:<br />
<br />
$ mysql -u <user> -p<br />
Password:<br />
<br />
Consider changing the password to smaller one.<br />
<br />
{{Note|You still can log in by specifying the password as an argument to mysql command.<br />
<br />
{{Warning|This behavior is considered dangerous, because your password might leak, for example, to the logs. Use it only in case of emergency and do not forget to change password right afterwards.}}<br />
<br />
$ mysql -u <user> -p"<some-very-strong-password>"<br />
<br />
}}<br />
<br />
=== MySQL binary logs are taking up huge disk space ===<br />
<br />
By default, mysqld creates binary log files in {{ic|/var/lib/mysql}}. This is useful for replication master server or data recovery. But these binary logs can eat up your disk space. If you do not plan to use replication or data recovery features, you may disable binary logging by commenting out these lines in {{ic|/etc/mysql/my.cnf}}:<br />
<br />
#log-bin=mysql-bin<br />
#binlog_format=mixed<br />
<br />
Or you could limit the size of the logfile like this:<br />
<br />
expire_logs_days = 10<br />
max_binlog_size = 100M<br />
<br />
Alternatively, you can purge some binary logs in {{ic|/var/lib/mysql}} to free up disk space with this command:<br />
<br />
# mysql -u root -p"PASSWORD" -e "PURGE BINARY LOGS TO 'mysql-bin.0000xx';"<br />
<br />
{{Warning|This may decrease the chances of successful data recovery when trying to repair database tables (i.e. on database corruption).}}<br />
<br />
=== OpenRC fails to start MySQL ===<br />
<br />
To use MySQL with [[OpenRC]] you need to add the following lines to the {{ic|[mysqld]}} section in the MySQL config file, located at {{ic|/etc/mysql/my.cnf}}.<br />
<br />
user = mysql<br />
basedir = /usr<br />
datadir = /var/lib/mysql<br />
pid-file = /run/mysqld/mysql.pid<br />
<br />
You should now be able to start MySQL using:<br />
<br />
# rc-service mysql start<br />
<br />
=== Specified key was too long ===<br />
<br />
See [[#Increase character limit]].<br />
<br />
=== Changed limits warning on max_open_files/table_open_cache ===<br />
<br />
Increase the number of file descriptors by creating a [[Systemd#Drop-in_files|systemd drop-in]], e.g.:<br />
<br />
{{hc|/etc/systemd/system/mysqld.service.d/limit_nofile.conf|2=<br />
[Service]<br />
LimitNOFILE=8192<br />
}}<br />
<br />
== See also ==<br />
<br />
* [https://mariadb.com/ MariaDB Official Website]<br />
* [https://mariadb.com/kb/en/ MariaDB knowledge Base]<br />
* [https://www.askapache.com/mysql/performance-tuning-mysql/ MySQL Performance Tuning Scripts and Know-How]</div>Aleksozolinshttps://wiki.archlinux.org/index.php?title=Steam&diff=564608Steam2019-01-25T03:12:29Z<p>Aleksozolins: Added a comma after "thus."</p>
<hr />
<div>[[Category:Gaming]]<br />
[[ja:Steam]]<br />
[[ru:Steam]]<br />
[[zh-hans:Steam]]<br />
{{Related articles start}}<br />
{{Related|Steam/Troubleshooting}}<br />
{{Related|Steam/Game-specific troubleshooting}}<br />
{{Related|Gaming}}<br />
{{Related|Gamepad}}<br />
{{Related|List of games}}<br />
{{Related articles end}}<br />
[http://store.steampowered.com/about/ Steam] is a popular game distribution platform by Valve.<br />
<br />
{{Note|Steam for Linux only supports Ubuntu LTS.[https://support.steampowered.com/kb_article.php?ref&#61;1504-QHXN-8366] Thus, do not turn to Valve for support for issues with Steam on Arch Linux.}}<br />
<br />
Registration time: 03:01, 25 January 2019 <br />
== Installation ==<br />
<br />
Enable the [[multilib]] repository and [[install]] the {{Pkg|steam}} package.<br />
<br />
The following requirements must be fulfilled in order to run Steam on Arch Linux:<br />
<br />
* Installed 32-bit version [[Xorg#Driver installation|OpenGL graphics driver]].<br />
* Generated [[Locale#Generating locales|en_US.UTF-8]] locale, preventing invalid pointer error.<br />
* The GUI heavily uses the Arial font. See [[Microsoft fonts]]. An alternative is to use {{Pkg|ttf-liberation}} or [[Steam/Troubleshooting#Text is corrupt or missing|fonts provided by Steam]] instead.<br />
* [[Install]] {{Pkg|wqy-zenhei}} to add support for Asian languages.<br />
<br />
=== SteamCMD ===<br />
<br />
[[Install]] {{AUR|steamcmd}} for the command-line version of the [https://developer.valvesoftware.com/wiki/SteamCMD Steam].<br />
<br />
{{Note|This package installs files under ''root'', so you must run SteamCMD as ''root''.}}<br />
<br />
=== Alternative Flatpak installation ===<br />
<br />
Steam can also be installed with [[Flatpak]] as {{ic|com.valvesoftware.Steam}} from [https://flathub.org/ Flathub]. The easiest way to install it for the current user is by using the Flathub repo and flatpak command:<br />
<br />
flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo<br />
flatpak --user install flathub com.valvesoftware.Steam<br />
flatpak run com.valvesoftware.Steam<br />
<br />
The Flatpak application currently does not support themes. Also you currently can't run games via {{ic|optirun}}/{{ic|primusrun}}, see [https://github.com/flatpak/flatpak/issues/869 Issue#869] for more details.<br />
<br />
By default Steam won't be able to access your home directory, you can run the following command to allow it, so that it behaves like on Ubuntu or SteamOS:<br />
<br />
flatpak override com.valvesoftware.Steam --filesystem=$HOME<br />
<br />
== Directory structure ==<br />
<br />
The default Steam install location is {{ic|~/.local/share/Steam}}. If Steam cannot find it, it will prompt you to reinstall it or select the new location. This article uses the {{ic|~/.steam/root}} symlink to refer to the install location.<br />
<br />
=== Library folders ===<br />
<br />
Every Steam application has a unique AppID, which you can find out by looking at its [http://store.steampowered.com/ Steam Store] page path.<br />
<br />
Steam installs games into a directory under {{ic|''LIBRARY''/steamapps/common/}}. {{ic|''LIBRARY''}} normally is <br />
{{ic|~/.steam/root}} but you can also have multiple library folders (''Steam > Settings > Downloads > Steam Library Folders'').<br />
<br />
In order for Steam to recognize a game it needs to have an<br />
{{ic|appmanifest_''AppId''.acf}} file in {{ic|''LIBRARY''/steamapps/}}. The appmanifest file uses the <br />
[https://developer.valvesoftware.com/wiki/KeyValues KeyValues] format and its {{ic|installdir}} property<br />
determines the game directory name.<br />
<br />
== Usage ==<br />
<br />
steam [ -options ] [ steam:// URL ]<br />
<br />
For the available command-line options see the [https://developer.valvesoftware.com/wiki/Command_Line_Options#Steam_.28Windows.29 Command Line Options article on the Valve Developer Wiki].<br />
<br />
Steam also accepts an optional Steam URL, see the [https://developer.valvesoftware.com/wiki/Steam_browser_protocol Steam browser procotol].<br />
<br />
== Launch options ==<br />
<br />
When you launch a Steam game, Steam executes its '''launch command''' in a [[Bash]] shell.<br />
To let you alter the launch command Steam provides '''launch options''',<br />
which can be set for a game by right-clicking on it in your library, selecting Properties and clicking on ''Set Launch Options''.<br />
<br />
By default Steam simply appends your option string to the launch command. To set environment variables or<br />
pass the launch command as an argument to another command you can use the {{ic|%command%}} substitute.<br />
<br />
=== Examples ===<br />
<br />
* only arguments: {{ic|-foo}}<br />
* environment variables: {{ic|1=FOO=bar BAZ=bar %command% -baz}}<br />
* completely different command: {{ic|othercommand # %command%}}<br />
<br />
== Tips and tricks ==<br />
<br />
=== Big Picture Mode without a window manager ===<br />
<br />
To start Steam in Big Picture Mode from a [[Display manager]], you can either:<br />
<br />
* Install {{AUR|steamos-compositor}} <br />
* Manually add a Steam entry (''but you lose the steam compositor advantages: mainly you '''can't''' control Big Picture mode with keyboard or gamepad''):<br />
<br />
create a {{ic|/usr/share/xsessions/steam-big-picture.desktop}} file with the following contents: <br />
<br />
{{hc|/usr/share/xsessions/steam-big-picture.desktop|<nowiki><br />
[Desktop Entry]<br />
Name=Steam Big Picture Mode<br />
Comment=Start Steam in Big Picture Mode<br />
Exec=/usr/bin/steam -bigpicture<br />
TryExec=/usr/bin/steam<br />
Icon=<br />
Type=Application</nowiki>}}<br />
<br />
=== Steam skins ===<br />
<br />
The Steam interface can be customized using skins. Skins can overwrite interface-specific files in {{ic|~/.steam/root}}.<br />
<br />
To install a skin:<br />
<br />
# Place its directory in {{ic|~/.steam/root/skins}}.<br />
# Open ''Steam > Settings > Interface'' and select it.<br />
# Restart Steam.<br />
<br />
An extensive list of skins can be found in [http://forums.steampowered.com/forums/showthread.php?t=1161035 this Steam forums post].<br />
<br />
{{Note|Using an outdated skin may cause visual errors.}}<br />
<br />
==== Creating skins ====<br />
<br />
Nearly all Steam styles are defined in {{ic|~/.steam/root/resource/styles/steam.styles}} (the file is over 3,500 lines long). For a skin to be recognized it needs its own {{ic|resource/styles/steam.styles}}.<br />
When a Steam update changes the official {{ic|steam.styles}} your skin may become outdated, potentially resulting in visual errors.<br />
<br />
See {{ic|~/.steam/root/skins/skins_readme.txt}} for a primer on how to create skins.<br />
<br />
=== Changing the Steam notification position ===<br />
<br />
The default Steam notification position is bottom right.<br />
<br />
You can change the Steam notification position by altering {{ic|Notifications.PanelPosition}} in<br />
<br />
* {{ic|resource/styles/steam.styles}} for desktop notifications, and<br />
* {{ic|resource/styles/gameoverlay.styles}} for in-game notifications<br />
<br />
Both files are overwritten by Steam on startup and {{ic|steam.styles}} is only read on startup.<br />
<br />
{{Note|Some games do not respect the setting in {{ic|gameoverlay.styles}} e.g. XCOM: Enemy Unknown.}}<br />
<br />
==== Use a skin ====<br />
<br />
You can create a skin to change the notification position to your liking. For example to change the position to top right:<br />
<br />
$ cd ~/.steam/root/skins<br />
$ mkdir -p Top-Right/resource<br />
$ cp -r ~/.steam/root/resource/styles Top-Right/resource<br />
$ sed -i '/Notifications.PanelPosition/ s/"[A-Za-z]*"/"TopRight"/' Top-Right/resource/styles/*<br />
<br />
==== Live patching ====<br />
<br />
{{ic|gameoverlay.styles}} can be overwritten while Steam is running, allowing you to have game-specific notification positions.<br />
<br />
{{hc|~/.steam/notifpos.sh|<br />
sed -i "/Notifications.PanelPosition/ s/\"[A-Za-z]*\"/\"$1\"/" ~/.steam/root/resource/styles/gameoverlay.styles<br />
}}<br />
<br />
And the [[#Launch options]] should be something like:<br />
<br />
~/.steam/notifpos.sh TopLeft && %command%<br />
<br />
=== In-home streaming ===<br />
<br />
Steam has built-in support for [http://store.steampowered.com/streaming/ in-home streaming].<br />
<br />
See [https://steamcommunity.com/sharedfiles/filedetails/?id=680514371 this Steam Community guide] on how to setup a headless in-home streaming server on Linux.<br />
<br />
=== Steam Controller ===<br />
<br />
Normally a Steam controller requires the use of the Steam-overlay. In non-Steam native Linux games however the overlay may not be practical. For that, while the Steam client is running it will maintain a "desktop configuration". With your Steam controller, configure the desktop configuration for it as a generic XBOX controller. As long as the Steam client is running you can then use your Steam controller in other games, such as GOG games, as an XBOX controller. Make sure to select your type of controller to map to in "general controller settings".<br />
<br />
== Troubleshooting ==<br />
<br />
See [[Steam/Troubleshooting]].<br />
<br />
== See also ==<br />
<br />
* [https://wiki.gentoo.org/wiki/Steam Gentoo Wiki article]<br />
* [https://pcgamingwiki.com/wiki/The_Big_List_of_DRM-Free_Games_on_Steam The Big List of DRM-Free Games on Steam] at PCGamingWiki<br />
* [http://steam.wikia.com/wiki/List_of_DRM-free_games List of DRM-free games] at Wikia<br />
* [http://store.steampowered.com/browse/linux Steam Linux store]<br />
* [https://github.com/ValveSoftware/Proton/ Proton] Compatibility tool for Steam Play based on Wine and additional components.</div>Aleksozolins