Skip to main content
added 3 characters in body
Source Link
Joseph R.
  • 40.5k
  • 8
  • 114
  • 146

You are confusing the function of echo. echo will print to the standard output file descriptor. If you already have a terminal open, that terminal is usually the standard output of the commands/scripts you run within it. By itself, echo will not open a terminal.

If you want to senddisplay a message on startup, a more "graphical" way would be to use something like zenity:

zenity --info --text "Hello, world!" 

If you put that in your startup script, you will see a message box displayed to that effect.

Also, motd prints your message for text-based logins (like a login on a virtual terminal or a login via ssh) so it's not going to do what you want either.

If you want to specifically open a terminal on startup, you can make your script do something like:

xterm -e 'bash -c "echo My startup message;sleep 10"' 

You are confusing the function of echo. echo will print to the standard output file descriptor. If you already have a terminal open, that terminal is usually the standard output of the commands/scripts you run within it. By itself, echo will not open a terminal.

If you want to send a message on startup, a more "graphical" way would be to use something like zenity:

zenity --info --text "Hello, world!" 

If you put that in your startup script, you will see a message box displayed to that effect.

Also, motd prints your message for text-based logins (like a login on a virtual terminal or a login via ssh) so it's not going to do what you want either.

If you want to specifically open a terminal on startup, you can make your script do something like:

xterm -e 'bash -c "echo My startup message;sleep 10"' 

You are confusing the function of echo. echo will print to the standard output file descriptor. If you already have a terminal open, that terminal is usually the standard output of the commands/scripts you run within it. By itself, echo will not open a terminal.

If you want to display a message on startup, a more "graphical" way would be to use something like zenity:

zenity --info --text "Hello, world!" 

If you put that in your startup script, you will see a message box displayed to that effect.

Also, motd prints your message for text-based logins (like a login on a virtual terminal or a login via ssh) so it's not going to do what you want either.

If you want to specifically open a terminal on startup, you can make your script do something like:

xterm -e 'bash -c "echo My startup message;sleep 10"' 
Source Link
Joseph R.
  • 40.5k
  • 8
  • 114
  • 146

You are confusing the function of echo. echo will print to the standard output file descriptor. If you already have a terminal open, that terminal is usually the standard output of the commands/scripts you run within it. By itself, echo will not open a terminal.

If you want to send a message on startup, a more "graphical" way would be to use something like zenity:

zenity --info --text "Hello, world!" 

If you put that in your startup script, you will see a message box displayed to that effect.

Also, motd prints your message for text-based logins (like a login on a virtual terminal or a login via ssh) so it's not going to do what you want either.

If you want to specifically open a terminal on startup, you can make your script do something like:

xterm -e 'bash -c "echo My startup message;sleep 10"'