0

I want to auto-start a shell script and therefore I added this line to my /etc/profile:

/bin/su -c "/path/to/my/script" user -

the script itself starts a xterm shell command and output following error during autostart:

xterm: cannot load font '-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1'

=> if I manually start the xterm script I have no problems

How can I solve this issue?

leon22
  • 101
  • 1
  • 1
    Looking at tags I assume you are using a RedHat flavour. In this case your default shell is most likely BASH and you should take in consideration .bash_profile file. https://serverfault.com/questions/782433/how-to-run-a-shell-scripts-at-every-login-in-centos – user2965433 Dec 16 '20 at 10:36

1 Answers1

0

Added the script to ~/.bash_profile solved the problem for me. No User change is needed. (Thanks to @user2965433)


So just append:

/path/to/my/script

to ~/.bash_profile of the desired user.

leon22
  • 101
  • 1