If KDE is running on tty1, it's likely :0
, i.e. the command to run is:
DISPLAY=:0 plasmashell
FWIW, I'm frequently restarting plasmashell, so I wrote the following script. It rebuilds the plasmashell database, then kills the old plasmashell instance in increasing levels of severity.
kbuildsycoca5
timeout 5 kquitapp5 plasmashell
pgrep -U $USER -x plasmashell &>/dev/null && pkill -U $USER -x plasmashell
pgrep -U $USER -x plasmashell &>/dev/null && pkill -U $USER -x -9 plasmashell
pgrep -U $USER -x plasmashell &>/dev/null && echo "ERROR: cannot kill plasmashell"
plasmashell &
N.B. if you want to adapt this for usage from another tty, you can kill the previous plasmashell without defining DISPLAY
. It's just starting the new instance that needs the variable.