avoid interaction installing xfce

Peter Flynn peter at silmaril.ie
Sun Dec 6 22:33:20 UTC 2020


On 06/12/2020 16:20, david wrote:
> Folks
> 
> I am trying to install xfce4-session in a several Ubuntu 20.04 LTS 
> servers, some physical, some virtual.  These are fresh installs.  The 
> install is driven from a Perl script, containing the following (as root):
> 
> $ENV{DEBIAN_FRONTEND} = 'noninteractive';
> system( "apt -y -qq install xfce4-session" );
> 
> Apparently this install requires intervention from the user, under the 
> title of "Package Configuration" and thus assumes there's a console.  In 
> this case, there is no one present.  I really don't want to go to each 
> of them and interact with the installation sequence by hand..  Is there 
> some way to avoid the interactive process in the install?   Any clues?

Would it work with a simple confirmation, eg

system( "yes|apt -y -qq install xfce4-session" );

Or if you know that a string response is needed

system( "echo whatever|apt -y -qq install xfce4-session" );

Peter




More information about the ubuntu-users mailing list