[plasmalnf] Fix command-line options, run in target user environment
This commit is contained in:
parent
7e5970324f
commit
388399f256
@ -72,26 +72,22 @@ PlasmaLnfJob::exec()
|
||||
{
|
||||
cDebug() << "Plasma Look-and-Feel Job";
|
||||
|
||||
#if 0
|
||||
int r = 0;
|
||||
auto system = CalamaresUtils::System::instance();
|
||||
Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
|
||||
|
||||
if ( system->doChroot() )
|
||||
{
|
||||
r = system->targetEnvCall( QStringList( { m_lnfPath, "--resetlayout", "--apply", m_id } ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
r = system->targetEnvCall( QStringList(
|
||||
{ "sudo", "-E", "-u", gs->value("username").toString(), m_lnfPath, "-a", m_id } ) );
|
||||
}
|
||||
QStringList command;
|
||||
|
||||
if ( !system->doChroot() )
|
||||
command << "sudo" << "-E" << "-H" << "-u" << gs->value("username").toString();
|
||||
|
||||
command << m_lnfPath << "-platform" << "minimal" << "--resetLayout" << "--apply" << m_id;
|
||||
|
||||
int r = system->targetEnvCall( command );
|
||||
if (r)
|
||||
return Calamares::JobResult::error(
|
||||
tr( "Could not select KDE Plasma Look-and-Feel package" ),
|
||||
tr( "Could not select KDE Plasma Look-and-Feel package" ) );
|
||||
#endif
|
||||
|
||||
return Calamares::JobResult::ok();
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ PlasmaLnfPage::activated(const QString& name)
|
||||
cDebug() << "Changed to" << name;
|
||||
|
||||
QProcess lnftool;
|
||||
lnftool.start( Calamares::lnftool(), {"--resetlayout", "--apply", name} );
|
||||
lnftool.start( Calamares::lnftool(), {"--resetLayout", "--apply", name} );
|
||||
|
||||
if ( lnftool.waitForStarted(1000) && lnftool.waitForFinished( 1000 ) && (lnftool.exitCode() == 0) && (lnftool.exitStatus() == QProcess::NormalExit ) )
|
||||
; // OK
|
||||
|
Loading…
Reference in New Issue
Block a user