Bug 28022 - In Plasma, Konsole and all other terminal emulators open with abbreviated environment variables
Summary: In Plasma, Konsole and all other terminal emulators open with abbreviated env...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: KDE maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-06 02:29 CET by Frank Griffin
Modified: 2021-10-05 21:14 CEST (History)
3 users (show)

See Also:
Source RPM: Plasma
CVE:
Status comment:


Attachments
"set" from damaged initial shell (3.36 KB, text/plain)
2021-01-06 02:38 CET, Frank Griffin
Details
"set" from am "su -l" session (215.84 KB, text/plain)
2021-01-06 02:40 CET, Frank Griffin
Details

Description Frank Griffin 2021-01-06 02:29:56 CET
In a fresh install of cauldron, using GDM as the DM and Plasma as the DE, invoking Konsole from the panel results in a shell with PS1 set to a null string.

The use of "su -l" to any other userid including the same userid used to open Konsole gets the correct environment settings.

$PS1 is normally set by /etc/bashrc, but even running ". /etc/bashrc" explicitly from the damaged shell doesn't change $PS1.

I'll attach the results of "set" from the initial shell and from the correct su -l shell.  

The only time I've seen anything like this is years ago when scripts invoked from systemd service files got abbreviated environments compared to the login state of the userid being used.  I was told this was deliberate, although I did not agree.

Also, a logon on a getty tty gets the correct environment right off.

I've never used GDM with Plasma.  I'm only doing it now because SDDM doesn't work with Wayland, so that may be the root cause.

Apparently, however Konsole creates the initial shell, it is doing it in a manner inconsistent with "su -l".

As a workaround, you can make the first command issued "su -l (userid)".
Comment 1 Frank Griffin 2021-01-06 02:38:31 CET
Created attachment 12184 [details]
"set" from damaged initial shell
Comment 2 Frank Griffin 2021-01-06 02:40:00 CET
Created attachment 12185 [details]
"set" from am "su -l" session
Comment 3 Lewis Smith 2021-01-07 11:35:11 CET
Thanks for the report.
Please always say explicitly what "a fresh install of cauldron" means: from which ISO, or NetInstall? And is the system up-to-date?

Once again, on my own up-to-date M8/Cauldron system, what you describe does not happen - nor ever has, I imagine one would notice! Under Plasma (from LightDM), Konsole launched from its taskbar icon:
 [lewis@localhost ~]$ echo $PS1
 [\u@\h \W]\$
without looking any further.

But your attachments speak for themselves, so assigning this to KDE prople.

Assignee: bugsquad => kde
CC: (none) => lewyssmith

Comment 4 Frank Griffin 2021-01-07 14:31:57 CET
Sorry, all my fresh installs are network installs selectin Custom desktop and checking all the category boxes under Workstation, Server, and Graphical.
Comment 5 Frank Griffin 2021-01-07 20:45:23 CET
As a point of interest, this problem affects every terminal emulator I've tried (eterm, mrxvt) and not just Konsole.
Lewis Smith 2021-01-07 21:07:35 CET

CC: lewyssmith => (none)

Comment 6 Frank Griffin 2021-01-10 18:59:10 CET
Light at the end of the tunnel !  While testing alternate DMs for bug#28024, I've noticed that the behavior described here does *not* occur with lxdm, lightdm, or xdm.  Because the behavior described in bug#28024 prevents me from signing on with SDDM (the userid and password fields are overlaid), I don't know whether this error occurs with SDDM.

So, the problem appears to be GDM/Wayland in conjunction with an X-based DE.
Comment 7 Frank Griffin 2021-04-26 19:34:10 CEST
New symptom: Desktop files which try to execute a shell script silently fail.  

If you set "Terminal=true" instead of "Terminal=false", you get a Konsole window with the error message:
     Warning: Could not find an interactive shell to start.
Comment 8 Marja Van Waes 2021-09-29 19:27:52 CEST
(In reply to Frank Griffin from comment #6)
> Light at the end of the tunnel !  While testing alternate DMs for bug#28024,
> I've noticed that the behavior described here does *not* occur with lxdm,
> lightdm, or xdm.  Because the behavior described in bug#28024 prevents me
> from signing on with SDDM (the userid and password fields are overlaid), I
> don't know whether this error occurs with SDDM.
> 
> So, the problem appears to be GDM/Wayland in conjunction with an X-based DE.

Adjusting the summary and CC'ing the Gnome maintainer group

CC: (none) => gnome, marja11, olav
Summary: Konsole sessions open under Plasma with abbreviated environment variables => When logged in with GDM/Wayland, Konsole and all other terminal emulators open under Plasma with abbreviated environment variables

Frank Griffin 2021-10-04 17:59:47 CEST

Summary: When logged in with GDM/Wayland, Konsole and all other terminal emulators open under Plasma with abbreviated environment variables => In Plasma, Konsole and all other terminal emulators open with abbreviated environment variables

Comment 9 Frank Griffin 2021-10-04 18:01:03 CEST
This isn't a Gnome issue.  Now that SDDM works, it happens there too.
Comment 10 Frank Griffin 2021-10-05 21:14:49 CEST
This has suddenly stopped happening, so I guess it's been fixed.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


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