Bug 977697 - Strange characters in front of bash prompt in termintaor
Strange characters in front of bash prompt in termintaor
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: terminator (Show other bugs)
19
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Dominic Hopf
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-25 03:31 EDT by Johan Vervloet
Modified: 2015-02-18 08:57 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-18 08:57:18 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Johan Vervloet 2013-06-25 03:31:02 EDT
Description of problem:
When I open a terminator window, it shows strange characters in front of the bash prompt.

Version-Release number of selected component (if applicable):
terminator-0.97-1.fc19.noarch


How reproducible:
Just run a terminator window

Steps to Reproduce:
1. Open a terminator window

Actual results:

This is what appears before the cursor:

]7;file://hostname.domain/home/johanv[johanv@hostname ~]$


Expected results:

[johanv@lap-jve ~]$



Additional info:

* In gnome-terminal, the prompt is shown as expected.
* The PS1 environment variable contains "[\u@\h \W]\$"
* changing PS1 does not change anything
* firing up a new instance of bash does not change anything
* when I enter 'sh', which starts bash as well, the problem is gone. (?)
Comment 1 Johan Vervloet 2013-06-25 03:38:07 EDT
In the expected results, I used 'hostname.domainname' for the name of my machine. In the additional info, I forgot replace the hostname. So the fact that it says lap-jve instead of hostname, is not a bug, but a typo :-)
Comment 2 Johan Vervloet 2013-06-25 04:04:47 EDT
I guess it is something in /etc/bashrc that causes the problem.
Comment 3 Dominic Hopf 2013-06-28 17:25:08 EDT
Hi Johan,

do you have some personal customizations to your bashrc, either in /etc/bashrc or in the hidden files in your home? I am not able to reproduce the bug here using the default Fedora /etc/bashrc.


Regards,
Dominic
Comment 4 Johan Vervloet 2013-06-28 17:44:09 EDT
No I haven't, as far as I know. Strange. It might be relevant that I was on Fedora 18, and I upgraded to Fedora 19 (beta) using yum.

But I think it has worked on F19 at some time in the past.

I don't use terminator that often, so I am not sure when the problem came up.

The extra characters look like some control character, followed by a kind of uri describing the cwd. 

I don't understand. But it is not a very critical problem, I can work around it.

export PS1="[\u@\h \W]\$ "; sh
Comment 5 Dominic Hopf 2013-06-28 18:32:18 EDT
What does your PS1 variable actually contain before you start to work around this issue re-setting that variable?
Comment 6 Johan Vervloet 2013-07-01 03:37:08 EDT
[johanv@lap-jve ~]$ echo $PS1
[\u@\h \W]\$
Comment 7 Jose Ramon Cabanes 2013-07-02 15:07:25 EDT
I've seen exactly the same behaviour as Johan in my fresh Fedora Core 19 installed today, so no personal customizations in .bashrc here .

   Regards,
   Kurt.-
Comment 8 Johan Vervloet 2013-07-04 03:39:27 EDT
The problem is gone. I don't know why; one of the following might be the reason:

* some update I installed this week fixed the problem
* I am now using the nvidia drivers (from rpmfusion-nonfree) instead of the nouveau drivers.
Comment 9 Jose Ramon Cabanes 2013-07-04 05:36:38 EDT
Same here. After rebooting and updating the next day the problem was gone, which is great because it was quite annoying. I think it has nothing to do with video drivers. I am using an Intel IGP. Maybe the problem was momentary after installing terminator for the first time... who knows.

   Regards,
   Kurt.-
Comment 10 pankaj pandey 2013-07-06 05:40:52 EDT
I still have the issue on reboot.
Strangely, terminator prompt is fine when started from the gnome shell dash, but it has the additional characters in front of the prompt when started from another gnome-terminal. I have a customized PS1 in ~/.bashrc . Exporting PS1 to a different value after starting terminator still preserves the strange characters and pwd uri in front of the newly set prompt.
Let me know if any further information is needed to debug it.
Comment 11 Scott Marlow 2013-07-16 16:10:57 EDT
My ~/.bashrc contains:
export PS1='\[\033[00;36m\]\u@\h\[\033[00m\]:\[\033[01;34m\] \w\[\033[00m\]$(__git_ps1 " (%s)")\$ '

After upgrading from Fedora 17 to 19, I noticed that PS1 was not set correctly any more.

After running .bashrc, I see:

. .bashrc
echo $PS1
\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[33m\]\[\033[34m\] $\[\033[00m\]

If I do the export directly from bash, I see:

export PS1='\[\033[00;36m\]\u@\h\[\033[00m\]:\[\033[01;34m\] \w\[\033[00m\]$(__git_ps1 " (%s)")\$ '
echo $PS1
\[\033[00;36m\]\u@\h\[\033[00m\]:\[\033[01;34m\] \w\[\033[00m\]$(__git_ps1 " (%s)")\$
Comment 12 Scott Marlow 2013-07-16 16:20:46 EDT
Also, I'm not using the Terminator component but thought my feedback might still help.  I'm using Konsole (KDE) but suspect that I am hitting the same issue with the bash shell.
Comment 13 Scott Marlow 2013-07-16 16:25:24 EDT
To upgrade from Fedora 17 to 19, I used FedUp (http://fedoraproject.org/wiki/FedUp).
Comment 14 Johan Vervloet 2013-09-02 03:46:27 EDT
FYI: I reported that the problem was gone (comment 8), but I now notice that it is still occurring when I start terminator from a gnome terminal. Starting terminator from the menu works fine (same experience as pankaj pandey in comment 10). Terminator instances started from terminator, have the same command prompt as the originating terminator.
Comment 15 Marco Ronconi 2013-09-11 18:27:03 EDT
Same here after upgrading fedora 18 to 19:

1) From menu: 
[marco@localhost ~]$ 

2) From command line (xterm): ]7;file://localhost.localdomain/home/marco[marco@localhost ~]$
Comment 16 Dustin Black 2014-04-02 11:12:20 EDT
Same experience here as comment 15 in Fedora 20. Consistently reproducible on a fresh install with no bashrc customizations.
Comment 17 Dustin Black 2014-04-02 11:13:41 EDT
Incidentally, executing through sudo gives normal results. Also, same behavior when running 'terminator' directly from either gnome-terminal or xterm.
Comment 18 Dustin Black 2014-04-02 11:16:19 EDT
(In reply to Dustin Black from comment #17)
> Incidentally, executing through sudo gives normal results. Also, same
> behavior when running 'terminator' directly from either gnome-terminal or
> xterm.

Sorry... that should've been made more clear.

Executing through sudo gives normal results.

Running 'terminator' directly from gnome-terminal or xterm gives the same bad results as described in comment 15.
Comment 19 Sam Mingo 2014-07-18 19:08:04 EDT
Fresh install of Fedora 20 w/ the terminator-0.97-4.fc20.noarch also produces the same issue with my prompt having an extra "escape" character being displayed.

]7;file://dufresne/home/slm[slm@dufresne ~]$ 

The suggested fix of running this fixes it but it would seem to be a bug in a config file.

$ export PS1="[\u@\h \W]\$ "; sh
Comment 20 Egmont Koblinger 2014-08-13 19:25:34 EDT
When you start gnome-terminal, it automatically sets VTE_VERSION. When you start terminator from gnome-terminal, this variable is still set, although to an incorrect value since terminator uses an older vte. Next, your shell in terminator sources /etc/profile.d/vte.sh and incorrectly believes it's running in a new vte and hence sets PROMPT_COMMAND to emit that ]7;blah stuff, which is not supported by the old vte.

A quick workaround could be to backport setting VTE_VERSION to the old vte - it would set it to the old version number and hence vte.sh wouldn't set PROMPT_COMMAND.

The proper fix is to update or drop all applications relying on old (gtk2) vte-0.28 and ditch that legacy unmaintained version for good. See https://bugs.launchpad.net/terminator/+bug/1030562.
Comment 21 Fedora End Of Life 2015-01-09 17:10:04 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 22 Fedora End Of Life 2015-02-18 08:57:18 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

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