Error when launching openmsx on raspbian at startup

Page 1/2
| 2

By drewdty72

Supporter (8)

drewdty72's picture

23-11-2020, 16:31

Hello, I am new in this forum,I have learned a lot by reading it
but have a problem
I install openmsx and run it from terminal
and no have a problem, it runs perfectly
but when I edit the rc.local file and it is executed when I start the raspberry, I get the following error when pressing the menu key
"error executng hot keycommand cant read" env (HOME) ": no such in array"
when press another time "error executing hot keycommand: invalidcommand name"main_menu_toggle"
I hope you can help me thanks Smile
sorry use google translate oO

Login or register to post comments

By Manuel

Ascended (17324)

Manuel's picture

23-11-2020, 18:32

Apparently the environment variable HOME is not set when starting from there. This is apparently required.

By drewdty72

Supporter (8)

drewdty72's picture

23-11-2020, 19:44

how can I solve that?
please

By Manuel

Ascended (17324)

Manuel's picture

23-11-2020, 20:47

just set it?
export HOME=/your/home/folder

By drewdty72

Supporter (8)

drewdty72's picture

25-11-2020, 12:12

I'm sorry but I don't know how to do it

By Manuel

Ascended (17324)

Manuel's picture

25-11-2020, 13:27

What exactly did you put in rc.local? Just put it before the line where you start openMSX. The path should be a valid path to the home directory of the user you're running openMSX for.
However, I'm not sure, I don't have Raspbian or a RPi whatsoever.

By Grauw

Ascended (9499)

Grauw's picture

25-11-2020, 14:51

I’m just reading up on it a little, I think there is no HOME in the environment because if it’s started by rc.local it runs as the root user.

I’m not sure using rc.local is the best way, running as the root user seems undesirable. It seems better to set up a systemd service which runs it as a normal user.

By Manuel

Ascended (17324)

Manuel's picture

25-11-2020, 14:43

But if you do it still, perhaps this would help:
export HOME=/root

By drewdty72

Supporter (8)

drewdty72's picture

25-11-2020, 18:54

in rc.local there is only this
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi

./opt/openMSX/bin/openmsx

exit 0

By Manuel

Ascended (17324)

Manuel's picture

25-11-2020, 19:01

So try to put it in the line before the one that starts openMSX.

By drewdty72

Supporter (8)

drewdty72's picture

25-11-2020, 19:11

ok now yes
I have put in rc.local and now it works

export HOME=/root
./opt/openMSX/bin/openmsx

now the openmsx menu does not give me an error Big smile
thanks for the help i patience with a newbie Wink

Page 1/2
| 2