<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>scripts (new threads)</title>
		<link>http://linguasos.wikidot.com/forum/c-26063/scripts</link>
		<description>Threads in the forum category &quot;scripts&quot; - some scripts I wrote to facilitate stuff</description>
				<copyright></copyright>
		<lastBuildDate></lastBuildDate>
		
					<item>
				<guid>http://linguasos.wikidot.com/forum/t-34774</guid>
				<title>auto add selected apps</title>
				<link>http://linguasos.wikidot.com/forum/t-34774/auto-add-selected-apps</link>
				<description>A script I am contemplating adding to the next release to facilitate addition of specific, recommended applications.</description>
				<pubDate>Thu, 10 Jan 2008 19:49:00 +0000</pubDate>
				<wikidot:authorName>tonytraductor</wikidot:authorName>				<wikidot:authorUserId>61021</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>#!/bin/bash</p> <p>## install recommended packages via a script.<br /> export DISPLAY=:0.0</p> <p>usr=$(whoami)</p> <p>zenity —info —title EXTRAS —text "Greetings, $usr. First we need to update apt."</p> <p>gksu apt-get update | tee &gt;(zenity —title "updating apt" —progress —pulsate —auto-close)</p> <p>zenity —info —title EXTRAS —text "Okay, $usr, now we are ready to install KDE. Click OKAY to proceed."</p> <p>gksu apt-get install kdebase | tee &gt;(zenity —title Idle-Python —text "Installing KDE Desktop" —progress —pulsate —auto-close)</p> <p>zenity —info —title SUCCESS —text "KDE Desktop installed"</p> <p>zenity —info —title B-BYE —text "Thank you for using Linguas OS, $usr! Have a nice day"</p> <p>exit</p> <ol> <li>it occurs to me that I should find a way to pipe the output from apt to a window or text file.</li> <li># you know, just in case the network is down or repos are hung or something, so the user know what happened.</li> <li>## Obviously, I could add other packages to be installed, or separate scripts.</li> <li>## As likely as not, I will scrap this, and just leave good instructions for the user to use synaptic, which is pretty self-explanatory anyway.</li> <li># It's fun to write scripts, though!</li> </ol> <p>Linux is FUN!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://linguasos.wikidot.com/forum/t-34772</guid>
				<title>Linguas OS appfinder / menu edit</title>
				<link>http://linguasos.wikidot.com/forum/t-34772/linguas-os-appfinder-menu-edit</link>
				<description>This script will assist the user in finding an application, and adding it to the fluxbox desktop menu.</description>
				<pubDate>Thu, 10 Jan 2008 19:40:59 +0000</pubDate>
				<wikidot:authorName>tonytraductor</wikidot:authorName>				<wikidot:authorUserId>61021</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>#!/bin/bash</p> <ol> <li>app finder for Linguas OS (www.linguasos.org).</li> <li>find apps and enable entry to flux menu</li> <li>author, Anthony Baldwin / <span class="wiki-email">gro.sosaugnil|rotcudartynot#gro.sosaugnil|rotcudartynot</span></li> <li>this little scripty is 100% gpl</li> </ol> <ol> <li>whoami gives the name of the currently logged in user.</li> </ol> <p>u=$(whoami)</p> <p>zenity —info —title LingApp —width 500 —text "Greetings, $u! This application will assist you in finding applications and adding them to your Linguas OS Fluxbox desktop menu."</p> <p>h=$(zenity —entry —title LingApp —width 500 —text "Do you require instructions on how to find applications and them to your menu, enter 'h' for help below. To proceed to find your application, 'f' for find.")</p> <p>if [ $h = h ]; then</p> <p>zenity —title LingApp —text-info —width 600 —height 600 —filename="/usr/local/share/lomened"</p> <ol> <li>Don't forget to put lomened text file into /usr/local/share!</li> <li>probably add a page to the Linguas OS wiki to direct users to as well.</li> </ol> <p>ap=$(zenity —entry —title LingApp —text "Enter the name of the application you wish to find")</p> <p>loc=$(whereis $ap)</p> <p>zenity —info —title LingApp —text "If you have entered the correct name for your application, and it is installed, then $ap is here: $loc".</p> <p>ed=$(zenity —entry —title LingApp —text "Would you like to edit your Fluxbox menu to add this application now? -enter y for yes.")</p> <p>if [ $ed = y ]; then</p> <p>kate ~/.fluxbox/menu # will have to edit this to medit !!</p> <p>exit</p> <p>else</p> <p>zenity —info —title LingApp —text "Thank you for using Linguas OS, $usr!"</p> <p>fi<br /> fi</p> <p>exit</p> <ol> <li>lomened gives further instructions. It is posted in reply to this script.</li> </ol> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://linguasos.wikidot.com/forum/t-34771</guid>
				<title>back up script</title>
				<link>http://linguasos.wikidot.com/forum/t-34771/back-up-script</link>
				<description>a script to remind me to back up important files, and execute the back up.</description>
				<pubDate>Thu, 10 Jan 2008 19:38:38 +0000</pubDate>
				<wikidot:authorName>tonytraductor</wikidot:authorName>				<wikidot:authorUserId>61021</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>#!/bin/bash</p> <ol> <li>this is a script to back up the files for my business</li> <li>I put it in my autostart.sh so it comes up when I log into fluxbox</li> <li>but one could just as well put it in crontab to pop up once a week, or something.</li> </ol> <p>A=$(zenity —entry —title "Back it UP!" —text "It is recommended that you back up your financial data at least once a week. Would you like to back up your files now? Type 'yes' to continue")</p> <p>if [ $A != yes ]; then</p> <p>zenity —warning —title Okay —text "Don't forget to do a back up soon!"</p> <p>end</p> <p>else</p> <p>zenity —info —title "Proceed" —text "Back Up will begin now."</p> <ol> <li>I originally wrote this to run on kubuntu, but for Linguas OS, you would use gksu instead of sudo</li> <li>also, one could use rsync instead of cp -u (to my knowledge, they do about the same thing, copy directories and files from one location to another, but only changing what is new in them).</li> </ol> <p>sudo cp -r -u /path/to/files /path/to/back-up/dir/ | tee &gt;(zenity —title "Copying files to back-up!" —progress —pulsate —auto-close)</p> <p>sudo cp -r -u /home/username/OmegaT/TMs /path/to/backup/dir | tee &gt;(zenity —title "Copying translation memories to back-up!" —progress —auto-close)</p> <p>zenity —info —title "COMPLETE" —text "Back-up is now complete."</p> <p>exit</p> <p>fi</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>