Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have created following script in: /home/user/bin/lockscreen.sh
Quote:
Originally Posted by zetrotrack000
Code:
I want to execute this script at cinnamon login and for this purpose I have created file: /home/user/.config/autostart/lockscreen.sh
Recheck where you put your script file. The desktop entry says one thing matching your first statement, but meanwhile there is this contradictory statement as to where the script file is actually located.
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.
Which show that file name is correct. However, still I have changed the filename to "autologin" and amend the script accordingly, but it's not working.
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.
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.
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.
Script permission wasn't 755, so I changed it to 755 but still not working. Regarding .desktop files, there are several files in ~/.config/autostart with different permissions:
Code:
-rwxr--r-- 1 user 1000 11065 Dec 24 20:16 firefox.desktop
-rwxr--r-- 1 user users 228 Dec 26 20:05 lockscreen.desktop
-rw-r--r-- 1 user users 15045 Dec 26 20:18 nemo.desktop
-rw-r--r-- 1 user users 14833 Dec 26 16:45 org.gnome.Terminal.desktop
-rw-r--r-- 1 user users 8001 Dec 26 16:45 print-applet.desktop
-rw-r--r-- 1 user users 5005 Dec 26 16:45 pulseaudio.desktop
-rwxr--r-- 1 user 1000 6961 Dec 24 20:16 thunderbird.desktop
-rwxrw-r-- 1 user 1000 610 Dec 24 20:16 whatsie.desktop
All run at startup, except lockscreen.desktop.
Regarding log, I don't know that how can I add log to a script.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.