<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; profile</title> <atom:link href="http://www.ghacks.net/tag/profile/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Sat, 11 Feb 2012 09:52:46 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Adding directories to your PATH</title><link>http://www.ghacks.net/2010/06/07/adding-directories-to-your-path/</link> <comments>http://www.ghacks.net/2010/06/07/adding-directories-to-your-path/#comments</comments> <pubDate>Mon, 07 Jun 2010 11:23:55 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[$PATH]]></category> <category><![CDATA[bash profile]]></category> <category><![CDATA[linux PATH]]></category> <category><![CDATA[profile]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=26273</guid> <description><![CDATA[One of the things I really like about Linux is how it handles a file&#8217;s ability to be executable. If you create a script and you want that script to be executable, you just set the permissions as such. Say you&#8217;ve created the script myscript.sh and you&#8217;ve placed it in your home directory. To execute that [...]]]></description> <content:encoded><![CDATA[<p>One of the things I really like about Linux is how it handles a file&#8217;s ability to be executable. If you create a script and you want that script to be executable, you just set the permissions as such. Say you&#8217;ve created the script <em>myscript.sh</em> and you&#8217;ve placed it in your home directory. To execute that script all you would have to do is issue the command <em>~/myscript.sh</em>. That&#8217;s all fine and good, but what if you wanted that script to be globally accessible for yourself? And let&#8217;s say you don&#8217;t want to copy that file, for whatever reason, to either the <strong>/usr/bin </strong>or the <strong>/usr/local/ </strong>directory. What would you do? That&#8217;s simple &#8211; you could place that file within a subdirectory of your home directory and add that directory to your PATH.</p><p>You see, any directory in your users&#8217;s PATH is global. That means you can issue a command by simply entering the command &#8211; you do not have to enter the full path to the command. That is why you don&#8217;t always have to enter <em>/usr/bin/ls</em> and you can just enter <em>ls.</em></p><p>In this article, we step back for a bit of Linux basics and learn how to add directories to your path.</p><p><span
id="more-26273"></span><strong>See what&#8217;s already there</strong></p><p>If you are curious to know what is already in your PATH you can do so by entering the command <em>echo $PATH</em>. You should see something like:</p><p><em>/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</em></p><p>The above is pretty standard for a default Linux path. What you are seeing is global paths, each separated by a &#8220;:&#8221;. Any file in:</p><ul><li>/usr/bin</li><li>/usr/local/sbin</li><li>/usr/local/bin</li><li>/usr/sbin</li><li>/usr/bin</li><li>/sbin</li><li>/usr/games</li></ul><p>will be global for the user.</p><p><strong>Adding a new directory</strong></p><p>There are three ways to add a new directory to your path. Let&#8217;s take a look at them individually. The first method only adds the new directory to the PATH temporarily. This is great for testing purposes, but know that the minute you log out that directory is removed from the users&#8217; path.</p><p>Let&#8217;s say you have the directory <strong>~/scripts</strong> that you want to add temporarily. To do this open up a terminal window and issue the command:</p><p><em>PATH=$PATH:/home/USERNAME/scripts</em></p><p>Where USERNAME is the actual name of the user you are using. Now if you issue the command <em>echo $PATH</em> that new directory will be listed. Log out and log in and issue that same command and the directory will be gone.</p><p>Now let&#8217;s say you want to make that addition permanent for the user. This was typically done in the users&#8217; <strong>~/.bash_profile </strong>file. You might notice that you don&#8217;t have such a file. Newer Ubuntu releases have opted for the <strong>~/.profile</strong> file instead. I still prefer to create a <strong>~/.bash_profile</strong> for these purposes.  So if you don&#8217;t have a <strong>~/.bash_profile</strong> create one and open it. If you have a <strong>~/.bash_profile</strong> open it. and add a line like:</p><p><em>PATH=&#8221;$HOME/bin:$PATH:/home/USER/scripts:&#8221;</em></p><p>Where USER is the actual user name.</p><p>You might think you would have to log out and log back in. You don&#8217;t. Just issue the command <em>source .bash_profile</em> and the changes will take effect.</p><p>You can also add this path to every users PATH by adding the same line to the <strong>/etc/profile. </strong>You probably won&#8217;t find a reference to PATH in that file. So what you have to do is add the following lines to the end of that file:<br
/> <em>PATH=$PATH:/home/USER/scripts<br
/> export PATH</em><br
/> Where USER is the actual user name. Of course you probably don&#8217;t want to add a directory of one user to everyone&#8217;s PATH, so you might want to create a new directory (like <strong>/data/scripts</strong>) and add that the to <strong>/etc/profile</strong>. Once you are done save that and the next time someone logs in they will have that new directory in their PATH.</p><p><strong>Final thoughts</strong></p><p>Linux is all about flexibility. As you can see it is possible to really stretch the usability of your directory structure to make it work for you instead of against you. Adding directories to your PATH variable allows you to create scripts that can be run globally, and by anyone.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/06/07/adding-directories-to-your-path/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Protect your Firefox Profile</title><link>http://www.ghacks.net/2007/01/27/protect-your-firefox-profile/</link> <comments>http://www.ghacks.net/2007/01/27/protect-your-firefox-profile/#comments</comments> <pubDate>Sat, 27 Jan 2007 09:02:13 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Browsing]]></category> <category><![CDATA[Firefox]]></category> <category><![CDATA[mozilla]]></category> <category><![CDATA[profile]]></category> <category><![CDATA[profiles.ini]]></category> <category><![CDATA[secure-profile]]></category> <category><![CDATA[tip]]></category> <guid
isPermaLink="false">http://www.ghacks.net/2007/01/27/protect-your-firefox-profile/</guid> <description><![CDATA[A Firefox profile stores all personal information such as bookmarks and passwords in it. Everyone who is starting up Firefox with that profile is able to use your saved passwords and cookies as well which is a security risk if you ask me. One way to overcome this would be to protect the Firefox profile folder by moving it to a location that is not accessible to anyone except you.]]></description> <content:encoded><![CDATA[<p>A Firefox profile stores all personal information such as bookmarks and passwords in it. Everyone who is starting up Firefox with that profile is able to use your saved passwords and cookies as well which is a security risk if you ask me. One way to overcome this would be to protect the Firefox profile folder by moving it to a location that is not accessible to anyone except you.</p><p>I did this by moving the profile to my encrypted hard drive. The hard drive is encrypted using True Crypt and the profile can only be accessed if I provide the security key to decrypt the hard drive. Other means are theoretically possible as well, use a portable device that has to be plugged in before you can use the profile.</p><p><span
id="more-1140"></span>Moving a profile to another location is not difficulty at all. Close all instances of Firefox and locate your profile folder. This is usually in Document and Settings under Application Date, Mozilla, Firefox, Profiles of the user who is logged into windows currently.</p><p>Move the complete folder to a different location. Open up profiles.ini afterwards (located in Firefox in Document and Settings). Change the path= parameter to the new location of your profile and change the parameter IsRelative=1 to 0.</p><p>Restart Firefox to see if the changes have been made. If all your bookmarks for instance load fine the changes have been successful. If that is not the case double-check the path parameter in profiles.ini.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2007/01/27/protect-your-firefox-profile/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> </channel> </rss>
