<?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 posts)</title>
		<link>http://linguasos.wikidot.com/forum/c-26063/scripts</link>
		<description>Posts 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#post-89687</guid>
				<title>auto add selected apps: auto add selected apps</title>
				<link>http://linguasos.wikidot.com/forum/t-34774/auto-add-selected-apps#post-89687</link>
				<description></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#post-89686</guid>
				<title>Linguas OS appfinder / menu edit: Re: Linguas OS appfinder / menu edit</title>
				<link>http://linguasos.wikidot.com/forum/t-34772/linguas-os-appfinder-menu-edit#post-89686</link>
				<description></description>
				<pubDate>Thu, 10 Jan 2008 19:42:21 +0000</pubDate>
				<wikidot:authorName>tonytraductor</wikidot:authorName>				<wikidot:authorUserId>61021</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <ol> <li>Here are the instructions that LingApp brings up:</li> </ol> <p>Linguas OS Application Finder - How to Edit your Fluxbox Menu<br /> abaldwin / <span class="wiki-email">gro.sosaugnil|rotcudartynot#gro.sosaugnil|rotcudartynot</span></p> <p>Close these instructions after reading these instructions, LingApp will assist you to find an application and add it to your menu.</p> <ol> <li>(note: I'd like to find a way to enable printing from the zenity text-info dialog…hmmmm.)</li> </ol> <p>In Fluxbox, when you add applications, they will not be automatically added to your fluxbox menu.<br /> LingApp is a handy little script that will help you to find where the applications have bee installed. In most cases, this will be in a location such as<br /> /usr/bin/yourapplication<br /> or<br /> /usr/sbin/application</p> <p>To add this application to launch from your fluxbox menu, you will have to add it manually. This is easily done by opening the fluxbox menu in a text editor and adding an entry for your application.<br /> Don't forget to save your changes to the menu.</p> <p>Your fluxbox menu will be in a hidden folder in your /home directory<br /> such as /home/yourname/.fluxbox<br /> You can open it and edit it by entering<br /> medit ~/.fluxbox/menu<br /> in xterm, which will open a text editor and display the menu for editing.</p> <p>Fluxbox menu entries look like this:</p> <p>[exec] (name of application) {/path/to/application}</p> <p>For instance, the menu entry for LingApp is</p> <p>[exec] (LingApp) {/usr/local/bin/lingapp}</p> <p>If you don't know where the application is, you can run</p> <p>whereis 'name of application'<br /> in xterm to find it.<br /> LingApp will do this for you after you close these instructions.<br /> Another means of finding an application on Linguas OS is to use Searchmonkey<br /> which is in your Admin submenu of the Linguas OS Fluxbox desktop menu.</p> <p>All the same, here is an example, say, if you were trying to find openoffice writer:<br /> You would open xterm or another terminal and do as follows:</p> <p>user@localhost:~$ whereis oowriter</p> <p>The terminal would then output this:</p> <p>oowriter: /usr/bin/oowriter /usr/bin/X11/oowriter /usr/share/man/man1/oowriter.1.gz</p> <p>You will notice that the first entry is "/usr/bin/oowriter"</p> <p>This is the command to start openoffice writer (your word processor).<br /> You will see this in the default Linguas OS menu in the "office" submenu.</p> <p>So, say you have decided to add xmms (winamp for linux) using synaptic, and, now you want to add it to your menu.</p> <p>You would enter xmms into LingApp, and it would give tell you that xmms is at /usr/bin/xmms.</p> <p>To add xmms to your fluxbox menu, then, you would add an entry like this</p> <p>[exec] (xmms) {/usr/bin/xmms}</p> <p>This would then show up in your menu, and you could start it with a click.</p> <p>You can add sumbenus, too:</p> <p>[submenu] (name of submenu)<br /> [exec] (name) {command}<br /> [exec] (name) {command}<br /> [end]</p> <p>For instance, say you want to add a submenu to your fluxbox menu for multimedia applications, and then add any multimedia applications to that menu.<br /> It might look something like this:</p> <p>[submenu] (Multimedia)<br /> [exec] (xmms) {/usr/bin/xmms}<br /> [exec] (gxine) {/usr/bin/gxine}<br /> [end]</p> <p>If you completely mess up the menu, you can run<br /> fluxbox-generate_menu<br /> in xterm to reconstruct something reasonable.<br /> Then you can edit it to customize it again.<br /> Also, I have included an extra copy of the default Linguas OS menu in<br /> /home/yourname/.bktxts<br /> You can move it to /home/yourname/.fluxbox<br /> to restore the default Linguas OS menu.</p> <p>If you require further assistance, please feel free to ask on the Linguas OS Yahoo! group at<br /> <a href="http://tech.groups.yahoo.com/group/linguasos/">http://tech.groups.yahoo.com/group/linguasos/</a></p> <p>Thanks for using Linguas OS!</p> <p>Anthony Baldwin<br /> <span class="wiki-email">gro.sosaugnil|rotcudartynot#gro.sosaugnil|rotcudartynot</span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://linguasos.wikidot.com/forum/t-34772#post-89684</guid>
				<title>Linguas OS appfinder / menu edit: Linguas OS appfinder / menu edit</title>
				<link>http://linguasos.wikidot.com/forum/t-34772/linguas-os-appfinder-menu-edit#post-89684</link>
				<description></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#post-89682</guid>
				<title>back up script: back up script</title>
				<link>http://linguasos.wikidot.com/forum/t-34771/back-up-script#post-89682</link>
				<description></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>