How do I open terminal and run commands in it on startup and keep it open?

Tried to run batch script on terminal at startup using crontab and /etc/rc.local but they dont work. I dont know what has gone wrong as there is no log to check Here is the line on crontab @reboot user /home/user/script.sh ; /usr/bin/gnome-terminal -- bash -c "/home/user/script2.sh; exec bash" and on rc.local /home/user/script.sh ; /usr/bin/xterm -hold -e /home/user/script2.sh


A terminal emulator such as xterm or Gnome Terminal can only run on a graphical server (Xorg or increasingly Wayland). There is no chance you can start that before the graphical environment has been setup.

During log in, however, you can automatically launch a terminal emulator. To keep the terminal open when the command has finished, you could add a "bash" command at the end so the terminal stays open at a bash prompt, or, in Gnome Terminal, edit the profile to specify that the terminal should remain open.