I'm trying to set a keyboard shortcut to open xfce4-terminal and run history(command) and keeping terminal open, but so far no avail, I read some tutorials then I tried xfce4-terminal -e "/bin/bash -c history; exec bash" , but nothing happens (I noticed the terminal opens and closes quickly) how to get it working? thks, vladi OS: Xubuntu 16.04.6

2 Answers 2


You have to enable history separately in a non-interactive shell:

xfce4-terminal --hold -x bash -c 'HISTFILE=~/.bash_history; set -o history; history'


  • Thanks, that's it, finally this command works:), I have waited almost an year for it.:)) Apr 14, 2020 at 14:17

Have you tried --hold ?

According to their doc, this should work

xfce4-terminal --command "command_with_args" --hold

In your case

xfce4-terminal --command "history" --hold

  • not working, I got a window displaying Fail to execute child process no such a file or directory I think the history command is a INTERNAL LINUX command and should be treated differently, but so far I don't know how to fix the shortcut. May 3, 2019 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.