I am trying to display a message when I log on to Linux Mint 17.2. I have tried various methods without success:
1) I created a file /home/myusername/Desktop/startup-message.sh as follows:
#!/bin/bash echo "My startup message" pause exit I made the file executable and made sure it works from a command line, e.g.
bash "/home/myusername/Desktop/startup-message.sh" or
sh -c "/home/myusername/Desktop/startup-message.sh" Then I used Mint's 'Startup Application' feature and added a new entry. I tried:
"/home/myusername/Desktop/startup-message.sh" bash "/home/myusername/Desktop/startup-message.sh" sh -c "/home/myusername/Desktop/startup-message.sh" with and without quotes around the path name. In all cases, nothing was displayed and the "pause" was ignored.
Finally, I added a command to copy a file after the pause, and the file was copied. So, it appears that echo and pause are ignored in a start-up file, presumably because no terminal is open?
2) I then tried adding the message to /etc/profile, but the message didn't appear when I logged on.
3) I then tried adding the message to /etc/motd, but the message didn't appear when I logged on.
So how can I perform this simple task?