2 added 60 characters in body
source | link

You run wmctrl directly after the xfce4-terminal command exits. But if there is already an open instance of the Xfce Terminal, xfce4-terminal puts itself in the background and immediately returns the command prompt while still in the process of setting up the actual terminal screen. So by the time wmctrl is started the window with title rd might not be there yet.

If you don't have to type the command, as in the example with &&, then wmctrl is started too fast. In the first example the typing, or selecting from history, is enough delay to have the terminal window with the right title available.

If you cut and paste the two commandlinecommand-line inputs from the first example, you probably will encounter the problem as well.

You should put a sleep command before invoking wmctrl. You can experiment with the duration, 1 second should be enough as the terminal's title will be set before the shell that is started needs to have processed its startup files. (If you start Firefox/Chrom with an URL that needs retrieving, waiting for the expected title can take several seconds, and it might never come when there are network errors).

To get uniform behavior, launch xfce4-terminal in the background so that it won't block even if this is the first instance you start.

xfce4-terminal --hide-menubar --hide-borders --hide-toolbars --title=dt &
sleep 1
wmctrl -r dt -e 0,10,10,720,720

You run wmctrl directly after the xfce4-terminal command exits. But xfce4-terminal puts itself in the background and immediately returns the command prompt while still in the process of setting up the actual terminal screen. So by the time wmctrl is started the window with title rd might not be there yet.

If you don't have to type the command, as in the example with &&, then wmctrl is started too fast. In the first example the typing, or selecting from history, is enough delay to have the terminal window with the right title available.

If you cut and paste the two commandline inputs from the first example, you probably will encounter the problem as well.

You should put a sleep command before invoking wmctrl. You can experiment with the duration, 1 second should be enough as the terminal's title will be set before the shell that is started needs to have processed its startup files. (If you start Firefox/Chrom with an URL that needs retrieving, waiting for the expected title can take several seconds, and it might never come when there are network errors).

You run wmctrl directly after the xfce4-terminal command exits. But if there is already an open instance of the Xfce Terminal, xfce4-terminal puts itself in the background and immediately returns the command prompt while still in the process of setting up the actual terminal screen. So by the time wmctrl is started the window with title rd might not be there yet.

If you don't have to type the command, as in the example with &&, then wmctrl is started too fast. In the first example the typing, or selecting from history, is enough delay to have the terminal window with the right title available.

If you cut and paste the two command-line inputs from the first example, you probably will encounter the problem as well.

You should put a sleep command before invoking wmctrl. You can experiment with the duration, 1 second should be enough as the terminal's title will be set before the shell that is started needs to have processed its startup files. (If you start Firefox/Chrom with an URL that needs retrieving, waiting for the expected title can take several seconds, and it might never come when there are network errors).

To get uniform behavior, launch xfce4-terminal in the background so that it won't block even if this is the first instance you start.

xfce4-terminal --hide-menubar --hide-borders --hide-toolbars --title=dt &
sleep 1
wmctrl -r dt -e 0,10,10,720,720
1
source | link

You run wmctrl directly after the xfce4-terminal command exits. But xfce4-terminal puts itself in the background and immediately returns the command prompt while still in the process of setting up the actual terminal screen. So by the time wmctrl is started the window with title rd might not be there yet.

If you don't have to type the command, as in the example with &&, then wmctrl is started too fast. In the first example the typing, or selecting from history, is enough delay to have the terminal window with the right title available.

If you cut and paste the two commandline inputs from the first example, you probably will encounter the problem as well.

You should put a sleep command before invoking wmctrl. You can experiment with the duration, 1 second should be enough as the terminal's title will be set before the shell that is started needs to have processed its startup files. (If you start Firefox/Chrom with an URL that needs retrieving, waiting for the expected title can take several seconds, and it might never come when there are network errors).