If you have AnyDesk installed, it creates numerous special files in the /tmp
directory with prefixes like ad_mailbox
and ad_connect_queue
.
While AnyDesk is running, attempting to use a file upload button in a web browser and selecting a file from the /tmp
directory can cause the browser to freeze. This issue seems to be related to the file picker struggling to fetch the /tmp
directory’s contents.
Unfortunately, AnyDesk does not provide an option to change the temporary directory via its GUI settings or by setting a common environment variable like TMPDIR
.
However, you can modify the /usr/bin/anydesk
binary to point /tmp
to a different location. Since the binary contains only one occurrence of /tmp
, and the replacement must have the same number of characters, you can create an alternative directory (e.g., /any
) and update the binary accordingly. This simple modification can help avoid these persistent issues.
sudo mkdir /any
sudo service anydesk stop
sudo perl -pi -e 's#/tmp#/any#g' /usr/bin/anydesk
sudo service anydesk start