While I wouldn't recommend running the IDE as the
root user, you could create (or modify) the
.desktop file for the app and create a custom launcher script that uses
For example, I have
$HOME/.local/share/applications/jetbrains-studio.desktop with the following content:
Comment=Develop with pleasure!
You can modify the
Exec line so that it points to a script of your own making, say,
This script could do something like this:
sudo /home/ray/.android-studio/bin/studio.sh %f
.desktop file under the directory mentioned above, you should also get the app to show up in the launcher, as shown in the example below, which is of my laptop using
This is a better long-term solution because:
- It's a one-time setup;
- You don't need to run terminal commands every time (e.g.
- You don't need to launch it from the terminal every time (e.g. running the
- You don't need to modify code in