<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-IE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I’m unaware of a script, but you could just create a
<b>Default Project</b>. These can be stored at a central location, everyone can access or place on their desktop, which will load all the Layers they require.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">If it’s any help, all the connection details are stored under the QGIS user Profiles. On Windows these can be found here C:\Users\<b><i>username</i></b>\AppData\Roaming\QGIS\QGIS3\profiles,
 maybe someone here could point out how you might be able to create a single file which can be placed within each users default Profile.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I think though messing with peoples profiles could be problematic, which is why I’d suggest the
<b>Default Project</b> as above<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Sorry I can’t be of any more help.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><br>
Richard.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<table style="FONT-SIZE: 9pt; HEIGHT: 321px; FONT-FAMILY: Arial, sans-serif; WIDTH: 500px; LINE-HEIGHT: 15px" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="FONT-SIZE: 9pt; FONT-FAMILY: Arial,sans-serif; WIDTH: 500px; COLOR: #004d44; PADDING-BOTTOM: 6px">
<span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #004d44"><br>
——</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #004d44">Richard McDonnell MSc GIS, FME Certified Professional</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44"><i>FRM Data Management</i></span><br>
<br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">——</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #004d44">Oifig na nOibreacha Poiblí</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">Office of Public Works</span><br>
<br>
<span style="FONT-FAMILY: Arial, sans-serif; FONT-WEIGHT: bold; COLOR: #565148">Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #565148">Jonathan Swift Street, Trim, Co Meath, C15 NX36</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #565148">——</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #565148">M +353 87 688 5964 T +353 46 942 2409</span><br>
<a href="https://gov.ie/opw">https://gov.ie/opw</a><br>
<br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">——<br>
To send me files larger than 30MB, please use the link below https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie<br>
</span><br>
<span style="FONT-FAMILY: Arial, sans-serif; COLOR: #004d44">Email Disclaimer: https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/
</span></td>
</tr>
</tbody>
</table>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Qgis-user <qgis-user-bounces@lists.osgeo.org>
<b>On Behalf Of </b>tim dunlevie<br>
<b>Sent:</b> 07 January 2022 00:52<br>
<b>To:</b> qgis-user@lists.osgeo.org<br>
<b>Subject:</b> [Qgis-user] automate connection to a PostGIS db for QGIS<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi guys,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">About to host a PostGIS db on our server, and want users to connect to the db in QGIS.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Is there a way I can push out a script (?) to all user's machines that sets the connection to the postgis db for QGIS?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Rather than manually entering authentication on each machine?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I have one generic role for users as they will be read-only users.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Tim<o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>