I want the Xfce terminal to run a command when it is turned on, for example print a welcome message or some system stats. I want this message to be printed only on the Xfce terminal emulator when it starts, not on some other terminal emulators. Can I achieve this effect by modifying the file terminalrc
? How?
How to make Xfce terminal run a command when it starts
xfce4-terminal
Best Answer
If you absolutely want to do this, I see two approaches:
1) Make a bash (or whatever shell you use) profile script that gets the parent
PID
to see if it is running underxfce4-terminal
, and, if so, prints your message.2) Something like this (note you may have to re-run it after OS upgrades, or it may even befuddle your package manager into not working properly anymore):