Launcher with sudo

Hi everyone,

I’m trying to create an launcher for my Phpstorm software. So in the launcher, I’ve this line : "/home/user/Downloads/PhpStorm-212.4746.100/bin/phpstorm.sh" %f

It works but I need to launch Phpstorm with root. How may I modify this line for use the root privileges ?

Best regards,

Why? It shouldn’t need superuser privileges…

1 Like

Hi. Maybe pkexec will do?
https://man.archlinux.org/man/pkexec.1

Ok, if you trust Phpstorm, then change the application file in this directory.

sudo chown root:root phpstorm.sh

It allows to access your system what it want.

Could you use terminal + bash?

Exec= terminal -e “bash -c ‘sudo -i command’”

Because I’ve some errors when I launch this app without the superuser privileges… Probably because I’m working with symfony and its webserver.

You better find the permission issues you have and adjust, rather than giving an IDE full access to the system (for example, give your user proper rights to write the files you want to edit, adding your user to proper group, or things like that).

1 Like

Which ones?

I can’t erase files and update them (symfony project).

I grasp that you use a local server, what configuration do you use? Wouldn’t this configuration do the job?

Alternatively, a way i think about avoiding requiring superuser privileges would be to simply set your user as the owner of the server’s deployment folder. Or through a symbolic link to that folder.


Also, just ticking that you’re using a user install PhpStorm. Have you tried using the package in AUR instead?

1 Like