Skip to content

Commit

Permalink
fix: fix-linglong app is missing
Browse files Browse the repository at this point in the history
systemd env(XDG_DATA_DIRS) is replaced by dde-session env
so dde-session only set partially needed

Log:
  • Loading branch information
dengbo11 committed Nov 22, 2023
1 parent 754eb65 commit ef1748f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/dde-session/environmentsmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,10 @@ void EnvironmentsManager::init()
void EnvironmentsManager::createGeneralEnvironments()
{
double scaleFactor = Utils::SettingValue("com.deepin.xsettings", QByteArray(), "scale-factor", 1.0).toDouble();
auto envs = QProcessEnvironment::systemEnvironment();
auto keys = envs.keys();

for (const auto& key : keys) {
m_envMap.insert(key, envs.value(key));
}
QByteArray sessionType = qgetenv("XDG_SESSION_TYPE");

// only insert partially needed env, do not set other environment
m_envMap.insert("XDG_SESSION_TYPE", sessionType);
m_envMap.insert("GNOME_DESKTOP_SESSION_ID", "this-is-deprecated");
m_envMap.insert("XDG_CURRENT_DESKTOP", "DDE");
m_envMap.insert("QT_DBL_CLICK_DIST", QString::number(15 * scaleFactor));
Expand Down

0 comments on commit ef1748f

Please sign in to comment.