4

So I'm trying to create a desktop icon for an application, and I dragged it from the top-left menu (I think it's called Dash or something). I clicked on it and it says it is untrusted and refuse to execute it.

I found out that I have go to Permission and check the checkbox saying "Allow executing file as program". However, when I open up the Permission dialog it says "I am not the owner, therefore I cannot change those settings." Everything is disabled and I can't check it.

enter image description here

Why is this happening and how do I "make myself the owner"?

3 Answers 3

5
  • Open a terminal with Ctrl + Alt +T then run this command:

    cd ~/Desktop
    sudo chmod +x sublime_text.desktop
    

    Change Desktop to whatever your desktop is called in your language. chmod is a command line command to change permissions, +x make it executable

  • or instead you can run:

    cd ~/Desktop
    sudo chown yourusername sublime_text.desktop
    

    chown is command line command to change file owner

3
  • Thanks this works. The shortcut becomes executable when set it via command line, but when I try to do it to change file owner it doesn't work Dec 10, 2013 at 2:01
  • you have changed "yourusername" with your username on the system. try: sudo chown yourusername:yourgroupname sublime_text.desktop to change the group too (group name is same as username, most desktop linux)
    – user.dz
    Dec 10, 2013 at 2:07
  • Yes I did change it. I figured it out, I have to re-login to see the effect. It worked, thank you so much! Dec 10, 2013 at 2:18
2
  1. Open a terminal with ctrl+alt+T and type in the terminal: gksu nautilus

  2. Enter your password when prompted and your file browser should emerge.

    This will make you root until you close the file browsing window, which is necessary to edit the file (as you can see that only "root" has permission.

  3. In here navigate to the file you want to edit. Now you can set the file to execute as program.

Be advised to use gksu with extreme caution. Everything you delete will be deleted permanently. Making changes to the wrong files is really easy this way and could leave you with an unusable system!

This is AFAIK about getting ownership of a file that belongs to Root

5
  • It does open up the file browser but when I navigate to Desktop there's nothing there. Dec 10, 2013 at 1:59
  • Yeah, Because you run it as user root. So the one you see empty is /root/Desktop/. Your user should be in /home/yourusername/Desktop/.
    – user.dz
    Dec 10, 2013 at 10:49
  • Is my answer not usefull at all? I'd like to know so don't hesitate to downvote if it didn't help.
    – Nkciy84
    Dec 10, 2013 at 11:02
  • 1
    It should work, That's why I think @Derek朕會功夫 may missed the folder as default for root is /root/Desktop.
    – user.dz
    Dec 10, 2013 at 13:17
  • 1
    @Nkciy84 I believe that's the problem, sorry for the slow response, and thanks for solving my problem. Dec 10, 2013 at 17:34
0

Figured out an answer:

  • Open Terminal
  • Type sudo -H nautilus
  • Ignore the messages, go to the opened Nautilus
  • Open the Desktop folder
  • Find the icon for your "untrusted program"
  • Right click the icon
  • Select Properties
  • Click the Permissions tab
  • Check the box by Allow executing file as program
  • Reboot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .