Bug 6015 - Terminal profile is broken for rxvt - can't use "exec foo || exec bar" in cmdline without shopt -s execfail
: Terminal profile is broken for rxvt - can't use "exec foo || exec bar" in cmd...
Status: CLOSED DUPLICATE of bug 5696
: ThinLinc
Desktop environment
: trunk
: PC Linux
: P2 Minor
: 4.7.0
Assigned To:
  Show dependency treegraph
Reported: 2016-09-27 18:05 by
Modified: 2016-09-29 14:39 (History)
Acceptance Criteria:



You need to log in before you can comment on or make changes to this bug.

Description From cendio 2016-09-27 18:05:27
Our terminal profile ships with support for multiple terminals - the testcmd
checks for one of xterm and rxvt. Perhaps this hasn't been tested for very
long, maybe it's fallout from bug 5099 - this is what happens on my Fedora 24
machine (bash 4.3.42):

> Executing profile: xterm
> Executing profile command: exec rxvt || exec xterm
> /bin/bash: rad 0: exec: rxvt: finns inte
> Profile command exited with exit code 127

(An observant reader will notice that I switched the order around to provoke
the bug - I had xterm already installed. The default is "exec xterm || exec
rxvt" and fails in the same way when you don't have xterm.)

In other words, the profile command only works with the first terminal exec'd.

To allow exec in non-interactive shells to fail gracefully, you have to "shopt
-s execfail" first. The default is unset.

>  execfail
>   If set, a non-interactive shell will not exit if it cannot
>   execute the file specified as an argument to the exec builtin
>   command.  An interactive shell does not exit if exec fails.
------- Comment #1 From cendio 2016-09-29 14:28:41 -------
exec of terminals were introduced in 5696.

*** This bug has been marked as a duplicate of bug 5696 ***