tag:blogger.com,1999:blog-62989091668580980172024-03-13T06:30:39.098-07:00Step by StepChenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.comBlogger118125tag:blogger.com,1999:blog-6298909166858098017.post-33369648353993486002015-02-26T01:22:00.001-08:002015-02-26T01:22:17.533-08:00youtube downloader<div dir="ltr" style="text-align: left;" trbidi="on">
The best (and free) youtube downloader is fastest tube.<br />
Refer to the following Website for more info: http://kwizzu.com<br />
<br /></div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-72348253548732264772015-01-04T01:52:00.001-08:002015-01-04T01:52:25.672-08:00Install and Configure SAMBA in UBUNTU<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Arial,Helvetica,sans-serif;">I have three machines in a local network: mac, ubuntu and windows.</span><br />
<span style="font-family: Arial,Helvetica,sans-serif;">Ubuntu is used as a server, and I need quite often exchange files between mac and windows. </span><br />
<br />
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">1: Install Samba</span></span><br />
<br />
<pre><strong> <span style="font-family: "Courier New",Courier,monospace;"> sudo apt-get update
<span class="anchor" id="line-2"></span> sudo apt-get install samba</span></strong></pre>
<pre><strong> </strong></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">2: Create shared folder</span></span></pre>
<pre><strong> </strong></pre>
<pre><span style="font-family: "Courier New",Courier,monospace;"><strong> mkdir -a ~/Documents/samba</strong></span></pre>
<pre><strong> </strong></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;"> It is also recommended to have this folder in /svr/samba/share. If you prefer this, you have to assure that the user has the right to do the operations in this folder.</span></span><strong>
</strong></pre>
<pre><strong> </strong></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">3: Backup configuration file </span></span></pre>
<pre><strong></strong>
<span style="font-family: "Courier New",Courier,monospace;"><strong> sudo cp /etc/samba/smb.conf /etc/samba/sab.conf.backup</strong></span></pre>
<pre><strong>
</strong></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">4: Edit configuration file</span></span></pre>
<pre><strong></strong>
<strong> sudo vim /etc/samba/smb.conf</strong></pre>
<pre><strong> </strong></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;"> At the end of this file, add the following lines:</span></span></pre>
<pre><strong> </strong></pre>
<pre><strong> <span style="font-family: "Courier New",Courier,monospace;"> [share]</span></strong></pre>
<pre><span style="font-family: "Courier New",Courier,monospace;"><strong> comment = Ubuntu File Server Shared</strong></span></pre>
<pre><span style="font-family: "Courier New",Courier,monospace;"><strong> path = /home/user_name/Documents/samba</strong></span></pre>
<pre><span style="font-family: "Courier New",Courier,monospace;"><strong> browsable = yes</strong></span></pre>
<pre><span style="font-family: "Courier New",Courier,monospace;"><strong> valid users = user_name</strong></span></pre>
<pre><span style="font-family: "Courier New",Courier,monospace;"><strong> guest ok = yes</strong></span></pre>
<pre><span style="font-family: "Courier New",Courier,monospace;"><strong> read only = no</strong></span></pre>
<pre><span style="font-family: "Courier New",Courier,monospace;"><strong> create mask = 0755</strong></span></pre>
<pre><strong>
</strong></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">5: Set up a password for this account in Samba:</span></span></pre>
<pre><strong>
</strong></pre>
<pre><strong> </strong>
<strong> sudo smbpasswd -a user_name</strong></pre>
<pre><strong> </strong></pre>
<pre><strong> </strong><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;"> Then, key in the password. It is suggested to use the same password as *unix Login.</span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">Because I used a different password, it does not work.</span></span></pre>
<pre><strong> </strong></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">6: Restart the samba: <strong> </strong></span></span></pre>
<pre><strong> </strong></pre>
<pre><strong> sudo service smbd restart</strong></pre>
<pre><strong> </strong></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">7: Check syntax errors in smb.conf file: </span></span><strong>
</strong></pre>
<pre><strong> </strong></pre>
<pre><strong> </strong><strong><span class="anchor" id="line-1-11"></span>testparm</strong></pre>
<pre><strong> </strong></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">8: Access Samba folder from Mac:</span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;"> </span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;"> Go to <span style="font-family: "Courier New",Courier,monospace;">Finder > Go > Connect to Server</span></span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;"> </span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;"> In "<span style="font-family: "Courier New",Courier,monospace;">Server Address</span>", put the Ubuntu server's IP address with Samba protocol:</span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;"> </span></span></pre>
<pre><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;"> smb://10.173.178.65</span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;"> </span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;"> Then, click on "<span style="font-family: "Courier New",Courier,monospace;">Connect</span>".</span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;"> </span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;"> An authentication window will pop out and you have to key in the user name and password.</span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">
</span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;"> Then, you can browse/edit the files on the server.</span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">
</span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">9: Access Samba folder from Windows:</span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">
</span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;"> Open a Windows Explorer window, key in <span style="font-family: "Courier New",Courier,monospace;">//ip_address/share</span> (share is the name of the shared folder defined in the smb.conf file), and key in your account and password.</span></span></pre>
<pre><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;"> </span></span><strong>
</strong></pre>
</div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-65847669890679120472014-12-29T18:56:00.002-08:002014-12-29T18:56:49.460-08:00Install Latex Style File in Mac OS X<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
In Mac OS X put your <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">.sty</code> file (or .tex file) in </div>
<pre style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;">usr/local/texlive/2014/texmf-dist/tex/latex/base
</code></pre>
<div style="border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
Then, run <code style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;">sudo -s texhash</code> command. </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-TI9wo1kD_Ao/VKIUVgPn2XI/AAAAAAAABkQ/Zp8NuQtkn60/s1600/Screen%2BShot%2B2014-12-30%2Bat%2B10.58.29%2BAM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-TI9wo1kD_Ao/VKIUVgPn2XI/AAAAAAAABkQ/Zp8NuQtkn60/s1600/Screen%2BShot%2B2014-12-30%2Bat%2B10.58.29%2BAM.png" height="46" width="320" /></a></div>
<div style="border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
<br /></div>
</div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-38904046812379037982014-08-20T02:54:00.003-07:002014-08-20T02:54:20.948-07:00MySQL Commands<div dir="ltr" style="text-align: left;" trbidi="on">
1: Login<br />
<br />
$ mysql -u user_name -p<br /> Enter password:<br />
<br />
2: Create a database<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">mysql> create database db_name;<br /> Query OK, 1 row affected (0.00 sec)</span></span><br />
<br />
3: Create a user<br />
<br />
<pre><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">CREATE USER '<span class="highlight">newuser</span>'@'localhost' IDENTIFIED BY '<span class="highlight">password</span>';</span></span></pre>
<br />
4: Grant the privileges to a user<br />
<br />
<pre><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">GRANT ALL PRIVILEGES ON db_name . * TO '<span class="highlight">newuser</span>'@'localhost';</span></span></pre>
<pre><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span></pre>
Here is a short list of other common possible permissions that users can enjoy.<br />
<ul>
<li>ALL PRIVILEGES- as we saw previously, this would allow a MySQL
user all access to a designated database (or if no database is selected,
across the system)</li>
<li>CREATE- allows them to create new tables or databases</li>
<li>DROP- allows them to them to delete tables or databases</li>
<li>DELETE- allows them to delete rows from tables </li>
<li>INSERT- allows them to insert rows into tables</li>
<li>SELECT- allows them to use the Select command to read through databases</li>
<li>UPDATE- allow them to update table rows</li>
<li>GRANT OPTION- allows them to grant or remove other users' privileges</li>
</ul>
<br />
5: Reload privileges (e.g., once you have finalized the permissions that you want to set up for your new users)<br />
<br />
<pre><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">FLUSH PRIVILEGES;</span></span></pre>
<pre> </pre>
6: Revoke a permission<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><br /></span></span>
<pre><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">REVOKE [type of permission] ON [database name].[table name] FROM ‘[username]’@‘localhost’;</span></span></pre>
<br />
7: Delete a user<br />
<br />
<pre><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">DROP USER ‘<span class="highlight">demo</span>’@‘localhost’;</span></span></pre>
<br />
8: Delete a database<br />
<br />
<pre><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">DROP DATABASE ‘<span class="highlight">demo</span>’@‘localhost’;</span></span></pre>
<br />
<br />
END</div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-48425307552407811322014-08-18T22:21:00.001-07:002014-08-18T22:39:38.696-07:00Websvn <div dir="ltr" style="text-align: left;" trbidi="on">
1: download Websvn<br />
<br />
2: unpackage websvn and move it to the apache Web root folder, rename it to svn (e.g., /var/www/svn). Here, please remove the version number (after you unpackage it, you will get something like websvn3.2.6).<br />
<br />
3: copy the configuration file<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> $cd /var/www/websvn/include</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> $sudo cp distconfig.php config.php</span></span><br />
<br />
4: open and edit the config.php.<br />
<br />
find the following lines:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><br /></span></span>
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> $config->addTemplatePath($locwebsvnreal.'/templates/calm/');
</span></span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>$config->addTemplatePath($locwebsvnreal.'/templates/BlueGrey/');
</span></span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>$config->addTemplatePath($locwebsvnreal.'/templates/Elegant/');
</span></span><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />and add the following line to indicate the default template to use:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>$config->setTemplatePath($locwebsvnreal.'/templates/calm/');</span></span><br />
<br />
5: add the following lines just before the last lines: (the objective is to tell websvn where to get the data of svn)<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>$config->parentPath("/media/datadrive/svn");
</span></span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>//you can have a parent path,
</span></span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>//or add another entry by using the following line:
</span></span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>//$config->addRepository("Empty Nest", "file:///media/datadrive/svn/emptynest");
</span></span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>$config->setEnscriptPath("/usr/bin");
</span></span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>$config->setSedPath("/bin");
</span></span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>$config->useEnscript();</span></span><br />
<br />
6: now, when you open your browser, and go to:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>l</span></span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span>ocalhost/svn</span></span><br />
<br />
you will be able to view svn directory.<br />
<br />
7: However, everyone in the LAN can access to the content of svn by entering the above-mentioned URL address. The next step is to add authorization. First, create a pass word file.<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>$touch /etc/apache2/dav_svn.passwd</span></span><br />
<br />
Then, use the following command to create a user:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>$sudo htpasswd /etc/apache2/dav_svn.passwd user1</span></span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>New password: </span></span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>Re-type new password: </span></span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>Adding password for user user1</span></span><br />
<br />
8: Then, open the file etc/apache2/dav_svn.passwd, you can see some like this:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>user1:$apr1$PYPG.CQv$4AkadaxTsdfwBmrx6uVOK0</span></span><br />
<br />
9: Of course, you can add more users by using the same command.<br />
<br />
10: Then, open the apache configuration file:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span>$sudo vim /etc/apache2/sites-enabled/000-default</span></span><br />
<br />
then, add the following lines:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> <Location /svn><br /> AuthType Basic<br /> AuthName "Subversion repository"<br /> AuthUserFile /etc/apache2/dav_svn.passwd<br /> Require valid-user<br /> </Location></span></span><br />
<br />
<br />
<br />
<br />
<br />Save the file.<br />
<br />
11: restart apache:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">$sudo service apache2 restart</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">[sudo] password for wcg1sgh: <br /> * Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName<br /> ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName<br /> [ OK ]</span></span><br />
<br />
<br />
<br />
<br />12: Open the browser, and enter localhost/svn, and a username and password is demanded.<br />
<br />
Done!<br />
<br />
<br /></div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-17925780839020207242014-08-15T00:16:00.001-07:002014-08-15T00:16:32.294-07:00apache<div dir="ltr" style="text-align: left;" trbidi="on">
check apache version in Ubuntu:<br />
<br />
apache2 -v</div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com1tag:blogger.com,1999:blog-6298909166858098017.post-68702771407895183192014-08-01T21:39:00.000-07:002014-08-01T21:39:16.040-07:00Setup Environment Variables for XRDP in UBUNTU<div dir="ltr" style="text-align: left;" trbidi="on">
<br /><br />when you use a xrdp client to remotely login to a ubuntu machine, you can find that the environment variables configured in the host machine are not what you can see in xrdp client.<br />
<br />
for example, execute the following commands on both host Ubuntu machine and xrdp client machine, repectively.<br />
<br />
echo $PATH<br />
echo $JAVA_HOME<br />
<br />
you can see that in your xrdp client machine, the second command returns a blank line, and the PATH variable is not identical to the one you can see in host Ubuntu machine.<br />
<br />
<b>Solution:</b><br />
<br />
<ol style="text-align: left;">
<li>open the xrdp file<br /><br /><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">sudo vim /etc/xrdp/startwm.sh</span></span><br /><br />Then, you can see the last line is:<br /><br /><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">. /etc/X11/Xsession<br /></span></span></li>
<li>add the environment setting to xrdp startup file<br /><br />Just before the last line, add the following line:<br /><br /><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">. /etc/environment</span></span><br /><br />And save it. . /etc/environment document defines all customized environment variables, it content is like:<br /><br /><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">JAVA_HOME="/usr/lib/jvm/jdk-1.8.0_11"<br />JRE_HOME="/usr/lib/jvm/jdk-1.8.0_11/jre"<br />CATALINA_HOME="/opt/tomcat/apache-tomcat-8.0.9"<br />AXIS2_HOME="/opt/axis2/axis2-1.6.2"<br />PATH="/usr/lib/jvm/jdk-1.8.0_11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"</span></span><br /></li>
<li>Then, you can start your xrdp client to connect to this Ubuntu machine, then you will see that the PATH variable is the same as you can see in the host Ubuntu machine. However, the other variables are still not exported. To solve this problem, create another file /etc/environment.xrdp, its content is like:<br /><br /><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">export JAVA_HOME="/usr/lib/jvm/jdk-1.8.0_11"<br />export JRE_HOME="/usr/lib/jvm/jdk-1.8.0_11/jre"<br />export CATALINA_HOME="/opt/tomcat/apache-tomcat-8.0.9"<br />export AXIS2_HOME="/opt/axis2/axis2-1.6.2"</span></span><br /></li>
<li>reedit the file /etc/xrdp/startwm.sh, add the following line before the last line:<br /><br /><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">. /etc/environment.xrdp</span></span><br /><br />save it.<br /></li>
<li>Run the xrdp client again, and you will see all the variables have been successfully imported.</li>
</ol>
<b>Problem</b>:<br />
<br />
The cause of this problem is that, when you login remotely to a Ubuntu server, the server will load automatically to ~/.profile or ~/.bashrc for the configuration of your environment. If some variables are commonly used by all the users, you can use the above mentioned solution to solve the problem. Otherwise, each user can also customize his/her own environment variable in ~/.profile or ~./bashrc file.</div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-27602623646062346072014-07-29T19:08:00.004-07:002014-07-29T19:08:41.700-07:00Add files to SVN recursively via command line<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 class="title" id="page-title">
</h2>
<div class="meta">
<span class="submitted">Submitted by abhishek on Wed, 09/15/2010 - 14:33</span>
</div>
Search files in subdirectories and add them to SVN recursively <br />
<code>svn status | grep "^\?" | awk '{print $2}' | xargs svn add</code><br />
<br />
original link: http://abhishek.nagar.me/blogs/add-files-svn-recursively-command-line</div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-89327312109964271292014-07-28T01:23:00.005-07:002014-08-20T02:46:40.784-07:00Ubuntu change the root password of MySQL<div dir="ltr" style="text-align: left;" trbidi="on">
Set / change / reset the MySQL root password on Ubuntu Linux. Enter the following lines in your terminal.
<br />
<ol>
<li>Stop the MySQL Server.<br />
<pre class="terminal">sudo /etc/init.d/mysql stop</pre>
</li>
<br />
<li>Start the mysqld configuration.<br />
<pre class="terminal">sudo mysqld --skip-grant-tables &</pre>
</li>
<br />
<li>Login to MySQL as root.<br />
<pre class="terminal">mysql -u root mysql</pre>
</li>
<br />
<li>Replace YOURNEWPASSWORD with your new password!<br />
<pre class="terminal">UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;</pre>
</li>
</ol>
Note: This method is not regarded as the securest way of resetting the password. However it works.<br />
<br />
original link: http://ubuntu.flowconsult.at/en/mysql-set-change-reset-root-password/ </div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-18541443160703211082014-07-24T21:37:00.002-07:002014-07-24T21:37:56.265-07:00create a script that can be executed at boot in Ubuntu.<div dir="ltr" style="text-align: left;" trbidi="on">
<strong>Step 1 – Create your script.</strong><br />
Simply create a new file (I called mine svnserve) and type the command you’d like to run<br />
<code>cd /etc/init.d/ # (thanks Alfonso)<br />
sudo touch svnserve<br />
sudo vi svnserve<br />
svnserve -d -r /usr/local/svn/repository_name</code><br />
<strong>Step 2 – Save the script in the /etc/init.d/ folder</strong><br />
<strong>Step 3 – Make the script executable</strong><br />
<code>sudo chmod +x svnserve</code><br />
<strong>Step 4 – Add the script to the boot sequence</strong><br />
<code>sudo update-rc.d svnserve defaults</code><br />
That’s it. When you’re done you should see some output similar to<br />
<code>Adding system startup for /etc/init.d/svnserve ...<br />
/etc/rc0.d/K20svnserve -> ../init.d/svnserve<br />
/etc/rc1.d/K20svnserve -> ../init.d/svnserve<br />
/etc/rc6.d/K20svnserve -> ../init.d/svnserve<br />
/etc/rc2.d/S20svnserve -> ../init.d/svnserve<br />
/etc/rc3.d/S20svnserve -> ../init.d/svnserve<br />
/etc/rc4.d/S20svnserve -> ../init.d/svnserve<br />
/etc/rc5.d/S20svnserve -> ../init.d/svnserve</code></div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-6159695058353087592014-07-24T04:13:00.001-07:002014-08-17T22:00:00.261-07:00Configure SVN Ubuntu<div dir="ltr" style="text-align: left;" trbidi="on">
1: Create a repo:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> $ svnadmin create /media/datadrive/svn/test</span></span><br />
<br />
2: Set the password:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> $ sudo gedit </span></span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">/media/datadrive/svn</span></span>/passwd-team </span></span><br />
<br />
And then, add the user information into the file, as follows:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">[users] </span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">michal = somepassword </span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">jimmy = anotherpassword </span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">craig = yetanotherpassword</span></span><br />
<br />
Since the password is not encrypted, so use the following command so that only the root can read.<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> $ sudo chmod 600 </span></span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">/media/datadrive/svn</span></span>/passwd-team</span></span><br />
<br />
3: configure:<br />
Each SVN repo has a scnserve.conf file, which is created automatically when you execute step 1. Using the following command to edit this file for configuration.<br />
<br />
<div class="code">
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> $ gedit </span></span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">/media/datadrive/svn</span></span>/</span></span>test/conf/svnserve.conf</span></span></div>
<div class="code">
<br /></div>
Find the following lines, and specify the password:<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">[general] </span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">anon-access = none </span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">password-db = /media/datadrive/svn/passwd-team </span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">realm = Team</span></span><br />
<br />
4: Start the svn:<br />
foreground <br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> $ sudo svnserve -d --foreground -r </span></span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">/media/datadrive/svn/</span></span><br />
<br />
or background:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> $ sudo svnserve -d -r </span></span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">/media/datadrive/svn/</span></span><br />
<br />
5: Start svn client using another machine:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> svn checkout svn://192.168.10.01(put the IP addr. here)/test --username jimmy</span></span><br />
<br />
<br /></div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-60822673850324007242014-07-23T22:23:00.001-07:002014-07-23T22:23:42.827-07:00Ubuntu: Configure SVN Server<div dir="ltr" style="text-align: left;" trbidi="on">
<h2>
Prerequisites</h2>
It is assumed that you already have a basic Ubuntu server running, and that
the other developers can connect to it. If you want to allow them to access the
Subversion server with the secure svn+ssh protocol, then each developer must
also be able to login to your machine with SSH.<br />
<h2>
Basic Subversion Setup</h2>
Begin by installing the Subversion package:<br />
<br />
<div class="code">
$ <strong>sudo apt-get install subversion</strong></div>
<div class="code">
<br /></div>
You're going to need a directory for your repositories, as well as other
Subversion-related files. Most people use <code>/home/svn</code> or
<code>/usr/local/svn</code> for this purpose, and you can choose either. I
personally prefer <code>/usr/local/svn</code> over <code>/home/svn</code>, as I
like to keep /home for home directories of real users of the system.<br />
<br />
<div class="code">
$ <strong>sudo mkdir /usr/local/svn</strong></div>
<div class="code">
<br /></div>
Inside this directory, create another one to hold your repositories:<br />
<br />
<div class="code">
$ <strong>sudo mkdir /usr/local/svn/repos</strong></div>
<div class="code">
<br /></div>
Now, you need to set some access permissions on those directories. You only
want to allow certain users of your system (that is, yourself and the other
developers) to access the repositories, so add a new group for those users.
Name the group <code>svn</code>.<br />
<br />
<div class="code">
$ <strong>sudo groupadd svn</strong></div>
<div class="code">
<br /></div>
Then, change the group ownership of <code>/usr/local/svn/repos</code> to the
new group using the <code>chgrp</code> command:<br />
<br />
<div class="code">
$ <strong>sudo chgrp svn /usr/local/svn/repos</strong></div>
<div class="code">
<br /></div>
The members of the <code>svn</code> group also need write access to the
<code>repos</code> directory, so use <code>chmod</code> to add the write
permission for the group:<br />
<br />
<div class="code">
$ <strong>sudo chmod g+w /usr/local/svn/repos</strong></div>
<div class="code">
<br /></div>
Additionally, you need to make sure that all new files and directories
created in the <code>repos</code> directory (in other words, anything committed
to the repositories) will also be owned by the group. To
accomplish this, use <code>chmod</code> again to set the set-group-ID bit on
the directory, which causes any file created inside it to have the same group
ownership as the directory itself. Effectively, everything in
<code>repos</code> will belong to the <code>svn</code> group.<br />
<br />
<div class="code">
$ <strong>sudo chmod g+s /usr/local/svn/repos</strong></div>
<div class="code">
<br /></div>
OK, so you now have the repositories directory with proper permissions,
ready to be used by the <code>svn</code> group. Go ahead and add yourself to
the group:<br />
<br />
<div class="code">
$ <strong>sudo usermod -a -G svn michal</strong></div>
<div class="code">
<br /></div>
However, your new group membership will not be effective for the current
session, so you need to log out and log back in. When you're back, you can
verify that your account is recognized as a member of the svn group:<br />
<br />
<div class="code">
$ <strong>groups</strong>
michal adm dialout cdrom plugdev lpadmin admin sambashare svn</div>
<div class="code">
<br /></div>
If the other developers have user accounts on your server, add them to the
group too:<br />
<br />
<div class="code">
$ <strong>sudo usermod -a -G svn jimmy</strong>
$ <strong>sudo usermod -a -G svn craig</strong></div>
<div class="code">
<br /></div>
If they don't, they will still be able to access the repositories, but only
using the basic svn protocol, not the secure svn+ssh method.<br />
<h2>
Creating a Test Repository<br />
</h2>
You can now create a repository. In the following steps, I'll
demonstrate how to create a simple test repository containing one text
file, and how to check out and commit files. If you're not familiar with
Subversion, then this could be a good exercise to learn the basics.
Otherwise, you can skip all the test checkouts and commits and just
create the repository for your project.<br />
The repository will be a subdirectory in the <code>repos</code> directory,
and will have its group ownership set to <code>svn</code> (thanks to the
<code>chmod g+s</code> you did earlier). However, that's not all – you also
need to make sure the repository will be group writable, so that the other
members of the <code>svn</code> group will be able to commit files. To do this,
set the umask to <code>002</code>:<br />
<br />
<div class="code">
$ <strong>umask 002</strong></div>
<div class="code">
<br /></div>
This command sets the new file mode creation mask which controls the default
permissions of any new file that you create. The default value is
<code>022</code> and it corresponds to read/write permissions for the file
owner, and read permissions for the group and others. The new value,
<code>002</code>, also gives write permissions to the group, which is just what
you need.<br />
Create the repository using the <code>svnadmin</code> command:<br />
<br />
<div class="code">
$ <strong>svnadmin create /usr/local/svn/repos/test</strong></div>
<div class="code">
<br /></div>
And set back the default umask:<br />
<br />
<div class="code">
$ <strong>umask 022</strong></div>
<div class="code">
<br /></div>
So you now have an empty repository, waiting for you to commit
something to it. But, before you do this, you need to check out the
current version (i.e., the empty directory) to create a working copy.<br />
<br />
<div class="code">
$ <strong>svn checkout file:///usr/local/svn/repos/test</strong>
Checked out revision 0.</div>
<div class="code">
<br /></div>
The working copy has been checked out to a new directory named
<code>test</code>. Go ahead and create a simple "hello world" text file in that
directory:<br />
<br />
<div class="code">
$ <strong>cd test</strong>
$ <strong>echo 'Hello, World!' > hello.txt</strong></div>
<div class="code">
<br /></div>
Then, add it to version control with the <code>svn add</code> command:<br />
<br />
<div class="code">
$ <strong>svn add hello.txt</strong>
A hello.txt</div>
<div class="code">
<br /></div>
Finally, commit it using <code>svn commit</code>:<br />
<br />
<div class="code">
$ <strong>svn commit -m "Added a 'hello world' text file."</strong> </div>
<div class="code">
Adding hello.txt
Transmitting file data . </div>
<div class="code">
Committed revision 1.</div>
<div class="code">
<br /></div>
The <code>hello.txt</code> file is now in the repository.<br />
<h2>
Accessing the Repository with the Svn Protocol</h2>
Remote repository access with the svn protocol requires you to use
<code>svnserve</code>, a Subversion server program. Each repository has a
<code>svnserve</code> configuration file (stored in the <code>conf</code> subdirectory) which controls how the repository can be accessed with <code>svnserve</code>.<br />
First, create a passwords file that lists the users of the repository and
their passwords. This will be a common passwords file for your development team
and you will be able to use it with multiple repositories.<br />
<br />
<div class="code">
$ <strong>sudo gedit /usr/local/svn/passwd-team</strong></div>
<div class="code">
<br /></div>
Here's a sample passwords file. Each line (except the first one,
which is the configuration section name) defines a user name and the
corresponding password.
<br />
<div class="code">
[users]
michal = somepassword
jimmy = anotherpassword
craig = yetanotherpassword</div>
Since the passwords are stored unencrypted, it's important that you protect
the passwords file by setting the proper permissions. The file should not be
readable by anyone except the owner (which is <code>root</code>), so change its
mode to <code>600</code>:<br />
<br />
<div class="code">
$ <strong>sudo chmod 600 /usr/local/svn/passwd-team</strong></div>
<div class="code">
<br /></div>
Then, open the <code>svnserve</code> configuration file in the test
repository:<br />
<br />
<div class="code">
$ <strong>gedit /usr/local/svn/repos/test/conf/svnserve.conf</strong></div>
<div class="code">
<br /></div>
There's probably some default configuration in the file, but you can just
remove everything and enter this:<br />
<div class="code">
[general]
anon-access = none
password-db = /usr/local/svn/passwd-team
realm = Team</div>
The <code>anon-access = none</code> line denies access to the repository to
unauthenticated users (by default, they are allowed read access, so they can do
checkouts). The <code>password-db</code> setting tells svnserve where to look
for the passwords file when authenticating users, and the <code>realm</code>
setting defines the name of the authentication realm. <br />
OK, the configuration is ready, so you can now launch
<code>svnserve</code>.<br />
<br />
<div class="code">
$ <strong>sudo svnserve -d --foreground -r /usr/local/svn/repos</strong></div>
<div class="code">
<br /></div>
The command-line options tell <code>svnserve</code> to run in daemon mode
(<code>-d</code>) as a foreground process (<code>--foreground</code>), and to
look for repositories in the <code>repos</code> dir that was created earlier
(<code>-r /usr/local/svn/repos</code>). Normally the program should be running
in the background (that's what daemon processes do), but at this moment you
only need to test it, so it's more convenient to run it in the foreground,
where you can easily kill it with <code>Ctrl</code>+<code>C</code>. <br />
<br />
Now, try accessing the repository using the svn protocol. You can try it on
another machine over the network, or on the same computer (in another
terminal). In the latter case, make sure you're not doing the checkout in the
same directory where the previous test working copy was checked out, because it
won't work – either delete the test directory, or <code>cd</code> to some
other location.<br />
<br />
Enter the following <code>svn checkout</code> command, replacing
<code>192.168.10.11</code> with the IP address of your Subversion server (if
you're testing on the same machine, you can use <code>127.0.0.1</code>):<br />
<br />
<div class="code">
$ <strong>svn checkout svn://192.168.10.11/test --username jimmy</strong></div>
<div class="code">
<br /></div>
The server will ask you for password:<br />
<div class="code">
Authentication realm: <svn://192.168.10.11:3690> Team
Password for 'jimmy': </div>
Then, it proceeds with the checkout.<br />
<div class="code">
A test/hello.txt
Checked out revision 1.</div>
And there's your working copy. Now, check if it works the other way –
try modifying the file and committing it back to the repository. Open
<code>hello.txt</code> with a text editor and add some text:<br />
<br />
<br />
<div class="code">
$ <strong>cd test</strong>
$ <strong>gedit hello.txt</strong></div>
<div class="code">
<br /></div>
When you're done, commit it:<br />
<br />
<br />
<div class="code">
$ <strong>svn commit -m "Modified the hello.txt file."</strong>
Sending hello.txt
Transmitting file data .
Committed revision 2.</div>
<div class="code">
<br /></div>
Sweet, it works both ways.<br />
<h2>
Accessing the Repository with the Svn+SSH Protocol</h2>
Setting up your Subversion server for svn+ssh access is simple, as it
doesn't even require using the <code>svnserve</code> program. Assuming you have a SSH server
running on the Subversion machine, and the other developers can login to it,
you don't have to configure anything – just set up the repository.<br />
You can just go ahead and check out the test project. The checkout operation
is slightly different with the svn+ssh access method. First, you must specify
the full path to the repository in the checkout URL:<br />
<div class="code">
$ <strong>svn checkout svn+ssh://192.168.10.11/usr/local/svn/repos/test --username jimmy</strong></div>
Then, when the server asks you for a password, you need to enter the user's
SSH password, not the one from the <code>passwd-team</code> file.<br />
<div class="code">
jimmy@192.168.10.11's password:</div>
And there it goes:<br />
<div class="code">
A test/hello.txt
Checked out revision 2.</div>
From here, you can use your working copy the same way as with the <code>svn</code> protocol.<br />
<h2>
Svnserve Initialization Script</h2>
If you plan on using <code>svnserve</code> in the long run, you
probably don't want to start it from the command-line every time the
server is rebooted. The proper way to start system services is with init
scripts located in the <code>/etc/init.d</code> directory.<br />
The Subversion package for Ubuntu does not include an init script, so you have to make one yourself. Or, you can download <a href="http://odyniec.net/articles/ubuntu-subversion-server/svnserve">this init script</a>, written by yours truly. Save the script as <code>/etc/init.d/svnserve</code> and make it executable:<br />
<div class="code">
$ <strong>sudo chmod +x /etc/init.d/svnserve</strong></div>
If you chose anything other than <code>/usr/local/svn/repos</code> for the repositories directory, make sure to change the path in the init script.<br />
Run <code>update-rc.d</code> to install the script:<br />
<div class="code">
$ <strong>sudo update-rc.d svnserve defaults</strong>
Adding system startup for /etc/init.d/svnserve ...
/etc/rc0.d/K20svnserve -> ../init.d/svnserve
/etc/rc1.d/K20svnserve -> ../init.d/svnserve
/etc/rc6.d/K20svnserve -> ../init.d/svnserve
/etc/rc2.d/S20svnserve -> ../init.d/svnserve
/etc/rc3.d/S20svnserve -> ../init.d/svnserve
/etc/rc4.d/S20svnserve -> ../init.d/svnserve
/etc/rc5.d/S20svnserve -> ../init.d/svnserve</div>
And that's it – <code>svnserve</code> will be started automatically when your system boots up. To start it manually, run this command:<br />
<div class="code">
$ <strong>sudo /etc/init.d/svnserve start</strong></div>
<h2>
References
</h2>
<ul class="references">
<li>
<a class="title" href="http://svnbook.red-bean.com/">Version Control with Subversion</a>
This is the official Subversion book, written by the people who
developed the version control system. The complete text of the book is
available online, and one of the chapters is <a href="http://svnbook.red-bean.com/en/1.5/svn.serverconfig.html">fully devoted to server configuration</a>.
<br />
</li>
<li><a class="title" href="http://help.ubuntu.com/community/Subversion">Subversion - Community Ubuntu Documentation</a>
A guide on setting up a Subversion server on Ubuntu, published as
part of the Ubuntu Community Documentation. It covers some of the tasks
presented in this tutorial, and provides instructions on how to
configure other methods of repository access (e.g., HTTP).
<br />
</li>
</ul>
<br />
original link: http://odyniec.net/articles/ubuntu-subversion-server/</div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-37846899909475363752014-07-23T21:19:00.002-07:002014-07-23T22:20:23.445-07:00Stop svnserver in Ubuntu<div dir="ltr" style="text-align: left;" trbidi="on">
On my flavour of Linux this would work:
<br />
<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> ps auxww | fgrep svnserve
</span></span><br />
<br />
<br />
Then the number in the second column is the process id, then I can do:
<br />
<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> kill <process id> (without the <> brackets)
</span></span><br />
<br />
<br />
and in the worst case (e.g. svnserve won't stop after many minutes):
<br />
<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> kill -9 <process id>
</span></span></div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-4728636011217398152014-07-23T19:50:00.001-07:002014-07-23T19:56:55.961-07:00Auto-mount the second hard drive in Ubuntu<div dir="ltr" style="text-align: left;" trbidi="on">
1: create a mount point:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> mkdir /media/datadrive </span></span><br />
create a mount point "datadrive" in /media<br />
<br />
2: Change the rights of this directory:<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br /></span></span>
<br />
<pre><span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> sudo chmod g+w /media/datadrive
<span class="anchor" id="line-3-3"></span> sudo chmod +t /media/datadrive</span></span></pre>
<pre> </pre>
The last "chmod +t" adds the sticky bit, so that people can only delete
their own files and sub-directories in a directory, even if they have
write permissions to it (see man chmod).<br />
3: Edit the /etc/fstab file:<br />
<br />
<pre> sudo gedit /etc/fstab</pre>
<br />
The first column,Ubuntu recommend the UUID instead of logical name. To check the UUID of hard drive and partition, use the following command:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> sudo blkid</span></span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">wcg1sgh@/mnt$sudo blkid<br />[sudo] password for wcg1sgh: <br />/dev/sda1: UUID="8b7a0996-d499-4722-b691-87dde9c0dd37" TYPE="ext4" <br />/dev/sda5: UUID="2aee8aab-8543-4476-9f43-bde31ab5ee49" TYPE="swap" <br />/dev/sdb2: LABEL="DATADRIVE" UUID="17b2b066-a817-4f9c-9330-cdd94b7a4191" TYPE="ext4" </span></span><br />
<br />
Then, add the following line into /etc/fstab:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"> # the second hard drive /dev/sdb<br /> UUID=17b2b066-a817-4f9c-9330-cdd94b7a4191 /media/datadrive ext4 defaults 0 2</span></span><br />
<br />
The detailed explanation of /etc/fstab can be found in [2].<br />
<br />
3: run the following command or reboot the computer to have the changes take effect.<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> sudo mount -a</span></span><br />
<br />
4: Then, you can use the second hard drive.<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">wcg1sgh@/media/datadrive$cd /media/<br />wcg1sgh@/media$ls<br />datadrive<br />wcg1sgh@/media$cd datadrive/<br />wcg1sgh@/media/datadrive$ls<br />lost+found svn</span></span><br />
<br />Now, we have to directories in the second hard drive:<br />
1: lost+found<br />
2: svn<br />
<br />
<span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;">references: </span></span><br />
<span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;">[1] https://help.ubuntu.com/community/InstallingANewHardDrive</span></span><br />
<span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;">[2] http://web.archive.org/web/20130413052717/http://www.tuxfiles.org/linuxhelp/fstab.html </span></span> </div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-17475956069838005702014-07-22T19:08:00.001-07:002014-07-22T19:28:35.744-07:00Ubuntu User Management<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="titlepage">
<div>
<div>
<h3 class="title">
Root Users</h3>
</div>
</div>
</div>
<div class="itemizedlist">
<ul class="itemizedlist" type="disc">
<li class="listitem">
If for some reason you wish to enable the root account, simply give it a password:<br />
<br />
<pre class="screen"><span style="font-family: "Courier New",Courier,monospace;"><span class="command"><b>sudo passwd</b></span> </span></pre>
<pre class="screen"> </pre>
Sudo will prompt you for your password, and then ask you to supply a new password for root as shown below:<br />
<br />
<pre class="screen"><span style="font-family: "Courier New",Courier,monospace;"><code class="computeroutput">[sudo] password for username: <b class="userinput"><code>(enter your own password)</code></b>
Enter new UNIX password: <b class="userinput"><code>(enter a new password for root)</code></b>
Retype new UNIX password: <b class="userinput"><code>(repeat new password for root)</code></b>
passwd: password updated successfully</code> </span></pre>
<pre class="screen"> </pre>
</li>
<li class="listitem">
To disable the root account, use the following passwd syntax:<br />
<br />
<pre class="screen"><span style="font-family: "Courier New",Courier,monospace;"><span class="command"><b>sudo passwd -l root</b></span> </span></pre>
<pre class="screen"> </pre>
</li>
<li class="listitem">
You should read more on <span class="application"><b>Sudo</b></span> by checking out it's man page:<br />
<br />
<pre class="screen"><span style="font-family: "Courier New",Courier,monospace;"><span class="command"><b>man sudo</b></span></span>
</pre>
</li>
</ul>
</div>
<div class="titlepage">
<div>
<div>
<h3 class="title">
Adding and Deleting Users</h3>
<ul class="itemizedlist" type="disc">
<li class="listitem">
To add a user account, use the following syntax, and follow the
prompts to give the account a password and identifiable characteristics
such as a full name, phone number, etc.<br />
<br />
<pre class="screen"><span style="font-family: "Courier New",Courier,monospace;"><span class="command"><b>sudo adduser username</b></span> </span></pre>
<pre class="screen"> </pre>
</li>
<li class="listitem">
To delete a user account and its primary group, use the following syntax:<br />
<br />
<pre class="screen"><span style="font-family: "Courier New",Courier,monospace;"><span class="command"><b>sudo deluser username</b></span></span>
</pre>
</li>
</ul>
<ul class="itemizedlist" type="disc">
<li class="listitem">
To temporarily lock or unlock a user account, use the following syntax, respectively:<br />
<br />
<pre class="screen"><span class="command"><b>sudo passwd -l username</b></span>
<span class="command"><b>sudo passwd -u username</b></span> </pre>
<pre class="screen"> </pre>
</li>
<li class="listitem">
To add or delete a personalized group, use the following syntax, respectively:<br />
<br />
<pre class="screen"><span class="command"><b>sudo addgroup groupname</b></span>
<span class="command"><b>sudo delgroup groupname</b></span> </pre>
<pre class="screen"> </pre>
</li>
<li class="listitem">
To add a user to a group, use the following syntax:<br />
<br />
<pre class="screen"><span class="command"><b>sudo adduser username groupname</b></span></pre>
</li>
</ul>
</div>
</div>
</div>
TBD</div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-88335371100766481212014-07-17T05:55:00.003-07:002014-07-17T05:55:45.810-07:00Upload file to remote server using SCP<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">chenwang@~/Downloads$scp BuildingCocoaApps.pdf wcg1sgh@sgh023118:/home/wcg1sgh/Desktop/</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Ubuntu 12.04.4 LTS</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">wcg1sgh@sgh023118's password:</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">BuildingCocoaApps.pdf 100% 653KB 652.9KB/s 00:00</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">chenwang@~/Downloads$</span></div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-34126472265107722042014-07-17T05:50:00.001-07:002014-07-17T05:50:51.882-07:00Vim: basic usage<div dir="ltr" style="text-align: left;" trbidi="on">
1: set line number:<br />
<br />
<span style="background-color: #eeeeee; color: #111111; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 12px; line-height: 18px;">:set number or </span><span style="background-color: #eeeeee; color: #111111; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 12px; line-height: 18px;">:set nu</span><br />
<span style="background-color: #eeeeee; color: #111111; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 12px; line-height: 18px;"><br /></span>
2: search:<br />
<br />
<span style="background-color: #eeeeee; color: #111111; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 12px; line-height: 18px;">/key_words</span><br />
<div>
<br /></div>
N: next<br />
P: previous</div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-91622562559819999362014-07-16T16:36:00.002-07:002014-07-16T16:36:19.239-07:00/opt and /usr/local<div dir="ltr" style="text-align: left;" trbidi="on">
/usr/local: System software/commands, for example, the software installed from directly by running installation package.<br />
<br />
/opt: Other software (based on my understanding, it can be some open source software). When you have an application installed in /opt directory, you will have:<br />
<span style="background-color: #fdfdfd; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;">/opt/<appname>/bin</span><br style="background-color: #fdfdfd; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;" /><span style="background-color: #fdfdfd; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;">/opt/<appname>/lib</span><br style="background-color: #fdfdfd; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;" /><span style="background-color: #fdfdfd; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;">/opt/<appname>/share/man</span><br style="background-color: #fdfdfd; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;" /><br style="background-color: #fdfdfd; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;" /><span style="background-color: #fdfdfd; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;">conf files in /etc/opt/<appname>/ and logs in /var/opt/<appname>/</span></div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-82293675838693833712014-07-15T23:15:00.001-07:002014-07-15T23:15:06.647-07:00If an Ubuntu machine become responseless<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
If the ubuntu machine locks up completely, you can REISUB it, which is a safer alternative to just cold rebooting the computer.
<br />
REISUB by:<br />
While holding <kbd>Alt</kbd> and the <kbd>SysReq (Print Screen)</kbd> keys, type <kbd>R</kbd><kbd>E</kbd><kbd>I</kbd><kbd>S</kbd><kbd>U</kbd><kbd>B</kbd>.<br />
<br />
<pre><code>R: Switch to XLATE mode
E: Send Terminate signal to all processes except for init
I: Send Kill signal to all processes except for init
S: Sync all mounted file-systems
U: Remount file-systems as read-only
B: Reboot</code></pre>
<pre><code> </code></pre>
REISUB is BUSIER backwards, as in "The System is <strong>busier</strong> than it should be", if you need to remember it. Or mnemonically - <strong>R</strong> eboot; <strong>E</strong>ven; <strong>I</strong>f; <strong>S</strong>ystem; <strong>U</strong>tterly; <strong>B</strong>roken.</div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-47788178748281283992014-07-15T23:12:00.000-07:002014-08-01T20:16:35.833-07:00Environment variables<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<span style="font-family: Times,"Times New Roman",serif;"><span style="font-size: small;">First of all, we have different places to setup environment variable. All the following files are applicable to both Ubuntu and Mac OS:</span></span></div>
<ul style="text-align: left;">
<li><span style="font-family: Times,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><b><code>~/.profile</code></b>:</span> <br />use this for variables you want to set in all
programs launched from the terminal (note that, unlike on Linux, all
shells opened in Terminal.app are login shells).<br /><code> </code></span></span></li>
<li><span style="font-family: Times,"Times New Roman",serif;"><span style="font-size: small;"><b><span style="font-family: "Courier New",Courier,monospace;"><code>~/.bashrc</code>: </span></b><br />this is invoked for shells which are not login
shells. Use this for aliases and other things which need to be redefined
in subshells, not for environment variables that are inherited.<br /><code> <br /> </code></span></span></li>
<li><span style="font-family: Times,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><b><code>/etc/profile</code>: </b></span><br />this is loaded before ~/.profile, but is
otherwise equivalent. Use it when you want the variable to apply to
terminal programs launched by all users on the machine (assuming they
use bash).<br /><code> </code></span></span></li>
</ul>
<br />
<b>Ubuntu System</b><br />
<br />
<span style="font-family: Times,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><b><code>/etc/profil<span style="font-family: "Courier New", Courier, monospace;">e.d/</span></code>: </b></span><br />All the script in this directory will be automatically executed. For more details, you can check the file /etc/profile</span></span><br />
<span style="font-family: Times,"Times New Roman",serif;"><span style="font-size: small;"><br /></span></span>
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">vim /etc/profile</span></span><br />
<span style="font-family: Times,"Times New Roman",serif;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: Times,"Times New Roman",serif;"><span style="font-size: small;">then, you will see:</span></span><br />
<span style="font-family: Times,"Times New Roman",serif;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: Times,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">if [ -d /etc/profile.d ]; then<br /> for i in /etc/profile.d/*.sh; do<br /> if [ -r $i ]; then<br /> . $i<br /> fi<br /> done<br /> unset i<br />fi</span></span></span></span><br />
<br />
<br />
<b>Mac OS X</b><br />
<br />
<ul>
<li><span style="font-family: Times,"Times New Roman",serif;"><span style="font-size: small;"><code>~/.MacOSX/environment.plist</code>: this is read by login window on
login. It applies to all applications, including GUI ones, except those
launched by Spotlight in 10.5 (not 10.6). It requires you to logout and
login again for changes to take effect. This file is no longer
supported as of OS X 10.8. </span></span></li>
<li><span style="font-family: Times,"Times New Roman",serif;"><span style="font-size: small;">your user's <code>launchd</code>
instance: this applies to all programs launched by the user, GUI and
CLI (command line interface). You can apply changes at any time by using
the <code>setenv</code> command in <code>launchctl</code>. <i>In theory</i>, you should be able to put <code>setenv</code> commands in <code>~/.launchd.conf</code>, and <code>launchd</code>
would read them automatically when the user logs in, but in practice
support for this file was never implemented. Instead, you can use
another mechanism to execute a script at login, and have that script
call <code>launchctl</code> to set up the <code>launchd</code> environment.<code> </code></span></span></li>
<li><span style="font-family: Georgia,"Times New Roman",serif;"><span style="font-size: small;"><span style="font-family: Times,"Times New Roman",serif;"><code>/etc/launchd.conf</code>: this is read by launchd when the system
starts up and when a user logs in. They affect every single process on
the system, because launchd is the root process. To apply changes to the
running root launchd you can pipe the commands into <code>sudo launchctl</code>. </span></span></span></li>
</ul>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
a</div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-55954837094101137242014-07-15T04:41:00.002-07:002014-07-15T04:41:37.123-07:00Set the colour in terminal of Mac OS X<div dir="ltr" style="text-align: left;" trbidi="on">
set the colour for normal users.<br />
1: Go to the home directory, and create the following file:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> vim .bash_profile</span><br />
<br />
2: Insert the following content into the file:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> export TERM="xterm-color"</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> PS1='\[\e[00;32m\]\u\[\e[0m\]@\[\e[00;32m\]\w\[\e[0m\]\$'</span><br />
<br />
The definition of each colour can be referred to the previous article.<br />
<br />
3: save the file. Make it validated.<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> source .bash_profile</span><br />
-------------------------------------<br />
set the colour for root.<br />
1: login as a root.<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> sudo -i</span><br />
<br />
and then, enter the password.<br />
<br />
2: create the following file:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> vim .profile</span><br />
<br />
3: Enter the following content into the file (can be the same as normal users):<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> export TERM="xterm-color"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> PS1='\[\e[00;31m\]\u\[\e[0m\]@\[\e[00;31m\]\w\[\e[0m\]\$'</span><br />
<br />
4: save the file and make it validated immediately.<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> source .profile</span><br />
-------------------------------------<br />
<div>
THEN, THE WORLD BECOMES COLOURFUL! :-)</div>
</div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-31085037609527141352014-07-10T20:21:00.002-07:002014-07-10T20:21:55.076-07:00Determine 32bit or 64bit of your mac OS<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<li style="-webkit-font-smoothing: antialiased; background-color: white; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(229, 229, 229); clear: both; color: #545454; font-family: Helvetica, arial, sans-serif; font-size: 16px; line-height: 25px; list-style: none; margin: 0px 0px 30px; padding: 20px;"><b class="whb" style="margin: 0px; padding: 0px;"><div class="step_num" style="float: left; font-size: 43px; margin: 0px; padding: 8px 15px 3px 0px;">
1</div>
<b class="whb" style="margin: 0px; padding: 0px;"></b>Launch Terminal app (see Applications/Utilities)</b><div class="clearall adclear" style="clear: both; margin: 0px; padding: 0px;">
</div>
</li>
<li style="-webkit-font-smoothing: antialiased; background-color: white; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(229, 229, 229); clear: both; color: #545454; font-family: Helvetica, arial, sans-serif; font-size: 16px; line-height: 25px; list-style: none; margin: 0px 0px 30px; padding: 20px;"><div class="mwimg largeimage floatcenter " style="border: 1px solid rgba(0, 0, 0, 0.0980392); line-height: 0px; margin: -21px -21px 20px; max-width: 670px; overflow: hidden; padding: 0px; position: relative;">
<a class="image" href="http://www.wikihow.com/Image:Determine-if-You%27re-running-the-32-Bit-or-64-Bit-Kernel-in-Mac-oSX-Step-2.jpg" style="color: #336633; margin: 0px; padding: 0px; text-decoration: none; word-wrap: break-word;"><img alt="Determine if You're running the 32 Bit or 64 Bit Kernel in Mac oSX Step 2.jpg" height="470" src="http://pad2.whstatic.com/images/thumb/4/40/Determine-if-You%27re-running-the-32-Bit-or-64-Bit-Kernel-in-Mac-oSX-Step-2.jpg/670px-Determine-if-You%27re-running-the-32-Bit-or-64-Bit-Kernel-in-Mac-oSX-Step-2.jpg" style="border: none; height: auto; margin: 0px; padding: 0px; width: 667px;" width="670" /></a></div>
<div class="step_num" style="float: left; font-size: 43px; font-weight: bold; margin: 0px; padding: 8px 15px 3px 0px;">
2</div>
<b class="whb" style="margin: 0px; padding: 0px;">At prompt, type the following:</b> "uname -a" (without the quotes) (note the blank space between "uname" and "-a" strings.<div class="clearall" style="clear: both; margin: 0px; padding: 0px;">
</div>
</li>
<li class="final_li" style="-webkit-font-smoothing: antialiased; background-color: white; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(229, 229, 229); clear: both; color: #545454; font-family: Helvetica, arial, sans-serif; font-size: 16px; line-height: 25px; list-style: none; margin: 0px; padding: 20px;"><div class="mwimg largeimage underwidth floatcenter " style="border: 1px solid rgba(0, 0, 0, 0.0980392); line-height: 0px; margin: -21px auto 20px; max-width: 628px; overflow: hidden; padding: 0px; position: relative;">
<a class="image" href="http://www.wikihow.com/Image:Determine-if-You%27re-running-the-32-Bit-or-64-Bit-Kernel-in-Mac-oSX-Step-3.jpg" style="color: #336633; margin: 0px; padding: 0px; text-decoration: none; word-wrap: break-word;"><img alt="Determine if You're running the 32 Bit or 64 Bit Kernel in Mac oSX Step 3.jpg" height="424" src="http://pad1.whstatic.com/images/thumb/7/79/Determine-if-You%27re-running-the-32-Bit-or-64-Bit-Kernel-in-Mac-oSX-Step-3.jpg/628px-Determine-if-You%27re-running-the-32-Bit-or-64-Bit-Kernel-in-Mac-oSX-Step-3.jpg" style="border: none; height: auto; margin: 0px; padding: 0px; width: 625px;" width="628" /></a></div>
<div class="step_num" style="float: left; font-size: 43px; font-weight: bold; margin: 0px; padding: 8px 15px 3px 0px;">
3</div>
<b class="whb" style="margin: 0px; padding: 0px;">The terminal will display two lines of text.</b> At the end of the 2nd line, you'll find something like either<ul style="margin: 0px; padding: 5px 5px 20px 55px;">
<li style="-webkit-font-smoothing: antialiased; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: none; clear: both; list-style: disc; margin: 0px; padding: 0px;">RELEASE_I386 i386 ; the latest "i386" means that you're running 32bits kernel</li>
<li style="-webkit-font-smoothing: antialiased; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: none; clear: both; list-style: disc; margin: 0px; padding: 0px;">RELEASE_X86_64 x86_64 ; the latest "x86_64" means that you're running 64bits kernel</li>
</ul>
</li>
<br />
Original Link: http://www.wikihow.com/Determine-if-You're-running-the-32-Bit-or-64-Bit-Kernel-in-Mac-oSX<br />
<br /></div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-73647862301226941192014-07-07T04:12:00.004-07:002014-07-07T04:12:55.809-07:00Change the Command-Line Prompt Colour in the Ubuntu/Linux Terminal<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="posttitle">
<h2>
How to Change the Command-Line Prompt Colour in the Ubuntu/Linux Terminal</h2>
<div class="post-info">
July 11, 2011 by <a href="http://ubuntugenius.wordpress.com/author/ubuntugenius/" title="Posts by Ubuntu Genius">Ubuntu Genius</a> </div>
</div>
The terminal for running commands in <span style="color: #993300;"><strong>Ubuntu</strong></span> and any other <strong>Linux</strong> distro is dull to look at, but you can easily spice it up a little with some colour.<br />
<div style="text-align: center;">
<img alt="" class="alignnone size-full wp-image-1694" src="http://ubuntugenius.files.wordpress.com/2011/07/colour-terminal-prompt.png?w=500" title="Change the Command-Line Prompt Colour in the Ubuntu/Linux Terminal" /></div>
Simply run the following command in a terminal:<br />
<span style="color: #3366ff;"><strong>gedit ~/.bashrc</strong></span><br />
When <span style="color: green;"><strong>.bashrc</strong></span> opens, locate and <em>uncomment</em> “<span style="color: red;"><strong>force_color_prompt=yes</strong></span>” (that is, remove the <em>hash</em>, so it no longer looks like: <span style="color: red;"><strong>#force_color_prompt=yes</strong></span>).<br />
Save the file, and open a new terminal window, and you should already see a change (the prompt should be <em><strong>Light Green</strong></em>, which is defined by <strong>1;32</strong>). You can then change any colour value you like; eg: <strong>0;35 = <em>Purple</em></strong>.<br />
To edit the colour values, locate the following section, and change
the default values with some of the examples listed further down:<br />
<span style="color: purple;"><strong>if [ "$color_prompt" = yes ]; then</strong></span><br />
<span style="color: purple;"><strong> PS1='${debian_chroot:+($debian_chroot)}\[\033[0<span style="color: red;">1;32</span>m\]\u@\h\[\033[00m\]:\[\033[01;31m\]\w\[\033[00m\]\$ '</strong></span><br />
<span style="color: purple;"><strong>else</strong></span><br />
<span style="color: purple;"><strong> PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '</strong></span><br />
<span style="color: purple;"><strong>fi</strong></span><br />
You can <span style="color: red;"><a href="http://www.arwin.net/tech/bash.php" target="_blank" title="Colour codes for your terminal"><span style="color: red;"><strong>check out this Bash colour chart</strong></span></a></span>
for a full range of colour values, but here are a few basic ones you
can play around with (note that “Light” isn’t what you might think – it
actually means “bold”):<br />
<strong><em>Black</em> <span style="color: red;">0;30</span> – <em>Dark Gray</em> <span style="color: red;">1;30</span> – <em>Blue</em> <span style="color: red;">0;34</span> – <em>Light Blue</em> <span style="color: red;">1;34</span> – <em>Green</em> <span style="color: red;">0;32</span> – <em>Light Green</em> <span style="color: red;">1;32</span> – <em>Cyan</em> <span style="color: red;">0;36</span> – <em>Light Cyan</em> <span style="color: red;">1;36</span> – <em>Red</em> <span style="color: red;">0;31</span> – <em>Light Red</em> <span style="color: red;">1;31</span> – <em>Purple</em> <span style="color: red;">0;35</span> – <em>Light Purple</em> <span style="color: red;">1;35</span> – <em>Brown</em> <span style="color: red;">0;33</span> – <em>Yellow</em> <span style="color: red;">1;33</span> – <em>Light Gray</em> <span style="color: red;">0;37</span> – <em>White</em> <span style="color: red;">1;37</span></strong><br />
For those curious about the codes used in the example pic, here’s the line from that section:<br />
<span style="color: purple;"><strong>PS1='${debian_chroot:+($debian_chroot)}\[\033[0<span style="color: red;">1;35</span>m\]\u@\h\[\033[00m\]:\[\033[0<span style="color: red;">1;34</span>m\]\w\[\033[00m\]\$ '</strong></span><br />
As you can see, <strong>1;35</strong> is the <em><strong>Light Purple</strong></em> user and machine name, while the <strong>1;34</strong> is the <em><strong>Light Blue </strong>tilde</em> (<strong>~</strong>). If you want yours a bit brighter, try:<br />
<span style="color: purple;"><strong>PS1='${debian_chroot:+($debian_chroot)}\[\033[0<span style="color: red;">1;36</span>m\]\u@\h\[\033[00m\]:\[\033[0<span style="color: red;">1;31</span>m\]\w\[\033[00m\]\$ '</strong></span><br />
… which will give you <em><strong>Light Cyan</strong></em> and <em><strong>Light Red</strong></em>, and look like the following:<br />
<div style="text-align: center;">
<img alt="" class="alignnone size-full wp-image-1695" src="http://ubuntugenius.files.wordpress.com/2011/07/colour-terminal-prompt1.png?w=500" title="Adding colour to the command-line" /></div>
In case you’re wondering about the colon and dollar sign, you can
change those as well, but you need to do more than just edit the colour
values. You’ll need to insert code in the appropriate places, so the
line looks like this:<br />
<span style="color: purple;"><strong>PS1='${debian_chroot:+($debian_chroot)}\[\033[01;36m\]\u@\h\<span style="color: red;">[\033[01;33m\]</span>:\[\033[01;31m\]\w\<span style="color: red;">[\033[01;33m\]</span>\$ '</strong></span><br />
You’ll notice the first highlighted code is just before the colon (<span style="color: red;"><strong>:</strong></span>) while the second is before the dollar sign (<span style="color: red;"><strong>$</strong></span>). In this example, both are yellow, with the result looking like:<br />
<div style="text-align: center;">
<img alt="" class="alignnone size-full wp-image-1701" src="http://ubuntugenius.files.wordpress.com/2011/07/colour-terminal-prompt2.png?w=500" title="Changing Colours for the Terminal Prompt in Ubuntu" /></div>
Now, if you want to go even further, you can make the user name stand out by doing the following:<br />
<span style="color: purple;"><strong>PS1='${debian_chroot:+($debian_chroot)}\[\033[01;36m\]\u<span style="color: red;">\[\033[01;35m\]</span>@\h\[\033[01;33m\]:\[\033[01;31m\]\w\[\033[01;33m\]\$ '</strong></span><br />
That extra bit of code is specifying <em><strong>Light Purple</strong></em> for the <span style="color: red;"><strong>@</strong></span> and the desktop name, making it now look like:<br />
<div style="text-align: center;">
<img alt="" class="alignnone size-full wp-image-1702" src="http://ubuntugenius.files.wordpress.com/2011/07/colour-terminal-prompt3.png?w=500" title="Change the Command-Line Prompt Colour in the Ubuntu/Linux Terminal" /></div>
And of course, one last bit of fiddling and you can have every
element a different colour. In this last example, we’re going to make
the computer name the same as the user name, and have them broken up by
red, as with the yellow elements:<br />
<span style="color: purple;"><strong>PS1='${debian_chroot:+($debian_chroot)}\[\033[01;36m\]\u<span style="color: red;">\[\033[01;31m\]</span>@<span style="color: red;">\[\033[01;36m\]</span>\h\[\033[01;33m\]:\[\033[01;31m\]\w\[\033[01;33m\]\$ '</strong></span><br />
As you can see, the <span style="color: red;"><strong>@</strong></span> is now <em><strong>Light Red</strong></em>, while the code before <span style="color: red;"><strong>\h</strong></span> is specifying <em><strong>Light Cyan</strong></em>, like the user name:<br />
<div style="text-align: center;">
<img alt="" class="alignnone size-full wp-image-1711" src="http://ubuntugenius.files.wordpress.com/2011/07/colour-terminal-prompt5.png?w=500" title="Change All Colours in Command Prompt" /></div>
You’ll also notice when you type commands that the colour of the text will match that of the <span style="color: red;"><strong>$</strong></span>, which can be preferable if using a “light” colour, since the bold text is easier to see.<br />
Lastly, in case you’re wondering whether the prompt can end in anything other than a <span style="color: red;"><strong>$</strong></span>, the answer is yes, and it’s as easy as opening the <span style="color: maroon;"><strong>Character Map</strong></span> (<span style="color: #3366ff;"><strong>sudo apt-get install gucharmap</strong></span> if you don’t have it), selecting a character, and pasting it over the <span style="color: red;"><strong>$</strong></span> at the end of the line of code:<br />
<span style="color: purple;"><strong>PS1='${debian_chroot:+($debian_chroot)}\[\033[01;36m\]\u\[\033[01;31m\]@\[\033[01;36m\]\h\[\033[01;33m\]:\[\033[01;31m\]\w\[\033[01;33m\]<span style="color: red;">ᛤ</span> '</strong></span><br />
In that example, I simply selected a cool looking character from the font <em>Runic</em>, and replaced the <span style="color: red;"><strong>$</strong></span> with that. You’ll also note one other thing you’ll have to do, and that’s remove the <span style="color: red;"><strong>\</strong></span> before it, or else that will appear too (obviously, that doesn’t happen if using the <span style="color: red;"><strong>$</strong></span>, but will with other characters).<br />
<div style="text-align: center;">
<img alt="" class="alignnone size-full wp-image-1714" src="http://ubuntugenius.files.wordpress.com/2011/07/colour-terminal-prompt6.png?w=500" title="Changing the Command-Line Prompt $ to a Nordic Rune!" /></div>
Have fun experimenting!<br />
<br />
Original Link: http://ubuntugenius.wordpress.com/2011/07/11/how-to-change-the-command-line-prompt-colour-in-the-ubuntulinux-terminal/<br />
<br />
and<br />
<br />
http://www.arwin.net/tech/bash.php </div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0tag:blogger.com,1999:blog-6298909166858098017.post-59253580986454299452014-07-06T22:47:00.000-07:002014-07-06T22:47:05.121-07:00Enable remote desktop for Ubuntu for multiple users<div dir="ltr" style="text-align: left;" trbidi="on">
<b>1: install xrdp</b><br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> sudo apt-get install xrdp</span></span><br />
<br />
<b>2: if now, you use remote desktop connector, you can only see a blank desktop. So a few more steps are needed:</b><br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> sudo vim /etc/xrdp/startwm.sh </span></span><br />
<br />
And then, add the following line in front of ". /etc/X11/Xsession": <br />
<br />
echo "gnome-session --session=ubuntu-2d" > .xsession<br />
<br />
<br />
<br />
<br />
<br />So, the file now looks like:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> #!/bin/sh<br /><br /> if [ -r /etc/default/locale ]; then<br /> . /etc/default/locale<br /> export LANG LANGUAGE<br /> fi<br /><br /> echo "gnome-session --session=ubuntu-2d" > .xsession<br /><br /> . /etc/X11/Xsession</span></span><br />
<br />
<br />
<br />
<br />
<b>3: Start the xrdp</b><br />
<br />
<br /><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> /etc/init.d/xrdp start</span></span><br />
<br />
Other useful commands:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> /etc/init.d/xrdp restart</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> /etc/init.d/xrdp stop</span></span><br />
<br />
<b>4: start the remote desktop connector, and enter the IP address of the Ubuntu machine, then follow the instructions.</b></div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com2tag:blogger.com,1999:blog-6298909166858098017.post-33043847939394309012013-05-24T14:47:00.000-07:002013-05-24T14:47:00.010-07:00BEAMER customize the navigation bar (tree)<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<pre class="lang-tex prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 12px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto;"><code style="border: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\documentclass</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">beamer</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\useoutertheme</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">tree</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\makeatletter</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\setbeamertemplate</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">headline</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\begin</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">beamercolorbox</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}[</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">wd</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\paperwidth</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">,colsep</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">1.5pt</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">]{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">upper separation line head</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\end</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">beamercolorbox</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\begin</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">beamercolorbox</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}[</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">wd</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\paperwidth</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">,ht</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">2.5ex</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">,dp</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">1.125ex</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">,</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
leftskip</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">.3cm</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">,rightskip</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">.3cm</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;"> plus1fil</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">]{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">title in head/foot</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\usebeamerfont</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">title in head/foot</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\insertshorttitle</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\end</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">beamercolorbox</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\begin</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">beamercolorbox</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}[</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">wd</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\paperwidth</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">,ht</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">2.5ex</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">,dp</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">1.125ex</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">,</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
leftskip</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">.3cm</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">,rightskip</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">.3cm</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;"> plus1fil</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">]{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">section in head/foot</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\usebeamerfont</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">section in head/foot</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\ifbeamer@tree@showhooks</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\setbox\beamer@tempbox</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\hbox</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\insertsectionhead</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\ifdim\wd\beamer@tempbox</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">></span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">1pt</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\hskip</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">2pt</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\raise</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">1.9pt</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\hbox</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\vrule</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;"> width</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">0.4pt</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;"> height</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">1.875ex</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\vrule</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;"> width </span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">5pt</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;"> height</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">0.4pt</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\hskip</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">1pt</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\fi</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\else</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">% </span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\hskip</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">6pt</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\fi</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\insertsectionhead</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\usebeamerfont</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">subsection in head/foot</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\ifbeamer@tree@showhooks</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\setbox\beamer@tempbox</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\hbox</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\insertsubsectionhead</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\ifdim\wd\beamer@tempbox</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">></span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">1pt</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\ \raise</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">1.9pt</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\hbox</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\vrule</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;"> width </span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">5pt</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;"> height</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">0.4pt</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\hskip</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">1pt</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\fi</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\else</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">% </span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\hskip</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">12pt</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\fi</span><span class="com" style="border: 0px; color: #868686; margin: 0px; padding: 0px; vertical-align: baseline;">%</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\insertsubsectionhead\hfill\insertframenumber</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">/</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\inserttotalframenumber\hspace</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">0.5em</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\end</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">beamercolorbox</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\begin</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">beamercolorbox</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}[</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">wd</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\paperwidth</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">,colsep</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">=</span><span class="lit" style="border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;">1.5pt</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">]{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">lower separation line head</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\end</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">beamercolorbox</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\makeatother</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\title</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">Tree Outer Theme</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\begin</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">document</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\section</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">Test Section</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\begin</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">frame</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;"> test </span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\end</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">frame</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\subsection</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">Test Subsection One</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\begin</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">frame</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;"> test </span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\end</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">frame</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\subsection</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">Test Subsection Two</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\begin</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">frame</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;"> test </span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\end</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">frame</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">
</span><span class="kwd" style="border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;">\end</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">{</span><span class="pln" style="border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;">document</span><span class="pun" style="border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;">}</span></code></pre>
</div>
Chenhttp://www.blogger.com/profile/13937012069334060151noreply@blogger.com0