finalterm
finalterm copied to clipboard
Crash on Fedora 20 with bashdb
When the first key I press is not 'q', finalterm will segfault or hang my gnome-shell.
Finalterm always starts bashdb, is it possible to disable this behavior and start regular bash instead?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Very strange, it does not do that on my system (I also use Fedora 20).
Can you post your .bashrc
?
This is my .bashrc
. It also reads another file called .bash_include
, and the .bash_include
file can be found here. https://github.com/lantw44/configfile/blob/master/bash_include
# .bashrc
if [[ "$-" == *i* ]] ; then interactive_shell=1; fi
[ "$interactive_shell" ] && echo ":: Starting Bash ..."
[ "$TERM" = xterm ] && TERM=xterm-256color
[ "$TERM" = screen ] && TERM=screen-256color
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
[ "$interactive_shell" ] && echo ":: Loading local configuration ..."
# User specific aliases and functions
. ~/.bash_include
PATH=${PATH%:/home/lantw44/bin}
PATH=/home/lantw44/scripts:/home/lantw44/bin:/home/lantw44/.local/bin:$PATH:/opt/arm-cross-tools/tools/bin
for i in /tmp/ram/lantw44-ccache /tmp/ram/lantw44-firefox \
/tmp/ram/lantw44-thunderbird /tmp/ram/lantw44-rpmbuild-BUILD \
/tmp/ram/lantw44-rpmbuild-BUILDROOT /tmp/ram/lantw44-libreoffice \
/tmp/ram/lantw44-googlechrome /tmp/ram/lantw44-chromium \
/tmp/ram/lantw44-epiphany /tmp/ram/download
do
[ '!' -d "$i" ] && mkdir -m 700 -p "$i"
done
mkdir -m 700 -p /tmp/ram/lantw44-virtshare
chcon -t samba_share_t /tmp/ram/lantw44-virtshare
export DEVKITPRO=/home/lantw44/devkitPro
export DEVKITARM=${DEVKITPRO}/devkitARM
function dumpkey()
{
local param=${1}
local key
local result
result=$(sudo xenstore-list ${param})
if [ "${result}" != "" ] ; then
for key in ${result} ; do dumpkey ${param}/${key} ; done
else
echo -n ${param}'='
sudo xenstore-read ${param}
fi
}
. /etc/bash_completion.d/xl.sh
[ "$DESKTOP_SESSION" = "xfce" ] && export `gnome-keyring-daemon -sd`
if [ "$DESKTOP_SESSION" = "xfce" ]; then
export `gnome-keyring-daemon -sd`
fi
gnome_unstable ()
{
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS="@im=ibus"
}
unset CFLAGS
That's one mighty include file!
~~The most telling lines in .bashrc
are the first two:~~
if [[ "$-" == *i* ]] ; then interactive_shell=1; fi
[ "$interactive_shell" ] && echo ":: Starting Bash ..."
~~Since Final Term always runs bash using the -i
flag and yet the ":: Starting Bash ..." text is nowhere to be seen in the output, I can only conclude that the flag does not get passed to the .bashrc
correctly when it is simply sourced from https://github.com/p-e-w/finalterm/blob/master/data/Startup/bash_startup.in. Maybe that by itself already causes a bashdb session to be opened for some reason. The prompt definition from the include file seems to get loaded just fine.~~
Edit: Scratch that, I just realized that in bash, 1
is actually FALSE so the output would only be expected in non-interactive mode.
You could try adding the line
echo "$@"
on top of your .bashrc
to see which arguments get forwarded, then compare the output between Final Term and your regular terminal. The problem must surely be in the arguments somehow, as nothing else would allow bash(db) to differentiate between the two (unless there is some environment variable that needs to be set in order to make bashdb not run in debugging mode, in which case you may want to add printenv
as well).
FinalTerm starts bash using /bin/bash --rcfile /usr/local/share/finalterm/Startup/bash_startup -i
and my regular terminal starts it using /bin/bash
. However, both FinalTerm and my regular terminal show nothing when running echo "$@"
.
There is no different environment variables between FinalTerm and regular terminal except for PATH
and SHLVL
because my .bashrc
unconditionally add new path and I start FinalTerm from my regular terminal.
What happens if you remove the -i
parameter from Final Term's invocation of bash? What happens if you remove all parameters and simply call /bin/bash
?
If I only remove the -i
parameter, FinalTerm still crashes and bashdb is started. If I remove all parameters, FinalTerm doesn't crash and bashdb is not started.
FinalTerm does not crash now, but there is still other problems. My input does not go to the next line when my input is longer than the terminal width.
@lantw44: I belive that you are seeing issue #52 now..