GNC Examples

From GroovixWiki
Revision as of 21:38, 1 May 2012 by Chris (talk | contribs)

Jump to: navigation, search

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 command in an xterm window to create a copy of the gnc template: cp -rp var/www/groovix/gnc/updates/doc/template /var/www/groovix/updates/[customer]/[updatename] where [customer] is the name of your Groovix site (Groovix site information can found in the /etc/groovix/version file), 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 /etc/network/interfaces file on a machine, create the interfaces file in a etc/network/ directory under your update directory and use the gncget command gncget --mod=644 /etc/network/interfaces.


Using the apt-get command

  • The apt-get-dontask install 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 apt-get-dontask remove 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

###############################################################################################################
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

*Change [homepage] to the desired website you want to use. For example, to use Google, enter http://www.google.com inbetween the quotes.


Setting a custom desktop background

###############################################################################################################
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]

*Change [desktop_background_image] to the name of the image file included in the gnc update.


Setting custom screensaver images

###############################################################################################################
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

*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

###############################################################################################################
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


Setting the Acceptable Use Policy page

###############################################################################################################
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

*Change [ServerIP] to the IP address of your local GroovixServer.


Enabling the web filter

###############################################################################################################
GNC_PARAMETERS=' --runonce --skipinstall --abort '
###############################################################################################################

#
apt-get-dontask install groovix-guardian-desktop

bashconfset.pl GK_GROOVIXGUARDIAN_ENABLE true /etc/groovix/pac.conf

pyconfset.pl enable_gxfilter 1 /etc/groovix/cmon.conf


Whitelisting a website



Adding sites to the DansGuardian exception list



Configuring a Reservation Station machine



Catalog only/kiosk machine



Setting a custom user profile


Downloading large files with a random delay


Setting up or changing printers


Setting custom shutdown delays and shutdown times