/etc/default/im-config leaves temporary variables fixed in environment

Bug #1877627 reported by David Cimadevilla
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
im-config (Ubuntu)
Fix Released
Low
Gunnar Hjalmarsson

Bug Description

Ubuntu 18.04
im-config 0.34-1ubuntu1.3

You can reproduce the issue following these steps:

- Open a X terminal
- echo $d
- Returns "GNOME"

The source is this line in /etc/default/im-config:

for d in 'Unity' 'MATE' 'GNOME'; do

the temporary variable d gets fixed in the environment variables.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for your report, but I can't reproduce it.

Can you please run:

apport-collect 1877627

Changed in im-config (Ubuntu):
status: New → Incomplete
Revision history for this message
David Cimadevilla (davidcim) wrote :

You are right. I've found that the issue happens also because I export $d in ~/.profile .

The updated list of steps to reproduce the issue:

- echo 'export d=my-env-var-data' >> ~/.profile
- Restart X session
- Open a X terminal
- echo $d
- Returns "GNOME"

Note: The installed display manager is sddm.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Exporting 'd' seems like a weird thing to do? In any case im-config could probably use a more specific variable name to avoid conflicts...

Changed in im-config (Ubuntu):
importance: Undecided → Low
status: Incomplete → New
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I made 'd' (and a couple of other temporary variables) local to avoid this issue. Uploaded to groovy.

Changed in im-config (Ubuntu):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package im-config - 0.44-1ubuntu2

---------------
im-config (0.44-1ubuntu2) groovy; urgency=medium

  * debian/patches/01-ubuntu-default-mode.patch:
    - Declare temporary variables as local to avoid the risk that they
      alter environment variables (LP: #1877627).

 -- Gunnar Hjalmarsson <email address hidden> Mon, 11 May 2020 18:13:00 +0200

Changed in im-config (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.