TL, DR: I want to be able to launch a GUI application with root priviliges via double clicking a .desktop file, and by preserving the good(relative to the sudo way) looking non-sudo way theme.

I have looked related questions/answers in here, however, I cannot say that I understand the situation and found a solution. Either they were not either well structured and explatory, or I just did not get them. OR most of them were mentioning gksu, however, as far as I understood, gksu has been removed from the repositories. I cannot install it.

Screenshot can be found as attached at the end of the question.

I am aware it will be a messy question, please pardon me.

Now, I have Quartus program installed on my computer, and I can run it via(LEFT SIDE OF THE SCREENSHOT):

/home/muyustan/altera/13.1/quartus/bin/quartus --64bit

I also had created a .desktop file as follows:

[Desktop Entry]
Name=Quartus II 13.1 (64-bit) Web Edition
Comment=Quartus II 13.1 (64-bit)
Exec=/home/muyustan/altera/13.1/quartus/bin/quartus --64bit

So far so good, I can run it via desktop entry, no terminal window pops up and halts there(annoying enough). Everything is fine.

However, I figured out that in a part of the Quartus app, it has to open(call) another program(Modelsim) and save some files to some places etc. The problem is, if I don't launch the app with a sudo in front of it(RIGHT SIDE OF THE SCREENSHOT), I get some errors stating permission denied and things just don't get working.

So, I can solve this by changing my launching habbit,

from -- double click on the desktop entry

to -- Ctrl+Alt+T -> sudo [executablePath] -> enter password

Now, clearly I won't want this because of two main reasons.

  1. It takes longer time.
  2. That terminal stays there as long as the application is open.

And right at this point a 3rd(bonus) reason pops up, as you may or may not have noticed from the screenshots, launching with sudo makes the GUI theme looking like, well, Windows XP style... I haven't chosen/changed any theme when I first installed Quartus or so, by the way.

So, I hope I made my point clear.

Thanks in advance.

enter image description here

Updates to the question

After someone's request in the comments, see the error I am getting in the called(launched from inside of Quartus) application, Modelsim:

do temp1_run_msim_rtl_verilog.do 
# if {[file exists rtl_work]} {
#   vdel -lib rtl_work -all
# }
# ** Error: (vdel-19) Failed to access library 'rtl_work' at "/home/muyustan/altera/13.1/temp1/simulation/qsim/rtl_work".
# Permission denied. (errno = EACCES)
# ** Error: /home/muyustan/altera/13.1/modelsim_ase/linux/vdel failed.
# Error in macro ./temp1_run_msim_rtl_verilog.do line 4
# /home/muyustan/altera/13.1/modelsim_ase/linux/vdel failed.
#     while executing
# "vdel -lib rtl_work -all"
#     invoked from within
# "if {[file exists rtl_work]} {
#   vdel -lib rtl_work -all
# }"
  • Could you add the error messages you get? probably worth fixing them then running such GUI app with a root power.
    – user.dz
    Apr 15, 2020 at 15:19
  • @user.dz see my update please
    – muyustan
    Apr 15, 2020 at 15:22
  • I take it this is Windows software you are running in WINE or a VM? Not sure why it needs root access.
    – Syd
    Apr 15, 2020 at 15:46
  • @Syd I did not say anything about wine or VM :confused:
    – muyustan
    Apr 15, 2020 at 15:48
  • From what I can find (and I might be wrong) Quartus is a windows only program.
    – Syd
    Apr 15, 2020 at 15:53

1 Answer 1


User got this error message:

# ** Error: (vdel-19) Failed to access library 'rtl_work' at "/home/muyustan/altera/13.1/temp1/simulation/qsim/rtl_work".
# Permission denied. (errno = EACCES)

From the use of sudo, I expected some folders/files were created with root privileges level.

  1. We generated listing for whole tree in "altera" folder to verify ownership and permissions. Using:

    find /home/muyustan/altera -type d -exec stat -c '%A %G %U %n' {} \; > log.txt
  2. Look for that folder temp1 or the user/group root, as you could see there are folders owned by root

    drwxrwxr-x muyustan muyustan /home/muyustan/altera/13.1/temp1/simulation/qsim/work/up_counter
    drwxrwxr-x muyustan muyustan /home/muyustan/altera/13.1/temp1/simulation/qsim/work/prime_detector_4bits_vlg_check_tst
    drwxr-xr-x root root /home/muyustan/altera/13.1/temp1/simulation/qsim/rtl_work
    drwxr-xr-x root root /home/muyustan/altera/13.1/temp1/simulation/qsim/rtl_work/_temp
    drwxr-xr-x root root /home/muyustan/altera/13.1/temp1/simulation/qsim/rtl_work/up_counter_tb
    drwxr-xr-x root root /home/muyustan/altera/13.1/temp1/simulation/qsim/rtl_work/up_counter
    drwxrwxr-x muyustan muyustan /home/muyustan/altera/13.1/temp1/simulation/modelsim
    drwxr-xr-x root root /home/muyustan/altera/13.1/temp1/simulation/modelsim/gate_work
    drwxr-xr-x root root /home/muyustan/altera/13.1/temp1/simulation/modelsim/gate_work/prime_detector_4bits
    drwxr-xr-x root root /home/muyustan/altera/13.1/temp1/simulation/modelsim/gate_work/_temp
    drwxr-xr-x root root /home/muyustan/altera/13.1/temp1/simulation/modelsim/rtl_work
    drwxr-xr-x root root /home/muyustan/altera/13.1/temp1/simulation/modelsim/rtl_work/_temp
    drwxr-xr-x root root /home/muyustan/altera/13.1/temp1/simulation/modelsim/rtl_work/up_counter
    drwxrwxr-x muyustan muyustan /home/muyustan/altera/13.1/temp1/db
    drwxrwxr-x muyustan muyustan /home/muyustan/altera/13.1/temp1/incremental_db
  3. Change the ownership of that altera folder and all child folders and files in it to your user and group.

    sudo chown -R muyustan:muyustan /home/muyustan/altera

Try again running Quartus without sudo

  • yes! exact shot to the point
    – muyustan
    Apr 15, 2020 at 18:01
  • I have sent you some message on chat, it shows you left the room, I don't know if it is permanent or not, so I am typing here to notify you
    – muyustan
    Apr 15, 2020 at 23:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.