Skip to content

Commit e459b38

Browse files
didrockselectron-bot
authored andcommitted
Support multiple inherited ubuntu session for indicators
Multiple sessions inherits the "ubuntu" base settings properties in ubuntu. One of the most popular one is communitheme: the next ubuntu default theme has its dedicated session, with thus duplicated indicators for dropbox. Rather than a string comparison for ubuntu, only match a substring then. XDG_CURRENT_DESKTOP can be of form: "communitheme:ubuntu:GNOME", "ubuntu:GNOME", … Fixes: electron#12843.
1 parent 9796513 commit e459b38

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/browser/init.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,10 @@ require('./api/protocol')
163163
const mainStartupScript = packageJson.main || 'index.js'
164164

165165
// Workaround for electron/electron#5050 and electron/electron#9046
166-
if (process.platform === 'linux' && ['Pantheon', 'Unity:Unity7', 'ubuntu:GNOME', 'pop:GNOME'].includes(process.env.XDG_CURRENT_DESKTOP)) {
167-
process.env.XDG_CURRENT_DESKTOP = 'Unity'
166+
if (process.platform === 'linux') {
167+
if (['Pantheon', 'Unity:Unity7', 'pop:GNOME'].includes(process.env.XDG_CURRENT_DESKTOP) || process.env.XDG_CURRENT_DESKTOP.includes('ubuntu')) {
168+
process.env.XDG_CURRENT_DESKTOP = 'Unity'
169+
}
168170
}
169171

170172
// Finally load app's main.js and transfer control to C++.

0 commit comments

Comments
 (0)