Bug 498452 - restored tabs get wrong setting: neither KONSOLE_DBUS_WINDOW environment variable, nor bash aliases
Summary: restored tabs get wrong setting: neither KONSOLE_DBUS_WINDOW environment vari...
Status: REPORTED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 22.12.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-10 04:24 UTC by Igor Zhuravlov
Modified: 2025-01-20 00:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
tab#1, restored session mc, env command - broken (2.86 KB, text/plain)
2025-01-10 04:24 UTC, Igor Zhuravlov
Details
tab#1, restored session mc, pstree command - broken (50.17 KB, image/png)
2025-01-10 04:25 UTC, Igor Zhuravlov
Details
tab#2, manually opened tab, built-in profile, mc, env command - ok (3.88 KB, text/plain)
2025-01-10 04:27 UTC, Igor Zhuravlov
Details
tab#2, manually opened tab, built-in profile, mc, pstree command - ok (49.77 KB, image/png)
2025-01-10 04:28 UTC, Igor Zhuravlov
Details
tab#3, manually opened tab, mc profile, env command - ok (3.88 KB, text/plain)
2025-01-10 04:29 UTC, Igor Zhuravlov
Details
tab#3, manually opened tab, mc profile, pstree command - ok (50.18 KB, image/png)
2025-01-10 04:29 UTC, Igor Zhuravlov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Zhuravlov 2025-01-10 04:24:26 UTC
Created attachment 177242 [details]
tab#1, restored session mc, env command - broken

SUMMARY

STEPS TO REPRODUCE
1. Run Konsole.
2. Open some tabs, e.g. with bash and mc.
3. Re-login session / reboot PC.

OBSERVED RESULT
Konsole session is restored ok with tabs opened at step 2. But restored tabs behavior is weird:
- no environment variables: BASH_FUNC_mc%%, GPG_TTY, HISTCONTROL, KONSOLE_DBUS_WINDOW, LS_COLORS, LS_OPTIONS, MC_SID
- no bash aliases
- mc never pauses after command execution

EXPECTED RESULT
Konsole tab should behave the same regardless of whether it was restored from previous session or opened manually by user.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux 5.14.21-150500.55.88-default #1 SMP PREEMPT_DYNAMIC x86_64
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION

1. But if a new tab was opened manually, it behaves properly: environment vars and bash aliases are presented, pause after execution works. Regardless of the way a tab was opened:
- manually run dedicated mc profile,
- or manually run default profile, then run mc there.

2. Similar bugs:
- https://bugs.kde.org/show_bug.cgi?id=382116
- https://bugs.kde.org/show_bug.cgi?id=365449
Comment 1 Igor Zhuravlov 2025-01-10 04:25:34 UTC
Created attachment 177243 [details]
tab#1, restored session mc, pstree command - broken
Comment 2 Igor Zhuravlov 2025-01-10 04:27:39 UTC
Created attachment 177244 [details]
tab#2, manually opened tab, built-in profile, mc, env command - ok
Comment 3 Igor Zhuravlov 2025-01-10 04:28:08 UTC
Created attachment 177245 [details]
tab#2, manually opened tab, built-in profile, mc, pstree command - ok
Comment 4 Igor Zhuravlov 2025-01-10 04:29:13 UTC
Created attachment 177246 [details]
tab#3, manually opened tab, mc profile, env command - ok
Comment 5 Igor Zhuravlov 2025-01-10 04:29:42 UTC
Created attachment 177247 [details]
tab#3, manually opened tab, mc profile, pstree command - ok
Comment 6 Igor Zhuravlov 2025-01-20 00:31:09 UTC
A Konsole profile:

host:~$ cat /home/johndoe/.local/share/konsole/mc.profile
[Appearance]
ColorScheme=BlackOnWhite
Font=Monospace,11,-1,5,50,0,0,0,0,0

[General]
Command=/usr/bin/mc
Icon=mc
Name=mc
Parent=FALLBACK/

[Interaction Options]
AutoCopySelectedText=true

[Scrolling]
HistoryMode=2

Default user shell:

host:~$ grep johndoe /etc/passwd
johndoe:x:1000:100:John Doe:/home/johndoe:/bin/bash