I thought this would be simple, but I have this issue where SXHKD bindings won't work after boot until a bash xfce4-terminal has been opened once. So I tried opening a terminal on boot via rc.local, which is no good because it doesn't open with the ~/.config settings. So I created a launcher put in /etc/xdg/autostart with Exec= /Usr/bin/xfce4-terminal -e 'bash -c "sleep 1"' Or bash -c '/usr/bin/xfce4-terminal' And dozens of other things, with the intent of momentarily opening bash, but nothing seems to work. For example I can't run the launcher from rc.local, either.
Rather than autostart the terminal why not autostart SXHKD.
Create this file
It should contain:
[Desktop Entry] Name=sxhkd Comment=Simple X hotkey daemon Exec=/usr/bin/sxhkd Terminal=false Type=Application
Here's a worked example, where I tried the following on an Xfce installation I have in a VM.
I used Settings > Session and Startup > Application Autostart.
I added a new task with the command xfce4-terminal -e 'bash -c "sleep 5"'
This added a file to ~/.config/autostart/ (not /etc/xdg/autostart)
The contents were:
[Desktop Entry] Encoding=UTF-8 Version=0.9.4 Type=Application Name=Terminal Comment=Terminal test Exec=xfce4-terminal -e 'bash -c "sleep 5"' OnlyShowIn=XFCE; RunHook=0 StartupNotify=false Terminal=false Hidden=false
This worked perfectly, terminal appeared, hung around for 5 seconds, then closed.
When you launch the terminal with a command to execute, it does just that, executes the command. While it’s executing the command it’s not available for subsequent commands to be entered, hence no user@user prompt. Most commands are so quick you don’t notice this. In your case the sleep command makes it far more noticeable.
If you open a terminal normally and type something like
firefox then Firefox should open. Leaving firefox open if you go back to the terminal you will see no user@user prompt waiting for you but you will still see the previous prompt and firefox command on the screen. You may also see a few error or warning messages. The Firefox command is running in the terminal so the terminal is busy with no user prompt waiting for input. If you then close the Firefox window the user@user prompt will be available in the terminal again.
You can get a terminal to open when you login with a user@user prompt ready by using just
xfce4-terminal as your command in the auto launcher.