You are not logged in.
Pages: 1
hello all I have an executable i can click to start my vnc looks like
#!/usr/bin/sh -
x0vncserver -display :0 -passwordfile ~/.vnc/passwd
It is named blamnet.sh Then I have a systemd file looks like
[Unit]
Description=blamnet
[Service]
Type=simple
ExecStart=/usr/bin/blamnet.sh
KillMode=process
[Install]
WantedBy=graphical.target
it is named blamnet.service I really just want to run it after my network connects but when i do
systemctl enable blamnet
then
systemctl start blamnet
it appers to start but no vnc server
can anyone point me in the right direction?
Last edited by Mosttoast (2015-02-02 05:40:46)
Offline
Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Fo … s_and_Code
Offline
so.... you got an answer?
thank you for the tip on posting code
Last edited by Mosttoast (2015-02-02 05:43:25)
Offline
The answer would come from a combination of establishing why your service fails (`systemctl status -l yourservice.service`) and `man systemd.service`...
Offline
here is the result of
systemctl status -l blamnet.service
blamnet.service - blamnet
Loaded: loaded (/etc/systemd/system/blamnet.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2015-02-02 05:49:26 UTC; 39min ago
Process: 557 ExecStart=/usr/bin/blamnet.sh (code=exited, status=1/FAILURE)
Main PID: 557 (code=exited, status=1/FAILURE)
what should I be looking for? I don't see any kind of error code or description of failure unless 1/failure is it
Last edited by Mosttoast (2015-02-02 06:41:48)
Offline
Are you not going to make any effort to solve this yourself?
Read the wiki page, there is an example service file there...
Offline
I have tried ever form of .target and i have tried many examples. i have changed to all types and i started with the example off the wiki page. Perhaps I need to be more specific... but i don't know why it wont work.
Offline
Spend more time on the wiki...the systemd entry gives clear guidance for what you ought to do to investigate further.
"We may say most aptly, that the Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves." - Ada Lovelace
Offline
here is example of vnc wiki
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=simple
User=
PAMName=login
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver -geometry 1440x900 -fg -alwaysshared -dpi 100 %i
ExecStop=/usr/bin/vncserver -kill %i
[Install]
WantedBy=multi-user.target
I tried it with my user pluged in and it will not work, but it's not what i want to do anyway i just want to run the executable i made after start up I think my problem is that it needs to be forking since my executable starts a vnc server, but i guess maybe i dont know how to fork it.
Offline
thanks nullifiedi tried that throuble shooting thing and i got this
journalctl _PID=557
-- Logs begin at Sat 2015-01-03 19:39:40 UTC, end at Mon 2015-02-02 06:27:59 UTC
lines 1-1/1 (END)
i press down and get a bunch of ~ do i just not know how to read journal? seems blank but on their example it is not.
Offline
Thanks guys I tried ending process restarting and getting new PID journal still blank. Perhaps i need sudo too read or something but I'm spent today. I do thank you and I understand your frustrated because I do not fully understand the wiki. I was hoping you could see my error from my code, but I will return to studying systemd as advised.
Last edited by Mosttoast (2015-02-02 07:21:20)
Offline
Pages: 1