Follow the steps as root user to install Anydesk from the repository.
Step 1. Add Anydesk repository key to the Trusted software providers list.
wget -qO - -GPG-KEY apt-key add -
Step 2. Now add the repository to the sources list.
Below command will put the repository entry in a new file under /etc/apt/sources.list.d/ directory.
* Execute as single command
echo "deb all main" > /etc/apt/sources.list.d/anydesk-stable.list
Step 3. Update the apt cache by running below command.
apt update
Step 4. Now install the software. This command will download and install Anydesk from repository along with dependencies.
apt install anydesk
Step 5. Finally, You can launch by typing Anydesk in the application launcher.
This method same is similar to previous method. However, we can download the latest software from Anydesk site and install locally.
Step 1. Download the latest Anydesk software from the following link using web browser.
[OR]
Use the following command to download latest software.
* Execute as single command
wget $(wget -q -O anydesk && grep -Eo "(httphttps)://[a-zA-Z0-9./?=_-]*amd64.deb" anydesk head -1 ) && rm anydesk
Step 2. After that go to the downloaded directory and check the file.
user@krizna:/Downloads$ ls -l
anydesk_5.5.5-1_amd64.debGive execute permission so that we can install the software.
chmod +x anydesk_5.5.5-1_amd64.deb
Step 3. Now install the downloaded software.
This command will install the downloaded package. In addition, It will install the dependencies needed for the software.
sudo apt install ./anydesk_5.5.5-1_amd64.deb
Step 4. Finally, You can launch the application by typing Anydesk in the application launcher.
See also
How to setup VNC server on centos 8 / RHEL 8
How to install TeamViewer on ubuntu 20.04
Yes you are not supposed to be able to use these commands with sudo plainly like that, they will not have the dbus session of your user available, nor the X environment of your users xorg server. In case this is actually relevant, you should not try to sledgehammer problems by prepending sudo to commands willy nilly, that will often not lead to success. Are you trying to run the standard anydesk client as root despite not needing to? Then just don't and this also would explain your issues.
After successfully installing AnyDesk, you can use it on your Ubuntu Linux. You can launch AnyDesk in several ways, depending on your preference. For instance, you can use the terminal, the command line interface (CLI), or the Graphical User Interface (GUI).
AnyDesk can also be accessed using the GUI for those who prefer a more visual approach. This approach allows users to avoid the command line terminal and access the application directly. The sequence of steps to achieve this is as follows:
In this method, we will use the wget and echo command to download the Debian package on our system from the Linux repository. Run the following command-lines on your terminal shell chronologically with root privileges to avoid permission errors.
In the future, you can open that file up in a plain text editor. Text editors include nano (a command-line-based text editor with a very small learning curve) and Pluma (the MATE text editor). Both editors should be installed by default. In the future, to open the file in Pluma, you can use the command:
This morning, after returning home from a mini vacation, I decided to run apt update and apt upgrade from the command line just to see whether there had been any updates while I was offline. After issuing the update command, something didn't seem quite right; I was seeing messages along the lines of:
It turns out that I have older configurations for some repositories, artifacts of installation processes from "back in the day," that needed adjustment. Taking my prompt from the warning message, I ran man apt-key at the command line, which provided several interesting bits of information. Near the beginning of the man page:
Ubuntu uses the comprehensive and advanced APT package management tool to install, remove, and upgrade packages in the default Ubuntu repository. As a Linux administrator, you are probably already familiar with the APT package manager and how to use it.
Sometimes, when you install a new package in Ubuntu using the apt command line tool, you will get the following error: