tag:blogger.com,1999:blog-82084791091209508562024-02-20T22:01:02.854-05:00Linux + GNU = Humans EnabledA Man with a mission: Enable Humans with Technology the GNU/Linux way!
Disclaimer: This is my personal web blog. The opinions expressed here represent my own and not necessarily those of my employer.Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.comBlogger116125tag:blogger.com,1999:blog-8208479109120950856.post-15445830166683873382021-08-21T22:51:00.035-04:002021-11-04T09:13:14.522-04:00How To: Install Wordpress on Manjaro Linux Pahvo 21.1.0<p></p><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs9-8iQuCIXd_jBV7NXCl6AUDSp3uib287xtycAud5skB1Lycshes7aNdjXSnaekQwGB4m45ZBI3xr-YVP1TFabxybbBuZqqnXDwC8NEGyp5AzHbjms6mo0eVkmDvF2_ijAAOYlVAw38o/s1367/Screenshot+from+2021-08-21+22-06-03.png" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><span style="font-family: inherit;"><img alt="WordPress Admin Page" border="0" data-original-height="810" data-original-width="1367" height="190" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs9-8iQuCIXd_jBV7NXCl6AUDSp3uib287xtycAud5skB1Lycshes7aNdjXSnaekQwGB4m45ZBI3xr-YVP1TFabxybbBuZqqnXDwC8NEGyp5AzHbjms6mo0eVkmDvF2_ijAAOYlVAw38o/w320-h190/Screenshot+from+2021-08-21+22-06-03.png" title="WordPress Admin Page" width="320" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: inherit;">WordPress Admin Page<span style="text-align: left;"></span></span></td></tr></tbody></table><span style="font-family: inherit;"> <br />WordPress, a free open-source content management system (CMS), is one of the most popular platforms for blogs and websites in the world today. The official website for WP is <a href="http://wordpress.org" target="_blank">wordpress.org</a>. WP is a spectacular platform! This great product, with all it's ability to be customized, its high-quality visual appeal, its super-duper functionality, its multitude of themes, and so much more, it's so awesome that this feature-rich platform is Free and Open Source for everyone to use!</span><div><span style="font-family: inherit;"><br /></span></div><div><span style="font-family: inherit;">WordPress is made even more powerful due the plethora(<a href="https://wordpress.org/plugins/" target="_blank">literally 10s of thousands</a>) of plugins (both free and paid) that are available for the platform!</span><p></p><p><span style="font-family: inherit;">I wanted to take a look at this fabulous software for myself so I made some notes for installing WP on one of my Manjaro Linux 5.10.59-1-MANJARO x86_64 21.1.0 Pahvo machines for a test. Installation was pretty quick and easy, and I only encountered a few snags in the process. I'll point out how to work around the issues below.</span></p><p><span style="font-family: inherit;">As a bare minimum to get WP up and running on Manjaro Linux, we need to install WP, PHP, and MariaDB, here's the command to use in the terminal (Internet connection required, obviously. See fig. 1 for example.):</span></p>
<span style="font-family: inherit;"><code> $ sudo pacman -S wordpress php mariadb </code>
<br />
</span><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUc5_o_e7Hk8z-myw2s0vKm-aweNUrQNO4Y4oYm-gGT3OzkfILqXGep8hMHkz4zsIPs5fMgt8QwB2knFaSUp0reC3uASvdtoKdGl9mPgSWSKte2smG3S1qrPlO3F7IaJAlT3_diG8ixF4/s732/InstallWP.png" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><span style="font-family: inherit;"><img border="0" data-original-height="620" data-original-width="732" height="169" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUc5_o_e7Hk8z-myw2s0vKm-aweNUrQNO4Y4oYm-gGT3OzkfILqXGep8hMHkz4zsIPs5fMgt8QwB2knFaSUp0reC3uASvdtoKdGl9mPgSWSKte2smG3S1qrPlO3F7IaJAlT3_diG8ixF4/w200-h169/InstallWP.png" width="200" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: inherit;">fig. 1 Installing Packages</span></td></tr></tbody></table><p><span style="font-family: inherit;">After confirming the install of the above packages, we move on to some initial setup on the MariaDB for use:</span></p>
<span style="font-family: inherit;"><code> $ sudo mysql -u root -p </code><br />
</span><p><span style="font-family: inherit;"> For the above command, I had to authenticate as my CLI user to allow sudo, and then, since this is just a test database setup, I simply hit Enter at the prompt for "Enter password:", to set the MariaDB root password to blank (See fig. 2 for the example.).</span></p><p><span style="font-family: inherit;"><br /></span></p><p><span style="font-family: inherit;">Also, here's where I hit my 1st snag. When attempting to set the root password for the MariaDB, I was presented with the error message 'ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)'.</span></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVIqVcU3RokroPGEzwMEn9bypatriueEYxxIrskpJk4B5-lepehGldUnRMOWzOp4kvj6mPm3ma7X-oVidDuIoEpj_HoK_kdSjwboCHuAY7eWoIlP9XugVh3p8SP9SEvS7d2uxvK1Vwarg/s892/maridb_connect.png" style="margin-left: auto; margin-right: auto;"><span style="font-family: inherit;"><img border="0" data-original-height="187" data-original-width="892" height="67" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVIqVcU3RokroPGEzwMEn9bypatriueEYxxIrskpJk4B5-lepehGldUnRMOWzOp4kvj6mPm3ma7X-oVidDuIoEpj_HoK_kdSjwboCHuAY7eWoIlP9XugVh3p8SP9SEvS7d2uxvK1Vwarg/s320/maridb_connect.png" width="320" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: inherit;">fig. 2 - Set MariDB root passwd shows an error.</span></td></tr></tbody></table><p></p><p><span style="font-family: inherit;">This error happened because the MariaDB service was not running. So, time to break out the systemctl command to get things up and running.</span></p><p><span style="font-family: inherit;">First we check the status of the MariaDB service. Shows as disabled and inactive in fig. 3:</span></p>
<code><span style="font-family: inherit;"> $ sudo systemctl status mariadb </span></code></div><div><code><span style="font-family: inherit;"><br /></span></code></div><div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipIiA1c4pxFTC9HBc1HrzPMiLLpC4X9MDL8VjfW52zAoJhFbS4_79V4DFGMK0dG21dVwaCU6s2IJQI2HUBkEBgs0sshVwJf0JRhhCO_kdW-mASrHhqIjlq_mU2oiJmtMo57xrthvf0FZ4/s897/mariadbstatus.png" style="margin-left: auto; margin-right: auto;"><span style="font-family: inherit;"><img border="0" data-original-height="189" data-original-width="897" height="67" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipIiA1c4pxFTC9HBc1HrzPMiLLpC4X9MDL8VjfW52zAoJhFbS4_79V4DFGMK0dG21dVwaCU6s2IJQI2HUBkEBgs0sshVwJf0JRhhCO_kdW-mASrHhqIjlq_mU2oiJmtMo57xrthvf0FZ4/s320/mariadbstatus.png" width="320" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: inherit;">fig. 3 - MariaDB service not running.</span></td></tr></tbody></table><span style="font-family: inherit;"><br /></span><p><span style="font-family: inherit;">Next, we enable the MariaDB service. fig.4</span></p><span style="font-family: inherit;"><code></code>
<code> $ sudo systemctl enable mariadb </code></span></div><div><span style="font-family: inherit;"><span><br /></span>
</span><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPdOfJIog8qdZZoU5bCFARZtbgsUemKMfrH34-qL9GGbH9unxSRTmFHvJ_JNQUhqju4msrzCX5wbJ5UFMzYD3Zpfg6pC34h9obr9WWhLlsKMlF-91xOCRRysB6pCQ4EIAuKJ2GOJ-Lu6w/s1076/mariadb_enabled.png" style="margin-left: auto; margin-right: auto;"><span style="font-family: inherit;"><img border="0" data-original-height="142" data-original-width="1076" height="42" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPdOfJIog8qdZZoU5bCFARZtbgsUemKMfrH34-qL9GGbH9unxSRTmFHvJ_JNQUhqju4msrzCX5wbJ5UFMzYD3Zpfg6pC34h9obr9WWhLlsKMlF-91xOCRRysB6pCQ4EIAuKJ2GOJ-Lu6w/s320/mariadb_enabled.png" width="320" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: inherit;">fig. 4 - Enabling the MariaDB service</span></td></tr></tbody></table><span style="font-family: inherit;"><br /><code><p>Next, we'll try restarting the MariaDB service to see if everything comes up. fig.5</p><code></code> </code></span></div><div><code><span style="font-family: inherit;">$ sudo systemctl restart mariadb </span></code></div><div><code><span style="font-family: inherit;"><br /></span></code></div><div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEpCRZR9U2sBxOsOe4WahuqwGkJEs57wMxRrZr_7AMJrxjDKPC7z8kNcZLaABqV9gmDbQSty3q8T1acffyk1yI3jdNWjZzJcPSGHf9FcjktzEuD2BynXNf2Ej5sE9qg777_H80D7g7UWM/s821/mariadb_restart_fail.png" style="margin-left: auto; margin-right: auto;"><span style="font-family: inherit;"><img border="0" data-original-height="125" data-original-width="821" height="49" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEpCRZR9U2sBxOsOe4WahuqwGkJEs57wMxRrZr_7AMJrxjDKPC7z8kNcZLaABqV9gmDbQSty3q8T1acffyk1yI3jdNWjZzJcPSGHf9FcjktzEuD2BynXNf2Ej5sE9qg777_H80D7g7UWM/s320/mariadb_restart_fail.png" width="320" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: inherit;">fig. 5 - MariaDB restart fails</span></td></tr></tbody></table><span style="font-family: inherit;"><br /></span><p><span style="font-family: inherit;">As we can see in fig. 5, when we tried restarting the MariaDB, it fails. After again checking the status of the MariaDB service, it now shows a specific error, "[ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist" when attempting to restart the MariaDB service. Turns out I had to run the mysql_install_db executable and set the datadir path to get things squared away (see fig. 6):<br /> </span></p>
<code><span style="font-family: inherit;"> $ sudo mysql_install_db --user=mysql --datadir=/var/lib/mysql</span></code></div><div><span style="font-family: inherit;"><span><br /></span><code></code></span><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJPKSbwaxZvYRiVNBXM6mk6sxjTb-nftAfx_wSNL0Fxjghkck_pCwC-LBG6ZnVkDlxiLHteYq67dGj7xa-IEOu4o3jf1OFT8ZSQU5e3oBqMxTBZ1zLl07Ssznv5BOLjP7NpcCao3fKh0I/s731/mysql_install_db_datadir.png" style="margin-left: auto; margin-right: auto;"><span style="font-family: inherit;"><img border="0" data-original-height="731" data-original-width="695" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJPKSbwaxZvYRiVNBXM6mk6sxjTb-nftAfx_wSNL0Fxjghkck_pCwC-LBG6ZnVkDlxiLHteYq67dGj7xa-IEOu4o3jf1OFT8ZSQU5e3oBqMxTBZ1zLl07Ssznv5BOLjP7NpcCao3fKh0I/s320/mysql_install_db_datadir.png" width="304" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: inherit;">fig. 6 - mysql_install_db script, set datadir=/var/lib/mysql</span></td></tr></tbody></table><span style="font-family: inherit;"><br /></span><p><span style="font-family: inherit;">And now we can see that MariaDB restarts without error and when checking status for it, now shows active (fig. 7):</span></p>
<span style="font-family: inherit;"><code>$ sudo systemctl restart mariadb;sudo systemctl status mariadb;</code>
</span><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4Tc6CuG1WNo3fLqDDuEcyuFDixDOps2uSc11XUsbMTD5HT7RUXNWjiJu_ZVk62uOAAOJtKbNqpb3grRQXGgwh82SUMpHsAphsbJFyU928WeXOGgS5L4Lbt4U3oChgiFCdm0DG3Hr_JbY/s1236/mariadb_restart_succeeds.png" style="margin-left: auto; margin-right: auto;"><span style="font-family: inherit;"><img border="0" data-original-height="629" data-original-width="1236" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4Tc6CuG1WNo3fLqDDuEcyuFDixDOps2uSc11XUsbMTD5HT7RUXNWjiJu_ZVk62uOAAOJtKbNqpb3grRQXGgwh82SUMpHsAphsbJFyU928WeXOGgS5L4Lbt4U3oChgiFCdm0DG3Hr_JbY/s320/mariadb_restart_succeeds.png" width="320" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: inherit;">fig. 7 - MariaDB shows as running.</span></td></tr></tbody></table><p><span style="font-family: inherit;">Now we'll setup a database for the new WP site, I'll call it 'shannon_wordpress_db', the username to access will be 'WP_user' and the password will be 'demo' (don't use a weak password like this for a real site!) See fig. 8:</span></p><p>
<span style="font-family: inherit;"><code>$ sudo mariadb -uroot -p -e'CREATE DATABASE shannon_wordpress_db; \ <br />
GRANT ALL PRIVILEGES ON shannon_wordpress_db.* TO "WP_user"@"localhost" \ <br />
IDENTIFIED BY "demo"; FLUSH PRIVILEGES;'</code>
</span></p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4NrH19DPn0lmg4Wz23hBUDe3UT4UxZomGvfgAiyER21yTucIZec_ZCZw6sF-q3RKVShcEghT3X_jL5yAotmVZbfG5oj5s5NOHskGPtyflgDiQ-jKWfhBXE4NiV0XVQ9UvJX1ZYgiAwk4/s696/setup_z_database.png" style="margin-left: auto; margin-right: auto;"><span style="font-family: inherit;"><img border="0" data-original-height="404" data-original-width="696" height="186" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4NrH19DPn0lmg4Wz23hBUDe3UT4UxZomGvfgAiyER21yTucIZec_ZCZw6sF-q3RKVShcEghT3X_jL5yAotmVZbfG5oj5s5NOHskGPtyflgDiQ-jKWfhBXE4NiV0XVQ9UvJX1ZYgiAwk4/s320/setup_z_database.png" width="320" /></span></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="font-family: inherit;">fig. 8 - mariadb SQL to create WP DB and set login</span></td></tr></tbody></table><span style="font-family: inherit;"><br /><span>At this point, I wanted to test access to my newly created WP database before I setup WP for PHP. I'll use the 'SHOW GRANTS' command to ensure access (fig. 9):</span></span></div><div><span style="font-family: inherit;"><span><br /></span></span></div>
<span style="font-family: inherit;"><code>$ mariadb -uWP_user -p"demo" -D"shannon_wordpress_db" -e"SHOW GRANTS;" </code><br />
</span><div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><img border="0" data-original-height="206" data-original-width="1046" height="63" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2naTYYm2TYroQt-QcGuIf0XoXoytbSIntvdDHVYv43PrxwjQuLzRSy60CRCawmBILZlkiAeAvP_KDEpFvoENYDVaeUXNIJtwAQwmrOwJ8LFA7ne4mWDspVEiqCU-wleGBXK7da8IqGHE/s320/mariadb_test_access.png" style="margin-left: auto; margin-right: auto;" width="320" /></td></tr><tr><td class="tr-caption" style="text-align: center;">fig. 9 - Testing access to new WP DB</td></tr></tbody></table><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2naTYYm2TYroQt-QcGuIf0XoXoytbSIntvdDHVYv43PrxwjQuLzRSy60CRCawmBILZlkiAeAvP_KDEpFvoENYDVaeUXNIJtwAQwmrOwJ8LFA7ne4mWDspVEiqCU-wleGBXK7da8IqGHE/s1046/mariadb_test_access.png" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: inherit;"></span></a></div><div class="separator" style="clear: both; text-align: center;"><span style="font-family: inherit;"><br /></span></div><div class="separator" style="clear: both; text-align: left;">Ok, at this point, we're ready to setup WP. As shown above, WordPress was installed into '/usr/share/webapps/wordpress' on installation by pacman. Note that we'll have to make any changes to the default directory for WP using sudo since the permissions are restricted for the default directory. In the example below, I first copy the 'wp-config-sample.php' file to 'wp-config.php' so we can use it as our configuration file. I also used grep to show the pertinent database connection fields for WP (fig. 10):</div><div class="separator" style="clear: both; text-align: left;"><br />
<code>$ sudo cp /usr/share/webapps/wordpress/wp-config-sample.php /usr/share/webapps/wordpress/wp-config.php</code><br />
<code>$ grep "DB_[N*|U*|P*]" /usr/share/webapps/wordpress/wp-config.php</code><br /> </div></div><div class="separator" style="clear: both; text-align: left;"><code><br /></code></div><div class="separator" style="clear: both; text-align: left;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaRS1jzXVxCtGYTk1o17rW4D33p4ZFVWoJCiGnMS-roWz843W-3zY32Wllp6ou9Z9JkK7G-WVxdAYh6X8OraRS1uO5k58IREiO6rd2vqBIm6i5jzye_vVtKeSoxCE_QykdMg34v95SSfE/s969/wp-config_php_database_setting.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="171" data-original-width="969" height="56" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaRS1jzXVxCtGYTk1o17rW4D33p4ZFVWoJCiGnMS-roWz843W-3zY32Wllp6ou9Z9JkK7G-WVxdAYh6X8OraRS1uO5k58IREiO6rd2vqBIm6i5jzye_vVtKeSoxCE_QykdMg34v95SSfE/s320/wp-config_php_database_setting.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">fig. 10 - Create wp-config.ph and show DB connection fields</td></tr></tbody></table><br /></div><div class="separator" style="clear: both; text-align: left;">Now we'll edit the wp-config-php file using sed and replace the database name(<span style="font-family: monospace;">shannon_wordpress_db)</span>, db user(<span style="font-family: monospace;">WP_user</span>), and db password(<span style="font-family: monospace;">demo</span>) for our WP database (fig. 11):</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: monospace;">$ </span><span style="font-family: monospace;">sudo sed -i -e 's/database_name_here/shannon_wordpress_db/g' -e 's/username_here/WP_user/g' -e 's/password_here/demo/g' /usr/share/webapps/wordpress/wp-config.php</span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: monospace;">$ </span><span style="font-family: monospace;">grep "DB_[N*|U*|P*]" /usr/share/webapps/wordpress/wp-config.php</span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: monospace;"><br /></span></div><div class="separator" style="clear: both; text-align: left;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWjusBY1nCrwt9UwGkpb6_1wd-gADJ8R6NpNfliswqmhZvY_3SJG3y6JZYQYhAJdgaONSB91bmPB6JObF__TDe59NWwTiA34CxrhwmgLbaU36dyI-ioynu4oLW4ctoGcKp4tTZMA0m5jI/s881/WordPressDBSettingsInstalled.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="200" data-original-width="881" height="73" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWjusBY1nCrwt9UwGkpb6_1wd-gADJ8R6NpNfliswqmhZvY_3SJG3y6JZYQYhAJdgaONSB91bmPB6JObF__TDe59NWwTiA34CxrhwmgLbaU36dyI-ioynu4oLW4ctoGcKp4tTZMA0m5jI/s320/WordPressDBSettingsInstalled.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">fig. 11 - wp-config.php edited with sed command</td></tr></tbody></table><br /><span style="font-family: monospace;"><br /></span></div><div class="separator" style="clear: both; text-align: left;">At this point we're ready to test the connection to our WordPress install and finish setting it up. First we can launch PHP web service from within a directory by cd'ing to it, then run php -S command with the port setting (to end, hit CTRL+c). After that, we'll open a web browser and attempt to navigate to the served site, in this case http://localhost:3456 (fig. 12):</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: monospace;">$ </span><span style="font-family: monospace;">cd /usr/share/webapps/wordpress; php -s localhost:3456</span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: monospace;"><br /></span></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji8zY7O_UZ019ZtWTgv6Q_QiWReewZzJkWytaEzfZH5jHJtZpBRhs-3cw4EXjqK41jOfnrMCJ6vxM2lkf54V1kdyYRUNEmYWjsjwWWAh3gbnf8gAJozdxAHIm5_Cfth-_muKda8e-gec8/s1158/wordpress_cli_fails.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="646" data-original-width="1158" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji8zY7O_UZ019ZtWTgv6Q_QiWReewZzJkWytaEzfZH5jHJtZpBRhs-3cw4EXjqK41jOfnrMCJ6vxM2lkf54V1kdyYRUNEmYWjsjwWWAh3gbnf8gAJozdxAHIm5_Cfth-_muKda8e-gec8/s320/wordpress_cli_fails.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">fig. 12 - using php to serve wp, and error msg shown after attempting to access from browser</td></tr></tbody></table><br /><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">In fig. 12 what is shown is the result of my attempt to access localhost:3456 from the web browser. We can see there is an error 'GET / - Uncaught Error: Call to undefined function mysql_connect() in /usr/share/webapps/wordpress/wp-includes/wp-db.php:1688' both in fig. 12 (where the WP site is served by PHP), as well as below in fig. 13 when we attempt to browse to http://localhost:3456.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlO-qrW-q9E_ZAKLDUxHA7KJl1Rmm5lFO2pXvtZq2Ip2eC38AWiELF3l5iqnfuoG1azBI62JdEWiv-YMAbwAx9gcQrPCsNnCHxz2sAb-IhtT0-bH4YG-OEI_F3eWAxdG2FfuALFUclMIA/s795/wordpresssite_fails.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="377" data-original-width="795" height="152" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlO-qrW-q9E_ZAKLDUxHA7KJl1Rmm5lFO2pXvtZq2Ip2eC38AWiELF3l5iqnfuoG1azBI62JdEWiv-YMAbwAx9gcQrPCsNnCHxz2sAb-IhtT0-bH4YG-OEI_F3eWAxdG2FfuALFUclMIA/s320/wordpresssite_fails.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">fig. 13 - WordPress page fails due to DB connection issue (mysqli not enabled)</td></tr></tbody></table><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div>As it turns out, WP cannot connect to the database because 'mysqli' extension is disabled (commented out with the ";") in /etc/php/php.ini. So we'll first check to see if mysqli is uncommented in the php.ini file and then use sed to change it to drop the preceding semi-colon, which uncomments it. We'll then check again with the php -m command to see if it's loaded (fig. 14):<div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><br /></div>To show if the mysqli php module is enabled use either command below and if it comes back blank, mysqli is not enabled:<br /><div class="separator" style="clear: both; text-align: left;"><span style="font-family: monospace;">$ </span><span style="font-family: monospace;">php -m|grep mysqli</span></div></div><div class="separator" style="clear: both; text-align: left;">Or:</div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: monospace;">$ grep ';extension=mysqli' /etc/php/php.ini</span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: monospace;"><br /></span></div><div class="separator" style="clear: both; text-align: left;">Here's how to use sed to update the php.ini file and uncomment the mysqli module so it can be used:</div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: monospace;">$ sudo sed -i -e 's/\;extension=mysqli/extension=mysqli/g' /etc/php/php.ini;<br /></span></div><div class="separator" style="clear: both; text-align: left;"><br /><span style="font-family: monospace;"><br /></span><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCnYPaESpOJpgLkybk-61UDpmitILkl2GqV850d0-18P4FesZ-VprXSy5zO4qec0ItifAGg5BiVo7IIrb4TLQyD1Po6OJAi-j55eZcy7pBn9BvGAI0mDKB_AtPHONXQLS6PNwxomwyDwg/s719/mysqli_php_enabled.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="286" data-original-width="719" height="127" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCnYPaESpOJpgLkybk-61UDpmitILkl2GqV850d0-18P4FesZ-VprXSy5zO4qec0ItifAGg5BiVo7IIrb4TLQyD1Po6OJAi-j55eZcy7pBn9BvGAI0mDKB_AtPHONXQLS6PNwxomwyDwg/s320/mysqli_php_enabled.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">fig. 14 - Shows whether mysqli is loaded plus using sed to edit the php.ini</td></tr></tbody></table><br /></div><div class="separator" style="clear: both; text-align: left;">After the mysqli module is enabled in php.ini, we'll go back and serve up the WordPress site from the /usr/share/webapps/wordpress directory with the php -S localhost:3456 command once again and then try to navige to http://localhost:3456 with our web browser. As you can see in fig. 14 and fig. 15, things are working now!</div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhivBDeezxWgkB07UZZMbDiCIiwELgxf6FOV7AHDzmD8wGiq82d1VUpCqN4_5LohAVWME9nGeAmKzkGVE6_bouR0errhTYPW5ynLtOUQBUdt-vLeo2T1YcjTRytMDRHohphRJ2D-MdN33Y/s722/cli_wordpress_servingworks.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="183" data-original-width="722" height="81" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhivBDeezxWgkB07UZZMbDiCIiwELgxf6FOV7AHDzmD8wGiq82d1VUpCqN4_5LohAVWME9nGeAmKzkGVE6_bouR0errhTYPW5ynLtOUQBUdt-vLeo2T1YcjTRytMDRHohphRJ2D-MdN33Y/s320/cli_wordpress_servingworks.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">fig. 14 - using php -s localhost:3456 from the /usr/share/webapps/wordpress directory to serve wordpress<br /></td></tr></tbody></table><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvx_7ghpTkXwHsjEx7XneOZe62GfuU2hvxbpMdFXcHaYPKO0ZRTmwhiFYTLbaS4T_jc3fMKBRJ2jVnKTMbYCpalnG1mZThHFB1oEvHU4wgJWmQdfgezLUeDUoySLxgTyJ_yMqylCiN-nI/s1007/WordPress_setup_Page.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1007" data-original-width="808" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvx_7ghpTkXwHsjEx7XneOZe62GfuU2hvxbpMdFXcHaYPKO0ZRTmwhiFYTLbaS4T_jc3fMKBRJ2jVnKTMbYCpalnG1mZThHFB1oEvHU4wgJWmQdfgezLUeDUoySLxgTyJ_yMqylCiN-nI/s320/WordPress_setup_Page.png" width="257" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">fig. 15 - WordPress now loads the initial setup page at http://localhost:3456</td></tr></tbody></table><br /><div class="separator" style="clear: both; text-align: left;">And now we have a running WordPress Site! Some additional screen clips below show the next steps for setting up WordPress using the browser:</div><div class="separator" style="clear: both; text-align: left;"><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH3HsEJqDQzTCvC3RMyu95Cic0CdjvU7PPe-_9Z29lDirCbFfjoKSxxU7AEJb-Osf91KUmTLEOidOZZWybpLcsCtaLwv147_hxFbWfrX4jhHk76ipW4YTFRXP1ZxkePFLyhV7-4qrRlmE/s801/word_press_step2_login_button.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="531" data-original-width="801" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH3HsEJqDQzTCvC3RMyu95Cic0CdjvU7PPe-_9Z29lDirCbFfjoKSxxU7AEJb-Osf91KUmTLEOidOZZWybpLcsCtaLwv147_hxFbWfrX4jhHk76ipW4YTFRXP1ZxkePFLyhV7-4qrRlmE/s320/word_press_step2_login_button.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">fig. 16 - Step 2 after initial setup(which takes a minute because it builds the database structure for the website)</td></tr></tbody></table><br /><br /><div class="separator" style="clear: both; text-align: center;"><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd6vfQfBXhDJrgFRnvtOn52Q9aNkI_DwcNOdxJI3nu_Mg3MA3qrzBvimC3lPvFhoF17kioYZXSQ1nNOLgxRO1gtEGRyoZIjbMgfoTLtixSMBBB0wUQl6NvGNT3LpOE8XiE9hyphenhyphenzy_YqicM/s774/wp_login_page.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="585" data-original-width="774" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd6vfQfBXhDJrgFRnvtOn52Q9aNkI_DwcNOdxJI3nu_Mg3MA3qrzBvimC3lPvFhoF17kioYZXSQ1nNOLgxRO1gtEGRyoZIjbMgfoTLtixSMBBB0wUQl6NvGNT3LpOE8XiE9hyphenhyphenzy_YqicM/s320/wp_login_page.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">fig. 17 - Logging in for the first time!<br /><br /></td></tr></tbody></table><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaw1EhBk6LEGI5yaKmJ1jwIOct_O6aEFTtga6cLDyFFqBsojIO6atqlxHzRrNPIqss510YSmu9uC0lSSFYKD5DvgwPbyi82Bj2ApFNkw9cVQVjy6Y5Sodwbud0Otci_avRI_Vbw-8QqzU/s1396/wordpress_is_setup_page.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1018" data-original-width="1396" height="233" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaw1EhBk6LEGI5yaKmJ1jwIOct_O6aEFTtga6cLDyFFqBsojIO6atqlxHzRrNPIqss510YSmu9uC0lSSFYKD5DvgwPbyi82Bj2ApFNkw9cVQVjy6Y5Sodwbud0Otci_avRI_Vbw-8QqzU/s320/wordpress_is_setup_page.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">fig. 18 - Wordpress configuration page</td></tr></tbody></table></div><br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu094T2J8OyIflEaAKi8Jgek3TKxK_MlCdy0vVgq3NzLgi0FxRprEDAcpfUf2adLyi6KoyRClturzsgeRXnKsAN1k8fR8ZG3nydXgwaWS8GFbrshpABIU4mK1YMafb27Aa_4Tyg103Y2g/s1333/wp_theme_page.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1008" data-original-width="1333" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu094T2J8OyIflEaAKi8Jgek3TKxK_MlCdy0vVgq3NzLgi0FxRprEDAcpfUf2adLyi6KoyRClturzsgeRXnKsAN1k8fR8ZG3nydXgwaWS8GFbrshpABIU4mK1YMafb27Aa_4Tyg103Y2g/s320/wp_theme_page.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Checking out the themes for WordPress</td></tr></tbody></table><div class="separator" style="clear: both; text-align: center;"><br /></div><div><br /></div>So that's it for a basic test install of WordPress! Further steps would include installing a webserver, e.g., Apache, installing modules for WordPress, hardening the install for security, assigning a DNS entry for easier navigation, etc. I hope something here was useful for you! <div><br /></div><div>-Shannon<br /><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><br /></div></div>Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com0tag:blogger.com,1999:blog-8208479109120950856.post-1555552899353933782019-03-22T01:18:00.001-04:002019-03-23T11:00:20.836-04:00How to Disable Middle Mouse Button in Ubuntu / Debian Linux<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrQYOYS1olcDX8oR2d6QnCZwL8lu39Smg34zm0wtxVFUNE4i6H3AMlJkhDwYyKHVb3dH12g3C-IkF7aez4PPhuaxjB8MeyaCNML1MN0t20tkU869RFOmPky0MvmDGABZQMUGNGycSpyxA/s1600/mous.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="876" data-original-width="1168" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrQYOYS1olcDX8oR2d6QnCZwL8lu39Smg34zm0wtxVFUNE4i6H3AMlJkhDwYyKHVb3dH12g3C-IkF7aez4PPhuaxjB8MeyaCNML1MN0t20tkU869RFOmPky0MvmDGABZQMUGNGycSpyxA/s320/mous.jpg" width="320" /></a></div>
Like many things in Linux+GNU some users absolutely love the middle click - close-tab or paste feature of the mouse being set by default. Others absolutely hate it!<br />
<br />
The problem in this case is: apparently there is no easy way to disable the mouse middle-click through any graphical settings tools of Ubuntu.<br />
<br />
But as always, with Linux+GNU - there is a way. Here's a quick post about disabling the middle mouse button in Ubuntu or Debian Linux. This method would likely work with non Debian based distros as well, but I haven't tested it.<br />
<br />
I've seen a few approaches to accomplish the disabling but the one I was able to get working is by using a custom xorg.conf file in Ubuntu 18.10.<br />
<br />
The first thing one needs to figure out to disable the middle click is what button it's numbered as on in the 'xinput' command. Once we find that out, we set that number position to '0'.<br />
<br />
<div>
You may need to install xinput with:</div>
<div>
<pre></pre>
<pre>$ sudo apt install xinput
</pre>
<div>
<br /></div>
<div>
Try this command in the terminal (ctrl+alt+t) to see what your current pointer mapping is:</div>
</div>
<br />
<pre>$ pointers=$(xinput --list --name-only|egrep -i 'touchpad|mouse'|sed 's/\ /_/g'); \
echo;echo "Button Maps:";for i in $(echo "$pointers");do echo "$i"|sed 's/_/\ /g'; \
xinput get-button-map "$(echo $i|sed 's/_/\ /g')";done;echo</pre>
<pre></pre>
<pre></pre>
<pre></pre>
<pre></pre>
<pre>example output:</pre>
<pre></pre>
<pre></pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhswEpern53X75JI14ke8HUjLfyh4O6Aj9qMIJI19RxBSCSagfP3DDKojMk4Ar_hlDvxOqHZmW5WiO2ast903RCRszYE-8KHFSeYPYgzWabqAw3ecslr_8PtQWBMxwyBWbInOf6HlG-SpI/s1600/linux-screen.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="201" data-original-width="941" height="85" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhswEpern53X75JI14ke8HUjLfyh4O6Aj9qMIJI19RxBSCSagfP3DDKojMk4Ar_hlDvxOqHZmW5WiO2ast903RCRszYE-8KHFSeYPYgzWabqAw3ecslr_8PtQWBMxwyBWbInOf6HlG-SpI/s400/linux-screen.png" width="400" /></a></div>
<pre></pre>
<pre></pre>
<pre></pre>
<div class="separator" style="clear: both; text-align: center;">
</div>
<pre></pre>
<pre></pre>
<pre></pre>
<div>
<br />
<br />
What I figured out for my machine, in order to disable the middle-click, was that I needed to change my xinput mapping for the mouse to: '1 0 3 4 5 6 7'. The "0" in place of the "2" - disables the middle click for my USB mouse. This setting also worked for the Touchpad.</div>
<div>
<br /></div>
<div>
I can achieve this setting by simply running this command:<br />
<pre>$ xinput set-button-map 'PixArt Dell MS116 USB Optical Mouse' 1 0 3 4 5 6 7
</pre>
<br />
But, as I've seen asked so much out there - without any seemingly clear answer - is: How do I make this setting permanent so I don't have to run the xinput command every time I login?</div>
<div>
<br /></div>
<div>
The answer is to create a custom xorg.conf file and place it in either /etc/X11/xorg.conf or /etc/X11/xorg.conf.d/somefilename.conf.</div>
<div>
<br /></div>
<div>
What I did was to simply create a file named (will have to use sudo to edit):</div>
<div>
<pre></pre>
<pre>sudo vi /etc/X11/xorg.conf.d/disable-mouse-middle-click.conf
</pre>
<div>
<br /></div>
<div>
With contents:</div>
<div>
<br /></div>
<pre>Section "InputClass"
Identifier "USB Pointer"
MatchIsPointer "true"
Option "ButtonMapping" "1 0 3 4 5 6 7"
EndSection
Section "InputClass"
Identifier "TouchPad Pointer"
MatchIsTouchpad "true"
Option "ButtonMapping" "1 0 3 4 5 6 7"
EndSection
</pre>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Then top it off with "Ctrl-Alt-Backspace" to restart my session. Checkout this <a href="http://www.humans-enabled.com/2013/10/ubuntu-1310-enable-controlaltbackspace.html" target="_blank">link</a> to enable it if it's not already.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Here's the text for a script to help you set it up:<br />
<br /></div>
<pre></pre>
<pre>#Finally Disable middle click with a custom xorg.conf
#By Shannon VanWagner
#3/21/2019
#humans-enabled.com
if [ $# -eq 0 ]; then
echo
echo "$(basename $0): Disable pointer-middle-click w/cust. xorg.conf"
echo
echo "To install the fix run:"
echo "$0 -i"
echo
echo "To remove the fix run:"
echo "$0 -r"
echo
fi
xconfCustom='/etc/X11/xorg.conf.d/disable-mouse-middle-click.conf'
xconfDir='/etc/X11/xorg.conf.d'
if [ "$1" = "-i" ]; then
while true; do
if [ ! -d "$xconfDir" ]; then
echo "Whoops! $xconfDir doesn't exist. Creating it with sudo..."
sudo mkdir $xconfDir
else
echo "$xconfDir directory exists. This is good."
break;
fi
done
while true; do
if [ ! -f "$xconfCustom" ]; then
echo "Creating custom xconf file to disable middle click."
echo "New file name: $xconfCustom"
echo "Creating custom xconf file with the text below."
echo "File name: $xconfCustom"
echo
echo '#Disable Middle Click - By vanwagner
Section "InputClass"
Identifier "USB Pointer"
MatchIsPointer "true"
Option "ButtonMapping" "1 0 3 4 5 6 7"
EndSection
Section "InputClass"
Identifier "TouchPad Pointer"
MatchIsTouchpad "true"
Option "ButtonMapping" "1 0 3 4 5 6 7"
EndSection' | sudo tee $xconfCustom
echo
else
echo "Middle-click disabling xconf file is installed."
echo "File name: $xconfCustom"
echo "Enable changes w/ session restart (ctrl-alt-backspace if enabled)."
break;
fi
done
fi
if [ "$1" = "-r" ]; then
echo "Removing cust. xorg.conf file, sudo may be needed:"
echo "File name: $xconfCustom"
sudo rm -rf $xconfCustom
if [ ! -f "$xconfCustom" ]; then
echo "Custom xconf has been removed or doesn't exist."
echo "Enable changes w/ session restart (ctrl-alt-backspace if enabled)."
fi
fi
</pre>
<pre></pre>
<pre>Cheers!</pre>
<pre>Shannon VanWagner</pre>
<pre>3/22/2019</pre>
Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com1tag:blogger.com,1999:blog-8208479109120950856.post-45767290966056148402018-08-25T14:28:00.004-04:002018-10-13T10:31:41.142-04:00My Thoughts On Valve's Proton Steam Play Feature and Linux Gaming<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJwhNNMGZfT5JlXkZ0GBcgYNS-xrBpXtj60RXI6R4K6EJqj6SrgKGHHsovC8VXa5_W5d05FSsWSOdwj6RE8N-TKHP6NQ9eR7VFmVx-bTGIZMghY6FvLo6OOlfrdh9YtGYc-paBH2wzYZM/s1600/valve_pic.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1024" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJwhNNMGZfT5JlXkZ0GBcgYNS-xrBpXtj60RXI6R4K6EJqj6SrgKGHHsovC8VXa5_W5d05FSsWSOdwj6RE8N-TKHP6NQ9eR7VFmVx-bTGIZMghY6FvLo6OOlfrdh9YtGYc-paBH2wzYZM/s320/valve_pic.png" width="320" /></a></div>
So I was reading a great post by liamdawe@ over at <a href="http://gamingonlinux.com/">gamingonlinux.com</a> entitled: '<a href="https://www.gamingonlinux.com/articles/some-thoughts-on-valves-new-steam-play-feature-and-what-it-means-for-linux-gaming.12412" target="_blank">Some thoughts on Valve’s new Steam Play feature and what it means for Linux gaming</a>', and I wanted to share my thoughts about it.<br />
<br />
liamdawe's post is about Valve's new Linux+GNU Gaming initiative dubbed 'Steam Play', which uses an open source fork of the venerable <b>WINE</b> compatibility application for playing win-based programs on Linux, see <a href="http://winehq.org/">winehq.org</a> for more information about this great program.<br />
<br />
First of all, these are exciting times for Linux Gaming!<br />
<br />
I've been plugging for gaming on Linux for a decade or more. I've also been using and working with Linux for even longer than that. For example, I wrote some simple posts about how Linux would be great for gaming back in 2009, e.g., '<a href="http://www.humans-enabled.com/2009/01/proof-gamers-want-gnulinux-ports.html" target="_blank">Proof - Gamers want GNU/Linux ports</a>'. After all these years, I'm still just as excited about Linux being a major gaming platform as I was back then!<br />
<br />
Also, I remember back on 7/25/2012 when allthingsd.com reported Gabe Newell as saying, “<a href="http://allthingsd.com/20120725/valves-gabe-newell-on-the-future-of-games-wearable-computers-windows-8-and-more/" target="_blank">We want to make it as easy as possible for the 2,500 games on Steam to run on Linux as well. It’s a hedging strategy. I think Windows 8 is a catastrophe for everyone in the PC space. I think we’ll lose some of the top-tier PC/OEMs, who will exit the market. I think margins will be destroyed for a bunch of people. If that’s true, then it will be good to have alternatives to hedge against that eventuality.</a>"<br />
<br />
After that, Valve valiantly carved out this new path of making Valve games work with Linux. Valve pulled a lot of heavy work by investing a metric f-ton into trying to make gaming on Linux expand. Vulkan is big, Steam machines, Valve's games ported, Steam OS, inviting Debian Developers to the platform, etc. etc. There is a real vision from Gabe and obviously people at Valve to make gaming on Linux happen! It's fabulous! We have come so far with Linux as a gaming platform!<br />
<br />
Valve's Proton, which uses a forked version of Winehq.org, is the latest iteration of Valve moving toward Gabe's stated goal. Valve was able to get quite a number of games ported over to and available to Linux. Then things seemed to plateau, just a bit. And, a recurring problem is there are still some a-list gaming titles missing from the platform.<br />
<br />
In my opinion, Proton, is like dropping a gear, flooring it, and flying past any Linux gaming market share ever realized before! Keep in mind, even with all the great work Valve has done, steam reporting of Linux as the market share for games still stayed in the single digits as a percentage. So this proton, this is the signal that Valve is not giving up, but instead - Gabe's opening the next can of whoop-ass to bringing Linux gaming to the mainstream!<br />
<br />
First of all, they make proton open source. This is absolutely the right way to do it! Gabe said it himself. I figure Valve is working with codeweavers.com(they created the WINE project) at some level as well, which is good. Also, imagine if<a href="http://gog.com/" target="_blank"> GoG.com</a> and anyone else who wants to allow some windows software to run on Linux, could use this same approach - like Proton, to make it easier.<br />
<br />
Next, as indicated by their statement about showing users on Proton as Linux users, Valve will be able to show game studios proof in numbers on how many users are interested in playing games on Linux. The fancy trick here is that Valve can prove that Linux is a viable platform, without the studio having to basically fork everything, spend $$$, and run two development shops to provide a native port of Linux. This should in turn provide an incentive for developers to make sure their titles work with Proton and thus work with Linux.<br />
<br />
Consider Gabe's original stated goal - Valve is committed to bringing games to Linux, and by investing in proton, it shows Valve is still (after 5 years) in the business of making that work. It's great stuff!<br />
<br />
As for Feral and other porters that have done great awesome work to port things over, couldn't they work to make more games work good with Proton (open source software), as well as do ports to Linux?<br />
<br />
One of the main problems with porting to Linux is that it doesn't make $$$ sense to go back and port all of the previous software titles over all the way. Nobody will pay enough money to make this worth doing, e.g., if you have an old game you'd like to play in Linux, what incentive is there for the studio to spend $$$ to port it and then only be able to sell the game for a lesser price? Will you buy the old game for $60 a title? Likely not. So it's tough to port old stuff. And there's so many titles out there that are not ported to Linux.. With Proton, maybe porting the old stuff can be easier and cheaper, and maybe Feral can help with it. Then if the studio wants to sell the old titles, they can do it and sell it for a nominal fee and still profit.<br />
<br />
All in all, hasn't the goal always been to make these games more cross-platform-compatible, as opposed to changing over everything to a Linux only version. It doesn't make sense for Valve or anyone to switch from one near-monopoly of market share in windows, only to do the same with Linux. Let the market share expand in working with Vulkan, which is cross-platform, and open source.<br />
<br />
Crossover.com's Winehq.org is a fantastic project. The problem is that Wine has not been made mainstream enough for game makers to embrace it seriously (well maybe not publicly, Blizzard's games have historically worked awesome with it). With Valve making a version of Wine in Proton, Wine has just been made mainstream. It's like Debian to Ubuntu.<br />
<br />
Now the thing to do is to get enough buzz going around Proton, that the major titles will make their stuff work well with it. Then we have more gaming on Linux, more recognition of Linux as a gaming platform, a hedge to windows, and a win win all around! Also, consider that Linus Torvalds himself even wants Linux on the desktop to be used more, more gaming on Linux means more of Linux as the Desktop as a possibility! <br />
<br />
<b>Here's how you can help: Send the message to game developers - Ask for that Linux port! Also, ask that if no Linux port can be done, then the game should at least work well with Valve's Proton! This way, thanks to Valve and Open Source Proton, the games will be Linux compatible!</b><br />
<br />
<b>Get your Freedom on! Switch to GNU+Linux as your Universal Gaming Platform today!</b><br />
<br />
<b>Cheers!</b><br />
<b>Shannon VanWagner</b><br />
<b>2018-10-13 </b><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com0tag:blogger.com,1999:blog-8208479109120950856.post-33175337237463041832017-09-08T23:31:00.000-04:002017-09-09T08:09:55.672-04:00Tether Android to Ubuntu / Fedora Linux<div>
<div style="text-align: left;">
<div>
<div>
<b><span class="Apple-style-span" style="font-weight: normal;"><b>(Update 09-08-17 - <a href="https://drive.google.com/file/d/0BwAD-TypIoq4U1N2UHBwRmVPRWM/view?usp=sharing" target="_blank">CLICK HERE for the automatic setup script</a> - Now Just 296KB!</b><b> <span style="font-size: x-small;">sha1sum: f3b79c2e191baf8060367681bae27ac75fab9886</span></b><span class="Apple-style-span" style="background-color: white; color: #888888; font-family: "arial" , sans-serif;"><span class="Apple-style-span" style="font-size: x-small;"> </span></span><b>). Based on reader comments, I've added the functionality for the script to use either yum or apt-get (Fedora or Ubuntu). Includes<a href="http://pullmonkey.com/2011/11/15/azilink-is-working-again/"> updated Azilink by Charlie Snider - for Android 2.3.x</a>. READ the install </b><a href="https://drive.google.com/file/d/0BwAD-TypIoq4THRGdFJDQ09ia00/view?usp=sharing" target="_blank"><b>instructions here</b></a><b> (e.g., PLUG YOUR DROID INTO THE USB FIRST!)) Let me know how it works for you in the comments.)</b></span></b></div>
</div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJb99XxkSaHp26cKlZA9j43KEgrtxtLTPPgN36Qsh1CnajEfFBy-aUB6LVqblBo4T1oNvHke_qtYuzTpvYyl9-lqNJU4aW3laOXUT747SZiIzV-EJejAFgrE5ZfphZwzE8vKxB6ycKA0c/s1600/Android_guy.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="257" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJb99XxkSaHp26cKlZA9j43KEgrtxtLTPPgN36Qsh1CnajEfFBy-aUB6LVqblBo4T1oNvHke_qtYuzTpvYyl9-lqNJU4aW3laOXUT747SZiIzV-EJejAFgrE5ZfphZwzE8vKxB6ycKA0c/s320/Android_guy.jpg" width="320" /></a></div>
<br />
<br />
<div>
So if you're like me you recently picked up the fabulous Verizon Droid Linux-based phone, and now you're one happy camper.</div>
<br />
<div>
I've been cruising along with my Droid (Android Linux based device) for a month now, and I'm happy as a clam. I have to tell you... The Verizon Droid is quite a fine Linux-based device indeed.</div>
<br />
<div>
So now that I've used the Droid for awhile, I set out in search of a piece of functionality that I hadn't yet replaced from my Blackberry days. That is: The capability to tether my Droid as an Internet modem to my Ubuntu GNU/Linux 9.10 machine using the USB cable.</div>
<br />
<div>
On the Blackberry, this was as simple as, a.) provisioning the data service through Verizon(yes, this does cost extra), and then b.) setting up the "<a href="http://wiki.colar.net/home">Berry4All/BBTether</a>" script (by the extravagant Mr. Thibaut Colar) on my Ubuntu Linux box.</div>
<br />
<div>
In my search for a solution, the first place I checked for a tethering application was in the Android Market. And while there are many other applications, the only app I was able to find for tethering, required for my phone to be "rooted". And so instead of jumping right into that, I went looking for an easier solution, and voila! - I found it.</div>
<br />
<div>
What I found are some easy tethering instructions by the masterful <a href="http://ubuntuforums.org/member.php?u=624954" target="_blank">Shwan.c</a> (<a href="http://ubuntuforums.org/showpost.php?p=7446857&postcount=8">link</a> at ubuntuforums.org) using <a href="https://drive.google.com/file/d/0BwAD-TypIoq4THRGdFJDQ09ia00/view?usp=sharing" target="_blank">James Perry's azilink (modified for Android 2.3.x by Charley Snider)</a> from <a href="http://code.google.com/hosting/">Google Project Hosting</a>, <a href="http://fsf.org/">GNU</a>+<a href="http://linux.com/">Linux</a>, and the <a href="http://en.wikipedia.org/wiki/Free_and_Open_Source_Software">FOSS</a> program <a href="http://openvpn.net/">openvpn</a>. So now there was only one problem: I'm using the Verizon Droid, not the HTC Magic. The good news is that the process is generally the same, except for a difference in hardware id information for the udev rules settings in Ubuntu.</div>
<br />
<div>
So after some minor changes, I've now successfully tethered my Verizon Droid via USB as a modem for my Ubuntu GNU/Linux 9.10 machine(Works with 10.04 too - only difference is that you may have to uncheck "Work Offline" in Firefox after connecting (Thanks to Gene for mentioning this)). Update:06-04-10 - I've tested these instructions and they work successfully with both the Motorola Droid and the HTC Incredible Android phones.</div>
<br />
<div>
So here are the easy steps to get you up and running with using your Droid as a USB tethered modem (and a big Thanks to Shwan.c for posting the original idea):</div>
<br />
<div>
<b>1.) Download the current Android SDK (for Linux (i386)</b><b>) from:<a href="http://developer.android.com/sdk/index.html" target="_blank"> http://developer.android.com/sdk/index.html</a></b></div>
<br />
Update(thanks for comments!): 12-13-10 adb does not come with the new SDK by default so you have to add it via the Android SDK and AVD Manager.<br />
<div>
<b>2.) Extract the SDK, run the "Android SDK and AVD Manager", then to get the adb tool, install "Android SDK Platform-tools, revision 1": </b><br />
<code></code><br />
<code>tar xvf android-sdk_r07-linux_x86.tgz</code><code></code><br />
<code>cd android-sdk-linux_86<br />
tools/android</code><br />
<br />
<code> </code></div>
In the Android SDK and AVD Manager, expand "Available Packages", put a checkmark by "Android SDK Platform-tools, revision 1", click "Install Selected" and follow the prompts to complete the download/installation of adb into your SDK folder (screenshot below).<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj8nZybJYmcSCEbnOBEGZh30NYm8xd3xFH3BvjsfttDsHyhGbW8PmqIPXAbeIeRg5E0II-aBlj3wA2z_BXYE9u1nblBroUz_LN5PfGR-THwxvTOATqkcvviiZ-ddB1Ev3_HGB0tLwRGRs/s1600/android_adb_add.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="232" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj8nZybJYmcSCEbnOBEGZh30NYm8xd3xFH3BvjsfttDsHyhGbW8PmqIPXAbeIeRg5E0II-aBlj3wA2z_BXYE9u1nblBroUz_LN5PfGR-THwxvTOATqkcvviiZ-ddB1Ev3_HGB0tLwRGRs/s400/android_adb_add.png" width="400" /></a></div>
<br />
<br />
<div>
<b>3.) Change Directory into the "platform-tools" directory, then copy the </b><b>"adb" application to your Ubuntu /usr/bin directory (sudo privs needed)</b><br />
<code>#From the extracted "android-sdk-linux_86" directory: </code><br />
<code>cd platform-tools </code><br />
<code>sudo cp adb /usr/bin/adb</code></div>
<br />
<div>
<b>4.) Create/edit/save a rules file for udev to allow your machine to see your device</b><br />
<code>sudo vi /etc/udev/rules.d/91-android.rules</code></div>
<br />
<div>
Put the text below into the file(using "i" to enter "insert" mode and hitting the escape key to return to "select" mode before saving.. C'mon, what fun would Linux be without using vi? If you really don't like vi, you can substitute with something like gedit, or nano, or kate, or etc.), replace USERNAME with your Linux username, then type ZZ to save the file from vi.<br />
<code><br />
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", SYMLINK+="android_adb", MODE="0666", OWNER="USERNAME" <br />
<span class="Apple-style-span" style="font-family: monospace;"><b>If you have an HTC Android phone - use this rule instead of the one above:</b></span><br />
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", SYMLINK+="android_adb", MODE="0666", OWNER="USERNAME" <br />
<b>If you have the Samsung Galaxy Android phone, use this rule instead of the one above:</b> <br />
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", SYMLINK+="android_adb", MODE="0666", OWNER="USERNAME" <b> </b> <br />
<b>If you have the Sony Ericsson X11 Android phone, use this rule instead of the one above (Thanks to Steven from the comments): </b><br />
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", SYMLINK+="android_adb", MODE="0666", OWNER="USERNAME"<b>If you have the LG Optimus V(Virgin Mobile) Android phone, use this rule instead of the one above: </b><br />
<code> SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", SYMLINK+="android_adb", MODE="0666", OWNER="USERNAME" </code></code></div>
<code><br />
</code><br />
<div>
<code><b>5.) Set the appropriate permissions to the rules file you just created.</b></code><br />
<code><code>sudo chmod a+r /etc/udev/rules.d/91-android.rules</code></code></div>
<code><br />
</code><br />
<div>
<code><b>6.) Restart udev to load the new rule.</b></code><br />
<code><code>sudo restart udev</code></code></div>
<code><br />
</code><br />
<div>
<code><b>7.) Enable "USB debugging" on your Verizon Droid via Settings | Applications | Development</b></code></div>
<code><br />
</code><br />
<div>
<code><b>8.) Connect your Droid to the computer with the USB cable and then use the following adb command to check for your device.</b></code><br />
<code><code>adb devices</code></code></div>
<code><br />
</code><br />
<div>
<code>example:</code><br />
<code>$ adb devices</code><br />
<code>List of devices attached</code><br />
<code>040364FA0901E011</code></div>
<code><br />
</code><br />
<div>
<code><b>9.) Install openvpn on your computer so you can connect to your device with it.</b></code><br />
<code><code>sudo apt-get install openvpn</code></code><br />
<code><code>sudo /etc/init.d/networking restart<br />
sudo /etc/init.d/network-manager restart</code></code><br />
<code><span class="Apple-style-span" style="font-family: monospace;"><b><br />
</b></span></code><br />
<code><span class="Apple-style-span" style="font-family: monospace;"><b>*For Fedora and Yum, replace the commands above with this:</b></span></code><br />
<code><code>sudo yum install openvpn<br />
sudo /etc/init.d/networking restart</code></code><br />
<code><span class="Apple-style-span" style="font-family: monospace;"><b><br />
</b></span></code><br />
<code><span class="Apple-style-span" style="font-family: monospace;"><b>Note for those without Internet: If you need to install the openvpn package (and dependencies) separately, these packages are what you will need: (liblzo2-2 libpkcs11-helper1 openssl-blacklist openvpn-blacklist openvpn). It's best to use the package manager to install openvpn because it will automatically install the dependencies, but if you can't get your Ubuntu machine onto to the Internet, then you can download the above packages (in .deb format) to a separate medium (i.e., USB drive, CDR, etc.)separately and then install them in the order listed to achieve the same result as installing from the package manager.</b></span></code></div>
<code><br />
</code><br />
<div>
<code><b>10.) Install openvpn on your Verizon Droid. Note: the line "adb install" actually installs the azilink application on your Droid device. After azilink is installed, an icon that looks like a flying insect will appear on your Droid in th applications area.</b></code><br />
<code><code>cd /home/Downloads/<br />
mkdir azilink<br />
cd azilink<br />
#Manually download the setup script, untar it to get the Azilink-debug.apk - <a href="https://drive.google.com/file/d/0BwAD-TypIoq4U1N2UHBwRmVPRWM/view?usp=sharing">fixed by Charley Snider for Android 2.3.x</a> from</code></code><br />
<code><code><br /></code></code>
<code><code>
adb install -r Azilink-debug.apk<br />
Download the azilink.ovpn file from <a href="https://github.com/aziwoqpd/azilink/blob/master/azilink.ovpn">here</a><br />
</code></code></div>
<code><br />
</code><br />
<div>
<code><b>11.) Create a replacement resolv.conf file to be copied over to your /etc directory at run-time:</b></code><br />
<code><code>vi resolv.conf</code></code></div>
<code><br />
</code><br />
<div>
<code>#Type in the text below(hit "i" for insert first, then ESC after the insert, before saving) and then hit ZZ to save</code><br />
<code><code>domain lan<br />
search lan<br />
nameserver 192.168.56.1</code></code></div>
<code><br />
</code><br />
<div>
<code><b>12.) Now create a very small script to start the modem</b></code><br />
<code><code>vi start_modem</code></code></div>
<code><br />
</code><br />
<div>
<code>#Type in the text below, then hit ZZ to save</code><br />
<code><code>adb forward tcp:41927 tcp:41927<br />
sudo cp resolv.conf /etc/<br />
sudo openvpn --config azilink.ovpn</code></code></div>
<code><br />
</code><br />
<div>
<code><b>13.) Set your new script to be executable.</b></code><br />
<code><code>chmod 755 start_modem</code></code></div>
<code><br />
</code><br />
<div>
<code><b>14.) On your Verizon Droid, launch the azilink app and place a checkmark by "Service active" so it can receive the connection from your Ubuntu machine.</b></code></div>
<code><br />
</code><br />
<div>
<code><b>15.) With your wireless connection in Ubuntu "unchecked"(via right-click of the Network manager applet), launch the the connection script you just made in the Terminal:</b></code><br />
<code><code>/home/Downloads/azilink/start_modem</code></code></div>
<code><br />
</code><br />
<div>
<code>You should now be able to surf the Internet, using your Verizon Droid as a tethered modem. When you're finished - hit ctrl+c at the Terminal from which you started the connection script. Then uncheck "Service active" in Azilink on your Droid.</code></div>
<code><br />
</code><br />
<div>
<code><b><span class="Apple-style-span" style="font-size: small;">Here's a Speedtest (courtesy of speakeasy.net/speedtest) of the connection from Seattle, WA:</span></b></code><br />
<code><b><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="color: #444b51; font-family: "verdana" , "arial" , sans-serif; font-size: 11px; font-weight: normal; line-height: 16px;">Download Speed: <b style="font-style: normal; font-weight: bold;">1448</b> kbps (181 KB/sec transfer rate)<br />
Upload Speed: <b style="font-style: normal; font-weight: bold;">281</b> kbps (35.1 KB/sec transfer rate)</span></span></b></code></div>
<code><br />
</code><br />
<div>
<code>If you have any questions, feel free to leave a comment.</code></div>
<a name='more'></a><br />
<div>
<div>
<div>
<div>
<div>
<div>
<b><span class="Apple-style-span" style="font-weight: normal;"><b>(Update 09-08-11 - <a href="https://drive.google.com/file/d/0BwAD-TypIoq4U1N2UHBwRmVPRWM/view?usp=sharing" target="_blank">CLICK HERE for the automatic setup script</a>(select download) - Now Just 296KB!</b><b> <span style="font-size: x-small;">sha1sum: f3b79c2e191baf8060367681bae27ac75fab9886</span></b><span class="Apple-style-span" style="background-color: white; color: #888888; font-family: "arial" , sans-serif;"><span class="Apple-style-span" style="font-size: x-small;"> </span></span><b>). Based on reader comments, I've added the functionality for the script to use either yum or apt-get (Fedora or Ubuntu). Includes<a href="http://pullmonkey.com/2011/11/15/azilink-is-working-again/"> updated Azilink by Charlie Snider - for Android 2.3.x</a>. READ the install </b><a href="http://dl.dropbox.com/u/394584/Droid-Tether-SV-README"><b>instructions here</b></a><b> (e.g., PLUG YOUR DROID INTO THE USB FIRST!)) Let me know how it works for you in the comments.)</b></span></b></div>
</div>
</div>
</div>
</div>
</div>
<div>
<code>Here's a quick video of the setup script in action:</code><br />
<code><object height="344" width="425"><param name="movie" value="http://www.youtube.com/v/hpo7IKgx-Ls&hl=en&fs=1">
</param>
<param name="allowFullScreen" value="true">
</param>
<param name="allowscriptaccess" value="always">
</param>
<embed src="http://www.youtube.com/v/hpo7IKgx-Ls&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></code></div>
<code><br />
</code><br />
<div>
<code>If you're trying to set this up on CentOS and it's not working, checkout <a href="http://www.droidforums.net/forum/droid-hacks/13070-azilink-tethering-linux.html" target="_blank">hughesjr's post</a> on <a href="http://droidforums.net/">droidforums.net</a></code><br />
<code><br />
</code><br />
<code>(08-14-2010) For Gentoo GNU/Linux users, checkout "<a href="http://www.blogger.com/">Tether your Motorola Droid on Gentoo Linux (USB Version)</a>" on the <a href="http://factionclash.com/">Faction Clash blog</a></code><br />
<code><br />
</code><br />
<code>For those looking for similar instructions for Mac OSX, checkout the article "<a href="http://droidie.com/2009/11/07/tethering-your-android-phone-to-os-x-via-usb/" target="_blank">Tethering Your Android Phone to OS X via USB</a>" on droidie.com.</code><br />
<code><br />
</code><br />
<code>Haven't replaced your iphone with the Android yet? Checkout Ashton Mills' <a href="http://apcmag.com/how-to-tether-the-iphone-to-your-linux-pc.htm">article at apcmag.net</a> to tether your iphone to Ubuntu GNU+Linux.</code><br />
<code><br />
</code><br />
<code>For the windows version of these instructions, see "<a href="http://www.humans-enabled.com/2010/09/how-to-tether-windows-to-internet-via.html">How To: Tether Windows to the Internet via your Android</a>"</code><br />
<code><br />
</code><br />
<code><b>Update: 08-31-10 - Just received the Android 2.2 (froyo) update for my Verizon Droid Incredible. Tethering works perfectly for me after the update. </b></code><br />
<code><br />
</code><br />
<code>Friendly Note: All references to Linux are intended to mean GNU/Linux.</code><br />
<code><br />
</code><br />
<code>Shannon VanWagner</code><br />
<code>Update 09-08-17</code></div>
<div>
<code><br />
</code></div>
<div>
<code><span style="font-size: 85%;"><a href="http://www.addthis.com/bookmark.php" style="font-family: verdana;"><img alt="" border="0" src="http://s7.addthis.com/static/btn/lg-share-en.gif" height="16" style="border: 0pt none;" width="125" /></a></span></code></div>
</div>
Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com280tag:blogger.com,1999:blog-8208479109120950856.post-53048048426548297542016-09-25T12:08:00.000-04:002016-09-25T12:11:36.848-04:00HowTo: Frostwire install on Ubuntu Linux 16.04. Answered for Carl of SC.<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikTkaWZHtaCqP4VGdJFu5pny8Nseo77FUtN7Z3GpiXce2lFD90vprqRhrafVsMJYtTmg2BC3Ck-0iCKdiqv4FaD8WOkinujcfU1AFa1d8Joe_uG1Cj_wlZkp_5tNA9Xwg3nMy4-SCoBYI/s1600/frostwire_running.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img alt="frostwire running, with ubuntu 16.04 search results" border="0" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikTkaWZHtaCqP4VGdJFu5pny8Nseo77FUtN7Z3GpiXce2lFD90vprqRhrafVsMJYtTmg2BC3Ck-0iCKdiqv4FaD8WOkinujcfU1AFa1d8Joe_uG1Cj_wlZkp_5tNA9Xwg3nMy4-SCoBYI/s320/frostwire_running.png" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Frostwire Application</td></tr>
</tbody></table>
<b> "Switch to GNU/Linux and get your freedom on today!"</b> A message I've been working to share for years! A simple way that I do this, is by wearing a shirt that says "Linux" as often as I can.<br />
So I was out on a road trip, proudly wearing my Ubuntu GNU/Linux shirt, and I pulled into a gas station to get a snack. That's when I met Carl. <br />
Carl saw my shirt and complimented Linux. We nearly did a high five right there in the gas station! Then, after a quick exchange of praise for our favorite operating system, and a solid hand shake, Carl asked if I knew how to solve a problem he was having with installing the Frostwire application for <a href="http://www.ubuntu.com/" target="_blank">Ubuntu 16.04,</a> or even in <a href="http://pinguyos.com/" target="_blank">Pinguy OS</a>.<br />
<br />
<a href="http://www.frostwire.com/" target="_blank">Frostwire</a> is a <a href="https://en.wikipedia.org/wiki/GNU_General_Public_License" target="_blank">GPL licensed</a>, free and open-source software (FOSS) application for use with bit-torrent(file sharing/distribution), media-download(i.e., from YouTube, archive.org, etc.), and/or media-playback of a myriad of different media content types (i.e.,m4a,mp3, and more).<br />
So to get my new Linux buddy Carl up and running, I did a bit of testing to see what might be the issue with installing Frostwire on Ubuntu 16.04 64-bit(amd64) and I've documented the details below.<br />
<br />
First of all, I downloaded the Frostwire *.deb installer file for my Ubuntu 16.04 GNU/Linux machine, by simply navigating my web browser to <a href="http://www.frostwire.com/">http://www.frostwire.com</a> and clicking the "Free Download" button appearing there (See Fig. 1).<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqjcn2tHtakh4o2OB-xdiwbkUMsIwhH42TEjXv3I8mXv8ZNUiQg1kquglKmKKitzvYJE3tsntg_ariozDNRu2_QLFEt3eLxyOqVGzeviU6FzSpAPFOXIJR1Z7enwB3bMbMry2NZBc2ZMw/s1600/frostwire_shot.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img alt="site of frostwire www.frostwire.com/home with free download button" border="0" height="281" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqjcn2tHtakh4o2OB-xdiwbkUMsIwhH42TEjXv3I8mXv8ZNUiQg1kquglKmKKitzvYJE3tsntg_ariozDNRu2_QLFEt3eLxyOqVGzeviU6FzSpAPFOXIJR1Z7enwB3bMbMry2NZBc2ZMw/s320/frostwire_shot.png" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig. 1</td></tr>
</tbody></table>
If you're using the Google Chrome browser, there will be a prompt at the bottom of the browser with a warning about the *.deb installer file being a possible harmful one. <br />
Not to worry, this is the default safe-browsing behavior for any type if installer file that you will encounter on the web. Click the "Keep" button and proceed with the download of the Frostwire *.deb installer file. In our case, the file was saved to the default download path of ~/Download (See Fig. 2).<br />
<br />
<b>Note: </b>At the time of this writing, the name of the *.deb installer file is "frostwire-6.3.6.all.deb". But keep in mind, the name of the installer file could be updated to a newer version name over time.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz1vdur9RCIgDCLm9krjk1NHG1mCu7yHnDTOo923WawTFbTrz3C_iKlffPa5KoVpeWmR8cyhzGv0QID9eaPEQCljtjGjPoF3jLaIw26VyQzQvA5-JIlBSdabT0xKe9zNh7vhOTltZ-9vY/s1600/frostwire_accept.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img alt="frostwire download page - click Keep to download .deb file" border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz1vdur9RCIgDCLm9krjk1NHG1mCu7yHnDTOo923WawTFbTrz3C_iKlffPa5KoVpeWmR8cyhzGv0QID9eaPEQCljtjGjPoF3jLaIw26VyQzQvA5-JIlBSdabT0xKe9zNh7vhOTltZ-9vY/s320/frostwire_accept.png" title="" width="313" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig. 2</td></tr>
</tbody></table>
<br />
Upon testing this application, I noticed it failed due to not having some dependencies needed for installing the application (See Fig. 3).<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYjwrs2IJv-JMH9HtloRUXLQPZZ1FlyYS62BdX87AU_fAybMydY2Q8WDMc_WWDIxkyG-pF09TXi5Pcj1zBsmrXc0hqPKaiziLJs5lfQZ2RP8V2NRb3aRQTDwRV6Y-s9Z5jyYpNVXKiN5w/s1600/frostwire_fail.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img alt="pic of dpkg failing to install frostwire due to missing openjdk-8-jre, lib32stdc++6 (>= 4.8.1), and mplayer" border="0" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYjwrs2IJv-JMH9HtloRUXLQPZZ1FlyYS62BdX87AU_fAybMydY2Q8WDMc_WWDIxkyG-pF09TXi5Pcj1zBsmrXc0hqPKaiziLJs5lfQZ2RP8V2NRb3aRQTDwRV6Y-s9Z5jyYpNVXKiN5w/s320/frostwire_fail.png" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig. 3</td></tr>
</tbody></table>
A caveat to installing *.deb files in Linux with dpkg is that dependencies needed to install the application are not automatically calculated and installed along with the application. So if there are any dependencies are needed for your application, the dpkg *.deb installation will fail to complete properly.<br />
Also, in the case of this specific Frostwire application *.deb installer, the dependencies I need to have installed before I can install Frostwire, require the 32-bit(ia32) architecture capability to be setup on my Ubuntu GNU/Linux 64-bit(amd64) operating system first. I will show how to correct these issues below.<br />
<br />
<i>For Carl:</i> So in order to INSTALL Frostwire on my Ubuntu 64-bit operating system, I simply need to run the following command in the terminal (press <b>CTRL+ALT+t</b> to bring up the terminal )(for visual example, See Fig. 4):<br />
<br />
<textarea cols="60" name="textarea" rows="2" style="height: 39px; margin: 0px; width: 641px;" wrap="VIRTUAL">sudo dpkg --add-architecture i386 && sudo apt-get install openjdk-8-jre lib32stdc++6 mplayer -y && sudo dpkg -i Downloads/frostwire-6.3.6.all.deb</textarea>
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdanXodawks-bv4sGJGKwRekLeJUUAWicA_y_IWV8T7_AY-Z5OMtmbKIulVGsflugmfzAAea9ikOeXVgE7XKy5mA-YQpJeAGOGlDNiKfeHBROeYiW1Mz4UspPOLnPwLTRacb8K64o5sQI/s1600/frostwire_install_detail.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdanXodawks-bv4sGJGKwRekLeJUUAWicA_y_IWV8T7_AY-Z5OMtmbKIulVGsflugmfzAAea9ikOeXVgE7XKy5mA-YQpJeAGOGlDNiKfeHBROeYiW1Mz4UspPOLnPwLTRacb8K64o5sQI/s320/frostwire_install_detail.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig. 4</td></tr>
</tbody></table>
<b> Note: </b>The above output doesn't show the packages downloading for install. So keep in mind that an Internet connection will be needed to run the install commands and the downloading of the additional packages may vary depending on your Internet connection speed.<br />
<br />
After the command in Fig. 4 completes, simply open your Ubuntu search glass, type frostwire, and you should be presented with an icon you can click to launch the application (See Fig. 5)<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwRCJsQ8gUgWAGDltdpUjvQJWlXEHaV2ixk3mzqFvw6moz6asAtXGa-eJQWxsSjN3TptTpAa-bEkBdCQFD184Vlp4SIWTtw8ULO84uFHPRCcD25qGsBPwchoYexHp0-Uq4_iYss58__Zo/s1600/frostwire_start.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img alt="frostwire app icon shown in Ubuntu search glass" border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwRCJsQ8gUgWAGDltdpUjvQJWlXEHaV2ixk3mzqFvw6moz6asAtXGa-eJQWxsSjN3TptTpAa-bEkBdCQFD184Vlp4SIWTtw8ULO84uFHPRCcD25qGsBPwchoYexHp0-Uq4_iYss58__Zo/s320/frostwire_start.png" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig. 5</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: left;">
See the picture 'Frostwire Application' at the top of this post to see what Frostwire looks like after it's launched.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b> Disclaimer: </b>Frostwire is an application that can be used to download .torrent files. While torrent files and the related protocol are a fantastic way to share files and get fast downloads - I recommend only downloading files that you can independently verify as being legally downloadable in your locale, and safe to use for your system. This post, or any post on my blog, don't advocate for downloading illegal content or breaking the law in any way.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Should you want to remove/uninstall Frostwire and the packages it depends on, simply run the following command in the terminal (shown in Fig. 6):<br />
<br />
<textarea cols="60" name="textarea" rows="2" wrap="VIRTUAL">sudo apt-get autoremove openjdk-8-jre lib32stdc++6 mplayer -y && sudo dpkg -r frostwire</textarea>
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbG97osk5PMVVjNCPHNZTl8WPFSV4WZqNAoFZ2qiWvZKXCJ-8PeoKGD0h1Z4ftpbvqkTNk3gMZZccRjbky5gyU1e-U12NMNhM3UmDrudee1WGCfFOpv-AmH6Z-gTPhkp1oA29k6E8RBkY/s1600/frostwire_remove.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="removal of frostwire and dependencies" border="0" height="166" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbG97osk5PMVVjNCPHNZTl8WPFSV4WZqNAoFZ2qiWvZKXCJ-8PeoKGD0h1Z4ftpbvqkTNk3gMZZccRjbky5gyU1e-U12NMNhM3UmDrudee1WGCfFOpv-AmH6Z-gTPhkp1oA29k6E8RBkY/s320/frostwire_remove.png" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig. 6</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
That's it! I hope this helps someone out there, especially Carl! Feel free to leave a comment below with any questions or comments. And as always, get your FREEDOM ON!! Switch to GNU/Linux today!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Cheers.</div>
<div class="separator" style="clear: both; text-align: left;">
Shannon VanWagner</div>
<div class="separator" style="clear: both; text-align: left;">
09/25/2016</div>
<br />Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com0tag:blogger.com,1999:blog-8208479109120950856.post-55821247102080124432016-07-09T22:12:00.002-04:002016-09-10T21:11:13.868-04:00(Updated) Chrome Browser Freezing Up Your Linux Box? Try This:<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFJbrGcDI4eYIDccMusCd9ji56Hil4KQxF_42rALzK3ynyuCLcB4SwurIWZz6eDIAFQKPjZOfD-qGca5mmHtd01F1jpndU33OCrAmmQsDBzUuUoMU0rurTyXh3SKNUd4eqyOJJZb8A3FY/s1600/chrome.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="275" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFJbrGcDI4eYIDccMusCd9ji56Hil4KQxF_42rALzK3ynyuCLcB4SwurIWZz6eDIAFQKPjZOfD-qGca5mmHtd01F1jpndU33OCrAmmQsDBzUuUoMU0rurTyXh3SKNUd4eqyOJJZb8A3FY/s400/chrome.png" width="400" /></a>
Being an absolutely avid GNU/Linux user, I am always very much enjoying my technological freedom!<br />
<br />
In fact, switching to GNU/Linux is among the better choices I've ever made, career-wise and from the standpoint of weilding the cutting edge when it comes to Technology! Get Yours!<br />
<br />
That said, I use two web browsers on my Linux machines: Google's Chrome and Mozilla's Firefox.<br />
<br />
The thing with using Chrome on GNU/Linux, and it's good and a bad thing - is that the Adobe(tm) Flash plugin is integrated into the Chrome. So until all Flash content gives way to HTML5 content on the web, Chrome gives me the most functionality for the current Internet.<br />
<br />
Google's Chrome is an awesome an powerful browser that's based on the Open Source Chromium project. This is an awesome project that helps to provide the most access to the web, from all sorts of devices and operating systems - it's cross-platform-compatible.<br />
<br />
Google Chrome is awesome, but one thing I've noticed, is that since Chrome will launch extra processes as necessary to handle additional tabs in the browser, the browser can end up having a very large memory footprint on the machine. On several of my Linux boxes, this memory consumption by Chrome, seems to have caused an issue where the machine will actually lockup from being out of memory.<br />
<br />
When the going gets tough, Linux is infinitely configurable! The user is in charge! So after looking around for a way to manage the issue where Chrome is eating up all of my system's memory and locking up the box, I found a blogpost entitled 'Automatically kill process using too much memory on Linux' by <a href="https://www.blogger.com/profile/18273388885281263476" target="_blank">Jon Jensen</a> on <a href="http://blog.endpoint.com/2012/08/automatically-kill-process-using-too.html" rel="nofollow" target="_blank">blog.endpoint.com</a> - accessed 7/9/2016, that seems to have helped me solve my issue.<br />
<br />
Mr. Jensen's blog post mentions a Perl script that is setup in a crontab to run every minute and kill off any process that uses too much memory. The script provides pretty much what I need to control my Chrome from running away with the memory on my system and locking up the machine.<br />
<br />
After doing some testing, what I realized with the Chrome memory usage problem, is that due to the fact that many chrome processes are launched with the browser, we can't just watch for one process to eat up a large amount of memory and act accordingly. Instead, we need to look at the overall total usage of the several Chrome processes that will run to support multiple tabs in Chrome.<br />
<br />
For instance, in a test, I have 7 tabs open in Chrome, and currently there are 10 chrome processes showing on my Linux machine:<br />
<br />
<textarea cols="60" name="textarea" rows="2" wrap="VIRTUAL">$ ps x |grep /opt/google/chrome|grep -v grep|wc -l
10
</textarea>
<br />
Another thing I noticed is that with those 10 chrome processes, they are using over 2GB of the 8GB of RAM I have on my machine currently.<br />
<br />
So here's the script I created to kill off some chrome processes when the overall memory usage from them is too large. This script is based on the example script from Mr. Jensen's blog post above. Note: The script example below will kill off chrome processes when total usage of system RAM by chrome is over 7.5GB, because I have 8GB of RAM installed. If your system has a different amount of RAM, adjust the value for $numMaxByteUsage accordingly. For example, if you have 2GB of RAM installed, I'd suggest setting something like this - $numMaxByteUsage = 1610612736 in the script below. Note, if the below is pasted into the terminal, it will create the script file named 'kill_chrome_tabs_when_ram_depleted.pl' in the home directory.<br />
<br />
<textarea cols="60" name="textarea" rows="60" wrap="VIRTUAL">echo '#!/usr/bin/perl
# Script to watch for and kill process that eat all my memory!
# Author: Shannon VanWagner
# Modified 9/10/2016
# Inspired by Jon Jensen blogpost at:
# http://blog.endpoint.com/2012/08/automatically-kill-process-using-too.html
# Ubuntu GNU/Linux needs: sudo apt-get install libproc-processtable-perl
# Crontab to run every minute: sudo crontab -e , add entry:
# * * * * * <path to this script>
use strict;
use warnings;
use Proc::ProcessTable;
my $objTable = Proc::ProcessTable->new;
my $intTotalRAMUsed = 0;
my $strTgtProcess = "chrome --type=renderer";
#Tune this for the max amount of RAM to let the process use before axing it:
#example for 3.5GB
#my $numMaxByteUsage = 3758096384;
#7.5 gigabytes max usage setting
my $numMaxByteUsage = 8053063680;
for my $strProcessLine (@{$objTable->table}) {
# Variable for process command line
my $strProcCMDLine = $strProcessLine->cmndline;
# Ignore processes from root
next if $strProcessLine->uid == 0 or $strProcessLine->gid == 0;
# Add up total rss used by $strTgtProcess instances
if ($strProcCMDLine =~ $strTgtProcess)
{
#diagnostic output (commented out):
#print "fname: ", $strProcessLine->fname, " rss-mem-used: ", $strProcessLine->rss, "\n";
#print "max-usage-threshold: ", $numMaxByteUsage, "\n";
#Total up the memory used by $intTgtProcess
$intTotalRAMUsed = $intTotalRAMUsed + $strProcessLine->rss;
#diagnostic output (commented out):
#print "Totalrss: ", $intTotalRAMUsed, "\n";
};
# Skip past record in proces tbl until total memory used > $numMaxByteUsage
next if $intTotalRAMUsed < $numMaxByteUsage;
# Kill only instances of $strTgtProcess to reduce RAM usage
if ($strProcCMDLine =~ $strTgtProcess)
{
(my $cmd = $strProcessLine->cmndline) =~ s/\s+\z//;
print "Terminating process: ", $strProcessLine->fname, " MemoryUsed=", $strProcessLine->rss, " cmdline=", $cmd, "\n";
# Attempt to terminate process cleanly
kill 15, $strProcessLine->pid;
# Destroy the process if not cleared out previously
sleep 4;
kill 9, $strProcessLine->pid;
};
};
print "Total rss RAM used by target process: ", $strTgtProcess, ": ", $intTotalRAMUsed, " bytes\n";
'>~/kill_chrome_tabs_when_ram_depleted.pl && chmod +x ~/kill_chrome_tabs_when_ram_depleted.pl
</textarea><br />
<br />
Note: You then can setup a crontab to run the script every minute. In this case, if you're browsing along and chrome starts eating up all your memory, the crontab+script will kill off any chrome processes after reaching the threshold noted in the script. See '$intRamUsed' setting, which is shown as byte-size.<br />
<br />
To run the script, you may have to install the supporting Perl package to inspect system processes first (e.g., if you get error 'Can't locate Proc/ProcessTable.pm in @INC (you may need to install the Proc::ProcessTable module'):
<textarea cols="60" name="textarea" rows="1" wrap="VIRTUAL">sudo apt-get install libproc-processtable-perl
</textarea><br />
<br />
Also, you'll want to add the script to run in a crontab every minute. Here's the example crontab entry for root(sudo crontab -e) in my case (sudo crontab -l):<br />
<textarea cols="60" name="textarea" rows="2" wrap="VIRTUAL">* * * * * /home/me/kill_chrome_tabs_when_ram_depleted.pl
</textarea><br />
<br />
To test, I opened up about 60 tabs in Chrome(see 1st pic below). I then ran the script above to output the total memory used by chrome. As you can see, the usage reached about 7.5GB of RAM, then the script executed a command to kill some chrome processes. This caused a few tabs to go "snap", but the rest of the browser tabs continued working(see 2nd pic below).<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKBRaQ0qEWo_iw_xKqY0q1fiu52ZicBZvg1291-vQHP-g90goObdOfXOo8VExtXTyfRCY2KdWJZWH1UJxqfV_k9ZZ5SF7aADxQtXNmSP5kTw5aOcYrH4MdUq6ht2_j4QdDEknKUFOmkjw/s1600/TAB_KILLED.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="291" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKBRaQ0qEWo_iw_xKqY0q1fiu52ZicBZvg1291-vQHP-g90goObdOfXOo8VExtXTyfRCY2KdWJZWH1UJxqfV_k9ZZ5SF7aADxQtXNmSP5kTw5aOcYrH4MdUq6ht2_j4QdDEknKUFOmkjw/s320/TAB_KILLED.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Lotsa tabs to use all my RAM!</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTs1LIUvpoLHKGIgdCriu9vjCtZJO0Q1XltNI0HXTna-reXnenhtl0FkUvuIbALz3LZ9xwelnKNYATntYL7FpptIiCUU4OuamHmCtwSJcyYmUmsHd6PG-caLTzBfuqJctxwkC2g7Gs6hc/s1600/show_mem_usage.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTs1LIUvpoLHKGIgdCriu9vjCtZJO0Q1XltNI0HXTna-reXnenhtl0FkUvuIbALz3LZ9xwelnKNYATntYL7FpptIiCUU4OuamHmCtwSJcyYmUmsHd6PG-caLTzBfuqJctxwkC2g7Gs6hc/s320/show_mem_usage.png" width="303" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Totalrss gets to around 7.5GB, then chrome processes start getting killed</td></tr>
</tbody></table>
<br />Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com0tag:blogger.com,1999:blog-8208479109120950856.post-38949053974176627272016-03-14T22:46:00.001-04:002018-09-16T09:27:06.117-04:00(updated) How To: Ubuntu 16.04 GNU / Linux - Netgear Wireless AC Adapter AC600 ( AC6100 ) Dual Band<div class="separator" style="clear: both; text-align: left;">
<i>Update - 9/16/2017<b> SIMPLY DO THIS ONE STEP TO SEE IF IT MAKES YOUR ADAPTER WORK:</b></i></div>
<div class="separator" style="clear: both; text-align: left;">
Try building the driver by running this in the terminal (ctrl+alt+t):</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<b>sudo apt-get install rtl8812au-dkms</b></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
It works for me in Ubuntu 17.10 (Artful) If the above doesn't get your wireless working, then start the process from the rest of this blog post by first running:</div>
<div class="separator" style="clear: both; text-align: left;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: left;">
<b>sudo apt-get remove rtl8812au-dkms</b></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Continued below...</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJGd04K0ZL9d-oMBdFg3E8IfFc8njkKYtegf8mXFECAEqFJ1Sd3Uz_DinweNrA3S3YRciI19EWOsf5cxA2SRylmcdQAGISNcXdUwoQ3f8FuyxKZ42xbVd09PAVeQrfZiyLLgNjcwhqR_c/s1600/ac600_wireless.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJGd04K0ZL9d-oMBdFg3E8IfFc8njkKYtegf8mXFECAEqFJ1Sd3Uz_DinweNrA3S3YRciI19EWOsf5cxA2SRylmcdQAGISNcXdUwoQ3f8FuyxKZ42xbVd09PAVeQrfZiyLLgNjcwhqR_c/s1600/ac600_wireless.jpg" /></a></div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Another GNU/Linux adventure. This time with Ubuntu GNU/Linux 16.04, kernel - uname -r - 4.4.0-12-generic.</span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">So I went shopping at my local Walmart (TM), and picked up this Netgear (TM) Wireless AC Adapter AC600 (A6100) Dual Band USB wireless adapter and brought it home to install in my GNU/Linux rig.</span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Plug it in and nothing... No wireless connection detected!</span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Why does this still happen! The year is 2016, why do we still have to manually setup wireless adapters for GNU/Linux? Oh well, good honest CLI training for the users to understand their new system I guess.</span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">So, as it turns out, the driver for this nice little USB wireless adapter is not automagically installed with Ubuntu 16.04 GNU/Linux. The purpose of this post is to help you get this adapter working.</span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">First, follow the instructions below to ensure your new netgear wireless adapter matches the hardware in this post.</span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">When you run this command in the terminal(ctrl+alt+t):</span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: xx-small;">$ lsusb|grep -i wireless</span></span><br />
<br />
You should see something like this:<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrqUVf3nRMQfgU_4UsLTE4r-P-P_y2EdTks9505udhDfErKVJh455XOi8HDwvXXJrk_jpgKekKPtl63GzuoY959dWIidHaLQmFkorQ9dw5sYFgohX5NCDCa2VO34xl2LduR1S-7pzjg0I/s1600/lsusb_wireless.png" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;"><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><img border="0" height="57" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrqUVf3nRMQfgU_4UsLTE4r-P-P_y2EdTks9505udhDfErKVJh455XOi8HDwvXXJrk_jpgKekKPtl63GzuoY959dWIidHaLQmFkorQ9dw5sYFgohX5NCDCa2VO34xl2LduR1S-7pzjg0I/s400/lsusb_wireless.png" width="400" /></span></a><br />
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">If your hardware matches the above (RTL8811AU) , see the instructions below for manually building, installing, loading the wireless driver module.</span></div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Ah, where to to get the driver! No worries, Michal Ulianko - @Grawp, on <a href="https://github.com/Grawp/rtl8812au_rtl8821au">github.com</a> has us covered! Thanks for your contributions to Open Source Michal!<span id="goog_1172914818"></span><span id="goog_1172914819"></span><a href="https://www.blogger.com/"></a></span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">To get this Netgear AC600 adapter working, you're going to have to roll up your sleeves and follow these detailed instructions:</span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;">Preparation for building from source, run these in the terminal:</span><br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><span style="font-size: xx-small;">Note, you will have to have your computer connected to the Internet to run the commands below, say via the Ethernet, or another connection.</span></span><br />
<span style="font-size: xx-small;"><br /> 1.) $ sudo apt-get install linux-headers-generic build-essential git -y </span><br />
<div>
<span style="font-size: xx-small;"><br />Note: for the above command, you will have to enter your password, then hit enter key (notice - it will not show your typing). <br /><br /> 2.) ~$ mkdir wireless_driver && cd wireless_driver<br /><br /> 3.) ~/wireless_driver$ git clone https://github.com/Grawp/rtl8812au_rtl8821au.git<br /><br /> 4.) ~/wireless_driver$ cd rtl8812au_rtl8821au<br /><br /> 5.) ~/wireless_driver/rtl8812au_rtl8821au$ make</span></div>
<div>
<span style="font-size: xx-small;">Note: the process from #5 above may run for a time, have several lines of output, and should end with something like 'make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-12-generic'... no errors.<br /><br /> 6.) ~/wireless_driver/rtl8812au_rtl8821au$ sudo make install<br /><br /> 7.) ~/wireless_driver/rtl8812au_rtl8821au$ sudo modprobe 8812au</span><br />
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: xx-small;"><br /></span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: xx-small;">Voila! Driver loaded, now </span><span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: xx-small;">use the Network manager applet to select and connect to your network (see pic below):</span></div>
<div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif; font-size: xx-small;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-ocWz_u9LFVs3wmNxl8TRNwe84GH_aaby_3JYgvNDWA-m3PL36AdvE18Z2XfW82z4w0jfN5O3PNruHJaZby0QmCpRrn3TsW4Y5pFXMW_QeOnO8WZzq_A2xiGQlrzZIySH5mCkyeFwSNM/s1600/wireless.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-ocWz_u9LFVs3wmNxl8TRNwe84GH_aaby_3JYgvNDWA-m3PL36AdvE18Z2XfW82z4w0jfN5O3PNruHJaZby0QmCpRrn3TsW4Y5pFXMW_QeOnO8WZzq_A2xiGQlrzZIySH5mCkyeFwSNM/s320/wireless.png" width="320" /></a></div>
<div>
</div>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "helvetica neue" , "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<br />
<br />
<br />
<br />
Great speed from this adapter - 434 Mb/s !<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi51RJuhpEYiP3XNyVQZzTHXNsn_X0i-SzmKMmZiN4UiGY_c8HZneqIsV7si4_-pUIT8sJPXTVbe2521C6SHwRl9I7qwg5Vna-_nOflUqbp10xrYtPcWvgagtq2nYPvyGqu-XmT590LFk8/s1600/netgear_wireless_status.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi51RJuhpEYiP3XNyVQZzTHXNsn_X0i-SzmKMmZiN4UiGY_c8HZneqIsV7si4_-pUIT8sJPXTVbe2521C6SHwRl9I7qwg5Vna-_nOflUqbp10xrYtPcWvgagtq2nYPvyGqu-XmT590LFk8/s320/netgear_wireless_status.png" width="262" /></a></div>
<br />
<br />
Hope this helps you get connected!<br />
<br />
Cheers!<br />
<br />
<br />
Shannon VanWagner<br />
03/14/2016</div>
Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com0tag:blogger.com,1999:blog-8208479109120950856.post-84690868735510599652016-01-09T13:15:00.003-05:002016-01-09T13:19:18.537-05:00How to fix slow video in Supertux 0.3.4 (FOSS game)<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjHTnXt2v2gh8SNiABWVhSyBM0LePONvijW7q7omjkFI6ER6LXT-wP3qcKpvrUm7oNj1IVGYKoqH66xbZpadEq9D9lv9K0h6Rt65t7oICtkDc3Q9VitcnK8FNzv2rYMtYq8g4ADiQBuck/s1600/SuperTux2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="294" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjHTnXt2v2gh8SNiABWVhSyBM0LePONvijW7q7omjkFI6ER6LXT-wP3qcKpvrUm7oNj1IVGYKoqH66xbZpadEq9D9lv9K0h6Rt65t7oICtkDc3Q9VitcnK8FNzv2rYMtYq8g4ADiQBuck/s320/SuperTux2.png" width="320" /></a></div>
Supertux2, is a fantastic free open source ( FOSS / GPL ) 2d side-scroller game, similar to the Super Mario Bros variety. My children have been playing this awesome game for years.<br />
<br />
This awesome game is available in most GNU/Linux distros via their software package-management systems. It's also available for other OSes.<br />
<br />
In the case of the Debian-based GNU/Linux, the packages are available for the previous version of Supertux (sudo apt-get install supertux-stable), and Supertux2 (sudo apt-get install supertux).<br />
<br />
To learn more about Supertux, checkout the project page for Supertux is <a href="http://supertuxproject.org/">supertuxproject.org</a> <b>Thanks to all the great efforts from the Supertux team for this awesome game!</b><br />
<br />
Supertux2 is the newest of the Supertux games and is fabulous. However, the Supertux2 game appears to have a bug where the "auto" selection of video rendering can result in very slow behavior from the game.<br />
<br />
You can check the video setting for Supertux2 from the terminal(CTRL+ALT+t) with something like this:<br />
<pre>
$ grep 'video \"' .supertux2/config
(video "auto")
</pre>
<br />
Note: The 'video "auto" setting appears to be the default setting installing Supertux2. And after some testing, this setting is what causes the game to be very slow in some cases.<br />
<br />
To fix, try setting the video mode to "sdl" in the .supertux2/config file.<br />
<br />
Here's how:
<br />
1.) Make a backup of your configuration:<br />
<pre>
$ cp .supertux2/config .supertux2/config.bak
</pre>
<br />
2.) Update your Supertux2 video setting in the config file to use "sdl" instead of "auto" or "opengl".<br />
<br />
<pre>
$ sed -i 's/video\ "auto"/video\ "sdl"/g;s/video\ "opengl"/video\ "sdl"/g' .supertux2/config
</pre>
<br />
3.) Check to ensure the change:<br />
<br />
<pre>
$ grep 'video \"' .supertux2/config
(video "sdl")
</pre>
<br />
4.) That's it! Launch the game and it should work as good as the original Supertux.<br />
<br />
<br />
<br />
Shannon VanWagner<br />
2015-01-09Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com1tag:blogger.com,1999:blog-8208479109120950856.post-74418502580456625782015-09-16T17:46:00.000-04:002016-02-13T08:31:28.448-05:00Hulu.com - No Video Love For Linux Users(even paying ones); Modern Technology Fail!<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY9VXIlOjgwwXvwR01KgjJWKFmTJx6EkNpArpWkQCsL4wPxrwOUvbr3pFam3xQbCfg4oZvOoBr-iKNz0oG2cW51RK2e27xw9onNyvOPHmom6kk3z8spqdn_FbXSsBEEWCO__S5RYnuPpk/s1600/HuluFail.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span style="font-family: "verdana" , sans-serif;"></span></a></div>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><br /></span><span style="font-family: "verdana" , sans-serif;">(UPDATE 2-13-2016) - Hulu now working on Google Chrome browser again! Hulu folks - for us Linux users, please test before breaking Hulu on Linux in the future. Thanks for looking out.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Self-driving cars, the international space station, major stock markets, bullet trains, top supercomputers, billions of smart phones, animated movies, science, education, entire citties, and even the very Internet that we rely on for information and connectivity everyday. These are just a few of the amazing things that are brought to us thanks to the power of the GNU/Linux operating system!!</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">So why is it that hulu.com wouldn't test to ensure us GNU/Linux desktop users weren't blocked by their latest DRM/video-rendering update? C'mon hulu.com, I'm a paying customer - and hulu.com used to work just fine for me on my Ubuntu GNU/Linux systems.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">Now when I try to view hulu.com, I'm presented with this problem and can't watch the videos at all:</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY9VXIlOjgwwXvwR01KgjJWKFmTJx6EkNpArpWkQCsL4wPxrwOUvbr3pFam3xQbCfg4oZvOoBr-iKNz0oG2cW51RK2e27xw9onNyvOPHmom6kk3z8spqdn_FbXSsBEEWCO__S5RYnuPpk/s1600/HuluFail.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY9VXIlOjgwwXvwR01KgjJWKFmTJx6EkNpArpWkQCsL4wPxrwOUvbr3pFam3xQbCfg4oZvOoBr-iKNz0oG2cW51RK2e27xw9onNyvOPHmom6kk3z8spqdn_FbXSsBEEWCO__S5RYnuPpk/s320/HuluFail.png" width="320" /></a></div>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<br />
<span style="font-family: "verdana" , sans-serif;">To hulu.com's credit, it's not all their fault.. Adobe's flash sucks (especially in terms of Linux support), and Hollywood's endless push for Digital Rights Management technology makes it a miracle that any video content can be viewed online at all. </span><span style="font-family: "verdana" , sans-serif;">That said, this is unacceptable for paying customers hulu!</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">There's an answer to this problem.. Netflix.com has already found it. Use open standards and HTML5 to deliver your content instead! Drop those arcane technologies that bind themselves to old technologies and lock-in systems.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">So this is a callout to hulu.com - Please fix your site to work with Linux again. Thanks.</span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><i>Update 10/16/2015</i>: Thanks to the luanchpad.net PPA from </span><br />
<span style="font-family: "verdana" , sans-serif;"><a href="https://www.blogger.com/"><span id="goog_1072338834"></span>Michael Blennerhassett</a>, you can install the hal package then use Mozilla Firefox to view hulu.com. </span><span style="font-family: "verdana" , sans-serif;">To enable the hal package, run these commands, then open hulu.com in Firefox to watch:</span>
<br />
<pre>sudo add-apt-repository ppa:mjblenner/ppa-hal
sudo apt-get update && sudo apt-get install hal
</pre>
<br />
<span style="font-family: "verdana" , sans-serif;">Related </span><a href="http://www.linuxforums.org/forum/ubuntu-linux/158731-can-not-stream-video-hulu-anymore.html" style="font-family: Verdana, sans-serif;" target="_blank">linuxforums.com link</a><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">9/16/2015</span><br />
<br />
<br />Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com0tag:blogger.com,1999:blog-8208479109120950856.post-91592132134481430642014-08-10T20:55:00.002-04:002014-08-10T22:06:33.479-04:00How To Set Default Grub / kernel / boot option on Ubuntu GNU/Linux 14.04<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiUqweYk8bkO8FIED8rTIUzejYzI4gedpBuagl9ihFtgFeQaGdA0JOOrP5qN64kXul8vLIqtaRYVCwEklh3_zh0hC9NAmjXtxXOT1C20E8ogQI3AL9aBg5YeqqVnkJMTttgCNLfUTr40o/s1600/grub_default.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiUqweYk8bkO8FIED8rTIUzejYzI4gedpBuagl9ihFtgFeQaGdA0JOOrP5qN64kXul8vLIqtaRYVCwEklh3_zh0hC9NAmjXtxXOT1C20E8ogQI3AL9aBg5YeqqVnkJMTttgCNLfUTr40o/s1600/grub_default.png" height="245" width="400" /></a></div>
Looking around on Google (or whatever one's favorite search engine); one can usually find everything they need in terms of tips for making GNU/Linux work optimally.<br />
<br />
But sometimes, you just want to do one specific thing, and although the required documentation is available, it may be questionable because you can't figure out if the fix exactly matches what you need for your system.<br />
<br />
Finding the fix online, along with too much information about how to implement it, is what happened in recent situation I encountered. A friend brought me his Gateway Laptop. The laptop was failing to boot (kernel panic) after some recent updates that were run. So I referred to my technical library, Google, and although I was able to find an answer, it wasn't immediately clear to how to implement the fix to my friend's specific situation. So for that reason, and for the reason of being able to quickly get of this jam in the future, I decided I would write up the specific steps that helped my friend out of his jam.<br />
<br />
<b>The problem:</b> a kernel bug in the newest kernel that was running on his machine was causing kernel panic on startup.<br />
<b>The workaround:</b> We needed to boot to a previous kernel version until a fix was released for the newer kernel. Furthermore, we didn't want to let the system accidentally boot into the newer kernel because it wasted time for us to exit the broken system and have to go back through the steps to get to the older kernel for the workaround.<br />
<br />
While I'm at it, I want to mention that (another thing) that's great about GNU/Linux is that you can choose to boot with a variety of different versions of the Linux kernel if you wish. This open capability enables you to easily transcend any kernel bugs that may affect your particular hardware, by being able to boot to whatever you want, and get back up and running! This type of openness with the system is the reason why I've switched to GNU/Linux and have been using it on all my computers for many years now.<br />
<br />
So back to my friend's situation: He's running Ubuntu GNU/Linux 'Trusty Tahr' 14.04 and when he ran a recent update, it installed the newest available kernel. Let's just say it was kernel 3.13.0-32-generic, for the purposes of my examples below. With this newly updated kernel booting as default, my friend's machine would fail early in the boot process with a 'kernel panic'.<br />
<br />
Since the machine was working perfectly before this latest update, we tried booting into an earlier version kernel. To do this, we would tap CTRL then SHIFT(but not together) repeatedly just as Linux is loading up, this would get us to the grub menu where we could select a particular kernel to boot with. The grub menu, if triggered, appears just after the machine shows the screen for the brand of the computer and the POST (Power On Self Test).<br />
<br />
Let's walk through the steps to get to the menu for kernel selection on Ubuntu 14.04 so you can see how we began working around this issue.<br />
<br />
1.) POST screen. This appears when you very first turn on your computer. Note: The image you see will vary depending on your specific computer maker.. It also may go by so fast that you don't even see it, so be ready to use the keyboard. Just at the end of this type of screen, start tapping back and forth between CTRL or the left SHIFT key to get the menu in #2 below.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0G-vu87G4a4Y7Mnta1EgInQYURDkDSwKB4Y5DC_N-tqxCu3BqTkn81fIlt9GDeHsIu7IzwfR43OjAcWCZM_Is25BxYAJAKzeuyVSjn_IR9ptrePwMXNVumPyVDR0-4KhVUB8rJqn-oVs/s1600/1-POST.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0G-vu87G4a4Y7Mnta1EgInQYURDkDSwKB4Y5DC_N-tqxCu3BqTkn81fIlt9GDeHsIu7IzwfR43OjAcWCZM_Is25BxYAJAKzeuyVSjn_IR9ptrePwMXNVumPyVDR0-4KhVUB8rJqn-oVs/s1600/1-POST.jpg" /></a></div>
<br />
<br />
2.) The GRUB menu with 'Ubuntu' as the default selection. We could press "e" at this prompt, and edit the Linux startup commands in grub, but unless we've memorized the specific text of the boot option we need, that idea may be difficult to implement on the fly. Instead, at this point we'll hit the down arrow on the keyboard to select "Advanced options for Ubuntu" (see next image):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtngeLTyut5bjm6hllj5qAMnNAcQIT8gQhyphenhypheno9gvYWls-AotaC6qu9WgX7JaddbCQpkE53iGkRhMgiFcO19VS9_Gmq6H90lLVychfe6CQitoO5nCBmMXlLvRpthKDRVRaQu_d2yjhEZfds/s1600/2-Ubuntu-default.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtngeLTyut5bjm6hllj5qAMnNAcQIT8gQhyphenhypheno9gvYWls-AotaC6qu9WgX7JaddbCQpkE53iGkRhMgiFcO19VS9_Gmq6H90lLVychfe6CQitoO5nCBmMXlLvRpthKDRVRaQu_d2yjhEZfds/s1600/2-Ubuntu-default.jpg" height="257" width="400" /></a></div>
<br />
3.) In this view, I've hit the down arrow on my keyboard to select "Advanced options for Ubuntu". I then hit ENTER to get all the options to boot to previous kernels that are still installed. Ubuntu keeps a number of previous kernels installed after updates, to help you if you ever have to fallback to an earlier version.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKwAFnFkkLiHZWZ2KKqQdlgT086-4SgXcl8Ms_dW9mxMDFlrZLaSDj6cZvGcy-qIP9uYQ3QcmBIRF6CJ_PEyzUjdGnTo35XgcW0wHQsmQ_38y0Q2oMSd8JxCyM1fgVLy5DjSvxIMvx_Eo/s1600/3-ArrowDown-Ubuntu-Advanced.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKwAFnFkkLiHZWZ2KKqQdlgT086-4SgXcl8Ms_dW9mxMDFlrZLaSDj6cZvGcy-qIP9uYQ3QcmBIRF6CJ_PEyzUjdGnTo35XgcW0wHQsmQ_38y0Q2oMSd8JxCyM1fgVLy5DjSvxIMvx_Eo/s1600/3-ArrowDown-Ubuntu-Advanced.jpg" /></a></div>
<br />
4.) Here's the menu with the Kernel selection menu. We want to boot to the 3.11 kernel because we tried and it's the one that boots without error for us. So we'll use the down arrow to move down to the 3.11 kernel (see next image).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaFnXeXz7mATWIpM1JcashWc9e5_6buuiJLQAc8fal6pJkwnCexHpOi50AzB4EOjYNfuGMVh7s30Jn0waGGbWcxUnu8l1EVjfy2GrNUrfCT-JN4myI8lFrPjOKgNX2DfpOdByHwpkbh24/s1600/4-Kernel-Selection.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaFnXeXz7mATWIpM1JcashWc9e5_6buuiJLQAc8fal6pJkwnCexHpOi50AzB4EOjYNfuGMVh7s30Jn0waGGbWcxUnu8l1EVjfy2GrNUrfCT-JN4myI8lFrPjOKgNX2DfpOdByHwpkbh24/s1600/4-Kernel-Selection.jpg" /></a></div>
<br />
5.) Here's the screen with the older kernel (kernel 3.11) selected, now we hit ENTER to boot the machine to that kernel, and when it boots, we give our colleagues a nice high-five because we were able to get the booting and running again! Go GNU/Linux! We've now learned about something that can be helpful to others that may encounter a similar situation.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9JypMTR8chU1FHrr7IYzF9GIsR21HlS64gOi61I1Luq77EVFW2VBx0YYiGaFahHqRKxvzYwlynfXFk_59joNQV_CjBYtSND4u_OChyphenhyphenoO6F9v_njDTds_wSUf_ZFsKLALIGbT0HVsQqlE/s1600/5-Previous-Kernel-Selected.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9JypMTR8chU1FHrr7IYzF9GIsR21HlS64gOi61I1Luq77EVFW2VBx0YYiGaFahHqRKxvzYwlynfXFk_59joNQV_CjBYtSND4u_OChyphenhyphenoO6F9v_njDTds_wSUf_ZFsKLALIGbT0HVsQqlE/s1600/5-Previous-Kernel-Selected.jpg" /></a></div>
<br />
So, in the case of my friend, once we booted to the previous kernel, his machine loaded up without issue. So this is how we will work around the kernel issue. The next steps would be to file a bug (or add input to an existing bug) at launchpad.net to get the issue for the newer kernel fixed. The actual fixing of the new kernel will likely take time, but that's ok because we can use the workaround and still continue to enjoy our awesome Ubuntu GNU/Linux system!<br />
<br />
But how do we make our machine boot to a specific kernel for future boots until the problem is fixed, so we don't have to worry about the system failing to boot? There are a few ways, but one way is to add the previous kernel as the default boot option via the /etc/default/grub file.<br />
<br />
I'll explain how to do that below..<br />
<br />
First of all, as seen in #2 above, Ubuntu 14.04, it's noteworthy to point out that Ubuntu now nestles the previous kernel boot options under a 'submenu' named "Advanced options for Ubuntu". In a separate, more advanced subject, another thing that's new is that it's no longer recommended to use the label of a grub.cfg menuentry to set it as default because it may cause a problem if it contains special characters in it. So instead, we should use the value for "$menuentry_id_option" that appears in the menuentry we want to select for the default boot option.<br />
<br />
Sounds pretty confusing right? It's actually pretty straight forward, save for a few more steps needed to make the edit to the appropriate file to affect the changes. We simply have to build the GRUB_DEFAULT= value using the $menuentry_id_option for the submenu, then add ">" (no quotes), then add the $menuentry_id_option for the actual kernel boot selection we want to boot to behind it. For example:<br />
<br />
GRUB_DEFAULT='gnulinux-advanced-7ec5403e-7a25-47a1-bf0c-1a7c955dc590>gnulinux-3.11.0-19-generic-advanced-7ec5403e-7a25-47a1-bf0c-1a7c955dc590'<br />
<br />
1.) So first, let's get the $menuentry_id_option for the 'submenu' named "Advanced options for Ubuntu". Hit CTRL+ALT+t to open a terminal and run:<br />
<br />
<pre>grep submenu /boot/grub/grub.cfg </pre>
<br />
Example output (with the "id" text we need highlighted):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjitqkOqwc-VMva6YWn7mTGAgc5xxFikQNWhOvF4Oe3UxU-a3pCLcNy8k_JoYZG3DUZjrhA5MpDlFWcWyC-K7MHg4Glky1xWqEgX3LSfbBNUlNSZzCuLxOVYCYyB6Xr9O47oiCs-uaEJgQ/s1600/advanced_menu_id.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjitqkOqwc-VMva6YWn7mTGAgc5xxFikQNWhOvF4Oe3UxU-a3pCLcNy8k_JoYZG3DUZjrhA5MpDlFWcWyC-K7MHg4Glky1xWqEgX3LSfbBNUlNSZzCuLxOVYCYyB6Xr9O47oiCs-uaEJgQ/s1600/advanced_menu_id.png" height="55" width="400" /></a></div>
<br />
2.) Next, we get the $menuentry_id_option for the 3.11.0-19-generic kernel boot entry that we know will work with my friend's computer and we highlight the id for it. Hit CTRL+ALT+t to open a terminal and run:<br />
<br />
<pre>grep gnulinux /boot/grub/grub.cfg </pre>
<br />
<br />
Example output (with desired value highlighted):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieaB_g9_dwgewRBNW6LmxakE18bOQJLNgM4bVDSwISmwCSb6tU3ZkrmTG0LoFrhoJBTKI6-YF89ylwDrGRkkbW96ukrirwadthWxTV97Ze99EIPWi3HW8m7L96pNDPU6oclAH0s5X4CPU/s1600/default_kernel_selection.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieaB_g9_dwgewRBNW6LmxakE18bOQJLNgM4bVDSwISmwCSb6tU3ZkrmTG0LoFrhoJBTKI6-YF89ylwDrGRkkbW96ukrirwadthWxTV97Ze99EIPWi3HW8m7L96pNDPU6oclAH0s5X4CPU/s1600/default_kernel_selection.png" height="320" width="300" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9t4remJoBMkBmr0K7WrpE5vKc_h1zPFsqrIlWLjDA2Oynz-Ypunsxs-R-IUJiohlW9X8T-JdgYW6MGSnRfKZgQbznPPPm15h6WA0iEVHc8-MGpcL9JRqnInJIzNXv4-d2GtFNJOc46Y8/s1600/grepgnulinux.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
2.) In the Terminals where you ran the commands for #1 and #2 above, use your mouse to select the text after "$menuentry_id_option" (everything inside and including ' ' ), then we'll use CTRL+SHIFT+c to copy them from the Terminal (one by one) and paste them into /etc/default/grub to build our default entry, in another step below. Example values to be copied:<br />
<br />
<pre>'gnulinux-advanced-7ec5403e-7a25-47a1-bf0c-1a7c955dc590' </pre>
<pre>'gnulinux-3.11.0-19-generic-recovery-7ec5403e-7a25-47a1-bf0c-1a7c955dc590'</pre>
<br />
3.) Now, with new Terminal, we'll backup, then edit /etc/default/grub file, and then use the values from the first two terminals above to make the default entry for boot.<br />
Make a backup of the file, to our home directory:<br />
<br />
<pre>sudo cp /etc/default/grub ~</pre>
<pre></pre>
<br />
Now edit the file:<br />
<br />
<pre>sudo vi /etc/default/grub
</pre>
<br />
4.) Edit the default entry in your /etc/default/grub file so your system will boot to the previous kernel by default. Use your arrow keys (or h j k l ) to move to the line with "GRUB_DEFAULT=0". Hit <b>Y</b> to copy, then <b>P</b> to paste the line again. Next, use the keyboard arrow keys, or h/j/k/l to position your cursor in front of the lower "GRUB_DEFAULT=0", then hit <b>i </b>for insert mode, then type <b>#</b> in front of the line to comment it out. Hit <b>esc</b> to get out of insert mode, then position your cursor over the 0 in the upper entry of GRUB_DEFAULT=0, then hit <b>x </b>to delete "0". Now, hit <b>A</b> to insert after the end of the line with "GRUB_DEFAULT=". Now, you'll copy the value from Terminal in step #1. above(highlight text, then use CTRL+SHIFT+c), then switch back to the current Terminal and hit CTRL+SHIFT+V to paste it in, then type ">" (no quotes), then copy the 3.11 kernel text from Terminal in step #2 above and paste it in after the ">". Then hit <b>esc </b>again, then type <b>ZZ </b>or<b> :wq</b> to save/quit. Example (also see image below):<br />
GRUB_DEFAULT='gnulinux-advanced-7ec5403e-7a25-47a1-bf0c-1a7c955dc590>gnulinux-3.11.0-19-generic-advanced-7ec5403e-7a25-47a1-bf0c-1a7c955dc590'<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr86py14Y9buVAaYxDyoaUjKYOVo2NW4Hr4cNi-5CCpPMM0GDIV1A221_LlEyZ3-TgyRW_Tcc9335vg3QqI7tiFKreLlAu-KYAjpbKWakTs7T_IevMQSNNr8Lc_9fN4Y0YybTC-G5t-Ug/s1600/grub_default_edit.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr86py14Y9buVAaYxDyoaUjKYOVo2NW4Hr4cNi-5CCpPMM0GDIV1A221_LlEyZ3-TgyRW_Tcc9335vg3QqI7tiFKreLlAu-KYAjpbKWakTs7T_IevMQSNNr8Lc_9fN4Y0YybTC-G5t-Ug/s1600/grub_default_edit.png" height="164" width="320" /></a></div>
<br />
5.) IMPORTANT: Now that we have the default kernel setting in place in the /etc/default/grub, we must update our grub configuration for the changes to take effect:<br />
<br />
<pre>sudo update-grub</pre>
<br />
You'll see something like this:<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0ED06ld2hQN-t98DD2lqpjVB17bQXY7bOL5zV5E96vUWWNZpFgNZVfI4TrWj-F9EdTujBIzZr60Qc1ZzF-IAmc5V3JVJOT7h0rTYKdYn7_DIIWVCk1KXr73Ka4hnWkri9ulbIPPywtNs/s1600/sudoupdategrub.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0ED06ld2hQN-t98DD2lqpjVB17bQXY7bOL5zV5E96vUWWNZpFgNZVfI4TrWj-F9EdTujBIzZr60Qc1ZzF-IAmc5V3JVJOT7h0rTYKdYn7_DIIWVCk1KXr73Ka4hnWkri9ulbIPPywtNs/s1600/sudoupdategrub.png" height="234" width="320" /></a></div>
<br />
<br />
6.) Reboot the computer, then verify the system has booted to the new default kernel by launching CTRL+ALT+T to open a Terminal, then run the command to check the loaded kernel:<br />
<br />
<pre>uname -r</pre>
<br />
The output from the command should show something like:<br />
<br />
<pre>3.11.0-19-generic</pre>
<br />
<b>In closing:</b> You'll want to keep an eye out for kernel updates as you update your system. The reason is that once the newer kernel comes out, like the one with the appropriate update to fix the original problem that's outlined in this post, you'll want to revert the changes outlined in the post to let your system to boot to the default kernel again. Basically you'll just go into /etc/default/grub, place a "#" in front of your custom kernel specified in #4 above.<br />
<br />
GNU/Linux rockin!! Get your Freedom on!!<br />
<br />
Shannon VanWagner<br />
08/10/2014<br />
<br />
<div>
<br />
<br />
<span style="font-size: 85%;"><a href="http://www.addthis.com/bookmark.php" style="font-family: verdana;"><img alt="" border="0" src="http://s7.addthis.com/static/btn/lg-share-en.gif" height="16" style="border: 0pt none;" width="125" /></a></span> </div>
Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com0tag:blogger.com,1999:blog-8208479109120950856.post-47437140801735447822014-01-23T23:38:00.000-05:002014-01-24T07:19:36.016-05:00How to Install Virtualbox 4.3 + Resizable Guest Video Resolution on Ubuntu 13.10 GNU/Linux<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrUy3behaQQxkKO3BVA7dq0uhfBAUobvZmz1bbo3BHcnCdGnwQnV_WrGB7COLK8YE3pjajYpQV6UHAoDJoxfp1TozdNWQTKlDzGsXfYM1CqkhPFJ7qMZbpjphWk98l2Q-Gv3pZxVV1awk/s1600/Ubuntu_Linux_VBox_cut.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrUy3behaQQxkKO3BVA7dq0uhfBAUobvZmz1bbo3BHcnCdGnwQnV_WrGB7COLK8YE3pjajYpQV6UHAoDJoxfp1TozdNWQTKlDzGsXfYM1CqkhPFJ7qMZbpjphWk98l2Q-Gv3pZxVV1awk/s1600/Ubuntu_Linux_VBox_cut.jpg" height="168" width="320" /></a></div>
While I really like the FOSS KVM (Kernel-based Virtual Machine), KVM can be just a bit daunting for the more GUI-oriented types.<br />
<br />
So, for the newly experienced, I usually recommend they try Oracle's Virtualbox virtual machine software from virtualbox.org.<br />
<br />
The Ubuntu repositories have Virtualbox available, but it is the older version. This post provides instructions for installing the newer Virtualbox 4.3 in your Ubuntu 13.10 GNU/Linux box. Also, I've outlined the steps needed to install the packages inside the guest Ubuntu 13.10 virtual machine and make the video resolution re-sizable with the window. These steps also enable the Ubuntu guest to have larger screen resolution or even fullscreen resolution.<br />
<br />
For the purpose of this writeup, I use Ubuntu 13.10 GNU/Linux as both the HOST operating system, and the Virtualbox GUEST operating system. This posting assumes that you know how to install and configure Ubuntu GNU/Linux as the guest OS.<br />
<br />
<b>These first set of steps are used to setup your Host Ubuntu 13.10 with the newer version of Virtualbox, version 4.3.</b> Open the terminal from the Ubuntu menu, or hit CTRL+ALT+T, then run these commands to install the virtualbox repository for Ubuntu 13.10 Saucy Salamander, and then install Virtualbox 4.3:<br />
<br />
<pre>wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -</pre>
<br />
<pre>sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian saucy contrib" >> /etc/apt/sources.list.d/virtualbox.list'</pre>
<br />
<pre>sudo apt-get update && sudo apt-get install dkms virtualbox-4.3</pre>
<br />
If the above commands were successful, you should now be able to find Virtualbox in your Ubuntu menu. Launch it, then install Ubuntu GNU/Linux 13.10 into a virtual machine. Once you have logged in and completely updated the software packages for your Guest Ubuntu GNU/Linux machine, take a baseline snapshot of the Guest Ubuntu OS.<br />
<br />
<b>The next set of steps are run inside the Guest Ubuntu OS to add mouse pointer integration. These steps also allow larger, re-sizable, and fullscreen video resolution of the Ubuntu guest.</b> Run these commands in the Terminal(**or in alternate run-level) inside the Ubuntu guest OS to install the baseline software building components:<br />
<br />
<pre>sudo apt-get install build-essential linux-headers-$( uname -r ) dkms</pre>
<br />
I suggest taking a VM snapshot here, just in case things go wrong during the next steps. Next, add the Virtualbox repository and install the Virtualbox guest additions iso.
<br />
<br />
<pre>wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -</pre>
<br />
<pre>sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian saucy contrib" >> /etc/apt/sources.list.d/virtualbox.list'</pre>
<br />
<pre>sudo apt-get update && sudo apt-get install virtualbox-guest-additions-iso</pre>
<br />
I suggest taking a VM snapshot at this point. Also, reboot the Ubuntu guest OS so the driver modules can load. After you've rebooted the Guest OS, re-open the Terminal and run the command below to install the final packages needed for resizing the Ubuntu Guest video resolution.
<br />
<br />
<pre>sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11</pre>
<br />
Next, reboot the Ubuntu guest OS to allow the newly installed modules to load.<br />
<br />
Voila, mouse integration should work, and you should be able to re-size your Guest OS VM window and the video resolution should change size dynamically.<br />
<br />
**As an extra tip, if you ever need to enter alternate run-levels (alternate TTYs) in your Guest VM OS: simply replace <pre>CTRL+ALT+F1|F2|F3|F4|F7</pre> with <pre>(host-key,e.g.,Right-Control-Key)+F1|F2|F3|F4|F7</pre>
<br />
As another extra tip, if your Ubuntu Guest seems to be rather slow because of Unity, maybe you can try the gnome-session-fallback interface instead. Get to it by clicking the Ubuntu symbol near your username on login. Here's how to install it:
<br />
<br />
<pre>sudo apt-get install gnome-session-fallback</pre>
<br />
<br />
<br />
<br />
Cheers!<br />
Shannon VanWagner<br />
<br />
<br />
01-23-2014
<br />
<div>
<br />
<br />
<span style="font-size: 85%;"><a href="http://www.addthis.com/bookmark.php" style="font-family: verdana;"><img alt="" border="0" height="16" src="http://s7.addthis.com/static/btn/lg-share-en.gif" style="border: 0pt none;" width="125" /></a></span> </div>
Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com0tag:blogger.com,1999:blog-8208479109120950856.post-4935157695170904062013-10-12T20:07:00.002-04:002014-01-23T20:07:10.810-05:00Ubuntu 13.10 - Enable "Control+Alt+Backspace to terminate the X server"<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg69bHgnnj8KFyyd17bmFiN3jc6YL55kmXEXlcUNZUXBrQshihoGYOGAPJ1rY4A7YVY_xaovsv9v0ulrlTOBO08J3fMPvJnri6gXHpSZjZs4JVP_pg9QvERKvnYUxjU_BZI8AuMLYLUQY8/s1600/ctrl+alt+backspace_killWindowMgr.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="169" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg69bHgnnj8KFyyd17bmFiN3jc6YL55kmXEXlcUNZUXBrQshihoGYOGAPJ1rY4A7YVY_xaovsv9v0ulrlTOBO08J3fMPvJnri6gXHpSZjZs4JVP_pg9QvERKvnYUxjU_BZI8AuMLYLUQY8/s320/ctrl+alt+backspace_killWindowMgr.png" width="320" /></a></div>
Having loaded up Ubuntu GNU/Linux 13.10 on my computer which previously ran the 13.04 version, I have to say that I am quite impressed with the speed improvements and polish this new version brings to this already awesome operating system!! Way to go Canonical and Ubuntu developers!!<br />
<br />
One of the things I really love about GNU/Linux is the power I have to customize things in the system to my liking. Rather than force changes down your throat like the other operating systems out there, GNU/Linux gives you the power to choose!! You have the power!!<br />
<br />
Usually, after installing the base system, I come back and tweak things a bit to my liking. After all, per the license - I already own this copy of Ubuntu GNU/Linux that's installed on my computer, so I might as well customize it to my liking as much or as little as I like!! This is what Freedom in computing is all about!!<br />
<br />
Of course, the developers behind Ubuntu, have made it so I don't need to customize anything at all if I don't want to, and it's still a very easy to use this awesome Ubuntu GNU/Linux anyway!! But when I do want to customize, I can do this as little or as much "tweaking" as my geek appetite calls for.<br />
<br />
Something I always customize in my Ubuntu GNU/Linux, is having Control+Alt+Backspace "kill the session". This makes it easy to jump out of my logged in session if I've launched something that failed or otherwise screwed things up so I can't operate in the current session.<br />
<br />
In Ubuntu 13.04, the aforementioned option was a few short steps to being enabled. It was done by clicking the gear menu by the clock, then System>Preferences>Keyboard, then on the Layouts tab, then clicking Layout options, then under "Key sequence to kill the X server", putting a check by "Ctrl+Alt+Backspace".<br />
<br />
In Ubuntu 13.10, it seems the option has been moved around again, because they've polished up the menus a bit more. But, unlike some other systems out there that don't let you easily change things around, in this Ubuntu GNU/Linux - we can still change this setting(and much more) rather easily. <b>So here's how I enabled "Use Control+Alt+Backspace to terminate the X server?"</b>:<br />
<br />
1.) Hit Control+Alt+t to launch the terminal<br />
<br />
2.) Type or paste in the command below into the terminal, hit enter, then authenticate with your user password necessary (below is a one liner):
<br />
<br />
<pre>sudo dpkg-reconfigure keyboard-configuration</pre>
<br />
3.) Hit enter 5 times, or as necessary, to accept the already-set values for the keyboard settings and arrive at the screen to change the behavior for "Control+Alt+Backspace" (see picture above).<br />
<br />
4.) At the screen that says, "Use Control+Alt+Backspace to terminate the X server?", hit the left arrow key to select yes, then hit Enter to save the setting and complete the kbd configuration.<br />
<br />
Voila! At this point, if you hit Control+Alt+Backspace, you will be exited from your current session! Just make sure you save any open work before testing this out, as it will not save anything automatically.<br />
<br />
<br />
User Customizations - Another reason to love GNU/Linux!! Get Yours!!<br />
<br />
Cheers!<br />
Shannon VanWagner<br />
<br />
<br />
10-12-2013
<br />
<div>
<br />
<br />
<span style="font-size: 85%;"><a href="http://www.addthis.com/bookmark.php" style="font-family: verdana;"><img alt="" border="0" height="16" src="http://s7.addthis.com/static/btn/lg-share-en.gif" style="border: 0pt none;" width="125" /></a></span> </div>
Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com6tag:blogger.com,1999:blog-8208479109120950856.post-51789047885547240262013-02-02T21:37:00.002-05:002013-02-02T21:37:18.128-05:00How to install xrdp on Ubuntu 12.04 Precise Pangolin<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9EjdOEGgqcG6dcIjBAYSiCDgFgs2s9s-u7C-9MijPjmhryTSRFjKLGlsE7GBQBUX65NomWMSGr2_DgA5j0va2JlBRkvk9X_o5tMGbZtY2EhiZV_xOSpvV2E7Eqqo70ZQ6cvkwcRly87c/s1600/arrow.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="249" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9EjdOEGgqcG6dcIjBAYSiCDgFgs2s9s-u7C-9MijPjmhryTSRFjKLGlsE7GBQBUX65NomWMSGr2_DgA5j0va2JlBRkvk9X_o5tMGbZtY2EhiZV_xOSpvV2E7Eqqo70ZQ6cvkwcRly87c/s320/arrow.jpg" width="320" /></a></div>
I absolutely love a system that can stay connected! With Ubuntu GNU/Linux, there are many ways to get connected remotely to your computer and get your Linux on! <br />
<br />
For instance, here is a list of several ways you can stay connected:<br />
Desktop Sharing (built-in VNC, see <a href="https://help.ubuntu.com/12.04/ubuntu-help/sharing-desktop.html" target="_blank">help</a>)<br />
<div>
SSH (<a href="http://www.jonathanmoeller.com/screed/?p=3606" target="_blank">requires install</a>)</div>
<br />
FreeNX (<a href="http://www.humans-enabled.com/2012/05/how-to-install-freenx-on-ubuntu-1204.html" target="_blank">requires install</a>)<br />
NX Free (<a href="http://www.humans-enabled.com/2012/04/how-to-install-freenx-server-on-ubuntu.html" target="_blank">requires install</a>)<br />
ssh -X (requires install and local xserver)<br />
<br />
<br />
The default "Desktop Sharing" functionality in Ubuntu 12.04 is good for some things, but since it's based on <a href="http://en.wikipedia.org/wiki/Virtual_Network_Computing" target="_blank">VNC</a>, and doesn't have any additional layer for security, it's not a necessarily secure method for connecting to remote machines. Also, people trying to connect from their windows systems will have to obtain/install a vnc client to use for connection. This can be a problem in some environments.<br />
<br />
This is where <b>xrdp</b> comes in. <a href="http://xrdp.org/">xrdp.org</a> is free open source software that can be easily installed in Ubuntu 12.04 GNU/Linux machine via the package management system. Since it uses the RDP protocol, xrdp is a relatively secure method of connection. Other benefits are that your windows users can easily connect with their built-in remote desktop client mstsc.exe and your Linux users with rdesktop.<br />
<br />
In this post I'm going to outline how to quickly install the xrdp packages and connect with mstsc.exe(windows) or rdesktop(GNU/Linux. <br />
<br />
1.) Enable the community repository in Ubuntu - click to open the "Ubuntu Software Center". Then, on the top menu(top of screen), click Edit > Software Sources > put a checkmark by "Community-maintained free and open-source software (universe)", then click Close.<br />
<br />
2.) Update your sources and install xrdp using apt-get. Open the terminal with ctrl+alt+t, then type or paste these commands, hit enter, authenticate, then confirm to install the xrdp packages.<br />
<br />
<pre> sudo apt-get update && sudo apt-get install xrdp</pre>
<br />
<b>Note: </b>Depending on how quickly your machine can update the sources, the sudo apt-get update command may fail after closing the Ubuntu Software Manager because there may be a process running that is updating the sources already in the background. If this happens, wait longer, then try the command again.<br />
<br />
3.) Add this special .xsession file entry into the /home/(username) directory you intend to login with (e.g., /home/shannon/.xsession) to improve performance by converting your session to ubuntu-2d:<br />
<br />
<pre> echo "gnome-session --session=ubuntu-2d" > /home/YOURUSER/.xsession</pre>
<br />
4.) Reload the configuration into the xrdp server process:<br />
<br />
<pre> sudo /etc/init.d/xrdp restart</pre>
<br />
That's it. Now you can connect to your xrdp host with ease from GNU/Linux using:
<br />
<br />
<pre> rdesktop ip-or-host-of-your-xrdp-server</pre>
<br />
<br />
Or from windows, with:
<br />
<br />
<pre> windows-key+R, mstsc.exe /v:ip-or-host-of-your-xrdp-server</pre>
<br />
<br />
<b>Tip:</b> If you find that you're having problems changing network settings via your xrdp session, it's because of the protection configured to secure the machine to console users only via policy-kit.<br />
<br />
See this article for more information and a workaround:<br />
http://ubuntuforums.org/showpost.php?s=d9ba0898e67cf91204ecc75f693ed4ed&p=10095159&postcount=3<br />
<br />
<b>Spoiler: </b>Basically you're modifying all "no" values in the allow_inactive attributes to "yes" in<br />
/usr/share/polkit-1/actions/org.freedesktop.network-manager-settings.system.policy <br />
<br />
<br />
Cheers!<br />
Shannon VanWagner
<br />
<br />
02-03-2013
<br />
<div>
<br />
<br />
<span style="font-size: 85%;"><a href="http://www.addthis.com/bookmark.php" style="font-family: verdana;"><img alt="" border="0" height="16" src="http://s7.addthis.com/static/btn/lg-share-en.gif" style="border: 0pt none;" width="125" /></a></span> </div>Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com3tag:blogger.com,1999:blog-8208479109120950856.post-39641360593425721072012-08-03T18:26:00.002-04:002012-08-06T17:19:34.289-04:00Enable CentOS 5.8 GNU / Linux Authentication on Windows Domain<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQvxDxhWzM7ZHeAUVL3nYO94GgAVtJW5WM4Z-BJ7E82CdQCAH4VcDdtlD21oBJUa1Zw6xte65DysmlU6Q5Dj4Nk8Pb4ZJQIYQnRL6IvIZAARbba8qaYKJ4-WVRrKmZt0gJHTQ10bD5t3w/s1600/Screenshot+from+2012-08-03+15:22:58.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="161" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQvxDxhWzM7ZHeAUVL3nYO94GgAVtJW5WM4Z-BJ7E82CdQCAH4VcDdtlD21oBJUa1Zw6xte65DysmlU6Q5Dj4Nk8Pb4ZJQIYQnRL6IvIZAARbba8qaYKJ4-WVRrKmZt0gJHTQ10bD5t3w/s200/Screenshot+from+2012-08-03+15:22:58.png" width="200" /></a></div>
In case you should ever be finding yourself having to configure your CentOS 5.8 GNU/Linux machines to allow active directoy windows users to login to them, this post will help.<br />
<br />
While there are a few ways to set this up, i.e., likewise-open (see beyondtrust.com), centrify (centrify.com), the built-in System, Authentication graphical controls in CentOS, etc., the method in this post focuses on touching just a few config files to enable active directory authentication. K.I.S.S. is the way I like to roll.<br />
<br />
Using the authentication methods below assume that you have already enabled services for Unix on your active directory server and that the users that would be logging in to CentOS have their Unix tab (on ad user and computers) populated with values.<br />
<br />
The Authentication methods outlined here use LDAP and Kerberos. LDAP brings the UID/GID information (from the Unix tab in ad) for the user, and Kerberos provides for username/password authentication piece.<br />
<br />
With the default install of CentOS 5.8, it's amazingly simple to setup authentication to your active directory for Unix-enabled ad users.<br />
<br />
Here are the steps for enabling your CentOS 5.8 GNU/Linux computer to authenticate with active directory:<br />
<br />
1.) Create a special user in active directory (e.g., ad-guest-01). Once you've created the user, add it to the group "Domain Guests", make it the Primary group, and remove all other group memberships (e.g., Domain Users should be removed).<br />
<br />
2.) Make changes to the following configuration files on the CentOS 5.8 GNU/Linux machine as shown below:
<br />
<br />
<pre>##############################################################
#/etc/ldap.conf for connecting with Win-Server w/SFU Enabled #
##############################################################
base dc=yourcompany,dc=com
uri ldap://yourADserver.yourcompany.com ldap://yourADserver.yourcompany.com/
binddn ad-guest-01@yourcompany.COM
bindpw <ad -guest-01="-guest-01" here="here" password="password" s="s">
bind_policy soft
scope sub
pam_min_uid 1000
bind_timelimit 5
timelimit 5
idle_timeout 3600
ssl no
referrals no
nss_base_group dc=yourcompany,dc=com?sub?&(objectCategory=group)(gidnumber=*)
nss_map_objectclass posixAccount user
nss_map_objectclass shadowAccount user
nss_map_objectclass posixGroup group
nss_map_attribute gecos cn
nss_map_attribute homeDirectory unixHomeDirectory
nss_map_attribute uniqueMember member
nss_initgroups_ignoreusers root,ldap
</ad></pre>
<br />
<br />
<pre>##############################################################
#/etc/krb5.conf for connecting with Win-Server w/SFU Enabled #
##############################################################
# Tip: You can use predefined DNS names for your kerberos,
#+ ldap (ad) servers to make future ad dc hostname changes
#+ less painful.
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
default_realm = YOURCOMPANY.COM
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
forwardable = yes
[realms]
YOURCOMPANY.COM = {
kdc = yourADserver.yourcompany.com:88
kdc = yourADserver
admin_server = yourADserver.yourcompany.com:749
}
[domain_realm]
yourcompany.com = YOURCOMPANY.COM
.yourcompany.com = YOURCOMPANY.COM
[appdefaults]
pam = {
debug = false
ticket_lifetime = 36000
renew_lifetime = 36000
forwardable = true
krb4_convert = false
}
</pre>
<br />
<br />
<pre>
######################################################
#/etc/nsswitch.com for Win-Server w/SFU Enabled Auth#
######################################################
passwd: files ldap
shadow: files ldap
group: files ldap
#hosts: db files nisplus nis dns
hosts: files dns
# Example - obey only what nisplus tells us...
#services: nisplus [NOTFOUND=return] files
#networks: nisplus [NOTFOUND=return] files
#protocols: nisplus [NOTFOUND=return] files
#rpc: nisplus [NOTFOUND=return] files
#ethers: nisplus [NOTFOUND=return] files
#netmasks: nisplus [NOTFOUND=return] files
bootparams: nisplus [NOTFOUND=return] files
ethers: files
netmasks: files
networks: files
protocols: files
rpc: files
services: files
netgroup: files ldap
publickey: nisplus
automount: files ldap
aliases: files nisplus
</pre>
<br />
<br />
<pre>
##############################################################
#/etc/pam.d/system-auth-ac for Win-Server w/SFU Enabled Auth#
##############################################################
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth sufficient pam_unix.so nullok try_first_pass
auth requisite pam_succeed_if.so uid >= 500 quiet
auth sufficient pam_krb5.so use_first_pass
auth sufficient pam_ldap.so use_first_pass
auth required pam_deny.so
account required pam_unix.so broken_shadow
#The line below allows local user login
account sufficient pam_localuser.so
account sufficient pam_succeed_if.so uid < 500 quiet
account [default=bad success=ok user_unknown=ignore] pam_ldap.so
account [default=bad success=ok user_unknown=ignore] pam_krb5.so
account required pam_permit.so
password requisite pam_cracklib.so try_first_pass retry=3
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok
password sufficient pam_krb5.so use_authtok
password sufficient pam_ldap.so use_authtok
password required pam_deny.so
session optional pam_keyinit.so revoke
session required pam_limits.so
#The line below triggers creation of home-dir upon user first login
session optional pam_mkhomedir.so
session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session required pam_unix.so
session optional pam_krb5.so
session optional pam_ldap.so
</pre>
<br />
<br />
If you want your windows users to be able to run sudo, run visudo as root, then add:<br />
<br />
<pre>%Domain\ Users ALL=(ALL) ALL</pre>
<br />
<br />
Note: The above setting is just an example of how to add FULL CONTROL for the ad-based "Domain Users" to the sudoers file. Changes to the sudoers file can be more finely tuned to only allow certain programs. If user restriction is a concern for your situation, I suggest you research "sudoers" and find the more granular settings that are appropriate for your needs.
<br />
<br />
Speaking of security, something else to consider is that if the user can become root with sudo -s on the machine, they will then be able to su <any-windows-user> and be seen as that user as far as the local machine is concerned. You can force them to authenticate (even as root) by commenting the line below in /etc/pam/su, but if they are root - they can still change it back:
<pre>vi /etc/pam.d/su</pre>
<pre>#auth sufficient pam_rootok.so</pre>
<br />
That's it. Reboot your CentOS, then you should be able to login as your windows user on the box. Feel free to leave a comment below with any suggestions or questions.
<br />
<br />
<br />
Cheers!<br />
Shannon VanWagner
<br />
<br />
08-03-2012
<br />
<div>
<br />
<br />
<br />
<span style="font-size: 85%;"><a href="http://www.addthis.com/bookmark.php" style="font-family: verdana;"><img alt="" border="0" height="16" src="http://s7.addthis.com/static/btn/lg-share-en.gif" style="border: 0pt none;" width="125" /></a></span> </div>Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com1tag:blogger.com,1999:blog-8208479109120950856.post-75853274527704122242012-08-01T13:53:00.001-04:002012-08-01T13:53:30.047-04:00How To Install Clearcase 7.1.1 on CentOS 5.8<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg56lu5Bc6eiyVMWoBtDMJ8JTJHrGkb6Mg69vfLvKU33adIwV3FeTUhxVeYxT1C1hzAhroLdJRopWLduxTVLoMyWTMf9s6qwI1-A4D6Zm4ZGnMUPKzf22OP3dx6jQRCJX2xsQ3Nt5fJrJA/s1600/ct.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg56lu5Bc6eiyVMWoBtDMJ8JTJHrGkb6Mg69vfLvKU33adIwV3FeTUhxVeYxT1C1hzAhroLdJRopWLduxTVLoMyWTMf9s6qwI1-A4D6Zm4ZGnMUPKzf22OP3dx6jQRCJX2xsQ3Nt5fJrJA/s320/ct.jpg" width="320" /></a></div>
First of all, if you're going to have to use source control, get something FOSS - like git, or subversion, or mercurial, etc. Here's a great list on <a href="http://en.wikipedia.org/wiki/Comparison_of_revision_control_software" target="_blank">wikipedia.org</a> <br />
<br />
Otherwise, if you're one those poor bastards that are tasked(like me) with installing the less-than-FOSS IBM Rational Clearcase (c) (version 7.1.1) on the CentOS 5.8 GNU/Linux machine, you've come to the right place for some notes on a real installation.<br />
<br />
Basically, IBM Clearcase does not include support for CentOS. To make things worse - the IBM installer will actually fail the install for "unsupported operating system" when installing on the non-supported operating system. As to why the IBM installer doesn't have the option to "try anyway" is beyond me, but since it doesn't, we will have to resort to other means.<br />
<br />
Luckily, it is rather easy to workaround the "unsupported operating system" problem. To install Clearcase 7.1.1.1 on CentOS 5.8, we simply have to trick it into thinking that our CentOS is actually Red Hat Enterprise Linux. In this post, I'm providing an overview for how the installation process worked for me.<br />
<br />
Disclaimer: This is an experimental procedure only. By using these methods, you accept full responsibility for any subsequent damages that might happen to your system by using these instructions.<br />
<br />
And now for the installation details:<br />
<br />
First, on the computer you'll use for testing Clearcase, install CentOS 5.8 GNU/Linux (32-bit version in this example). There are no special requirements to this step, except that upon your first login, you should run all system/security updates. After running the updates, you should reboot to ensure you are booted to the latest installed kernel.<br />
<br />
Related terminal command for system updates:<br />
<pre>yum update && yum upgrade -y</pre><br />
<br />
And now, let's get the system ready for the install of Clearcase 7.1.1:<br />
Note: These commands assume you are running the terminal as root, use this command to become root:<br />
<pre>su - </pre><br />
<br />
Next, check to see if you are running the PAE kernel so we can decide which dependency packages to install for the Clearcase MVFS module build. Run the command below and take note of the result:<br />
<pre>uname -r</pre><br />
Example result for running the PAE kernel:<br />
2.6.18-308.11.1.el5PAE<br />
<br />
Now, let's install the dependencies needed to build the mvfs module for Clearcase:<br />
<br />
If you are having the PAE kernel:<br />
<pre>yum install compat-libstdc++-33 \ <br />
gcc glibc-devel glibc-headers kernel-headers \ <br />
kernel-devel kernel-PAE-devel -y</pre><br />
<br />
If you are NOT having the PAE kernel (command above would work fine too):<br />
<pre>yum install compat-libstdc++-33 gcc glibc-devel \ <br />
glibc-headers kernel-headers kernel-devel -y</pre><br />
<br />
In this step, we'll set up the trickery that is needed to mask CentOS system to mask itself as Red Hat for the installation of Clearcase 7.1.1:<br />
<br />
First, open the terminal, and make a backup of your redhat-release file:<br />
<pre>cp /etc/redhat-release /etc/redhat-release.original</pre><br />
<br />
Then, edit /etc/redhat-release as follows:<br />
<pre>vi /etc/redhat-release</pre><br />
Insert this text:<br />
<pre>Red Hat Enterprise Linux ES release 5</pre><br />
Save the file and close it.<br />
<br />
Now, let's Mount the VOB storage folder on your clearcase server using NFS so the MVFS will be able to mount the VOB folder. To do this, create a mount point (directory):<br />
<pre>mkdir /home/clearcase</pre><br />
<br />
Then, modify /etc/fstab to mount the clearcase folder you just created:<br />
<pre>vi /etc/fstab</pre><br />
Add a line to mount the server files:<br />
</pre>ccaseserver(or IP):/home/<VOBdir> /home/clearcase nfs defaults 0 0<br />
<br />
Then, re-process the entries from /etc/fstab with:<br />
<pre>mount -s</pre><br />
<br />
Then, test to ensure you can see the files on the server with this command (should not produce an error):<br />
<pre>ls /home/clearcase</pre><br />
<br />Unzip and install the IBM installation agent (installer version 1.3.3 for this example), cd into the dir, then run the install script: <br />
<br />
<pre>unzip -d extracted agent.installer.linux.gtk.x86_1.3.3.zip</pre><br />
<pre>cd extracted</pre><br />
<pre>./install</pre><br />
<br />Then, use the graphical interface to install the IBM Installer (Note: You should restart the installer with the button provided at the last step of the process).<br />
<br />
Now for the install of Clearcase 7.1.1.1. From the IBM Installation Manager, click File > Preferences > Add Repository, then Browse to "Disk 1" dir of your Clearcase 7.1.1 installation files and add the diskTag.inf as a repository. Click OK as necessary to get back to the IBM Installation Manager screen, then click the install button to install Clearcase.<br />
<br />
As for the installation steps, I used the defaults pertaining to my environment, except I also added the "ClearCase Full Function Installation" package, and I tested to ensure the "kernel source" build directory was accessible on the MVFS Module page. To test this yourself, run ls of the directory in the terminal. The result should be an existing directory with a list of files:<br />
<pre>ls /lib/modules/2.6.18-309.11.1.el5PAE/build</pre><br />
same as <pre>ls /lib/modules/$(uname -r)/build</pre> for me.<br />
If you get an error at this step, check to ensure the dependency packages are installed (per the step above). <br />
<br />
If for some reason the MVFS module doesn't get built by the installer, you may see a message like "... albd_server MVFS module could not be found ..." when restarting clearcase with this command:<br />
<pre>/etc/init.d/clearcase restart</pre><br />
<br />
If you experience the above error, you can try building and installing the MVFS module by hand with these commands:<br />
<pre>/etc/init.d/clearcase stop<br />
cd /var/adm/rational/clearcase/mvfs/mvfs_src<br />
make<br />
make install</pre><br />
<br />
Finally, to test that the MVFS module is installed and running, perform these commands:<br />
<pre>/etc/init.d/clearcase restart</pre><br />
<pre>/opt/rational/clearcase/bin/cleartool lsvob</pre><br />
The result should list out your VOB directories with a * (to show mounted) to the left. Example:<br />
<pre>* /vob_storage/MyVob.vbs</pre><br />
<br /><br />
So, that's it. Hopefully something here will help someone with their setup. If you have any questions or comments, please leave them below.<br />
<br />
<br />
Cheers!<br />
Shannon VanWagner
<br />
<br />
08-01-2012
<br />
<div>
<br />
<br />
<br />
<span style="font-size: 85%;"><a href="http://www.addthis.com/bookmark.php" style="font-family: verdana;"><img alt="" border="0" height="16" src="http://s7.addthis.com/static/btn/lg-share-en.gif" style="border: 0pt none;" width="125" /></a></span> </div>
Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com0tag:blogger.com,1999:blog-8208479109120950856.post-87890734017491932862012-07-17T22:25:00.000-04:002012-07-17T22:25:25.492-04:00Fun with Bash Double Brackets, Regular Expressions, Case Matching, and Digits<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGqpquKg_0hitRCV8Lv_E43IENT1sQea7FiFtwo360EGRSCO6td8TjW9QavmLEr1q6VwU2KNFpYp1fBEjWuffxbcIAuhWek_5HJNV0f1WEU5vOzejjTkif1OrjSjL5-Js27sHdQKOfvN0/s1600/regex.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGqpquKg_0hitRCV8Lv_E43IENT1sQea7FiFtwo360EGRSCO6td8TjW9QavmLEr1q6VwU2KNFpYp1fBEjWuffxbcIAuhWek_5HJNV0f1WEU5vOzejjTkif1OrjSjL5-Js27sHdQKOfvN0/s320/regex.png" width="320" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisBkrV7-8Ge1p2J2byPBUlJoqEY5_Cph8ZJSkWguA-yF6xu9HMAoHm_-_GHo0f3RQTGSTtT3h6q5bd0zSuN8OU4AAiVH-7Y36jsKcKb2XMc-hV0IUW2J8DDvRPFwg0dtNgWKsFnqIUQ9I/s1600/regex.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a>After some quick searching and not finding the answer, I decided to write this up for my own reference.<br />
<br />
My original inquiry was how do I form a double-bracketed if branch statement, using "=~" to check a variable against a regular expression for upper OR lower case of a specific search string in bash. After some working it out, I think I got it. See below.<br />
<br />
For instance, in the example script below, the user is asked to answer yes or no, the value entered is then checked to "loosely" match a predefined value. In this case, yes/y (with any combination of case) will match the Regular Expression.<br />
<br />
This example points out how to formulate your bracketed regular expression to match any variations in case (or even a single character answer, e.g., y OR n). There are differences with the bracketed use of regular expressions compared to how grep uses them, I'm finding.<br />
<br />
Like, notice in the experimental script below, how single quotes are not used in the bracketed expression, and the "|" for the OR situation is not escaped with \. Also, with the example that checks for exactly 6 characters, no "\" are used to escape the curly braces.<br />
<br />
<br />
<pre>#!/bin/bash
while [ 1 ]
do
echo "Are you ready to get started? Enter: Yes|No"
read result
#Test the result for yes/no (or variation)
if [[ "$result" =~ ^[Yy][Ee][Ss]$|^[Yy]$ ]]
then
echo "Good. Grab your stuff and let's roll!"
break
elif [[ "$result" =~ ^[Nn][Oo]$|^[Nn]$ ]]
then
echo "You answered No. Ok, we'll wait until later."
break
elif [[ "$result" =~ ^[Ee][Gg][Gg]$ ]]
then
echo "Congrats! You found the Easter Egg!"
while [ 1 ]
do
echo "Enter a 6 digit number:";
read theresult
if [[ "$theresult" =~ ^[0-9]{6}$ ]]
then
echo "Nice work! Bye!"
break
else
echo "Input not recognized, please enter 6 digits."
fi
done
break
else
echo "Input not recognized. Please enter Yes/No."
fi
done
exit 0</pre>
<pre> </pre>
<pre> </pre>
<br />
So there it is, just a quick example of how bracketed regular expressions can be used to test for specific values in bash. Hopefully this little example will help somebody save a bit of time having to research for this information.<br />
<br />
<br />
<br />
Cheers!<br />
<br />
<br />
Shannon VanWagner<br />
<br />
<br />
07-17-2012
<br />
<div>
<br />
<br />
<br />
<span style="font-size: 85%;"><a href="http://www.addthis.com/bookmark.php" style="font-family: verdana;"><img alt="" border="0" height="16" src="http://s7.addthis.com/static/btn/lg-share-en.gif" style="border: 0pt none;" width="125" /></a></span> </div>Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com3tag:blogger.com,1999:blog-8208479109120950856.post-10486816226630352302012-06-28T02:45:00.001-04:002012-08-10T15:12:24.198-04:00How To: Update Your Ubuntu GNU/Linux sources.list the Geeky Way<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggysD_GTo5t1bcx2a5aVyR0CGpX9Tp3aNuI-LffIEc2G6TuNgilyaW0myRViCet41YUkI8hmHeRTHMeF_Dsx2b8XWB9GxD8ucrzCD6irJ9R8Z2NFNzqj9VyavAw3WICciMUrot3JVqPak/s1600/Screenshot+from+2012-06-27+23:26:06.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="244" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggysD_GTo5t1bcx2a5aVyR0CGpX9Tp3aNuI-LffIEc2G6TuNgilyaW0myRViCet41YUkI8hmHeRTHMeF_Dsx2b8XWB9GxD8ucrzCD6irJ9R8Z2NFNzqj9VyavAw3WICciMUrot3JVqPak/s320/Screenshot+from+2012-06-27+23:26:06.png" width="320" /></a></div>
Here's my geeky tip for updating your /etc/apt/sources.list on Ubuntu GNU/Linux.<br />
<br />
This tip is especially useful around April/October when the new Ubuntu
releases are freed into the wild and the main servers are very busy.<br />
<br />
I know what you're saying: This can easily be done from the Ubuntu Software Center via the edit > sources menu. Yes, this is true, but now that's not a very geeky (or terminal-fast) thing to do, now is it? Besides, I like it better when I can initiate the sources update myself with sudo apt-get update, vs. having the software centre do it on exit.<br />
<div id=":yx">
<br />
To change your sources.list package server setting from the command line.<br />
<br />
1.) Open the Terminal. Simply hit CTRL+ALT+T.<br />
<br />
2.) Run this command to update your sources.list file:</div>
<div id=":yx">
</div>
<br />
<pre>sudo sed -i.backup 's/us.archive.ubuntu.com/mirror.anl.gov/g' /etc/apt/sources.list</pre>
<br />
3.) Run this command to see if your change took effect (you should see mirror.pnl.gov instead of us.archive.ubuntu.com on update).<br />
<br />
<pre>sudo apt-get update</pre>
<br />
<br />
<br />
Related Notes:<br />
<br />
<b>a.) </b>Edits your sources.list file in place (makes
a backup of your current sources.list as /etc/apt/sources.list.backup).
Keep in mind if you run the command twice - the backup will be
overwritten.<br />
<br />
<b>b.)</b> Assumes your Ubuntu was installed in the USA(can probably swap the us for your country code) - hence the <a href="http://us.archive.ubuntu.com/" target="_blank">us.archive.ubuntu.com</a> original setting.<br />
<br />
<b>c.)</b> Assumes you want to replace your current package source with mirror.pnl.gov
(that one is fast for me here in Seattle, WA). See your list of options
for package servers by running this command: <br />
<br />
<pre>cat /usr/share/update-manager/mirrors.cfg</pre>
<br />
Alternatively, checkout <a href="https://launchpad.net/ubuntu/+archivemirrors" target="_blank">https://launchpad.net/ubuntu/+<wbr></wbr></a><br />
archivemirrors for list with speeds and other information.<br /><br />
<br />
<br />
Feel free to leave your suggestions for the better way below. Thanks!<br />
<br />
See these links for more information:<br />
<a href="https://wiki.ubuntu.com/Mirrors/" target="_blank">https://wiki.ubuntu.com/<wbr></wbr></a><br />
Mirrors/<br /><a href="https://help.ubuntu.com/community/Repositories/CommandLine" target="_blank">https://help.ubuntu.com/<wbr></wbr></a><br />
community/Repositories/<wbr></wbr>CommandLine<br /><br />
<br />
Cheers!<br />
<br />
Shannon VanWagner<br />
06/27/2012
<br />
<div>
<br />
<br />
<br />
<span style="font-size: 85%;"><a href="http://www.addthis.com/bookmark.php" style="font-family: verdana;"><img alt="" border="0" height="16" src="http://s7.addthis.com/static/btn/lg-share-en.gif" style="border: 0pt none;" width="125" /></a></span> </div>Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com0tag:blogger.com,1999:blog-8208479109120950856.post-31478603549990891032012-06-19T19:50:00.000-04:002012-06-19T22:33:33.196-04:00How To Use xargs To grep (or rm) a Million Files<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb-aQkOw82n6mpSaiNwhZQoWQ46_qCk55QBiGq8CWrXkgmy9wIpcOoD47LlRhCQLIdhoxiUYuBUzGjengo8ZH8msdbALmtjDrI4JHg8i9sUEnl7O3WlngQg6Ozdh9Ws7ozTQODYko071s/s1600/xargs.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb-aQkOw82n6mpSaiNwhZQoWQ46_qCk55QBiGq8CWrXkgmy9wIpcOoD47LlRhCQLIdhoxiUYuBUzGjengo8ZH8msdbALmtjDrI4JHg8i9sUEnl7O3WlngQg6Ozdh9Ws7ozTQODYko071s/s320/xargs.png" width="320" /></a></div>
Sometimes even when a tidbit of technology one is studying is already very well documented, one still seeks to test it out for oneself to get a solid sense of the true behaviour of the subject. Plus, if you're like me, writing about a particular subject has the added benefit of committing it to memory.<br />
<br />
And so it is for the reason of teaching myself that I document these already well-known points about grep and xargs.<br />
<br />
Of course, as a side-effect, if another out there ends up learning from my writings too, that would be perfectly fabulous in my eyes as well.<br />
<br />
Basically, the question in my mind is this: How do I successfully grep(search) for something in a directory that contains hundreds of thousands, or perhaps more individual files?<br />
<br />
To illustrate an example: Using the grep command by itself to search through hundreds of thousands of files provides the following result on my Ubuntu 12.04 GNU/Linux system. The below directory contains 200,000 files.<br />
<br />
<pre>$ grep 'rubies' *
bash: /bin/grep: Argument list too long</pre>
<br />
So why would I receive the error "Argument list too long" for this example? The key is to take a look at the number of characters for an argument that I am dealing with when using grep * in a directory with a large number of files(as in the example above ). Take a look at this example, which counts and displays the number of characters in the arguments for echo.<br />
<br />
<pre>$ echo *|wc -c
2288895</pre>
<br />
The above command uses echo to enumerate all the names of the files in the current directory with the wildcard "*". The results are then piped to the word counting(wc) program, showing number of characters via (-c).<br />
<br />
So as you can see, when applying "*" to a command, it's not really the number of files retrieved as arguments that's the problem, but the length of all the names of the files globbed together in the directory when all being processed as an argument to a command with the "*" wildcard.<br />
<br />
If the number of characters you retrieve with the command above is greater than the pre-set "ARG_MAX" value on your system, that's when you will get the "Argument list too long" error with a command being used to process a great number of files.<br />
<br />
Here's one example of how to find the ARG_MAX value:<br />
<br />
<pre>$ getconf ARG_MAX
2097152</pre>
<br />
Obviously, if the number of characters submitted to my grep command is greater than the number shown for the ARG_MAX setting, I will not be able to process a command that uses * with that size of argument.<br />
<br />
So, the answer to deal with this argument list problem, is to use GNU xargs from the Free Software Foundation.<br />
<br />
Here's an excerpt from the xargs man page:<br />
<br />
<span style="font-size: x-small;">NAME<br /> xargs - build and execute command lines from standard input<br /><br />DESCRIPTION<br /> This manual page documents the GNU version of xargs. xargs reads items from the<br /> standard input, delimited by blanks (which can be protected with double or sin‐<br /> gle quotes or a backslash) or newlines, and executes the command (default is<br /> /bin/echo) one or more times with any initial-arguments followed by items read<br /> from standard input. Blank lines on the standard input are ignored.<br /><br /> Because Unix filenames can contain blanks and newlines, this default behaviour<br /> is often problematic; filenames containing blanks and/or newlines are incorrect‐<br /> ly processed by xargs. In these situations it is better to use the -0 option,<br /> which prevents such problems. When using this option you will need to ensure<br /> that the program which produces the input for xargs also uses a null character<br /> as a separator. If that program is GNU find for example, the -print0 option<br /> does this for you.</span><br />
<span style="font-size: x-small;"><br />
</span>
(For the complete manual, please see http://www.gnu.org/software/findutils/ )<br />
<br />
In this writeup, I want to focus on details of the second paragraph. Specifically, I wanted to document some tests that show why you should use the find command with the -print0 setting along with the xargs -0 setting together to overcome problems like spaces in filenames, and to overcome the "Argument list too long" error.<br />
<br />
Anyways, here's how you can see how things respond, and which way is the wrong way vs. the right. DISCLAIMER: These tests are experimental only, and I cannot responsible for any damage you cause to your machine while testing these commands for yourself. So make a backup of your important data and use caution when entering the commands.<br />
<br />
Let's start by making 200,000 files (a task that took my computer about 8.3 seconds). Then we'll cd into the new directory.<br />
<br />
<pre>mkdir dirWith200KFiles</pre>
<pre>cd dirWith200KFiles</pre>
<br />
<br />
Now, create 200,000 files (named file-1 thru file-200000), and echo some text into them (with just a few taps of your fingers). Note: this same process will work for a million or more files, e.g., just replace {1..200000} with {1..1000000}.<br />
<br />
<pre>for eachfile in {1..200000}
do
echo "yes there is something here" > file-$eachfile
done</pre>
<br />
<br />
Now, let's hide a gem in one of the files so we can search for it with grep later.<br />
<br />
<pre>echo "rubies diamonds and gold" >> file-78432</pre>
<br />
<br />
And, let's add a file with spaces in the name so we can break some commands with that too.<br />
<br />
<pre>echo "spaces in filename" > "myfile spaces inname"</pre>
<br />
<br />
At this point we can conduct a search with grep, and experience what might happen when one is trying to find a gem in such a large set of files and in a file with spaces in the name.<br />
<br />
<pre>$ grep 'rubies' *
bash: /bin/grep: Argument list too long</pre>
<br />
<br />
So, in the above example, grep fails because of "Argument list too long". To resolve the problem, see the CORRECT example below.<br />
<br />
A CORRECT way to use xargs with grep:<br />
<br />
<pre>$ find . -type f -print0 | xargs -0 grep 'rubies'
./file-78432:rubies diamonds and gold</pre>
<br />
<br />
In the above example, the find command checks the current directory for files of type and formats the output, replacing blank spaces in names with the null character, which then gets piped to the xargs command. The xargs command accepts the output from the find command, while ensuring no blank spaces with the -0 (format of -print0 command required), and greps the results for 'rubies'. As you can see in the output, this is how it's supposed to work.<br />
<br />
Here are a few variations with explanations that show how these are the WRONG way to use the grep and xargs commands.<br />
<br />
<pre>$ find . -type f | xargs -0 grep 'rubies'
xargs: argument line too long</pre>
<br />
<br />
In the above example, when the find command encounters our filename with 3 spaces in it, they are piped into the xargs command as 3 arguments at once, which causes an error because our xargs command only expects 1 argument.<br />
<br />
<pre>$ find . -type f -print0 | xargs grep 'rubies'
xargs: Warning: a NUL character occurred in the input.
It cannot be passed through in the argument list.
Did you mean to use the --null option?
xargs: argument line too long</pre>
<br />
<br />
In the above example, the output format of the find command sends the null characters in place of the spaces in the filename, but the xargs command doesn't expect them, so it causes an error.<br />
<br />
And finally, the most chaotic example that has the potential to cause problems. Especially if using xargs to do something more destructive than grep, e.g. rm (remove) files:<br />
<br />
<pre>$ find . -type f | xargs grep 'rubies'
grep: ./myfile: No such file or directory
grep: spaces: No such file or directory
grep: inname: No such file or directory
./file-78432:rubies diamonds and gold</pre>
<br />
<br />
In the above example, the output from the find command is processed by "xargs grep" as separate arguments and so separate filenames in this case. The xargs grep command then also succeeds in finding the correct result, but at this point the damage could already be done.<br />
<br />
Here are some of the same tests using the command "rm" instead:<br />
<br />
CORRECT:<br />
<br />
<pre>$ find . -type f -print0 | xargs -0 rm</pre>
<br />
<br />
WRONG (In my case of deleting 200K files anyway):<br />
<br />
<pre>$ rm *
bash: /bin/rm: Argument list too long</pre>
<br />
<br />
WRONG:<br />
<br />
<pre>$ find . -type f | xargs rm
rm: cannot remove `./myfile': No such file or directory
rm: cannot remove `spaces': No such file or directory
rm: cannot remove `inname': No such file or directory</pre>
<br />
<br />
So there it is. Problem solved. I'm definitely not saying this is the only way to do it. But now you can get your searching for text in large sets of files on like never before.<br />
<br />
<br />
Credit to the site below for showing more information on ARG_MAX <br />
http://www.in-ulm.de/~mascheck/various/argmax/
<br />
<br />
<br />
<br />
<br />
Shannon VanWagner<br />
06/19/12
<br />
<div>
<br />
<br />
<br />
<span style="font-size: 85%;"><a href="http://www.addthis.com/bookmark.php" style="font-family: verdana;"><img alt="" border="0" height="16" src="http://s7.addthis.com/static/btn/lg-share-en.gif" style="border: 0pt none;" width="125" /></a></span> </div>Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com3tag:blogger.com,1999:blog-8208479109120950856.post-83301775893838746452012-06-08T19:57:00.000-04:002012-08-07T18:37:50.150-04:00Ubuntu 12.04 GNU/Linux + HP 8100 or Ricoh Aficio MP 3500 = Printing Success<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqsZW2lTXYdsf4M7CDm4TVqDWMK36Cj1XWFZM-4Tr80EiR6d2qSKwEo-DiN4TVY9ERrqO6DgabgO8ILc7L4nsPXXuQrmnbhUahhck83DQkaCoh7XPLc63SQGSIVc8jX51GaAMOjyzaj0E/s1600/printers_control.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqsZW2lTXYdsf4M7CDm4TVqDWMK36Cj1XWFZM-4Tr80EiR6d2qSKwEo-DiN4TVY9ERrqO6DgabgO8ILc7L4nsPXXuQrmnbhUahhck83DQkaCoh7XPLc63SQGSIVc8jX51GaAMOjyzaj0E/s1600/printers_control.png" /></a></div>
Here's a quick write-up on my real-life experience with adding the HP LaserJet and Ricoh Aficio MP 3500 as printers in Ubuntu GNU/Linux.<br />
<br />
I chose to make a note of this simple task because I was tripped up by it at first. The problem? The default setting caused nothing but garbage at the printer. After some simple trial and error, I figured out that I needed to switch the driver settings as noted below. <br />
<br />
Ricoh Aficio 3500
Driver:<br />
Ricoh Aficio MP 3500 PXL<br />
<br />
HP Laserjet 8000 series
Driver:<br />
HP Laser Jet 8000 Series pcl3, hpcups 3.12.x<br />
<br />
Adding a printer in Ubuntu GNU/Linux 12.04 is really easy, simply follow these steps:<br />
<ol>
<li> Click the Power icon > Printers > Add + </li>
<li>Expand the Network Printer section > click AppSocket/HP jetDirect</li>
<li>Enter the hostname|IP Address for the printer, Click Forward (and pause as the system will attempt to detect the printer)</li>
<li>Select the printer from database(or leave as detected) > click Forward</li>
<li>If not given the selection to select the specific driver, accept the default and then you can come back and open printers > properties (for the printer you want to modify), then set the driver that way. </li>
</ol>
Basically, if your printer is not working with the default setting (usually postscript), I suggest trying the pcl3 or pxl drivers instead.<br />
<br />
Typically, printing works great with the default settings in Ubuntu anyway, I just wanted to point out that if it's not, that you should try switching to the alternate driver.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMkBEc95emUWk-POHLNErv2xdC2isbTvOVF9myV9wD6Z2uhfs48tITuciUgl1iYTpkT2LC2QCntMpanNfFd6W2HGSVfe-p0gu7NsDIvO7gw9WSILEk4g95B_YoONw_jd6LZYel5tDMtxc/s1600/ricoh3500.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMkBEc95emUWk-POHLNErv2xdC2isbTvOVF9myV9wD6Z2uhfs48tITuciUgl1iYTpkT2LC2QCntMpanNfFd6W2HGSVfe-p0gu7NsDIvO7gw9WSILEk4g95B_YoONw_jd6LZYel5tDMtxc/s400/ricoh3500.png" width="400" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhClT2-C1JGxdGJZmSjCP2w-_Wmsf1LYx12fNkJ-6CVx9i67b6Ay9AO_LvB4dOGo1tHppDHt_j0c03Reu5yeRbglU3b_26EEn6G6rkNyCqBsXD6Xd-qkZm6SkBaZQ8wrALn-kaUQNP3l4c/s1600/hplj8100.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhClT2-C1JGxdGJZmSjCP2w-_Wmsf1LYx12fNkJ-6CVx9i67b6Ay9AO_LvB4dOGo1tHppDHt_j0c03Reu5yeRbglU3b_26EEn6G6rkNyCqBsXD6Xd-qkZm6SkBaZQ8wrALn-kaUQNP3l4c/s400/hplj8100.png" width="400" /></a></div>
<br />
Hopefully this helps someone out there. Please feel free to leave your on-subject, constructive comments below.<br />
<br />
Note: If you're looking for the *.ppd file for Ricoh Aficio MP 3500 PXL (can be imported as a printer driver), see <a href="http://www.openprinting.org/download/PPD/Ricoh/PXL/Ricoh-Aficio_MP_3500_PXL.ppd" target="_blank">this link</a>.<br />
<br />
Cheers!<br />
<br />
Shannon VanWagner<br />
06/07/12<br />
<br />
<div>
<br />
<br />
<br />
<span style="font-size: 85%;"><a href="http://www.addthis.com/bookmark.php" style="font-family: verdana;"><img alt="" border="0" height="16" src="http://s7.addthis.com/static/btn/lg-share-en.gif" style="border: 0pt none;" width="125" /></a></span> </div>Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com7tag:blogger.com,1999:blog-8208479109120950856.post-28106812149495298422012-05-29T20:18:00.000-04:002012-05-30T12:28:11.376-04:00Simple Bash Script to Reverse Your Name and Output itJust a quick script to reverse some input, using Bash and the FOSS "rev" program. It's amazing how easy it is to manipulate things with Bash. I love it!<br />
<br />
<br />
Bash script version:
<br />
<blockquote>
#!/bin/bash
<br />
#Simple script to reverse an input name<br />
<br />
echo "Enter your name";read 'myname'
<br />
<br />
<br />
echo "Your name spelled backwards is: $( echo $myname | rev )"
<br />
<br />
exit 0
</blockquote>
<br />
<br />
One-liner version:
<br />
<blockquote>
echo -n "what is your name?";read name;echo "$name" |rev
</blockquote>
<br />
<br />
Or how about this more ridiculous example (one that doesn't use the "rev" program):
<br />
<blockquote>
#!/bin/bash
<br />
#Simple script to reverse an input name<br />
<br />
<br />
echo -n "Enter your name:"
<br />
read myname
<br />
</blockquote>
<br />
<blockquote>
numChars=$(echo -n "$myname" |wc -c)
<br />
revname=
<br />
while [ $numChars -gt 0 ]
<br />
do
</blockquote>
<br />
<blockquote>
revname=$revname$(echo -n "$myname"|cut -b$numChars)
<br />
numChars=$(expr $numChars - 1)
<br />
</blockquote>
<br />
<blockquote>
done
<br />
<br />
echo "Your name spelled backwards is: $revname"
<br />
<br />
exit 0
</blockquote>
<br />
<br />
Ridiculous one-liner version (one that doesn't use the 'rev' program):<br />
<blockquote>
echo -n "Enter your name:";read myname;numChars=$(echo -n "$myname" |wc -c);revname=;while [ $numChars -gt 0 ];do revname=$revname$(echo -n "$myname"|cut -b$numChars);numChars=$(expr $numChars - 1);done;echo "$revname"
</blockquote>
<br />
<br />Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com0tag:blogger.com,1999:blog-8208479109120950856.post-72850403897032893092012-05-25T03:16:00.002-04:002012-05-25T03:19:41.997-04:00Simple Bash Script to Remove Clearcase Views (experimental)<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0gNgTw9q16YQnkku5MhQBUj_G7m8U7vZxmiX03Zn48oaIQ2bZmFhBMrVNvkitfEHxvYVs80aeCDedUDWTApJe8u5Gw9GEhqqWwXLdn3xlNUgW_ICyx3tg3svNu8r8Goj2DSaKyZfFCfQ/s1600/creation.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0gNgTw9q16YQnkku5MhQBUj_G7m8U7vZxmiX03Zn48oaIQ2bZmFhBMrVNvkitfEHxvYVs80aeCDedUDWTApJe8u5Gw9GEhqqWwXLdn3xlNUgW_ICyx3tg3svNu8r8Goj2DSaKyZfFCfQ/s320/creation.gif" width="320" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidmFDVXhQEPO4WmkGnIarBSd-vBXuxmwgoA9yLaNd8JpYF_Af_XTyO2tSlZ8fNpbAQYvTBG40VW8ZWHI6HtU02hpFqu8XkUuOa2JC6EdK1Mv2CytYde99I914fFl_C63qPGbuRdGWSzZM/s1600/bash.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><br />
So I just wanted to take a minute to say how awesome GNU Bash is, and that you can do a great many things with it. One of those things you can do is run commands from the cross-platform-compatible(mostly) IBM Rational Clearcase cleartool.<br />
<br />
<br />
Since I was working on cleaning up some old user views, I thought I'd just make a quick writeup on a script for helping with this task. I did it because I like writing scripts in Bash and I'm working (very often) to get better at it. Please note, the script is experimental, and just meant for tinkering purposes. That said, I can't be held responsible for any damage you do to your systems as a result of using this script.<br />
<br />
The script takes a parameter of the username. The script will search for views that are owned by the username, and will de-register, de-tag them. As for deleting the actual files at the view path, that part is NOT done by this script. Instead, the script will record the server name and view path into a file named "ViewsToDeleteReport...<year><month><day><hour><min><second>" for you to sort through for reference to the final removal.</second></min></hour></day></month></year><br />
<br />
The reason I left the deleting of the files off is two-fold, 1.) It's a bit tricky to remove the files from multiple view servers at once, and 2.) for safety - if you somehow remove the wrong view from clearcase, you can easily go back and re-register the existing view files back as a view again. I certainly hope someone can find something useful here.
<br />
<br />
<br />
<div>
<pre><code><span style="font-size: x-small;">#!/bin/bash
#Delete clearcase Views (clearcase parts, not physical data parts) Script
#License GPL v2.0 - More information is available at fsf.org
#By: Shannon VanWagner
#05-01-2012
#humans-enabled.com
#TODO - read multiple users based on file input
deleteUserViews()
{
if [ -x /opt/rational/clearcase/bin/cleartool ]
then
ct=/opt/rational/clearcase/bin/cleartool
rtimestamp=$(date +%Y_%b_%d_%H_%M-%S)
else
echo "Fatal Error(31) no cleartool executable at /opt/rational/clearcase/bin/cleartool, script halted"
exit 31
fi
for item in $($ct lsview -long|egrep -B10 -i "view owner: \/$1|view owner: $1"|grep -i 'tag:'|cut -d" " -f2)
do
if [ $item ]
then
vuid=$($ct lsview -long "$item"|grep -i 'view uuid:'|cut -d" " -f3)
vpath=$($ct lsview -long "$item"|grep -i 'view server access path:'|cut -d" " -f5)
vserver=$($ct lsview -long "$item"|grep -i "view on host:"|cut -d" " -f4)
#Process clearcase view removal
echo "Removing clearcase references for view:$item"
$ct endview $item > /dev/null 2>&1
$ct rmview -force -uuid $vuid -all > /dev/null 2>&1
$ct unregister -view -uuid $vuid > /dev/null 2>&1
$ct rmtag -view $item > /dev/null 2>&1
#Call report output for view deletion info
reportFilesToDelete $rtimestamp $vserver $vpath
else
echo "Fatal Error(43) Base cleartool lsview failed, script halted."
exit 43
fi
done
}
reportFilesToDelete() {
#Expects timestamp:$1, server:$2, path:$3
if [ $1 ] && [ $2 ] && [ $3 ]
then
rname="$(echo $delViewReportName)_$1.txt"
echo $2 $3 | tee -a $rname
else
echo "Missing timestamp, servername, or path from function call"
fi
}
# main
if [ $1 ]
then
usern=$1
delViewReportName=ViewsToDeleteReport
deleteUserViews $usern
else
progname=$(basename $0)
echo -e " What user views shall I delete? \n Script Usage: ./$progname username"
#29 no parameter error code - defined by me
exit 29
fi
echo "Done"
exit 0</span>
</code></pre>
</div>
<br />
Note: If you're looking for a FOSS solution for your source code repository solution instead. I would recommend you try "git" from <a href="http://git-scm.org/" target="_blank">http://git-scm.org</a> instead.<br />
<br />
Cheers!<br />
<br />
Shannon VanWagner
<br />
05-24-2012
<br />
<br />
<div>
<br />
<br />
<br />
<span style="font-size: 85%;"><a href="http://www.addthis.com/bookmark.php" style="font-family: verdana;"><img alt="" border="0" height="16" src="http://s7.addthis.com/static/btn/lg-share-en.gif" style="border: 0pt none;" width="125" /></a></span> </div>Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com0tag:blogger.com,1999:blog-8208479109120950856.post-31880550615913796792012-05-10T19:54:00.004-04:002013-01-17T14:09:33.103-05:00How to install FreeNX on Ubuntu 12.04 Precise Pangolin<div style="text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO3G02dk0jew4VyX_jWv_WBozYq4YHpT5d09Cm1Eul0r0nZfuj59AQLIrzlOf2OH7yYwkfj_IWqqpD5Rf5PtFAMgxZZrqrAkOckSboxJo8yUTFq8G6BhtkmBF1O5dr6UY8gFFAjkhIBss/s1600/freenx_qtnx_action.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="279" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO3G02dk0jew4VyX_jWv_WBozYq4YHpT5d09Cm1Eul0r0nZfuj59AQLIrzlOf2OH7yYwkfj_IWqqpD5Rf5PtFAMgxZZrqrAkOckSboxJo8yUTFq8G6BhtkmBF1O5dr6UY8gFFAjkhIBss/s320/freenx_qtnx_action.png" width="320" /></a> Ask anyone who knows me and they will tell you that I am a vocal (and
perhaps tireless) advocate of FOSS/GNU/Linux. I loves me some FOSS and GNU/Linux and I really like to help others with it as well!<br />
<br />
So after writing my post: <a href="http://www.humans-enabled.com/2012/04/how-to-install-freenx-server-on-ubuntu.html">How to install NX Free Edition on Ubuntu 12.04 Precise Pangolin</a>, I will follow it up with a story about FOSS. In this post, I will guide you through some easy instructions
for installing the GPL,FOSS NX server variant called FreeNX, and the FOSS "qtnx" client that is used to connect to the FreeNX server.
<br />
<br />
The main difference is that, unlike NX Free Edition, which is licensed as proprietary ( 2 connections limit), FreeNX and qtnx are completely Free Open Source Software (FOSS, GPL)! Sounds good right? It's music to my ears. Afterall, this FOSS/GNU/Linux stuff makes the Technical world go around for everyone.<br />
<br />
<div style="text-align: center;">
<i><b>Update 01/02/13: Want to try something easier? Simply install xrdp:</b></i></div>
<div style="text-align: center;">
<i><b>1.) sudo apt-get install xrdp<br />2.) Add this to the ~ of the user you plan on logggin in with:<br />echo "gnome-session --session=ubuntu-2d" > ~/.xsession<br />3.) sudo /etc/init.d/xrdp restart<br />4.) Connect to your xrdp host from GNU/Linux with rdesktop <host ip="ip" or="or">, or from win with windows-key+R, mstsc /v:<host ip="ip" or="or"></host></host></b></i></div>
<br />
So here are the simple instructions (and a couple of tweaks) that I used to install FreeNX on Ubuntu 12.04 GNU/Linux:
<br />
<br />
First, you need to add the freenx-team PPA for Ubuntu 12.04 GNU/Linux. Hit <b>CTRL + ALT + t</b> to get your Terminal, then type or paste in the command below, then hit Enter, then hit Enter to confirm the addition of the new source:
<br />
<blockquote>
sudo add-apt-repository ppa:freenx-team</blockquote>
Next, update your sources list, then install the FreeNX server software (there are two commands below, the 2nd only runs if 1st is successful). After verifying that no important packages will be <b>removed</b>, hit Y then enter to install FreeNX server:
<br />
<br />
<blockquote>
sudo apt-get update && sudo apt-get install freenx</blockquote>
<br />
Next, as noted in the <a href="https://help.ubuntu.com/community/FreeNX" target="_blank">community documentation for installing FreeNX</a> - download the missing nxsetup script, untar it, then copy it to /usr/lib/nx (the command below is one entire line that runs 3 commands and ends with /usr/lib/nx):
<br />
<blockquote>
wget https://bugs.launchpad.net/freenx-server/+bug/576359/+attachment/1378450/+files/nxsetup.tar.gz && tar xvf nxsetup.tar.gz && sudo cp nxsetup /usr/lib/nx </blockquote>
Now, run the nxserver setup script. I chose to use the parameter to install the default NoMachine provided encryption keys during this command so the NoMachine win-clients can connect as well as qtnx:
<br />
<blockquote>
sudo /usr/lib/nx/nxsetup --install --setup-nomachine-key</blockquote>
At this point, you have FreeNX server installed, but now you'll want to configure the FreeNX server to configure clients to use ubuntu-2d session:
<br />
<blockquote>
echo -e "\n#Use unity 2d for client sessions\nCOMMAND_START_GNOME='gnome-session --session=ubuntu-2d'"|sudo tee -a /etc/nxserver/node.conf </blockquote>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMRse0iHpTrMw3ASyHoTtaum5n4yZHRhPGU4bqYkY65mPi2hPDBHd0mWBzishcsX0gKzxtGIQCnQ7oCghsqi3OffXdaFFfLhxvmOAfbTOi08FOehOREm5zD5_4W2OO9H1Q6Ejp2NqDKFs/s1600/node.conf.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMRse0iHpTrMw3ASyHoTtaum5n4yZHRhPGU4bqYkY65mPi2hPDBHd0mWBzishcsX0gKzxtGIQCnQ7oCghsqi3OffXdaFFfLhxvmOAfbTOi08FOehOREm5zD5_4W2OO9H1Q6Ejp2NqDKFs/s320/node.conf.png" width="320" /></a></div>
<br />
<br />
Next, restart the FreeNX server to ensure it takes in the .conf file:
<br />
<blockquote>
sudo /etc/init.d/freenx-server restart</blockquote>
That's it for the FreeNX server, now let's move on to the client. First, install the 'qtnx' package on Ubuntu 12.04 so we can have a client application to access the FreeNX server. You'll have to launch the Ubuntu Software Center, then click 'Edit > Software Sources' from the top menu. Then place a check by "Community-maintained free and open-source software (universe). Also, uncheck "Cdrom with Ubuntu 12.04" if it's checked. Then close the Software Sources dialog and the Ubuntu Software Center.
<br />
Now, run the commands to update your sources and install the qtnx application from the terminal (<b>CTRL + ALT + t</b>):
<br />
<blockquote>
sudo apt-get update && sudo apt-get install qtnx</blockquote>
Ok, from the Unity menu or the CLI, start the 'qtnx' application. Enter the username/password for a user on the server, set the speed to LAN, then click configure. On the configuration dialog, set a name for the prfile, the hostname(or IP address) for the FreeNX server machine, the client resolution (I used 1024x768), network speed (LAN), and set the platform type to <b>GNOME</b> (see the example screenshot below).<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf5RxnXHck_lZRT4f_W_pT504y0xntkZwcQADPNsK_F3F4qdNDjt5tvD3Co63iLwUjwKPSTAs5-hzqsD1Rwplyp2701p6d5qItiNu15E3eFUvGWZV7cqc2nc7eQm6oTpOrD0qLN6fok34/s1600/qtnx.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf5RxnXHck_lZRT4f_W_pT504y0xntkZwcQADPNsK_F3F4qdNDjt5tvD3Co63iLwUjwKPSTAs5-hzqsD1Rwplyp2701p6d5qItiNu15E3eFUvGWZV7cqc2nc7eQm6oTpOrD0qLN6fok34/s320/qtnx.png" width="320" /></a></div>
<br />
<br />
Note: For the non-GNU/Linux clients, you can use nomachine.com's NX Client Free to connect to the server. Just use GNOME as the session.<br />
<br />
That's it! Get your FreeNX connection on!
<br />
<br /></div>
<div style="text-align: left;">
<span style="font-size: small;">
As for the version I tested with, it's: nxserver --version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
<br /><br />
Extra Tip: If for some reason your client wouldn't connect after testing, try deleting the entries in the ~/.nx directory. I'm not sure why this would help at all in most cases but it seemed to work for me. </span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"><br /></span>
<span style="font-size: small;">Extra Tip 2: If you<span style="font-size: small;">r clients are <span style="font-size: small;">seeing the Network Manager <span style="font-size: small;">'Edit<span style="font-size: small;">' buttons as greyed out while connected - have a look at this workaround: http://ubuntuforums.org/showthread.php?t=1616355</span></span></span></span></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"><br />
<b>Update 07-15-2012: Test out the script I wrote to set this up automatically. Download from <a href="http://dl.dropbox.com/u/394584/heInstallFreeNX.sh.tar.gz" target="_blank">HERE</a>. Be sure to test the sha256sum of your downloaded file to ensure authenticity. The result should be: 268a735ee24171073ff97c81a320db7022c88a0597f2902f8d181b686dfbf6b9</b>
<br /><br />
Additional resources from and Credit to:</span></div>
<div style="text-align: left;">
<span style="font-size: small;"><a href="https://help.ubuntu.com/community/FreeNX" target="_blank">https://help.ubuntu.com/community/FreeNX</a></span></div>
<div style="text-align: left;">
<span style="font-size: small;"><a href="http://askubuntu.com/questions/50503/why-do-i-get-unity-instead-of-classic-when-using-nx" target="_blank">http://askubuntu.com/questions/50503/why-do-i-get-unity-instead-of-classic-when-using-nx</a> </span></div>
<br />
Cheers!<br />
<br />
Shannon VanWagner
<br />
05-10-2012
<br />
<br />
<div>
<br />
<br />
<br />
<span style="font-size: 85%;"><a href="http://www.addthis.com/bookmark.php" style="font-family: verdana;"><img alt="" border="0" height="16" src="http://s7.addthis.com/static/btn/lg-share-en.gif" style="border: 0pt none;" width="125" /></a></span> </div>
Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com31tag:blogger.com,1999:blog-8208479109120950856.post-32944974476724290792012-04-30T19:51:00.000-04:002012-04-30T19:55:26.804-04:00Easy 'mail by smarthost' SMTP server in Ubuntu 12.04 GNU/Linux<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj21IXvkomnGwMEUWt2mNMkfrJOccl3AHaEPQvuB4wY7wRTq77THMjVDznJUF7Zacq46KAQmO1gI8OHvbkR4Rdzth7y0RO2EGFwVjiztYkRBcU0iaOW3yGHjfPoOVKexVHqTK6T8a2sUYc/s1600/smtp.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj21IXvkomnGwMEUWt2mNMkfrJOccl3AHaEPQvuB4wY7wRTq77THMjVDznJUF7Zacq46KAQmO1gI8OHvbkR4Rdzth7y0RO2EGFwVjiztYkRBcU0iaOW3yGHjfPoOVKexVHqTK6T8a2sUYc/s320/smtp.gif" width="320" /></a></div>
After being tasked with setting up some servers that need to use a local MTA (Mail Transfer Agent) (via SMTP) on our internal network, I found the setup for the Ubuntu 12.04 GNU/Linux exim4 MTA to be pleasingly simple. Easy Peasy, works for me!<br />
<br />
Assuming you already have a main mail server in your organization that you can use as a "smarthost" relay, run through these simple steps and you will be up and running with a local SMTP server on your Ubuntu GNU/Linux box in no time.<br />
<br />
<br />
1.) Install the MTA package on your Ubuntu 12.04 GNU/Linux box: <br />
<br />
sudo apt-get install exim4-daemon-light<br />
<br />
2.) Configure the MTA with this command and steps, replacing somedomain.com with your mail domain name:<br />
<br />
sudo dpkg-reconfigure exim4-config<br />
<br />
<ul>
<li>Set postmaster email: <b>postmaster@somedomain.com</b></li>
<li>Select '<b>mail sent by smarthost; no local mail</b>'</li>
<li>Set somedomain.com at the "<b>System mail name</b>" screen</li>
<li>Set <b>defaults</b>(hit enter) until you get to the step below</li>
<li>Enter mail.somedomain.com for the "<b>IP address or host name of the outgoing smarthost:</b>"</li>
<li>Set <b>defaults</b> all the way to the finish</li>
</ul>
<br />
That's it! exim4 should restart and you'll be ready to test. Now wasn't that easy?<br />
<br />
Now check if the smtp server is listening on port 25 (smtp) with these terminal commands:<br />
<br />
netstat -ano |grep :25<br />
<br />
Should see something like:<br />
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN off (0.00/0/0)<br />
<br />
Test the setup by sending an email to yourself from the Terminal:<br />
<br />
echo "Yay - SMTP works" | mail -s "Test email" youremail@somedomain.com<br />
<br />
That's it! Now you're free to go and get the beverage of your choice and drink to the awesomeness of the makers of FOSS/GNU/Linux/Ubuntu.<br />
<br />
Cheers!<br />
<br />
Shannon VanWagner
<br />
04-30-2012
<br />
<div>
<span style="font-size: 85%;"></span><br />
<span style="font-size: 85%;"></span><br />
<span style="font-size: 85%;"></span><br />
<span style="font-size: 85%;"><a href="http://www.addthis.com/bookmark.php" style="font-family: verdana;"><img alt="" border="0" height="16" src="http://s7.addthis.com/static/btn/lg-share-en.gif" style="border: 0pt none;" width="125" /></a></span> </div>Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com4tag:blogger.com,1999:blog-8208479109120950856.post-24018217138637664652012-04-26T00:39:00.000-04:002012-05-10T19:57:07.514-04:00How to install NX Free Edition on Ubuntu 12.04 Precise Pangolin<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_fcaCK3X2gchPKE5z6YXB6sbapJABFzwk3CdHJUVM0Rx6h3JXTYsuDZBrazJ4jXU8hVr7PgXBY6lETUcJQn6TafRHB7c7__hUuHb5u-aNNlG7dk3QmR6au59kHSHPWfnh-8to2khAk-M/s1600/freenx_lookingGreat.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_fcaCK3X2gchPKE5z6YXB6sbapJABFzwk3CdHJUVM0Rx6h3JXTYsuDZBrazJ4jXU8hVr7PgXBY6lETUcJQn6TafRHB7c7__hUuHb5u-aNNlG7dk3QmR6au59kHSHPWfnh-8to2khAk-M/s400/freenx_lookingGreat.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Screenshot of NX client connection to Ubuntu 12.04 with NX Free</td></tr>
</tbody></table>
Ubuntu GNU/Linux comes pre-loaded with the capability to remotely connect to the graphical desktop of your machine by means of a "Desktop Sharing" utility based on the VNC protocol. Clients can connect with a VNC viewer, i.e., tightvnc, vncviewer, etc.<br />
<br />
While this may be a viable option for others, VNC has a few drawbacks that sent me looking for something a little more suited for my situation. Namely, I needed a speedy connection, and security.<br />
<br />
One problem with VNC is that it's a non-encrypted and therefore non-secure protocol. The workaround for this is to configure the server to tunnel VNC client connections through SSH sessions. Unfortunately, doing this requires extra configuration on both the server and the client.<br />
<br />
Another problem with VNC (at least one that I've experienced) is the laggy connections, which can make the user experience less than optimal.
So in my search for a better alternative, I found "NX Free Edition" by <a href="http://www.nomachine.com/">www.nomachine.com</a>.<br />
<br />
NX Free Server delivers the X Window session to clients via the encrypted SSH (Secure Shell) protocol, and it does it much faster and snappier than my experience with VNC. The only drawback of NX Free Edition is the license, as it is proprietary..<br />
<br />
Although "NX Free" edition is said to be "free forever". Looking at the license file in the .deb package, it appears there are a number of GPL-covered items there, and then some items with the proprietary license. Checkout the license for NX Free for yourself <a href="http://www.nomachine.com/ar/view.php?ar_id=AR06D00401" target="_blank">here</a>.<br />
<br />
On the subject of NX servers, there is a FreeNX server PPA for Ubuntu 12.04(and other LTS versions), it's named ppa:freenx-team . Unfortunately, at the time of this writing, the packages from the ppa:freenx-team didn't seem to work properly for me. There was some error message concerning the esound dependency package not being available for install.<br />
<br />
So, instead of FreeNX, we'll install NX Free Edition with the provided .deb installers instead. I used the 64-bit versions in my tests. Apparently, the big difference between 'FreeNX' and 'NX Free Edition' is that FreeNX is wholly FOSS and has no connection limits whereas the NX Free Edition is only partially FOSS and is limited to 2 client connections (according to the license page at the link above).<br />
<br />
Before installing the NX Free Edition pacakages from: www.nomachine.com, first install the openssh-server package from the Ubuntu repositories.<br />
<br />
sudo apt-get install openssh-server<br />
<br />
After the pre-requisite has been installed, download and install the 3 NX Free Edition components from the "NX Free Edition for Linux" section at www.nomachine.com ( packages are installed in this order: client / node / server). Example:
<br />
<blockquote>
sudo dpkg -i nxclient_3.5.0-7_amd64.deb
<br />
sudo dpkg -i nxnode_3.5.0-7_amd64.deb
<br />
sudo dpkg -i nxserver_3.5.0-9_amd64.deb</blockquote>
<br />
As for the connection to the NX Free Edition server, simply download the client from www.nomachine.com that works with your platform. There are versions for all 3 of the Major operating systems available.<br />
<br />
As of this writing, the regular Ubuntu session provided by NX Free
server doesn't quite work as expected . Not to worry, the 'ubuntu-2d' session does
work well. I'm working on getting the appropriate server-side
configuration for this so the setting won't be required at the client, but in
the mean time, the workaround is to configure the NX Free
client Session setting as follows:<br />
<blockquote>
Application > "Run the following command": gnome-session --session=ubuntu-2d<br />
<br />
Options > Enable 'New virtual desktop'</blockquote>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf62bJToaBTb8ssdp6ma945x36IVlXWYJM9GziJ7N7zM6Hk8lHlLtrUlIbueTG6qMcjUmfKYeW0UcuapNKulRLbLGrj4IrS8PXsIQJgAPKPcJtU02TSqNnhdGMfylhw9Ux1lXCGPkvzrc/s1600/nxclient2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="305" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf62bJToaBTb8ssdp6ma945x36IVlXWYJM9GziJ7N7zM6Hk8lHlLtrUlIbueTG6qMcjUmfKYeW0UcuapNKulRLbLGrj4IrS8PXsIQJgAPKPcJtU02TSqNnhdGMfylhw9Ux1lXCGPkvzrc/s400/nxclient2.png" width="400" /></a></div>
<br />
<br />
That's it. NX Free Edition works great and it's one solution to the problem of needing more security and speed over the default VNC client in Ubuntu GNU/Linux. Here's a screenshot of the client connection.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4f_ZNhCp5Lc57G_89116IfGX8brA3hOhn4cHeUwQap4VV08jVDAk3k9UdUH4b09oAuig9jhoHaPERW6zRGUoiCFH-FjkHXHS1OwyS0IAYrKZuzcNpxM3v1U3b36SK0tssl-bEXEkxloI/s1600/nxclient_running.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4f_ZNhCp5Lc57G_89116IfGX8brA3hOhn4cHeUwQap4VV08jVDAk3k9UdUH4b09oAuig9jhoHaPERW6zRGUoiCFH-FjkHXHS1OwyS0IAYrKZuzcNpxM3v1U3b36SK0tssl-bEXEkxloI/s320/nxclient_running.png" width="320" /></a></div>
<br />
<br />
Feel free to leave your comments below. If you are using Ubuntu 11.10 and are having problems with Unity at the client, see <a href="http://askubuntu.com/questions/50503/why-do-i-get-unity-instead-of-classic-when-using-nx" target="_blank">this link</a> for the workaround. For more information concerning FreeNX on Ubuntu, see <a href="https://help.ubuntu.com/community/FreeNX" target="_blank">this link</a>.<br />
<br />
<br />
<br />
Looking for the FreeNX Server installation instructions? See my post <a href="http://www.humans-enabled.com/2012/05/how-to-install-freenx-on-ubuntu-1204.html" target="_blank"> "How to install FreeNX on Ubuntu 12.04 Precise Pangolin"</a> instead.
Cheers!<br />
<br />
Shannon VanWagner
<br />
04-25-2012
<br />
<br />
<div>
<span style="font-size: 85%;"></span><br />
<span style="font-size: 85%;"></span><br />
<span style="font-size: 85%;"></span><br />
<span style="font-size: 85%;"><a href="http://www.addthis.com/bookmark.php" style="font-family: verdana;"><img alt="" border="0" height="16" src="http://s7.addthis.com/static/btn/lg-share-en.gif" style="border: 0pt none;" width="125" /></a></span> </div>Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com25tag:blogger.com,1999:blog-8208479109120950856.post-44869813856844910862012-04-05T11:08:00.000-04:002012-04-06T16:09:15.653-04:00On Helping Others Get their GNU/Linux & Consider Doing So<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7x-EgcarsTxE8nBfEK8mGJ2gduO74xh-jm0534xNB1-75xrpD8nHE8A-MO76D1Lr_PUAjIzHUUcMAlWXrHQaJAmxV1nDmq7TFZAUuVCqioQzSiUeuALaVbn7n6iGYLbk-ij7VZqrUDwU/s1600/tuxheart.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7x-EgcarsTxE8nBfEK8mGJ2gduO74xh-jm0534xNB1-75xrpD8nHE8A-MO76D1Lr_PUAjIzHUUcMAlWXrHQaJAmxV1nDmq7TFZAUuVCqioQzSiUeuALaVbn7n6iGYLbk-ij7VZqrUDwU/s320/tuxheart.gif" width="268" /></a></div>
So one day I'm looking at my Google + page and I get this notification of a message:<br />
<br />
<blockquote>
<i>"Can you help me to configure chip ralink rt2870 on Ubuntu(GNU/Linux), please?"
</i></blockquote>
<br />
I
really can't imagine at all, I mean I am absolutely dumbfounded as to
why this person would contact me.. Really, it's not like I post (on
average) 5 stories about GNU/Linux a day or anything... haha..<br />
<br />
<span class="il">Turns out the driver this person </span>needed was one <span class="il">of</span> the types where it hadn't made it into the Linux kernel just yet, but the source code was out there. And so <span class="il">a</span> module had to be built from source and installed on the machine to make the wireless adapter work.<br />
<br />
Usually these types <span class="il">of</span> problems are relatively easy to get fixed, because: a.) GNU/Linux is open source and so bugs can get fixed (or worked around) by anyone with the technical know-how, and b.) there are kind people out there that take their own time to post the specific step-by-step instructions to repair the problems. However, sometimes finding the correct "fix" to match your specific hardware configuration can be tricky. GNU/Linux has a great many tools to detect what type of hardware is in the machine, but(luckily) there are many different types of hardware out there.<br />
<br />
Aside from finding a fix that applies to your specific hardware, another problem (and this can apply to any OS), is that you can get into these situations where, if you don't
cleanly de-install previous attempts at a fix that you have made, the residual clutter can mess things up for anything new that
you're trying to install. When this happens, a crucial ingredient to success can sometimes be lost. That is, the "faith" in a person that they actually can fix the problem in the first place.<br />
<br />
So, as it turns out, this person needed to
remove the older (and incorrect version) driver that he had installed (
sudo make uninstall from within the source folder ), then start fresh, rebuilding the driver from the correct source, installing the driver, and configuring things correctly for use. I'm fairly certain this person could have knocked this out, had they de-installed the incorrect version they had on their machine and taken a few more steps.<br />
<br />
<br />
So I respond:<br />
<br />
<blockquote>
<i>"Which rt2870? Is it the USB stick? Also, which Ubuntu,
is it 10.04? If both true then according to this article, you need to
blacklist a module, along with a few other seemingly ugly things: <a class="ot-anchor" href="http://linuxforums.org.uk/index.php?topic=852.0">http://linuxforums.org.uk/index.php?topic=852.0</a> (Thanks to: Mark Greaves for posting there ) and <a class="ot-anchor" href="http://ubuntuforums.org/showthread.php?t=960642">http://ubuntuforums.org/showthread.php?t=960642</a> (Thanks to: Nilsa5 for posting there). But,
we'd want to see exactly what you have in terms of wireless adapter and
version of Ubuntu before we jump in. You can see the version of Ubuntu
with the terminal command 'cat /etc/issue', and the kernel with 'uname
-r' or 'uname -a' to show whether you have 32bit or 64bit, and if you
have a built-in wireless adapter 'sudo lspci |grep -i network' or USB
adapter 'sudo lsusb |grep -i network'. Also, you could see which module
is loaded with 'sudo lsmod | grep rt2870sta' or 'sudo lsmod | grep
rt2800usb'."</i></blockquote>
<br />
<span class="kH">And after some back and forth, I figured we could save time if I were just to connect to this person's machine and help him fix the problem directly. This is another place where the free stuff comes in, this time it's <a href="http://www.teamviewer.com/" target="_blank">teamviewer.com</a> (Teamviewer is one of those</span> cross-platform-compatible applications where I could control the remote computer and they
could see what I am doing at the same time)<span class="kH">. There are definitely FOSS alternatives to this, like VNC server/client (some setup required), or we could have used Google Chrome Remote Desktop instead of course. But to me, the main thing is that I only use tools that are cross-platform-compatible(this is a must), and in this case, free of charge.</span><br />
<span class="kH"><br /></span><br />
How awesome is it that there are FOSS/GNU/Linux supporting individuals and and companies out there that continue to help to make GNU/Linux better for all of us?
Very awesome indeed I say. And also how great is it that some other FOSS-supporting
companies (and a few Freeware ones too ) are outright handing us all the tools we
need to provide one another support for Technical issues for Free?! Fabulous! How cool is
that? So by helping this person get their wireless up and running,
that's how I contribute to GNU/Linux/FOSS myself. This brings me great
satisfaction, not only as a technologist, but it's also a great feeling to be able to help someone else free themselves from the
dungeons of the coercive monopolists and their restrictive software.
<br />
<br />
So anyway, when I get connected
to this person's computer, I am <span class="il">a</span> bit surprised
that my left click on the mouse was reversed to the right click! And
the person apparently had the language setup for something totally different than mine.
Talk about adding <span class="il">a</span> layer <span class="il">of</span> difficulty! What a nice delicious challenge! So then I bring up the gedit on his machine and type to him <span class="il">a</span> message, and it's in this foreign language.. So I'm thinking, that's not going to work.. so then I open his web browser and navigate to <a href="http://google.com/translate" target="_blank">google.com/translate</a> (another awesome FREE tool), and we proceeded to use that to communicate, right there on his computer, for the rest <span class="il">of</span>
the time.<br />
<br />
So, working at the command line, I'm already knowing what
commands to use, and so I'm cranking away, de-installing the older
driver, checking to ensure dependencies are installed, compiling the new
driver, installing the new driver. Then, after some rmmod, insmod, and
reboot between.. voila! The driver is finally working! The person, having watched how easy it was, and now seeing that his wireless was working perfectly, was elated and Thanked me profusely. This is a very delightful aspect of FOSS in my eyes, to be helping others and not having to call into some paid-for "support case" because the proprietary OSes come with no warranty.<br />
<br />
Recapping it all, the point I wanted to make is how very proud that I was to be able to help a fellow human being with their GNU/Linux. If you have tried GNU/Linux, and have figured out something worth sharing, I suggest you do as well. But you don't have to be a technical person to do good things for FOSS/GNU/Linux. Nope. You can help by simply telling others your stories. Post them on your blog, mention them in comments, correct those nay-sayers, yell it from rooftops! Also, I want to say that I am grateful for FOSS/GNU/Linux, all the people that make those possible, and also for the free tools like Google+, Google Translate, Teamviewer, etc. (the list is exhaustive). Helping others (and ourselves) is the spirit of Technology! Don't let some profiteering, coercive monopolist change your mode of thinking.<br />
<br />
<br />
<br />
Cheers!<br />
Shannon VanWagner<br />
04/05/2012<br />
<br />
FREE YOURSELF, Use GNU+LINUX+FOSS! <a href="http://gnu.org/" target="_blank">gnu.org</a> | <a href="http://fsf.org/" target="_blank">fsf.org</a> | <a href="http://linux.com/" target="_blank">linux.com</a> | <a href="http://getgnulinux.org/" target="_blank">getgnulinux.org</a> | <a href="http://ubuntuguide.org/" target="_blank">ubuntuguide.org</a> | <a href="http://whylinuxisbetter.net/" target="_blank">whylinuxisbetter.net</a> | <a href="http://documentfoundation.org/" target="_blank">documentfoundation.org</a> | <a href="http://humans-enabled.com/" target="_blank">humans-enabled.com</a> | <a href="http://ubuntu.com/" target="_blank">ubuntu.com</a> | <a href="http://distrowatch.com/" target="_blank">distrowatch.com</a> | <a href="http://makethemove.net/" target="_blank">makethemove.net</a> | <a href="http://livecdlist.com/" target="_blank">livecdlist.com</a> | <a href="http://code.google.com/opensource" target="_blank">code.google.com/opensource</a> | <a href="http://sourceforge.net/" target="_blank">sourceforge.net</a> <br />
<div>
<span style="font-size: 85%;"></span><br />
<span style="font-size: 85%;"></span><br />
<span style="font-size: 85%;"></span><br />
<span style="font-size: 85%;"><a href="http://www.addthis.com/bookmark.php" style="font-family: verdana;"><img alt="" border="0" height="16" src="http://s7.addthis.com/static/btn/lg-share-en.gif" style="border: 0pt none;" width="125" /></a></span> </div>Shannon VanWagnerhttp://www.blogger.com/profile/00902572387191538052noreply@blogger.com2