Launch script at cinnamon login
Hi
I have created following script in: /home/user/bin/lockscreen.sh: Code:
#!/bin/bash Code:
[Desktop Entry] Thanks |
Quote:
Quote:
Or, are you saying that you have a .config/autostart file named the same thing as your script. Try not using the same name. Shouldn't be harmful unless both are in your path variable, and they probably are not. But just a possible guess here. |
Kindly check the following results:
Code:
ls /home/user/bin/lockscreen.sh Code:
cat /home/user/.config/autostart/lockscreen.desktop |grep Exec PS: Cinnamon "Startup Application" has an option to test the script and when I click on that option it executes the script properly, confirming that the script and its paths are correct. |
Agree.
At this point I'd try to add logs to various parts of the process and see if they reveal anything. I know you can add logs to the script, however I'd also see if I could add logs to the desktop autostart process, if possible. Also assuming the obvious which are that the lockscreen.desktop owner and permissions are the same as any other .desktop files which do run. Same for the shell script, that it's permissions are at least 755. |
Quote:
Code:
-rwxr--r-- 1 user 1000 11065 Dec 24 20:16 firefox.desktop Regarding log, I don't know that how can I add log to a script. |
1 Attachment(s)
One very strange thing is that when I click on "Run Button" in "Startup Applications" (check attached image), the script runs fine and loads screensaver. Doesn't it prove that the script formation, permission and location, all are correct?
|
Not arguing the point, however it's not behaving as expected. Thus, debug as best as you can.
Me, I'd put in log outputs to a file within the script saying stuff like "Entered", "Successfully ran script", and so forth. And I'd try to figure a way the desktop startup works where I could add debug to it. Perhaps there is a flag which can be used. |
Quote:
Code:
echo "this is a log line" >> /home/xxx/yyy/logfile.txt; |
All times are GMT -5. The time now is 01:09 PM. |