Reputation: 11
I am currently working on a project with alexa skill to control a raspberry pi remotely.
https://tutorials-raspberrypi.com/develop-your-own-raspberry-pi-alexa-skill-and-control-pi-remotely/
As endpoint for alexa skill i want to use telebit. Normaly I start telebit from the terminal and everything works fine.
sudo ./telebit http 5000
Now I want to start it automatically when starting the raspberry pi. For that i use the raspberry pi GUI.
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=telebit
Exec=lxterminal -e bash -c 'sudo /home/pi/telebit http 5000;$SHELL'
Terminal=true
And I get this error message.
(unix socket: /root/.local/share/telebit/var/run/telebit.sock)
/home/pi/Applications/telebit/bin/telebit-remote.js:643
var verstrd = [ pkg.name + ' daemon v' + state.config.version ];
^
TypeError: Cannot read property 'version' of undefined
at handleConfig (/home/pi/Applications/telebit/bin/telebit-remote.js:643:57)
at /home/pi/Applications/telebit/bin/telebit-remote.js:359:22
at /home/pi/Applications/telebit/usr/share/install-launcher.js:236:24
at ChildProcess.exithandler (child_process.js:296:5)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Socket.stream.socket.on (internal/child_process.js:381:11)
at Socket.emit (events.js:182:13)
at Pipe._handle.close (net.js:606:12)
I also tried rc.local and .bashrc but I always get the same error message.
Maybe some of you can help me
Upvotes: 1
Views: 1420
Reputation: 11
I solved the problem myself. You just have to omit sudo.
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=telebit
Exec=lxterminal -e bash -c '/home/pi/telebit http 5000;$SHELL'
Terminal=true
Upvotes: 0