toddak
Posts: 47
Joined: Wed Dec 30, 2015 10:10 pm
Location: Melbourne, Australia.

Over ruling a 'Permission Denied'

Wed Aug 10, 2016 11:24 am

I'm just trying to edit the following file:

/etc/xdg/lxsesion/LXDE/autostart

But in terminal I get a "bash: /etc/xdg/lxsesion/LXDE/autostart: Permission denied" message.

I'm guessing there is something obvious I'm doing wrong?
rpi 2 model B, running raspbian jessie.

User avatar
RaTTuS
Posts: 10491
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Over ruling a 'Permission Denied'

Wed Aug 10, 2016 11:27 am

ls -l /etc/xdg/lxsesion/LXDE/autostart
will show you how owns this file
you may want to
sudo nano /etc/xdg/lxsesion/LXDE/autostart
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

toddak
Posts: 47
Joined: Wed Dec 30, 2015 10:10 pm
Location: Melbourne, Australia.

Re: Over ruling a 'Permission Denied'

Wed Aug 10, 2016 11:56 am

RaTTus, many thanks, that works fine.

Think I may be editing the wrong thing though. I'm just trying to get a line of code to kick in after rpi boots into the GUI. Is that the right place to put it?

I'm just trying to run: xdg-open /home/pi/Desktop/still/stillhave_15_still9del.pd
In order to have a file open in PD when it boots up. Sadly, that didn't seem to do it.
rpi 2 model B, running raspbian jessie.

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Over ruling a 'Permission Denied'

Wed Aug 10, 2016 11:59 am

toddak wrote:I'm just trying to edit the following file:

/etc/xdg/lxsesion/LXDE/autostart

But in terminal I get a "bash: /etc/xdg/lxsesion/LXDE/autostart: Permission denied" message.

I'm guessing there is something obvious I'm doing wrong?
If you're running Jessie, that won't work anyway. You need to edit the users autostart file, rather than the global one. And since that file belongs to the user you won't have any permission problems.
Add programs/scripts you want to autostart using:

Code: Select all

nano ~/.config/lxsession/LXDE-pi/autostart

User avatar
RaTTuS
Posts: 10491
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Over ruling a 'Permission Denied'

Wed Aug 10, 2016 12:00 pm

right I'm not sure what the current method is to get x to autostart a thing
possibly - and I'm not sure
nano ~/.config/lxsession/LXDE-pi/autostart

I don't x running on my pi's currently
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

toddak
Posts: 47
Joined: Wed Dec 30, 2015 10:10 pm
Location: Melbourne, Australia.

Re: Over ruling a 'Permission Denied'

Thu Aug 11, 2016 11:31 am

JimmyN: Killer, thanks for that. Worked perfectly!
rpi 2 model B, running raspbian jessie.

User avatar
nl3prc
Posts: 160
Joined: Sun Jul 24, 2016 12:39 pm
Location: Den Helder the netherlands

Re: Over ruling a 'Permission Denied'

Thu Aug 11, 2016 4:04 pm

Just loggin with the root passwd
First chance the root passwd
sudo passwd root
Then on your pi account type su - in the terminal
Then you are in the root account and can edit any files

Return to “Beginners”