I want to run Arduino IDE as root, because if I run it normally (as a normal user), it won't allow me to upload the code to the Arduino. For now I have circumvented this issue by creating a symlink to the arduino file in my installation directory (for me it is /opt/arduino-1.8.5/arduino) and running it as sudo.
sudo is a command-line tool, you need to use
gksudo instead in this case as this will pop up a dialogue asking for the password.
However, this is probably not what you really want to do as it means the entire IDE is running as root which would be a security issue. What you should do is figure out what needs privileges and add your user to the correct group to enable access.
For example, wireshark/tshark need users should be added to the
wireshark group rather than run as root. Similarly, users who need access to the serial ports should be part of the
dialout group (maybe this is what you need).