(SOLVED) Script yields "Permission Denied" error

Forum rules
Before you post please read how to get help
Post Reply
User avatar
Larry78723
Level 7
Level 7
Posts: 1545
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

(SOLVED) Script yields "Permission Denied" error

Post by Larry78723 » Sat Nov 02, 2019 10:44 am

I'm using the following script to try and manually hide or show the panel in 19.2 Cinnamon.

Code: Select all

#!/bin/bash
state=$(gsettings get org.cinnamon panels-autohide)
if [ $state = "['1:true']" ]; then
    gsettings set org.cinnamon panels-autohide "['1:false']"
else
    gsettings set org.cinnamon panels-autohide "['1:true']"
fi
I saved the script as panel-autohide.sh in my /home/larry folder and created a custom keyboard shortcut bound to Super x. When I try to use it I get the following as seen in the screenshot.

Image

TIA for any help,
Larry
Last edited by Larry78723 on Sat Nov 02, 2019 11:23 am, edited 1 time in total.
Image

rene
Level 12
Level 12
Posts: 4297
Joined: Sun Mar 27, 2016 6:58 pm

Re: Script yields "Permission Denied" error

Post by rene » Sat Nov 02, 2019 11:14 am

If you (try to) start it as /home/larry/panel-autohide.sh from the shortcut then I expect simply chmod +x ~/panel-autohide.sh. Alternatively, start it as (ba)sh /home/larry/panel-autohide.sh

User avatar
Larry78723
Level 7
Level 7
Posts: 1545
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: Script yields "Permission Denied" error

Post by Larry78723 » Sat Nov 02, 2019 11:22 am

Thanks rene, sh /home/larry/panel-autohide.sh worked.
Image

Post Reply

Return to “Scripts & Bash”