mancity
Posts: 58
Joined: Tue Dec 23, 2014 8:18 pm

Autostart file

Thu Jan 22, 2015 9:01 pm

Hi guys,

I'm trying to setup synergy to start with Raspian, but im struggling to get the auto start file to become an executable.

Should the file icon change to look like something other than a notepad if done correctly?

I keep getting permission denied so tried logging in as sudo startx but it still won't work yet...

User avatar
B.Goode
Posts: 10191
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Autostart file

Thu Jan 22, 2015 9:48 pm

There is a tutorial here that might help.

https://learn.adafruit.com/synergy-on-r ... -autostart

In general, I think that initiating the GUI/windowing system as the root user is probably Not A Good Idea.

mancity
Posts: 58
Joined: Tue Dec 23, 2014 8:18 pm

Re: Autostart file

Sat Jan 24, 2015 8:00 am

Im following a guide already in a book (21 Brilliant Pi Projects) :roll: .

The only thing I cannot do is to get it to work from boot. I have followed a process to create a file named 'autostart' here -

/home/pi/.config/lxsession/LXDE/autostart

And the file contains this - synergyc -n RaspberryPi 192.168.1.79 - and it works if I type that directly into a terminal.

But I don't think the file is actually starting at startup. The guide said put this into a terminal to make is an executable and load at startup -

chmod +x /home/pi/.config/lxsession/LXDE/autostart

I have done this, and it doesn't say anything when you enter the command and the file still just looks like a leafpad file rather than some kind of executable, so I dont think its working?

User avatar
r3d4
Posts: 982
Joined: Sat Jul 30, 2011 8:21 am
Location: ./

Re: Autostart file

Sat Jan 24, 2015 8:08 am

mancity wrote: chmod +x /home/pi/.config/lxsession/LXDE/autostart

I have done this, and it doesn't say anything when you enter the command and the file still just looks like a leafpad file rather than some kind of executable, so I dont think its working?
To see if it worked ( normaly it will do )

try exec ing the file (just tipe in the path )
/home/pi/.config/lxsession/LXDE/autostart

or chk with LS ( some explanation of file permitions / ls output might be use full , search.. ;-)
ls -al /home/pi/.config/lxsession/LXDE/autostart

it might also be use full to include a hashbang for want ever language you write the script in.
Real life is, to most, a long second-best, a perpetual compromise between the ideal and the possible.
-
Meanwhile, the sysadmin who accidentally nuked the data reckons "its best not run anything more with sudo today"
-
what about spike milligan?

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Autostart file

Sat Jan 24, 2015 8:18 am

Might the problem be that the custom LXDE-pi lxsession config is what is being used instead of the LXDE lxsession config?

You could try modifying the suggested paths:

/home/pi/.config/lxsession/LXDE-pi/autostart

chmod +x /home/pi/.config/lxsession/LXDE-pi/autostart

mancity
Posts: 58
Joined: Tue Dec 23, 2014 8:18 pm

Re: Autostart file

Sat Jan 24, 2015 8:54 am

ktb wrote:Might the problem be that the custom LXDE-pi lxsession config is what is being used instead of the LXDE lxsession config?

You could try modifying the suggested paths:

/home/pi/.config/lxsession/LXDE-pi/autostart

chmod +x /home/pi/.config/lxsession/LXDE-pi/autostart
This worked! Mint

Thank you.

PS - This book is just plain wrong unless its out of date now because of the newer looking Raspian OS???

User avatar
B.Goode
Posts: 10191
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Autostart file

Sat Jan 24, 2015 10:08 am

The author of that book is a member of these forums.

WilliamNPI
Posts: 1
Joined: Mon Apr 08, 2019 8:18 pm

Autostart help

Mon Apr 08, 2019 8:28 pm

Pretty bad at coding but try to learn.

Want to make the system know when chrome has started and make a command line after chrome has started. Have managed to get chrome start in a computer bootup but can’t manage to do make it commands after its boot. How do I do that? Any genius coders out here? :)

Something like
Chrome started= wait 10 seconds then Tab, Tab then Type Username:William then Password: 12345

Return to “Beginners”