Changeset View
Changeset View
Standalone View
Standalone View
startkde/startplasma.cpp
Show First 20 Lines • Show All 321 Lines • ▼ Show 20 Line(s) | 321 | { | |||
---|---|---|---|---|---|
322 | const QByteArray usr_fdir = QFile::encodeName(QDir::home().absoluteFilePath(QStringLiteral(".fonts"))); | 322 | const QByteArray usr_fdir = QFile::encodeName(QDir::home().absoluteFilePath(QStringLiteral(".fonts"))); | ||
323 | if (qEnvironmentVariableIsSet("GS_LIB")) { | 323 | if (qEnvironmentVariableIsSet("GS_LIB")) { | ||
324 | qputenv("GS_LIB", usr_fdir + ':' + qgetenv("GS_LIB")); | 324 | qputenv("GS_LIB", usr_fdir + ':' + qgetenv("GS_LIB")); | ||
325 | } else { | 325 | } else { | ||
326 | qputenv("GS_LIB", usr_fdir); | 326 | qputenv("GS_LIB", usr_fdir); | ||
327 | } | 327 | } | ||
328 | } | 328 | } | ||
329 | 329 | | |||
330 | bool startKDEInit() | 330 | bool startKSMServer(bool wayland) | ||
331 | { | 331 | { | ||
332 | // We set LD_BIND_NOW to increase the efficiency of kdeinit. | | |||
333 | // kdeinit unsets this variable before loading applications. | | |||
334 | const int exitCode = runSync(QStringLiteral(CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 "/start_kdeinit_wrapper"), { QStringLiteral("--kded"), QStringLiteral("+kcminit_startup") }, { QStringLiteral("LD_BIND_NOW=true") }); | | |||
335 | if (exitCode != 0) { | | |||
336 | messageBox(QStringLiteral("startkde: Could not start kdeinit5. Check your installation.")); | | |||
337 | return false; | | |||
338 | } | | |||
339 | | ||||
340 | OrgKdeKSplashInterface iface(QStringLiteral("org.kde.KSplash"), QStringLiteral("/KSplash"), QDBusConnection::sessionBus()); | 332 | OrgKdeKSplashInterface iface(QStringLiteral("org.kde.KSplash"), QStringLiteral("/KSplash"), QDBusConnection::sessionBus()); | ||
341 | iface.setStage(QStringLiteral("kinit")); | 333 | iface.setStage(QStringLiteral("kinit")); | ||
342 | return true; | | |||
343 | } | | |||
344 | | ||||
345 | bool startKSMServer(bool wayland) | | |||
346 | { | | |||
347 | // finally, give the session control to the session manager | 334 | // finally, give the session control to the session manager | ||
348 | // see kdebase/ksmserver for the description of the rest of the startup sequence | 335 | // see kdebase/ksmserver for the description of the rest of the startup sequence | ||
349 | // if the KDEWM environment variable has been set, then it will be used as KDE's | 336 | // if the KDEWM environment variable has been set, then it will be used as KDE's | ||
350 | // window manager instead of kwin. | 337 | // window manager instead of kwin. | ||
351 | // if KDEWM is not set, ksmserver will ensure kwin is started. | 338 | // if KDEWM is not set, ksmserver will ensure kwin is started. | ||
352 | // kwrapper5 is used to reduce startup time and memory usage | 339 | // kwrapper5 is used to reduce startup time and memory usage | ||
353 | // kwrapper5 does not return useful error codes such as the exit code of ksmserver. | 340 | // kwrapper5 does not return useful error codes such as the exit code of ksmserver. | ||
354 | // We only check for 255 which means that the ksmserver process could not be | 341 | // We only check for 255 which means that the ksmserver process could not be | ||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |