Skip to content

Add tray icon workaround for newer Ubuntu releases (fixes #9046) - #9716

Merged
vanessayuenn merged 2 commits into
electron:masterfrom
dakira:fix-9046
Jun 9, 2017
Merged

vanessayuenn merged 2 commits into
electron:masterfrom
dakira:fix-9046

Conversation

@dakira

@dakira dakira commented Jun 9, 2017 •

Copy link
Copy Markdown
Contributor

Starting with 17.04, Ubuntu sets XDG_CURRENT_DESKTOP to Unity:Unity7 which prevents tray icons from being displayed. There already is a workaround for a similiar situation (for ElementaryOS).

I tested this fix by @MarshallOfSound in Ubuntu 17.04, and regression-tested it on older releases. Everythings works as expected.

Fixes #9046

@dakira dakira changed the title 🐧 Add tray icon workaround for newer Ubuntu releases (fixes #9046) Add tray icon workaround for newer Ubuntu releases (fixes #9046) Jun 9, 2017
Comment thread lib/browser/init.js Outdated
// Workaround for electron/electron#5050
if (process.platform === 'linux' && process.env.XDG_CURRENT_DESKTOP === 'Pantheon') {
// Workaround for electron/electron#5050 and electron/electron#9046
if (process.platform === 'linux' && ['Pantheon', 'Unity:Unity7'].indexOf(process.env.XDG_CURRENT_DESKTOP) !== -1) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor but this could be:

['Pantheon', 'Unity:Unity7'].includes(process.env.XDG_CURRENT_DESKTOP)

Which is a little more concise.

@vanessayuenn
vanessayuenn merged commit a6ea316 into electron:master Jun 9, 2017
@vanessayuenn

Copy link
Copy Markdown
Contributor

Thank you so much @dakira!! 🍾✨

Comment thread lib/browser/init.js
// Workaround for electron/electron#5050
if (process.platform === 'linux' && process.env.XDG_CURRENT_DESKTOP === 'Pantheon') {
// Workaround for electron/electron#5050 and electron/electron#9046
if (process.platform === 'linux' && ['Pantheon', 'Unity:Unity7'].includes(process.env.XDG_CURRENT_DESKTOP)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't appear to fix it for Pantheon though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Indicator icon missing in Ubuntu 17.04

6 participants