You are not logged in.
I have been trying to set up the following configuration. I have bash script in
/usr/local/binwhich I chmod and gave the correct permissions. The script is simple
#!/bin/bash
sleep 15 && conky -c ~/.conky/.conkyrc &
sleep 15 && conky -c ~/.conky/.todoconkyrcThen I created in a system file in
/usr/lib/systemd/systemcalled conky-start
[Unit]
Description = Start multiple conkyrc files
[Service]
WorkingDirectory=/usr/local/bin
Type=forking # but I have tried oneshot as well
ExecStart=/bin/bash conky-start
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target # I dont really understand the options here since they arent listed on archlinux wiki systemd pageI did look at Systemd but that doesn't clarify much. I decided to use multi-user-target since it was listed in the FAQs.
When I check systemctl, it reads out
conky.service loaded activating start start Start multiple conkybut nothing happens. In the script, I added the 15sec delay so there wouldn't be any issues with dependencies and what not, not being loaded. I have an SSD so I think 15secs is more than adequate.
My question is how can I get this bash script to execute on boot? If I open the terminal and execute
/usr/local/bin/conky-start,the script executes with no problems so the issue has to be in the system file I created.
Last edited by dwsmith (2015-04-08 17:56:02)
Offline
What are the conky configs doing? If they are drawing stuff and thus need a running X server, why don't you start this in ~/.xinitrc or some similar startup script for whatever WM/DE you're using? If they need X and you insist on using systemd, you want a user service and you need to at least get $DISPLAY set.
If they only output things to files, then you can more or less use it like this, but multiple things need fixing/improving.
Offline
What WM (or DE) are you using? This kind of thing is usually either run in .xinitrc or the startup file for your WM.
(edit) -- what Raynman said :-)
Last edited by 2ManyDogs (2015-04-08 17:27:01)
Offline
Raynman and 2ManyDogs are on target, but I just want to point out:
1) You should put custom services in /etc/systemd/system/
2) There is a typo in your service file:
WantedBy=multi-user.targert
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
I am using gnome. Where would I put the script in the gnome then?
Offline
Raynman and 2ManyDogs are on target, but I just want to point out:
1) You should put custom services in /etc/systemd/system/
2) There is a typo in your service file:WantedBy=multi-user.targert
The typo is just here not in the file.
Offline
So I created in ~/.config/autostart/conky.desktop
[Desktop Entry]
Name=Conky
Type=Application
Exec=/usr/local/bin/conky-start
Terminal=false
Comment=Start multiple conkyrc files.I will test this out and see if it works.
Okay so this worked. I dont see how to mark the thread solved though.
Last edited by dwsmith (2015-04-08 17:49:48)
Offline
Again, what WM are you using? It would be much simpler to just put the two conky start lines in your .xinitrc, or in the autostart file for the WM (if it has one). You are making this more difficult than it needs to be.
(edit) never mind, I see you are using GNOME. I know nothing about GNOME, so I will go away now. :-)
(edit2) -- to mark the thread SOLVED, just edit the title of your first post.
Last edited by 2ManyDogs (2015-04-08 17:54:50)
Offline
I dont see how to mark the thread solved though.
Welcome to the forum, please familiarize yourself with the stickied topics: https://bbs.archlinux.org/viewtopic.php?id=130309
Offline