<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4523667190511269416</id><updated>2024-09-05T03:30:02.351+02:00</updated><title type='text'>Remind-Nix</title><subtitle type='html'>Linux Howtos, tutorials and guides</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-6912045300920290224</id><published>2011-01-16T14:48:00.005+01:00</published><updated>2011-01-16T16:54:58.697+01:00</updated><title type='text'>Installing MySQLdb - the &#39;easy&#39; way</title><content type='html'>Just a quick reminder. &lt;br /&gt;If MySQL is installed in non-default directory like &#39;/opt/mysql&#39; the usual &lt;i&gt;&lt;b&gt;sudo easy_install MySQL-python&lt;/b&gt;&lt;/i&gt; (or similar) won&#39;t work. Instead download the tarball package and extract it. In the source directory find the file named &#39;site.cfg&#39; and edit the line&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;#mysql_config = /usr/local/bin/mysql_config&lt;/pre&gt;&lt;br /&gt;to&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;mysql_config = /path/to/optional/bin/mysql_config&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;EDIT:&lt;/b&gt;&lt;br /&gt;There is more convenient solution to this problem. No need to change the site.cfg file. If symlink to mysql_config file is created in /usr/bin directory, &lt;i&gt;easy_install&lt;/i&gt; will run fine. &lt;br /&gt;But I faced another (apparently famous) problem:&lt;br /&gt;&lt;pre&gt;&gt;&gt;&gt; import MySQLdb&lt;br /&gt;Traceback (most recent call last):&lt;br /&gt;  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;&lt;br /&gt;  File &quot;build/bdist.linux-x86_64/egg/MySQLdb/__init__.py&quot;, line 19, in &lt;module&gt;&lt;br /&gt;  File &quot;build/bdist.linux-x86_64/egg/_mysql.py&quot;, line 7, in &lt;module&gt;&lt;br /&gt;  File &quot;build/bdist.linux-x86_64/egg/_mysql.py&quot;, line 6, in __bootstrap__&lt;br /&gt;ImportError: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;... which i fixed typing line:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;/opt/mysql/lib&lt;/pre&gt; &lt;br /&gt;... in /etc/ld.so.conf file and running: &lt;pre&gt;$ sudo ldconfig&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Lets see if Django works now? YEP!</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/6912045300920290224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/6912045300920290224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/6912045300920290224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/6912045300920290224'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2011/01/mysqldb-installing-for-non-default.html' title='Installing MySQLdb - the &#39;easy&#39; way'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-5646890500644161488</id><published>2010-12-21T18:39:00.003+01:00</published><updated>2010-12-21T19:45:08.048+01:00</updated><title type='text'>Visudo editing</title><content type='html'>Visudo is a command that opens &lt;i&gt;/etc/sudoers&lt;/i&gt; file for editing. Editing sudoers file is essensial if for some reason user needs to be able to execute superuser commands via &lt;i&gt;sudo&lt;/i&gt; command. Simple example line to put in &lt;i&gt;/etc/sudoers&lt;/i&gt; file might be:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;user ALL=(ALL) ALL&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here, &lt;b&gt;user&lt;/b&gt; is the username of the user that is being assigned the privilege. For this to apply to a group of users on the machine you would prefix the name with a &lt;i&gt;%&lt;/i&gt; (%user). First &lt;b&gt;ALL&lt;/b&gt; entry represents the hosts that these permissions apply to. ALL option is always safe to use if the system is local. Second &lt;b&gt;ALL&lt;/b&gt; entry in brackets defines what user the first user is applying the command as. In this example ALL option means that &lt;i&gt;user&lt;/i&gt; can execute commands as any other user on system. Last &lt;b&gt;ALL&lt;/b&gt; entry is a comma separated list of commands that the &lt;i&gt;user&lt;/i&gt; will have access to. ALL means that user can execute any command that is privileged to user listed in second entry. Overall, this line is saying &lt;i&gt;user&lt;/i&gt; can execute any command as any user on every host on the system simply by providing its password.&lt;br /&gt;&lt;br /&gt;Personally, I use the above line on my system, simply because i&#39;m the only user on it and it saves me time, but it isn&#39;t really safe on multiuser systems. Another example can be:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;user ALL=(root) /usr/bin/apt-get, /sbin/halt&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here, the &lt;i&gt;user&lt;/i&gt; can only use apt-get and halt commands as root user using &lt;i&gt;sudo&lt;/i&gt;.</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/5646890500644161488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/5646890500644161488' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/5646890500644161488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/5646890500644161488'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2010/12/visudo-editing.html' title='Visudo editing'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-2467034125661414389</id><published>2010-08-07T03:29:00.008+02:00</published><updated>2010-08-07T04:23:52.785+02:00</updated><title type='text'>Using &#39;checkinstall&#39; tool with python source packages</title><content type='html'>Most python modules can be installed using a package management program. Important thing is, this modules can easily be uninstalled the same way. But if a module is only available as &lt;i&gt;gzipped tar file (.tar.gz)&lt;/i&gt; source, installation is done using:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ sudo python setup.py install&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;But there is no &lt;b&gt;uninstall&lt;/b&gt; option and the manual removal of the files seems the only way.&lt;br /&gt;Today I stumbled on the &lt;b&gt;checkinstall&lt;/b&gt; tool. Here&#39;s what the manual say:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;checkinstall is a program that monitors an installation procedure (such as make install,  install.sh),  and  creates  a  standard package for your distribution (currently deb, rpm and tgz packages are supported) that you can install through your distribution&#39;s package management system (dpkg, rpm  or installpkg).&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Good thing it can also be used on python source packages, and it&#39;s really easy:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ sudo checkinstall python setup.py install&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This will prompt user for some answers and best thing is to use the default ones (in other words, just press enter). After this &lt;b&gt;checkinstall&lt;/b&gt; will create a standard package file, and install it, in my case a &lt;i&gt;.deb&lt;/i&gt; package. The module can now be uninstalled easily with a package management program.</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/2467034125661414389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/2467034125661414389' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/2467034125661414389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/2467034125661414389'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2010/08/using-checkinstall-tool-with-python.html' title='Using &#39;checkinstall&#39; tool with python source packages'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-6301315292336199356</id><published>2010-08-05T00:10:00.007+02:00</published><updated>2010-12-21T19:06:23.394+01:00</updated><title type='text'>Debian: Setting Up JAVA - &#39;update-alternatives&#39;</title><content type='html'>Got back to using Linux for a while now and I came up with some new stuff to put here. So this will be some kinda comeback to blogging since 2008.&lt;br /&gt;This post will be adition to my last one about &lt;a href=&quot;http://remind-nix.blogspot.com/2008/10/choosing-which-version-of-java-jre.html&quot;&gt;using update-alternatives command to setup which java VM your Debian system should use&lt;/a&gt;. Using this method is sometimes good enough, but for manual installation of java it won&#39;t work.&lt;br /&gt;Let&#39;s say the java VM is unpacked as:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;/opt/jdk1.5.0_09/&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To succesfully use this version as default one the java command needs to be installed as a alternative first:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo update-alternatives --install /usr/bin/java java /opt/jdk1.5.0_09/bin/java 500&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The last argument in the command is priority and it is mandatory. Priority is used when automatic mode for the link group is set. Any random number will do, for example &#39;500&#39;. Personally I don&#39;t know much about this so I won&#39;t go any further.&lt;br /&gt;&lt;br /&gt;Last thing to do is executing one of this commands to use freshly installed java as default:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo update-alternatives --set java /opt/jdk1.5.0_09/bin/java&lt;br /&gt;sudo update-alternatives --config java&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That&#39;s all from me. Hope it helped someone.</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/6301315292336199356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/6301315292336199356' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/6301315292336199356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/6301315292336199356'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2010/08/debian-setting-up-java-with-update.html' title='Debian: Setting Up JAVA - &#39;update-alternatives&#39;'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-1017039623395174673</id><published>2008-10-28T22:15:00.003+01:00</published><updated>2010-08-05T16:52:08.916+02:00</updated><title type='text'>Choosing which version of Java JRE system should use</title><content type='html'>Sometimes a number of various Java Runtime Environment versions is needed to be installed on a Linux system. To chose which one to use as a default use this command:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo update-alternatives --config java&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;An output like this will show up:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;There are 6 alternatives which provide `java&#39;.&lt;br /&gt;&lt;br /&gt;  Selection    Alternative&lt;br /&gt;-----------------------------------------------&lt;br /&gt;          1    /usr/bin/gij-4.3&lt;br /&gt;          2    /usr/lib/jvm/java-gcj/jre/bin/java&lt;br /&gt;          3    /usr/lib/jvm/java-6-sun/jre/bin/java&lt;br /&gt;*         4    /usr/lib/jvm/java-1.5.0-sun/jre/bin/java&lt;br /&gt; +        5    /usr/lib/jvm/java-6-openjdk/jre/bin/java&lt;br /&gt;          6    /usr/bin/gij-4.2&lt;br /&gt;&lt;br /&gt;Press enter to keep the default[*], or type selection number:&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;All to do here is enter the number of the selection next to the alternative JRE name and press enter.&lt;br /&gt;&lt;br /&gt;Hope this was helpful. Enjoy.</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/1017039623395174673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/1017039623395174673' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/1017039623395174673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/1017039623395174673'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/10/choosing-which-version-of-java-jre.html' title='Choosing which version of Java JRE system should use'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-3094378948916751048</id><published>2008-10-28T14:13:00.003+01:00</published><updated>2010-08-05T16:52:39.777+02:00</updated><title type='text'>Schedule fsck program to check disks on next reboot</title><content type='html'>It&#39;s not save to run &lt;b&gt;fsck (file system check)&lt;/b&gt; while the disks are mounted. But it can be scheduled to run check on the next reboot simply by creating a file named &lt;b&gt;&#39;forcefsck&#39;&lt;/b&gt; on he root partition. Like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ sudo touch /forcefsck&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/3094378948916751048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/3094378948916751048' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/3094378948916751048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/3094378948916751048'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/10/schedule-fsck-program-to-check-disks-on.html' title='Schedule fsck program to check disks on next reboot'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-6775722421956992029</id><published>2008-09-19T12:23:00.004+02:00</published><updated>2010-08-05T16:54:11.045+02:00</updated><title type='text'>OpenSUSE: Install RPM packages with zypper CLI tool</title><content type='html'>Open Suse Linux uses RPM packages for software installation. Those files end in &lt;strong&gt;.rpm extension&lt;/strong&gt;.&lt;br /&gt;Most Suse users are familiar with the YaST graphic interface, but sometimes the quicker way to install a RPM package is from command line with the tool named &lt;strong&gt;zypper&lt;/strong&gt;. This tool is similar to &lt;strong&gt;apt-get&lt;/strong&gt; tool that Debian users use to install .deb packages and it uses already configured repositories to fetch packages. I&#39;ll explain its basic usage here.&lt;br /&gt;All &lt;strong&gt;zypper&lt;/strong&gt; commands have its longer and readable variant, and its shorter and less readable one. Commands for installing, removing and updating software needs root privileges.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Commands for &lt;strong&gt;software management&lt;/strong&gt;:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:135%;&quot;&gt;&lt;strong&gt;Installing software&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ zypper install [package name]&lt;br /&gt;$ zypper in [package name]&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:135%;&quot;&gt;&lt;strong&gt;Removing software&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ zypper remove [package name]&lt;br /&gt;$ zypper rm [package name]&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:135%;&quot;&gt;&lt;strong&gt;Updating all installed software&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ zypper update&lt;br /&gt;$ zypper up&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:135%;&quot;&gt;&lt;strong&gt;Distribution upgrade&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ zypper dist-upgrade&lt;br /&gt;$ zypper dup&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note: All of the above commands require root priviledeges.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Commands for &lt;strong&gt;software querying&lt;/strong&gt;:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:135%;&quot;&gt;&lt;strong&gt;Search for packages matching a pattern&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ zypper search [pattern]&lt;br /&gt;$ zypper se [pattern]&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:135%;&quot;&gt;&lt;strong&gt;Show package information&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ zypper info [package]&lt;br /&gt;$ zypper se [package]&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Commands for &lt;strong&gt;repository management&lt;/strong&gt;:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:135%;&quot;&gt;&lt;strong&gt;List all repositories&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ zypper repos&lt;br /&gt;$ zypper lr&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;For all other commands and help type:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ zypper --help&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/6775722421956992029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/6775722421956992029' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/6775722421956992029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/6775722421956992029'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/09/open-suse-linux-uses-rpm-packages-for.html' title='OpenSUSE: Install RPM packages with zypper CLI tool'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-4776873344496765001</id><published>2008-09-17T02:38:00.008+02:00</published><updated>2010-08-05T17:06:59.719+02:00</updated><title type='text'>Vim feature that makes editing easier</title><content type='html'>Vim, along with the Emacs is the best free text editing choice in the Linux and OSS world. It has tons of features and improvements that can make text editing a lot easier and faster. I&#39;ll mention some of its features on the blog that I use the most.&lt;br /&gt;This post is not a beginners tutorial or guide and I&#39;m assuming that the reader has basic Vim knowledge such as entering/exiting insert mode, basic movement keys etc.&lt;br /&gt;So let&#39;s get started.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:135%;&quot;&gt;&lt;b&gt;One word replacement&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let&#39;s assume we have this line of text in our file:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Nikola Tesla was tha greatest engineer in tha world&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Assume that the Vim is in the command mode and that the cursor is on the letter &#39;w&#39; of the word &#39;world&#39; also. This line has two typos in it an that is the &#39;tha&#39; words. We need to substitute that typos with the right word &#39;the&#39;. In the Vim editor that is done easily with the simple &lt;b&gt;ex&lt;/b&gt; command:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;:s/tha/the/g&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;First letter &lt;b&gt;s&lt;/b&gt; of this command means &lt;b&gt;substitute&lt;/b&gt;. Expression after the first slash presents the text we need to replace, and the second expression after the second slash presents the text to substitute with. Finally the letter &#39;g&#39; in this command after the last slash says vim to replace every &#39;tha&#39; occurrence in the line with the right word &#39;the&#39;.&lt;br /&gt;But what if we use the above command on this kinda sentence?&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Nikola Tesla was tha greatest engineer in thailand&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;First three letters of the word &#39;thailand&#39; will be substituted as well; the word &#39;thailand&#39; is also a typo here cause it needs to start with the capital letter, but ignore that for now. The problem can be fixed with regular expressions that can be used in vim during a text search. Regular expressions are complex topic and I&#39;m not gonna explain them here in depth. Let&#39;s just say that &lt;b&gt;\&amp;lt&lt;/b&gt; and &lt;b&gt;\&amp;gt&lt;/b&gt; can be used to mark start and end end of the word respectively, and our &lt;b&gt;ex&lt;/b&gt; command would look like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;:s/\&amp;lt;tha\&amp;gt;/the/g&lt;/tha\&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This command works only on the line in witch cursor resides. To substitute each and every &lt;b&gt;bad&lt;/b&gt; occurrence with &lt;b&gt;new&lt;/b&gt; in the file this command is used:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;:%s/bad/new/g&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Read the &lt;b&gt;&#39;%&#39;&lt;/b&gt; character as: do the commands on the whole file.&lt;br /&gt;Substitutions that needs to be done from line 1 to 10 for example is used like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;:1,10s/bad/new/g&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Isn&#39;t Vim great?</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/4776873344496765001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/4776873344496765001' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/4776873344496765001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/4776873344496765001'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/09/vim-feature-that-makes-editing-easier-1.html' title='Vim feature that makes editing easier'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-3929743738536295034</id><published>2008-09-11T01:35:00.004+02:00</published><updated>2010-08-05T17:07:23.214+02:00</updated><title type='text'>Find command: &#39;-exec&#39; action</title><content type='html'>There is a way to execute a command on each file using &lt;b&gt;find&lt;/b&gt; and it is done with the &lt;b&gt;-exec&lt;/b&gt; action argument.&lt;br /&gt;&lt;br /&gt;For example, removing all backup files under the &#39;/&#39; directory and its subdirectories is done like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ find / -name &#39;*~&#39; -exec rm &#39;{}&#39; \;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This means: execute &lt;b&gt;rm&lt;/b&gt; command on each filename that ends with &#39;~&#39; on file system. The &lt;b&gt;&#39;{}&#39;&lt;/b&gt; part of the command is replaced with the filenames that are found during execution, and escaped semicolon (\;) at the end represents the end of the -exec action argument.</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/3929743738536295034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/3929743738536295034' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/3929743738536295034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/3929743738536295034'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/09/find-command-exec-action.html' title='Find command: &#39;-exec&#39; action'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-5043842198624331949</id><published>2008-08-21T16:39:00.010+02:00</published><updated>2010-08-05T17:08:22.072+02:00</updated><title type='text'>openSUSE: Installing flash player plugin on any internet browser</title><content type='html'>Download Flash Player installer in .tar.gz format from &lt;a href=&quot;http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&quot;&gt;this site&lt;/a&gt;. Run these commands in the directory where you saved the archive:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;~&gt; tar -xvvzf install_flash_player_9_linux.tar.gz&lt;br /&gt;~&gt; cd install_flash_player_9_linux&lt;br /&gt;~&gt; sudo cp libflashplayer.so /usr/lib/browser-plugins&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Enter root&#39;s password, restart any running internet browser and that&#39;s it. Worked for me for Firefox.</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/5043842198624331949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/5043842198624331949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/5043842198624331949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/5043842198624331949'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/08/opensuse-installing-flash-player-plugin.html' title='openSUSE: Installing flash player plugin on any internet browser'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-546079688680698534</id><published>2008-08-18T17:24:00.001+02:00</published><updated>2010-08-05T17:08:50.322+02:00</updated><title type='text'>Ubuntu: Installing Truetype Fonts (TTF)</title><content type='html'>To install basic &lt;b&gt;Microsoft TrueType Fonts&lt;/b&gt; such as Arial, Courier, Impact, Times New Roman etc. you need to &lt;a href=&quot;http://www.ubuntugeek.com/how-to-enable-the-universe-and-multiverse-repositories-in-ubuntu-804-hardy.html&quot;&gt;enable the &quot;Universe repositories&quot;&lt;/a&gt; and install the &lt;b&gt;msttcorefonts&lt;/b&gt; package:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ sudo apt-get install msttcorefonts&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;New fonts will appear under the &lt;i&gt;/usr/share/fonts/truetype/msttcorefonts&lt;/i&gt; directory.&lt;br /&gt;Truetype fonts can also be installed by simply copying the &lt;b&gt;.ttf&lt;/b&gt; files in some subdirectory under the &lt;i&gt;/usr/share/fonts/truetype/&lt;/i&gt;.&lt;br /&gt;For example, If you downloaded some &lt;i&gt;&lt;b&gt;neat&lt;/b&gt;&lt;/i&gt; TTF fonts over the internet, you can install them like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;neat_fonts$ sudo mkdir /usr/share/fonts/truetype/neat&lt;br /&gt;neat_fonts$ sudo cp *.ttf /usr/share/fonts/truetype/neat&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Note: Name the subdirectory under /usr/share/fonts/truetype/ as you wish; &quot;neat&quot; is just for demonstrating purpose&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Log out and than login again to be able to use new fonts or just run this command to regenerate the fonts cache:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ sudo fc-cache -fv&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Those fonts will now be accessible to any user on the Ubuntu system.</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/546079688680698534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/546079688680698534' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/546079688680698534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/546079688680698534'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/08/ubuntu-installing-truetype-fonts-ttf.html' title='Ubuntu: Installing Truetype Fonts (TTF)'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-8803601423488944290</id><published>2008-08-13T00:26:00.001+02:00</published><updated>2010-08-05T17:09:07.923+02:00</updated><title type='text'>How to setup OpenDNS on Linux</title><content type='html'>Check the &lt;a href=&quot;http://www.opendns.com/&quot;&gt;OpenDNS webpage&lt;/a&gt; for more information of its services. Here, I&#39;ll just explain how to configure your network and switch over to the OpenDNS servers.&lt;br /&gt;&lt;br /&gt;Use your favorite text editor and open the &lt;i&gt;&lt;b&gt;/etc/resolv.conf&lt;/i&gt;&lt;/b&gt; file &lt;b&gt;as root&lt;/b&gt; and change the nameserver lines to:&lt;br /&gt;&lt;pre&gt;nameserver 208.67.222.222&lt;br /&gt;nameserver 208.67.220.220&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now it is needed to flush any cached addresses on the computer. Type this command:&lt;br /&gt;&lt;pre&gt;sudo /etc/init.d/networking restart&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That will also restart all the networking services.&lt;br /&gt;Check &lt;a href=&quot;http://www.opendns.com/welcome&quot;&gt;this website&lt;/a&gt; to check that you switched. If you get &quot;Oops!&quot; try again. :)</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/8803601423488944290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/8803601423488944290' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/8803601423488944290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/8803601423488944290'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/08/how-to-setup-opendns-on-linux.html' title='How to setup OpenDNS on Linux'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-6720991617723527425</id><published>2008-08-10T19:13:00.002+02:00</published><updated>2010-08-05T17:09:44.559+02:00</updated><title type='text'>Installing Internet Explorer on Linux / Ubuntu</title><content type='html'>Someone would ask: &quot;Why would I need IE on Linux cause I got the newest and best browser ever called Firefox already installed?&quot; :)&lt;br /&gt;Sometimes the IE is necessary for web designers working on Linux to test their pages, or to browse sites that don&#39;t open in any browser except the IE.&lt;br /&gt;Here I will explain how to install IE7 on Ubuntu box. Actually only the IE7 rendering engine will be installed on IE6 interface. I did this on my Ubuntu Hardy Linux installation, but the procedure should work on any Debian based distro.&lt;br /&gt;Start by adding two new repositories:&lt;br /&gt;&lt;pre&gt;$ sudo gedit /etc/apt/sources.list&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Add (or uncomment) those two new lines:&lt;br /&gt;&lt;pre&gt;deb http://us.archive.ubuntu.com/ubuntu hardy universe&lt;br /&gt;deb http://wine.budgetdedicated.com/apt hardy main&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Note: If using Ubuntu Gutsy type &lt;b&gt;gutsy&lt;/b&gt; instead &lt;b&gt;hardy&lt;/b&gt; in those two lines above.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Next, add the winebudget GPG key and install/upgrade &lt;b&gt;wine&lt;/b&gt; and &lt;b&gt;cabextract&lt;/b&gt; packages:&lt;br /&gt;&lt;pre&gt;$ wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -&lt;br /&gt;$ sudo apt-get update&lt;br /&gt;$ sudo apt-get install cabextract wine&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now, download IEs4Linux and install it:&lt;br /&gt;&lt;pre&gt;$ wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz&lt;br /&gt;$ tar zxvf ies4linux-latest.tar.gz&lt;br /&gt;$ cd ies4linux-*&lt;br /&gt;$ ./ies4linux --hack-ie7-proxy-settings&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Check the versions of IE you want to install and also check to install flash plugin. If you get some kinda error try it without flash plugin.&lt;br /&gt;Click &lt;b&gt;Advanced&lt;/b&gt; button and check the box at the bottom to install version 7.0. Click OK and than OK again. When the IE6 is installed it will run. You need to configure your proxy settings now in the Internet Options dialog. Once done, close the browser and the installation of IE7 rendering engine should continue.&lt;br /&gt;If the installation of IE7 won&#39;t continue try without the proxy hack argument &lt;i&gt;--hack-ie7-proxy-settings&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;That&#39;s it.</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/6720991617723527425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/6720991617723527425' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/6720991617723527425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/6720991617723527425'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/08/installing-internet-explorer-ubuntu.html' title='Installing Internet Explorer on Linux / Ubuntu'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-8428846008610912693</id><published>2008-08-09T17:34:00.001+02:00</published><updated>2010-08-05T17:10:12.271+02:00</updated><title type='text'>Search &amp; Play YouTube videos in Totem Movie Player / Ubuntu</title><content type='html'>First think to do is to install appropriate &lt;i&gt;gstreamer&lt;/i&gt; plugins. Use the apt-get command:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ sudo apt-get install gstreamer0.10-plugins-bad&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Next, open up the Totem Movie Player. You can start it with the &lt;b&gt;totem &amp;amp;&lt;/b&gt; command in the CLI (command line interface) or from the desktop menu. On Ubuntu it can be found under Application -&gt; Sound &amp;amp; Video -&gt; Movie Player. If you don&#39;t have Totem install it the usual way of installing software packages.&lt;br /&gt;Under the player&#39;s &lt;b&gt;Edit..&lt;/b&gt; menu select &lt;b&gt;Plugins..&lt;/b&gt;. New window will pop and under it check the box next to &lt;b&gt;YouTube browser&lt;/b&gt;. The new sidebar should become visible. Something like this:&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://2.bp.blogspot.com/_p2_APOwEK-Y/SJ3Bqxsz24I/AAAAAAAAANU/Qqi7R6e6qrA/s320/youtube_totem.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5232551282714336130&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;It is also possible to install YouTube H.264 plugin for better quality. Download archive file from &lt;a href=&quot;http://www.soccio.it/code/totem/youtubeh264.tar.gz&quot;&gt;here&lt;/a&gt;, and extract the files in the:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/usr/lib/totem/plugins&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;enjoy.</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/8428846008610912693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/8428846008610912693' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/8428846008610912693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/8428846008610912693'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/08/search-play-youtube-videos-in-totem.html' title='Search &amp; Play YouTube videos in Totem Movie Player / Ubuntu'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_p2_APOwEK-Y/SJ3Bqxsz24I/AAAAAAAAANU/Qqi7R6e6qrA/s72-c/youtube_totem.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-8767380890622290615</id><published>2008-08-09T16:53:00.001+02:00</published><updated>2010-08-05T17:10:27.962+02:00</updated><title type='text'>apt-get command</title><content type='html'>Most &lt;b&gt;Debian Linux&lt;/b&gt; are already familiar with the apt-get command. For those unfamiliar with it here&#39;s a short description.&lt;br /&gt;&lt;br /&gt;apt-get is a command-line tool for handling Debian Linux packages and it is used to install/remove individual packages, upgrade packages, apply patches, upgrade debian distribution, download .deb files etc. This command is a frontend to manyy GUI applications such as &lt;b&gt;&quot;Synaptic Package Manager&quot;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:120%;&quot;&gt;&lt;b&gt;&lt;u&gt;Install or upgrade package&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ apt-get install [package name]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:120%;&quot;&gt;&lt;b&gt;&lt;u&gt;Remove a package&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ apt-get remove [package name]&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:120%;&quot;&gt;&lt;b&gt;&lt;u&gt;Remove a package and its configuration files&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use this if 100% sure that the package will not be used never again :)&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ apt-get --purge remove [package name]&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:120%;&quot;&gt;&lt;b&gt;&lt;u&gt;Upgrade a package&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will list all possible software upgrades. If you wish to upgrade them all hit the &#39;y&#39; key:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ apt-get upgrade&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To upgrade single package use the &lt;b&gt;&#39;install&#39;&lt;/b&gt; argument option.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:120%;&quot;&gt;&lt;b&gt;&lt;u&gt;Distribution upgrade&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Intelligently handles changing dependencies with new versions of packages; apt-get has a &quot;smart&quot; conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ apt-get dist-upgrade&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;note: use auto-complete command line feature if you don&#39;t know full package name. It is done using the &amp;lt;TAB&amp;gt; key.&lt;/i&gt;</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/8767380890622290615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/8767380890622290615' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/8767380890622290615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/8767380890622290615'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/08/apt-get-and-dpkg-command.html' title='apt-get command'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-4757338953353052603</id><published>2008-07-29T22:13:00.001+02:00</published><updated>2010-08-05T17:10:43.467+02:00</updated><title type='text'>Installing Apache2 server with PHP and MySQL support</title><content type='html'>Today I wanted to try out and start learning PHP scripting language a bit. PHP is server-side scripting language so for it to work I need a server that supports it. Apache web server is widely used with PHP so I&#39;m going for that combo. Also, I would like to have a MySQL database support.&lt;br /&gt;Here&#39;s how I did that on Ubuntu 8.04 LTS. Googling around I found that the wanted combo is named LAMP (Linux-Apache-MySQL-PHP) task and it can be installed using &lt;b&gt;tasksel&lt;/b&gt; command:&lt;br /&gt;&lt;pre&gt;sudo tasksel install lamp-server&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;But unfortunately it gave me an error:&lt;br /&gt;&lt;pre&gt;tasksel: aptitude failed (100)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Is it a bug or something wrong with my machine? Anyone has an answer please comment.&lt;br /&gt;So I turned to the good old &lt;b&gt;apt-get&lt;/b&gt;:&lt;br /&gt;&lt;pre&gt;sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server libapache2-mod-auth-mysql&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;After the installation you&#39;ll be asked for MySQL &#39;root&#39; user password. Enter it and don&#39;t forget! :) Now, the Apache server can be started with:&lt;br /&gt;&lt;pre&gt;$ sudo /etc/init.d/apache2 start&lt;br /&gt;apache2: Could not reliably determine the server&#39;s fully qualified domain name, using 127.0.1.1 for ServerName&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To hide this strange &quot;Could not... &quot; message you need to create a file &lt;b&gt;&lt;i&gt;/etc/apache2/conf.d/fqdn&lt;/b&gt;&lt;/i&gt; and put this line in it:&lt;br /&gt;&lt;pre&gt;ServerName localhost&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now to check functionality create a &#39;test.php&#39; in the &lt;b&gt;/var/www/&lt;/b&gt; directory with the line:&lt;br /&gt;&lt;pre&gt;&amp;lt?php phpinfo();?&amp;gt&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Open up your browser and type &lt;b&gt;http://localhost/test.php&lt;/b&gt; in the address bar. If you get something like this:&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://lh4.ggpht.com/tvrtkom/SI-CpTE7MmI/AAAAAAAAANM/ovoAvhdtwRU/s144/phpinfo.gif&quot; /&gt;&lt;br /&gt;&lt;br /&gt;you did it!&lt;br /&gt;For configuring databases, user privileges etc. there is an application called &lt;b&gt;&quot;phpmyadmin&quot;&lt;/b&gt; that really ease the job.</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/4757338953353052603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/4757338953353052603' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/4757338953353052603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/4757338953353052603'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/07/installing-apache2-server-with-php-and.html' title='Installing Apache2 server with PHP and MySQL support'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-8276476034757047153</id><published>2008-07-09T13:12:00.001+02:00</published><updated>2010-08-05T17:11:02.302+02:00</updated><title type='text'>Mounting bin/cue files in Linux</title><content type='html'>It&#39;s impossible to mount .bin/.cue files in Linux with the &lt;i&gt;&#39;mount&#39;&lt;/i&gt; command. Bin/cue files always come in pairs; bin file is the raw image of a cd, and the cue file specifies the mode in which a cd is written and the number of bytes per sector in the image (bin) file.&lt;br /&gt;There are two methods for mounting bin/cue files. First is to convert bin/cue file to iso than burn it, and the second is to try mounting it directly with some other software tools.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;font size=&quot;2&quot;&gt;&lt;u&gt;Converting to iso with bchunk&lt;/u&gt;&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;One of the commands for converting bin/cue image to .iso image is &lt;b&gt;bchunk&lt;/b&gt;. If you don&#39;t have it installed already type:&lt;pre&gt;sudo apt-get install bchunk&lt;/pre&gt;&lt;br /&gt;Now, to convert it to iso type:&lt;pre&gt;bchunk -v image.bin image.cue &amp;lt;basename&amp;gt;&lt;/pre&gt;&lt;br /&gt;And now, when the conversation is done mount an iso file:&lt;pre&gt;mount -o loop,ro -t iso9660 &amp;lt;filename&amp;gt;.iso &amp;lt;mountpoint&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;&lt;font size=&quot;2&quot;&gt;&lt;u&gt;Some other tools&lt;/u&gt;&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CDfs&lt;/b&gt; - &lt;a href=&quot;http://freshmeat.net/redir/cdfs/1122/url_bz2/cdfs-2.6.23.tar.bz2&quot;&gt;download&lt;/a&gt; - cdfs is a file system kernel module. You can use it instead of iso9660 when you mount cds. It will show all the tracks on a cd as files in the mounted directory, i.e. A data cd may show a single .iso file, an audio cd will show some .wav files, and a mixed cd may show an .iso file and an apple hfs image, and some .wav files.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;cdemu&lt;/b&gt; - &lt;a href=&quot;http://cdemu.sourceforge.net/&quot;&gt;homepage&lt;/a&gt; - Userspace CDEmu is a CD/DVD-ROM device emulator for linux, licensed under GPL v2 or later.&lt;br /&gt;&lt;br /&gt;Enjoy!</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/8276476034757047153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/8276476034757047153' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/8276476034757047153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/8276476034757047153'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/07/mounting-bincue-files-in-linux.html' title='Mounting bin/cue files in Linux'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-1796565826500198503</id><published>2008-07-03T02:05:00.001+02:00</published><updated>2010-08-05T17:11:16.974+02:00</updated><title type='text'>Symbolic Links vs. Hard Links</title><content type='html'>Many times, it is required that two or more applications have access to the same file somewhere on the file system. Microsoft users are familiar with those kinda files named &lt;i&gt;icons&lt;/i&gt; that point to another directory or a file physically written on disk so when users run it, they actually run the file that icon points to. Links in Linux function that way, as a pointer to physical data. There are two kinds of links in Linux: &lt;b&gt;hard links and symbolic links&lt;/b&gt;.&lt;br /&gt;On most system all file names are hard links. The name of the file is just a name that refers to the actual data stored on the disk. It is possible to create multiple names (hard links) for the same data stored on the disk, so the data stored on the disk can be modified from different locations. Simply put, if one hard link is modified, all hard links (including the original file) is modified. Hard links on Linux are made with the &lt;i&gt;ln&lt;/i&gt; command. If the file &#39;.myconf&#39; allready exists, to create a hard link named &#39;.conf&#39; we&#39;ll write:&lt;pre&gt;ln /path/to/.myconf /path/to/.conf&lt;/pre&gt;&lt;br /&gt;If &#39;.conf&#39; is modified, &#39;.myconf&#39; is modified as well. All hard links pointing to same &lt;i&gt;original&lt;/i&gt; file have same characteristics of that file such as, amount of disk space used, file permissions and so on. Drawback of hard link is that it is hard to make a difference between it and the real file because they show all real file characteristics. Also, all hard links need to be located on the same filesystem.&lt;br /&gt;Symbolic links serves the same purpose as hard links, but they only contain a path to &lt;i&gt;original&lt;/i&gt; file, not all characteristics of a file, so they are easy to differentiate. To create symbolic link type:&lt;pre&gt;ln -s /path/to/original/file /path/to/symlink&lt;/pre&gt;&lt;br /&gt;Symbolic links are more used than hard links.</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/1796565826500198503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/1796565826500198503' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/1796565826500198503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/1796565826500198503'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/07/symbolic-links-vs-hard-links.html' title='Symbolic Links vs. Hard Links'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-7245813846477807576</id><published>2008-06-30T22:14:00.001+02:00</published><updated>2010-08-05T17:11:31.498+02:00</updated><title type='text'>Customizing BASH command prompt</title><content type='html'>The prompt text can hold more information than just username and hostname, such as command numbers, time, date, shell version etc.&lt;br /&gt;The text for the prompt is held in environment variable PS1 (Prompt String 1), and all that needs to be done is to change that variable.&lt;br /&gt;Default prompt on most Linux systems consists of username, hostname and current working directory, something like this:&lt;pre&gt;username@hostname:~$ &lt;/pre&gt;&lt;br /&gt;The prompt is fully customizable and the PS1 variable can be changed to users needs. We can have either extra short prompt with just one symbol, or a very long one showing all sorts of information in all sorts of colors. Simple example would be prompt consisting of simple series of characters, for example a &lt;i&gt;&#39;my prompt: &#39;&lt;/i&gt; character. So we assign a new value to PS1:&lt;pre&gt;tvrtko@tvrtko-laptop:~$ PS1=&#39;my prompt: &#39;&lt;br /&gt;my prompt:&lt;br /&gt;my prompt:&lt;/pre&gt;&lt;br /&gt;Prompt string can have a wide range of characters, escaped control sequence characters and color codes.&lt;br /&gt;Here are bash escaped control sequence characters:&lt;br /&gt;&lt;br /&gt; * \a : an ASCII bell character (07)&lt;br /&gt; * \d : the date in &quot;Weekday Month Date&quot; format (e.g., &quot;Tue May 26&quot;)&lt;br /&gt; * \D{format} : the format is passed to &lt;i&gt;strftime&lt;/i&gt; and than passed to the prompt&lt;br /&gt; * \e : an ASCII escape character (033)&lt;br /&gt; * \h : the hostname up to the first &#39;.&#39;&lt;br /&gt; * \H : the hostname&lt;br /&gt; * \j : the number of jobs currently managed by the shell&lt;br /&gt; * \l : the basename of the shell’s terminal device name&lt;br /&gt; * \n : newline&lt;br /&gt; * \r : carriage return&lt;br /&gt; * \s : the name of the shell, the basename of $0 (the portion following the final slash)&lt;br /&gt; * \t : the current time in 24-hour HH:MM:SS format&lt;br /&gt; * \T : the current time in 12-hour HH:MM:SS format&lt;br /&gt; * \@ : the current time in 12-hour am/pm format&lt;br /&gt; * \A : the current time in 24-hour HH:MM format&lt;br /&gt; * \u : the username of the current user&lt;br /&gt; * \v : the version of bash (e.g., 2.00)&lt;br /&gt; * \V : the release of bash, version + patch level (e.g., 2.00.0)&lt;br /&gt; * \w : the current working directory, with $HOME abbreviated with a tilde&lt;br /&gt; * \W : the basename of the current working directory, with $HOME abbreviated with a tilde&lt;br /&gt; * \! : the history number of this command&lt;br /&gt; * \# : the command number of this command&lt;br /&gt; * \$ : if the effective UID is 0, a #, otherwise a $&lt;br /&gt; * \nnn : the character corresponding to the octal number nnn&lt;br /&gt; * \\ : a backslash&lt;br /&gt; * \[ : begin a sequence of non-printing characters&lt;br /&gt; * \] : end a sequence of non-printing characters&lt;br /&gt;&lt;br /&gt;Now lets set a prompt displaying current time in 12-hour format, username, the command number and the &lt;i&gt;&#39;$&#39;&lt;/i&gt; sign at the end:&lt;pre&gt;my prompt: PS1=&#39;\T-\u-\# $ &#39;&lt;br /&gt;10:22:28-tvrtko-4 $&lt;br /&gt;10:22:32-tvrtko-4 $ ls -a&lt;br /&gt;...&lt;br /&gt;10:22:38-tvrtko-5 $ &lt;/pre&gt;&lt;br /&gt;&lt;b&gt;How to add colors to a prompt?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This might look a little complicated at start but its really not a big deal. To add colors to the shell prompt use the following export command syntax:&lt;br /&gt;&lt;pre&gt;&#39;\e[x;ym $PS1 \e[0m&#39;&lt;br /&gt;Where:&lt;br /&gt;    * \e[  - Start color scheme&lt;br /&gt;    * x;y  - Color pair to use (x - foreground;y - background)&lt;br /&gt;    * $PS1 - your shell prompt&lt;br /&gt;    * \e[0m - Stop color scheme&lt;br /&gt;&lt;br /&gt;foreground colors:&lt;br /&gt;    * 30 black&lt;br /&gt;    * 31 red&lt;br /&gt;    * 32 green&lt;br /&gt;    * 33 brown&lt;br /&gt;    * 34 blue&lt;br /&gt;    * 35 purple&lt;br /&gt;    * 36 light&lt;br /&gt;    * 37 gray&lt;br /&gt;&lt;br /&gt;background colors:&lt;br /&gt;    * 40 black&lt;br /&gt;    * 41 red&lt;br /&gt;    * 42 green&lt;br /&gt;    * 43 brown&lt;br /&gt;    * 44 blue&lt;br /&gt;    * 45 purple&lt;br /&gt;    * 46 light blue&lt;br /&gt;    * 47 white&lt;/pre&gt;&lt;br /&gt;Now lets set the new color prompt with light blue background displaying 24hr - time in black, username in brown and the &lt;i&gt;&#39;$&#39;&lt;/i&gt; sign in black again:&lt;br /&gt;&lt;br /&gt;&lt;img src=&#39;http://lh6.ggpht.com/tvrtkom/SGlMx6A1ngI/AAAAAAAAAMs/LE_tcYz-zr0/prompt2.jpg&#39; /&gt;&lt;br /&gt;&lt;br /&gt;Notice that the &lt;i&gt;\e[0m&lt;/i&gt; end sequence brings back the default color. To set text after the prompt in brown foreground and black background we would end sequence with &lt;i&gt;\e[33;40m&lt;/i&gt;.&lt;br /&gt;To make prompt string effective every time bash starts put your &lt;b&gt;PS1=&#39;...&#39;&lt;/b&gt; line in &lt;i&gt;.bashrc&lt;/i&gt; file.&lt;br /&gt;&lt;br /&gt;Well, I hope this guide was clear to understand. Have fun.</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/7245813846477807576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/7245813846477807576' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/7245813846477807576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/7245813846477807576'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/06/customizing-bash-command-prompt.html' title='Customizing BASH command prompt'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/tvrtkom/SGlMx6A1ngI/AAAAAAAAAMs/LE_tcYz-zr0/s72-c/prompt2.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-7530603910146242317</id><published>2008-06-19T19:48:00.001+02:00</published><updated>2010-08-05T17:11:44.337+02:00</updated><title type='text'>How to start a script at boot time</title><content type='html'>Making script start at the boot time is really not a big deal, it&#39;s done with ease with a few commands and actually no knowledge about system &lt;i&gt;runlevels&lt;/i&gt; is required for simple tasks. But a little background info won&#39;t hurt.&lt;i&gt;Runlevel&lt;/i&gt; is a state or mode in which system works, and each &lt;i&gt;runlevel&lt;/i&gt; uses its own specific services/scripts. Usually there are 8 of them:&lt;br /&gt;&lt;br /&gt;* 0 System Halt&lt;br /&gt;* 1 Single user&lt;br /&gt;* 2 Full multi-user mode (Default)&lt;br /&gt;* 3-5 Same as 2&lt;br /&gt;* 6 System Reboot&lt;br /&gt;&lt;br /&gt;There is also runlevel called &quot;s&quot; which is used by the system when it changes runlevels.&lt;br /&gt;Default runlevel for a Linux based system is 2 generally. Finding out in which runlevel system resides is done running &#39;runlevel&#39; command as root&lt;pre&gt;$ sudo runlevel&lt;br /&gt;[sudo] password for tvrtko:&lt;br /&gt;N 2&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Number 2 means system is in runlevel 2 and the N character means &#39;None&#39; - system was in that runlevel since boot.&lt;br /&gt;For each runlevel there is a directory filled with needed scripts in &lt;i&gt;/etc&lt;/i&gt;. On Debian/Ubuntu systems these directories are called: rc0.d, rc1.d, rc2.d, rc3.d, rc4.d, rc5.d and rc6.d, and if you open one of them you&#39;ll see all those scripts with weird names that are actually just links to real scripts that reside in &lt;i&gt;/etc/init.d&lt;/i&gt; directory. Command &lt;b&gt;update-rc.d&lt;/b&gt; makes those links, and I will explain its most basic usage.&lt;br /&gt;&lt;br /&gt;Suppose I have a script named &quot;myfirewall&quot; filled with lots of commands needed to configure my network and protection, and I need to start it every time the system boots. This script must reside in &lt;i&gt;/etc/init.d&lt;/i&gt; directory for this to work, and it must be executable.&lt;pre&gt;$ chmod 755 /etc/init.d/myfirewall&lt;/pre&gt;&lt;br /&gt;All that it must be now is to run &lt;b&gt;update-rc.d&lt;/b&gt; command like this:&lt;pre&gt;$ sudo update-rc.d myfirewall defaults&lt;br /&gt;password:&lt;br /&gt;Adding system startup for /etc/init.d/myfirewall ...&lt;br /&gt;/etc/rc0.d/K20myfirewall -&gt; ../init.d/myfirewall&lt;br /&gt;/etc/rc1.d/K20myfirewall -&gt; ../init.d/myfirewall&lt;br /&gt;/etc/rc6.d/K20myfirewall -&gt; ../init.d/myfirewall&lt;br /&gt;/etc/rc2.d/S20myfirewall -&gt; ../init.d/myfirewall&lt;br /&gt;/etc/rc3.d/S20myfirewall -&gt; ../init.d/myfirewall&lt;br /&gt;/etc/rc4.d/S20myfirewall -&gt; ../init.d/myfirewall&lt;br /&gt;/etc/rc5.d/S20myfirewall -&gt; ../init.d/myfirewall&lt;/pre&gt;&lt;br /&gt;And that&#39;s it. The script will run for every runlevel now. Notice the script will run as &lt;i&gt;root&lt;/i&gt; user. If you need to run some service as a less privileged user simply create a script in &lt;i&gt;/etc/init.d&lt;/i&gt; with the line:&lt;pre&gt;su [username_you_want_as_owner] -c /path/to/program&lt;/pre&gt;&lt;br /&gt;To remove script from startup sequence:&lt;pre&gt;$ update-rc.d -f  myfirewall remove&lt;/pre&gt;&lt;br /&gt;This should be enough for a start.</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/7530603910146242317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/7530603910146242317' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/7530603910146242317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/7530603910146242317'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/06/how-to-start-script-at-boot-time.html' title='How to start a script at boot time'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-5433168309407661574</id><published>2008-06-18T22:35:00.001+02:00</published><updated>2010-08-05T17:11:59.960+02:00</updated><title type='text'>Linux Command: alias</title><content type='html'>The alias command is used for creating shorter meaningful synonyms for longer, complex and sometimes meaningless shell commands.&lt;br /&gt;Few years ago when I started being interested in all &#39;free&#39; and &#39;open&#39; things that Linux OS gives I also started being more an more frustrated typing some commands over and over again. Than I descovered aliases. Oh lucky me.&lt;br /&gt;Most of advanced or even beginner Linux users already know this, but those that don&#39;t will find it quite handy in future.&lt;br /&gt;Syntax goes like this:&lt;br /&gt;&lt;pre&gt;alias &lt;i&gt;[synonym]&lt;/i&gt;=&#39;&lt;i&gt;[true shell command]&lt;/i&gt;&#39;&lt;/pre&gt;&lt;br /&gt;Real examples might be:&lt;br /&gt;&lt;pre&gt;alias lsa=&#39;ls -all -F&#39;&lt;/pre&gt;&lt;br /&gt;Now if &lt;i&gt;lsa&lt;/i&gt; is typed in a shell it will automatically run command &lt;i&gt;ls -all -F&lt;/i&gt;. Saves so much typing.&lt;br /&gt;Aliases are most efficient if they are defined at a shell startup time. To do that all that&#39;s needed is to put the line at the end of your bash profile file which is usually full of commands that run at shell startup and user mostly don&#39;t even know or think about it. Look for the file named &lt;i&gt;&#39;.bashrc&#39;&lt;/i&gt;, &lt;i&gt;&#39;.bash-profile&#39;&lt;/i&gt; or simply &lt;i&gt;&#39;.profile&#39;&lt;/i&gt; in your home directory.</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/5433168309407661574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/5433168309407661574' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/5433168309407661574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/5433168309407661574'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/06/linux-command-alias.html' title='Linux Command: alias'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-7813932058650676010</id><published>2008-06-10T21:09:00.001+02:00</published><updated>2010-08-05T17:12:36.925+02:00</updated><title type='text'>Renaming multiple files with &#39;rename&#39; command</title><content type='html'>The syntax for the rename command is:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;rename [ -v ] [ -n ] [ -f ] perl_expression [ files ]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;to rename for example multiple photo files with &lt;i&gt;&#39;.JPG&#39;&lt;/i&gt; extension to &lt;i&gt;&#39;.jpg&#39;&lt;/i&gt; extension:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;rename -v ’s/\.JPG$/\.jpg/’ *.JPG&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The perl substitution for regular expression syntax is: s/old/new/.&lt;br /&gt;&lt;i&gt;s&lt;/i&gt; means &#39;substitute&#39;. Period character substitutes any character, but in this case it&#39;s not wanted and we need to escape it with &#39;\&#39;.</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/7813932058650676010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/7813932058650676010' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/7813932058650676010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/7813932058650676010'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/06/renaming-multiple-files-with-rename.html' title='Renaming multiple files with &#39;rename&#39; command'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-6765527000111568402</id><published>2008-06-03T19:08:00.001+02:00</published><updated>2010-08-05T17:13:12.351+02:00</updated><title type='text'>Downloading files from a cell-phone via Bluetooth</title><content type='html'>This is a guide for downloading files from a cell-phone to a linux pc from a terminal.&lt;br /&gt;First thing to do is to activate a bluetooth adapter on both pc and a cellphone and make it visible and accessible. The necessery software must be installed too:&lt;br /&gt;&lt;pre&gt;apt-get install obexftp bluetooth&lt;/pre&gt;&lt;br /&gt;First command is for scanning bluetooth enabled devices in range to get their address. Something like this:&lt;br /&gt;&lt;pre&gt;tvrtko@tvrtko-laptop:~$ hcitool scan&lt;br /&gt;Scanning ...&lt;br /&gt;      00:15:B9:9D:40:39       SGH-ZV10 t&lt;/pre&gt;&lt;br /&gt;Command for browsing appropriate channel for file transfers:&lt;br /&gt;&lt;pre class=&quot;long&quot;&gt;tvrtko@tvrtko-laptop:~$ sdptool browse 00:15:B9:9D:40:39&lt;br /&gt;Browsing 00:15:B9:9D:40:39 ...&lt;br /&gt;Service Name: QC Voice Gateway&lt;br /&gt;Service RecHandle: 0x10000&lt;br /&gt;Service Class ID List:&lt;br /&gt; &quot;Headset Audio Gateway&quot; (0x1112)&lt;br /&gt; &quot;Generic Audio&quot; (0x1203)&lt;br /&gt;Protocol Descriptor List:&lt;br /&gt; &quot;L2CAP&quot; (0x0100)&lt;br /&gt; &quot;RFCOMM&quot; (0x0003)&lt;br /&gt;   Channel: 3&lt;br /&gt;Language Base Attr List:&lt;br /&gt; code_ISO639: 0x656e&lt;br /&gt; encoding:    0x6a&lt;br /&gt; base_offset: 0x100&lt;br /&gt;Profile Descriptor List:&lt;br /&gt; &quot;Headset&quot; (0x1108)&lt;br /&gt;   Version: 0x0100&lt;br /&gt;&lt;br /&gt;Service Name: QC Voice Gateway&lt;br /&gt;Service RecHandle: 0x10001&lt;br /&gt;Service Class ID List:&lt;br /&gt; &quot;Handfree Audio Gateway&quot; (0x111f)&lt;br /&gt; &quot;Generic Audio&quot; (0x1203)&lt;br /&gt;Protocol Descriptor List:&lt;br /&gt; &quot;L2CAP&quot; (0x0100)&lt;br /&gt; &quot;RFCOMM&quot; (0x0003)&lt;br /&gt;   Channel: 4&lt;br /&gt;Language Base Attr List:&lt;br /&gt; code_ISO639: 0x656e&lt;br /&gt; encoding:    0x6a&lt;br /&gt; base_offset: 0x100&lt;br /&gt;Profile Descriptor List:&lt;br /&gt; &quot;Handsfree&quot; (0x111e)&lt;br /&gt;   Version: 0x0101&lt;br /&gt;&lt;br /&gt;Service Name: FTP&lt;br /&gt;Service RecHandle: 0x10002&lt;br /&gt;Service Class ID List:&lt;br /&gt; &quot;OBEX File Transfer&quot; (0x1106)&lt;br /&gt;Protocol Descriptor List:&lt;br /&gt; &quot;L2CAP&quot; (0x0100)&lt;br /&gt; &quot;RFCOMM&quot; (0x0003)&lt;br /&gt;   Channel: 16&lt;br /&gt; &quot;OBEX&quot; (0x0008)&lt;br /&gt;Language Base Attr List:&lt;br /&gt; code_ISO639: 0x656e&lt;br /&gt; encoding:    0x6a&lt;br /&gt; base_offset: 0x100&lt;br /&gt;Profile Descriptor List:&lt;br /&gt; &quot;OBEX File Transfer&quot; (0x1106)&lt;br /&gt;   Version: 0x0100&lt;br /&gt;&lt;br /&gt;Service Name: OPP&lt;br /&gt;Service RecHandle: 0x10003&lt;br /&gt;Service Class ID List:&lt;br /&gt; &quot;OBEX Object Push&quot; (0x1105)&lt;br /&gt;Protocol Descriptor List:&lt;br /&gt; &quot;L2CAP&quot; (0x0100)&lt;br /&gt; &quot;RFCOMM&quot; (0x0003)&lt;br /&gt;   Channel: 17&lt;br /&gt; &quot;OBEX&quot; (0x0008)&lt;br /&gt;Language Base Attr List:&lt;br /&gt; code_ISO639: 0x656e&lt;br /&gt; encoding:    0x6a&lt;br /&gt; base_offset: 0x100&lt;br /&gt;Profile Descriptor List:&lt;br /&gt; &quot;OBEX Object Push&quot; (0x1105)&lt;br /&gt;   Version: 0x0100&lt;br /&gt;&lt;br /&gt;Service Name: Serial Port&lt;br /&gt;Service RecHandle: 0x10004&lt;br /&gt;Service Class ID List:&lt;br /&gt; &quot;Serial Port&quot; (0x1101)&lt;br /&gt;Protocol Descriptor List:&lt;br /&gt; &quot;L2CAP&quot; (0x0100)&lt;br /&gt; &quot;RFCOMM&quot; (0x0003)&lt;br /&gt;   Channel: 18&lt;br /&gt;Language Base Attr List:&lt;br /&gt; code_ISO639: 0x656e&lt;br /&gt; encoding:    0x6a&lt;br /&gt; base_offset: 0x100&lt;br /&gt;Profile Descriptor List:&lt;br /&gt; &quot;Serial Port&quot; (0x1101)&lt;br /&gt;&lt;br /&gt;Service Name: Dial-up Networking&lt;br /&gt;Service RecHandle: 0x10005&lt;br /&gt;Service Class ID List:&lt;br /&gt; &quot;Dialup Networking&quot; (0x1103)&lt;br /&gt;Protocol Descriptor List:&lt;br /&gt; &quot;L2CAP&quot; (0x0100)&lt;br /&gt; &quot;RFCOMM&quot; (0x0003)&lt;br /&gt;   Channel: 8&lt;br /&gt;Language Base Attr List:&lt;br /&gt; code_ISO639: 0x656e&lt;br /&gt; encoding:    0x6a&lt;br /&gt; base_offset: 0x100&lt;br /&gt;Profile Descriptor List:&lt;br /&gt; &quot;Dialup Networking&quot; (0x1103)&lt;br /&gt;   Version: 0x0100&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Our channel of interest is 16. Bellow &lt;i&gt;Service Class ID List: &quot;OBEX File Transfer&quot;&lt;/i&gt; lines.&lt;br /&gt;&lt;br /&gt;To browse files on a cellphone use the command to gat folder listing (in my case it is in XML format):&lt;br /&gt;&lt;pre&gt;tvrtko@tvrtko-laptop:~$ obexftp -b 00:15:B9:9D:40:39 -c / -l&lt;br /&gt;Browsing 00:15:B9:9D:40:39 ...&lt;br /&gt;Channel: 16&lt;br /&gt;Connecting...done&lt;br /&gt;Sending &quot;&quot;... done&lt;br /&gt;Receiving &quot;(null)&quot;...\&lt;br /&gt;&lt;br /&gt;(folder listing here)&lt;br /&gt;&lt;br /&gt;Disconnecting...done&lt;/pre&gt;&lt;br /&gt;And now, to download your newly taken photo you need to type command similar to this:&lt;br /&gt;&lt;pre&gt;tvrtko@tvrtko-laptop:~$ obexftp -b 00:15:B9:9D:40:39 -c /Pictures -g Photo-0062.jpg&lt;br /&gt;Browsing 00:15:B9:9D:40:39 ...&lt;br /&gt;Channel: 16&lt;br /&gt;Connecting...done&lt;br /&gt;....&lt;br /&gt;....&lt;/pre&gt;&lt;br /&gt;For uploading files use this command:&lt;br /&gt;&lt;pre&gt;obexftp -b 00:15:B9:9D:40:39 -c /Pictures -p Photo-0063.jpg&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;NOTICE: Use right addresses, folder and filename specific for your cellphone&lt;/i&gt;&lt;/b&gt;&lt;i&gt;&lt;/i&gt;</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/6765527000111568402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/6765527000111568402' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/6765527000111568402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/6765527000111568402'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/06/downloading-files-from-cell-phone-via.html' title='Downloading files from a cell-phone via Bluetooth'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-3360193534029255592</id><published>2008-04-22T22:33:00.001+02:00</published><updated>2010-08-05T17:13:24.958+02:00</updated><title type='text'>Ubuntu: Use root password instead default user password</title><content type='html'>After clean install of Ubuntu, you noticed u have to enter your user password to do administrative or system tasks. This is the way to change it.&lt;br /&gt;First make sure u set password for the &#39;root&#39; user:&lt;br /&gt;&lt;pre&gt;sudo passwd root&lt;/pre&gt;&lt;br /&gt;Use your favorite text editor and edit &#39;/usr/share/gconf/defaults/10_libgksu&#39; file.&lt;br /&gt;Change:&lt;br /&gt;&lt;pre&gt;/apps/gksu/sudo-mode true&lt;/pre&gt;&lt;br /&gt;to:&lt;br /&gt;&lt;pre&gt;/apps/gksu/sudo-mode false&lt;/pre&gt;&lt;br /&gt;Then issue following command:&lt;br /&gt;&lt;pre&gt;sudo update-gconf-defaults&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/3360193534029255592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/3360193534029255592' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/3360193534029255592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/3360193534029255592'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/04/ubuntu-use-root-password-instead.html' title='Ubuntu: Use root password instead default user password'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4523667190511269416.post-6444161996207015104</id><published>2008-04-12T11:07:00.001+02:00</published><updated>2010-08-05T17:13:57.476+02:00</updated><title type='text'>Fixing large fonts / graphics bug on Linux with intel driver</title><content type='html'>Problem with Intel drivers on linux which manifests like this: &lt;a href=&quot;http://i268.photobucket.com/albums/jj18/J4Ck_2008/Pantallazo-2.png&quot;&gt;Click to see screen shot&lt;/a&gt; is easily fixed by adding this into /etc/X11/xorg.conf file:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Section &quot;Monitor&quot;&lt;br /&gt;     ... #whatevert was in already.&lt;br /&gt;      Option &quot;DDC&quot; &quot;no&quot;&lt;br /&gt;EndSection&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://remind-nix.blogspot.com/feeds/6444161996207015104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4523667190511269416/6444161996207015104' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/6444161996207015104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4523667190511269416/posts/default/6444161996207015104'/><link rel='alternate' type='text/html' href='http://remind-nix.blogspot.com/2008/04/fixing-large-fonts-graphics-bug-with-on.html' title='Fixing large fonts / graphics bug on Linux with intel driver'/><author><name>Tvrtko</name><uri>http://www.blogger.com/profile/04956047142776324060</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>