Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Search
Appearance
Log in
Personal tools
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
GNC Examples
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
__TOC__ == Introduction to GNC == ''Note: this page assumes knowledge of the GNC script process and it's commands and parameters. Please have a full understanding of the [[Groovix NetCustomization]] page before continuing.'' === Starting a new GNC Script using the GNC template === When you are ready to make your own GNC update, run the following commands in an [[xterm]] window to create a copy of the gnc template: <font class="code"> <br> cd /var/www/groovix/gnc/updates/[customer]/ <br> gnc-new [updatename] <br> </font> where [customer] is your custom groovix version code (GX_VERSION= in /etc/groovix/groovix.conf), and [updatename] is the name of your update. A directory will be created at this new location containing the gnc file necessary to run the update. === Using the gncget command === The directory structure inside each GNC update should be treated as if it is the / (root) directory. When the gncget command is used, it copies and replaces files in the GNC update directory in the same directories as the actual / (root) directory. For example, to replace the <font class="code">/etc/network/interfaces</font> file on a machine, create the interfaces file in a <font class="code">etc/network/</font> directory under your update directory and use the gncget command <font class="code">gncget --mod=644 /etc/network/interfaces</font>. === Using the apt-get command === * The <font class="code">groovix-auto-apt-get install</font> command is used to download a package and install it on a local machine. This command can also be used to upgrade an already existing program to the most recent version. * The <font class="code">groovix-auto-apt-get remove</font> command is used to remove a program on a local machine. == Examples == ''Note: each dashed box represents the contents of the gnc file relevant to that script example.'' === Setting a custom homepage === <pre class="dashed-box"> ############################################################################################################### GNC_PARAMETERS=' --runonce --skipinstall --abort ' ############################################################################################################### #Assign the homepage variable of the pac.conf file bashconfset.pl PAC_BROWSER_STARTUP_HOMEPAGE "[homepage]" /etc/groovix/pac.conf </pre> <nowiki>*</nowiki>Change [homepage] to the desired website you want to use. For example, to use Google, enter <font class="code"><nowiki>http://www.google.com</nowiki></font> inbetween the quotes. === Setting a custom desktop background === <pre class="dashed-box"> ############################################################################################################### GNC_PARAMETERS=' --runonce --skipinstall --skiplive --abort ' ############################################################################################################### #Get custom image, assign read/write permissions, and place it in the proper directory gncget --mod=644 /var/lib/groovix/pac/images/[desktop_background_image] </pre> <nowiki>*</nowiki>Change [desktop_background_image] to the name of the image file included in the gnc update. === Setting custom screensaver images === <pre class="dashed-box"> ############################################################################################################### GNC_PARAMETERS=' --runonce --skipinstall --skiplive --abort ' ############################################################################################################### #Assign the image directory variable of the pac.conf file bashconfset.pl PAC_CUSTOM_SCREENSAVER_IMAGES_URL_DIR "[ServerIP]/groovix/screensaver/default/" /etc/groovix/pac.conf </pre> <nowiki>*</nowiki>Change [ServerIP] to the IP address of your local [[Groovix Server]]. Now, any images uploaded to the directory /groovix/screensaver/default/ on your server will be used in the screensaver slideshow. === Setting a custom welcome message on the login screen === <pre class="dashed-box"> ############################################################################################################### GNC_PARAMETERS=' --runonce --skipinstall --abort ' ############################################################################################################### #Assign the welcome message variable of the pac.conf file bashconfset.pl GDM_WELCOME_MESSAGE "Enter your welcome message here" /etc/groovix/pac.conf </pre> === Setting the Acceptable Use Policy page === <pre class="dashed-box"> ############################################################################################################### GNC_PARAMETERS=' --runonce --skipinstall --abort ' ############################################################################################################### #Get latest groovix-accept package apt-get-dontask install groovix-accept #Assign the acceptable use variable of the pac.conf file to true bashconfset.pl GK_ACCEPT_USE true /etc/groovix/pac.conf #Assign the web address of the acceptable use page on the local Groovix Server in the accept.conf file pyconfset.pl mainurl '[ServerIP]/groovix/accept/acceptable-use.html' /etc/groovix/accept.conf </pre> <nowiki>*</nowiki>Change [ServerIP] to the IP address of your local [[Groovix Server]]. === Enabling the web filter === <pre class="dashed-box"> ############################################################################################################### GNC_PARAMETERS=' --runonce --skipinstall --abort ' ############################################################################################################### #Install web filter software apt-get-dontask install groovix-guardian-desktop #Assign the Groovix Guardian variable of the pac.conf file to true bashconfset.pl GK_GROOVIXGUARDIAN_ENABLE true /etc/groovix/pac.conf #Assign the enable filter variable of the cmon.conf file to true pyconfset.pl enable_gxfilter 1 /etc/groovix/cmon.conf </pre> === Whitelisting a website === <pre class="dashed-box"> ############################################################################################################### GNC_PARAMETERS=' --runonce --skipinstall --abort ' ############################################################################################################### #Assign addresses to the whitelist variable of the pac.conf file bashconfset.pl GK_SITE_WHITELIST '[website],[website]' /etc/groovix/pac.conf </pre> <nowiki>*</nowiki>Change [website] to the domain, not the page of the site you would like to allow through the filter. Example, test.com, or example.test.com. To add multiple entries, separate with commas. If updating the whitelist with a new GNC script, all prior entries need to be included with the new entries. === Adding sites to the DansGuardian blacklist & whitelist=== <pre class="dashed-box"> ############################################################################################################### GNC_PARAMETERS=' --runonce --skipinstall --skiplive --abort ' ############################################################################################################### #Assign addresses to the bannedsitelist file used by Groovix Guardian echo '[website]' >> /etc/dansguardian/lists/bannedsitelist #Assign addresses to the exceptionsitelist file used by Groovix Guardian echo '[website]' >> /etc//dansguardian/lists/exceptionsitelist </pre> <nowiki>*</nowiki>Change [website] to the domain, not the page of the site you would like to allow through the filter. Example, test.com, or example.test.com. === Configuring a Reservation Station machine === <pre class="dashed-box"> ############################################################################################################### GNC_PARAMETERS=' --runonce --skipinstall --abort ' ############################################################################################################### #Assign customer username and password variables of the pacrez.conf file pyconfset.pl customid [username] /etc/groovix/pacrez.conf pyconfset.pl custompw [password] /etc/groovix/pacrez.conf #Assign the local Groovix Server variable of the pacrez.conf file pyconfset.pl pacrezserver '[ServerIP]/groovix/pacrez/python/user_access.py' /etc/groovix/pacrez.conf #Enable pacrez variables to true for pacauth.conf, cmon.conf, and pac.conf files pyconfset.pl enablepacrez 1 /etc/groovix/pacauth.conf pyconfset.pl enablepacrez 1 /etc/groovix/cmon.conf bashconfset.pl GK_PACREZ_ENABLE true /etc/groovix/pac.conf </pre> <nowiki>*</nowiki>Change [username] and [password] to the name and password used by your custom Groovix configuration. View the [[Contact Information]] page if you need assistance with getting this information. <nowiki>*</nowiki>Change [ServerIP] to the local IP address of your [[Groovix Server]]. === Catalog only/kiosk machine === <pre class="dashed-box"> ############################################################################################################### GNC_PARAMETERS=' --runonce --skipinstall --abort ' ############################################################################################################### #Assign variable to allow screensaver to run in session bashconfset.pl SAKLOCKSAVER_RUN_IN_USER_SESSION true /etc/groovix/pac.conf #Cycle screensaver/logout every 20 minutes bashconfset.pl GK_LOGOUT_TIME 20 /etc/groovix/pac.conf sed -i 's/*cycle:.*/*cycle: 0:20:00/' /etc/X11/app-defaults/XScreenSaver bashconfset.pl GK_PACREZ_ENABLE false /etc/groovix/pac.conf pyconfset.pl enablepacrez 0 /etc/groovix/pacauth.conf pyconfset.pl enablepacrez 0 /etc/groovix/cmon.conf #Add catalog user NEWUSER=catalog adduser --disabled-login --gecos "Infostation Access" $NEWUSER addgroup $NEWUSER audio addgroup $NEWUSER plugdev #Prevent SIP and guest logins from working pyconfset.pl localauthonly 1 /etc/groovix/pacauth.conf #Enable logout when Firefox is closed bashconfset.pl GK_FIREFOX_CLOSE_LOGOUT true /etc/groovix/pac.conf bashconfset.pl GDM_TIMED_LOGIN_ENABLE true /etc/groovix/pac.conf bashconfset.pl GDM_TIMED_LOGIN_USER catalog /etc/groovix/pac.conf bashconfset.pl GDM_TIMED_LOGIN_DELAY 1 /etc/groovix/pac.conf #Disable acceptable use prompt bashconfset.pl GK_ACCEPT_USE false /etc/groovix/pac.conf </pre> === Setting a custom user profile === ''Follow the steps on the "Making changes to the user profile" section of the [[Groovix Profiles]] page before continuing'' <pre class="dashed-box"> ############################################################################################################### GNC_PARAMETERS=' --runonce --abort ' ############################################################################################################### #Get, unzip, and place profile cpio file gncget --gunzip --mod=644 /var/lib/groovix/pac/home/template.cpio </pre> === Downloading large files with a random delay === <pre class="dashed-box"> ############################################################################################################### GNC_PARAMETERS=' --runonce --abort ' ############################################################################################################### #Create random delay so download is staggered across multiple machines MAX_RANDOM_DELAY=10 MY_DELAY=$[ ( $(head -c4 /dev/urandom | od -t u4 | awk '{ print $2 }') % $MAX_RANDOM_DELAY ) ] echo "Waiting $MY_DELAY seconds before downloading new cpio" sleep $MY_DELAY #Get, unzip, and place profile cpio file gncget --mod=644 --gunzip /var/lib/groovix/pac/home/custom.cpio </pre> === Setting up or changing printers === <pre class="dashed-box"> ############################################################################################################### GNC_PARAMETERS=' --runonce --skipinstall ' ############################################################################################################### #Output machine type and assign it to the MYTYPE variable MYTYPE=`cat /etc/groovix/type` echo MYTYPE is $MYTYPE #If statement to apply printer setup to specific machine types if [ $MYTYPE = "[reservation]" ] ; then echo "printers for reservations stations handled manually" else #Stop CUPS service, otherwise config files will be overwritten /etc/init.d/cups stop #Clear CUPS cache set +e rm -f /var/cache/cups/*.ipp set -e #Get and place printers.conf file and printer .ppd files gncget --mod=644 /etc/cups/printers.conf gncget --mod=644 /etc/cups/ppd/black_and_white.ppd gncget --mod=644 /etc/cups/ppd/color.ppd gncget --mod=644 /etc/cups/ppd/childrens.ppd #Restart CUPS /etc/init.d/cups start #end if statement fi </pre> <nowiki>*</nowiki>Change [reservation] with the name for your [[Reservation Station]] machine type, change [date] to date of the backup. === Setting custom shutdown delays and shutdown times === <pre class="dashed-box"> ############################################################################################################### GNC_PARAMETERS=' --runonce --skipinstall --abort ' ############################################################################################################### #Assign shutdown and end of day logoff variables to the pac.conf and netcustomization.conf files bashconfset.pl SHUTDOWN_UPDATE_DELAY [time] /etc/groovix/netcustomization.conf #Assign time, in minutes, before shutdown to display first warning message bashconfset.pl PAC_SHUTDOWN_WARNING_DELAY [time] /etc/groovix/pac.conf #Assign context of first warning message bashconfset.pl PAC_SHUTDOWN_WARNING_MESSAGE 'You have 10 minutes remaining until this computer shuts down. Please be sure to print and save your work or it will be lost.' /etc/groovix/pac.conf #Assign time, in minutes, before shutdown to display final warning message bashconfset.pl PAC_SHUTDOWN_LAST_WARNING_DELAY [time] /etc/groovix/pac.conf #Assign context of final warning message bashconfset.pl PAC_SHUTDOWN_LAST_WARNING_MESSAGE 'You have 5 minutes remaining until this computer shuts down. Please be sure to print and save your work or it will be lost.' /etc/groovix/pac.conf #set default closing time for all days ( must use 24 hour time, not am/pm ) : bashconfset GX_CLOSING_TIME[default]=20:00 /etc/groovix/groovix.conf # set closing times by day of the week ( must use 24 hour time, not am/pm ) : bashconfset GX_CLOSING_TIME[Mon]=20:00 /etc/groovix/groovix.conf bashconfset GX_CLOSING_TIME[Tue]=18:00 /etc/groovix/groovix.conf bashconfset GX_CLOSING_TIME[Wed]=20:00 /etc/groovix/groovix.conf bashconfset GX_CLOSING_TIME[Thu]=18:00 /etc/groovix/groovix.conf bashconfset GX_CLOSING_TIME[Fri]=17:00 /etc/groovix/groovix.conf bashconfset GX_CLOSING_TIME[Sat]=17:00 /etc/groovix/groovix.conf bashconfset GX_CLOSING_TIME[Sun]=13:00 /etc/groovix/groovix.conf # set special closing time override for a specific day, 2023-12-24 at 14:00 in this example: bashconfset GX_CLOSING_TIME[20231224]=14:00 /etc/groovix/groovix.conf
Summary:
Please note that all contributions to GroovixWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
GroovixWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)