Bug 119577 - konquerors terminal emulator changes display mode of directories
Summary: konquerors terminal emulator changes display mode of directories
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-05 17:34 UTC by Stephan
Modified: 2006-02-28 17:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan 2006-01-05 17:34:05 UTC
Version:           3.4.3 (using KDE 3.4.3, Debian Package 4:3.4.3-2 (testing/unstable))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.12-1-686

When I open a terminal emulator within Konqueror, the display mode of the current directory switches to print view (the first display mode). I can switch the disply view back to something else like tree view but when I change the directory print view is activated again. This way, the terminal emulator is unusable!
Comment 1 Stephan 2006-02-15 16:24:19 UTC
I did a little debugging. The problem appears when I opened a terminal emulator in Konqueror and click on a directory in the tree view. Then kdeprint_part is used and not the default kpart-component for directories. When I click on the same directory again, Konqueror understands that it is a directory and everything works as it should. It seems that Konqueror does not know the correct mime type in the first place but presents all possible kpart-components. From these, kdeprint_part is simply the first.
Comment 2 Stephan 2006-02-28 17:30:07 UTC
I solved the problem, it was not a bug in Konqueror. In my .bashrc I had the lines:

# distinguish root from a normal user
if test "$UID" = 0 ; then
  export PROMPT_END='#'
else
  export PROMPT_END='$'
fi

# if this is a konsole
# set the title to the last 25 characters of the current directory
if test "$DISPLAY"; then
  export PROMPT_COMMAND='echo -ne "\033]30;`echo $PWD | sed -e "s/^.*\(.\{25\}\)$/\1/"` $PROMPT_END\007\033]31;$PWD\007"'
fi

The "export"-line caused the problem. I changed it to:

# distinguish root from a normal user
if test "$UID" = 0 ; then
  export PROMPT_END='#'
else
  export PROMPT_END='$'
fi

# set the command prompt
export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'

# set the title of Konsole-sessions to the last 25 chars of the current dir
if [ -n "$KONSOLE_DCOP_SESSION" ] ; then
  dcop $KONSOLE_DCOP_SESSION renameSession "`echo $PWD | sed -e "s/^.*\(.\{25\}\)$/\1/"` $PRO\
MPT_END"
fi