--- old/src/java.base/unix/native/libjava/java_props_md.c 2020-12-10 10:21:23.725554375 +0530 +++ new/src/java.base/unix/native/libjava/java_props_md.c 2020-12-10 10:21:23.409396379 +0530 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -458,7 +458,8 @@ sprops.os_arch = ARCHPROPNAME; - if (getenv("GNOME_DESKTOP_SESSION_ID") != NULL) { + if (getenv("GNOME_DESKTOP_SESSION_ID") != NULL + || getenv("XDG_CURRENT_DESKTOP") != NULL) { sprops.desktop = "gnome"; } else {