<?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>How To Ubuntu &#187; gnome</title>
	<atom:link href="http://howto-ubuntu.net/tag/gnome/feed/" rel="self" type="application/rss+xml" />
	<link>http://howto-ubuntu.net</link>
	<description>Focusing on the Long Term Support release -- Lucid 10.04</description>
	<lastBuildDate>Fri, 30 Jul 2010 12:30:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to lock your screen from the command line</title>
		<link>http://howto-ubuntu.net/how-to-lock-your-screen-from-the-command-line/</link>
		<comments>http://howto-ubuntu.net/how-to-lock-your-screen-from-the-command-line/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 23:35:29 +0000</pubDate>
		<dc:creator>Eli</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[screensaver]]></category>

		<guid isPermaLink="false">http://howto-ubuntu.com/?p=185</guid>
		<description><![CDATA[<p>This could be very useful to you if you&#8217;re working in the terminal and need to step away for a moment. You can achieve a locked screen, just like when you do it the graphical way, with this command entered at the command line, or cli&#8230;


gnome-screensaver-command --lock

This will instantly launch your screensaver, and lock your [...]]]></description>
			<content:encoded><![CDATA[<p>This could be very useful to you if you&#8217;re working in the terminal and need to step away for a moment. You can achieve a locked screen, just like when you do it <a href="http://howto-ubuntu.com/2008/11/20/how-to-lock-your-screen/">the graphical way</a>, with this command entered at the command line, or cli&#8230;<br />
<span id="more-185"></span><br />
<br clear="none" /><br />
<code>gnome-screensaver-command --lock</code><br />
<br clear="none" /><br />
This will instantly launch your screensaver, and lock your computer&#8217;s screen. Your password will be required to gain access to your system once this is activated.</p>
<p>That command is pretty long, and typing it out would probably get on my nerves. You can use an alias to effectively shorten it. Here&#8217;s how we&#8217;ll do that, also at the command line&#8230;</p>
<p>Let&#8217;s say we want to be able to type in <em><strong>lock</strong></em>, to lock the screen. If I just type in lock, I get nothing. So I need to create an alias for this command. An alias is just like what it sounds like. It&#8217;s assigning another name to a certain command. At the command line enter&#8230;</p>
<p><code>gedit .bashrc</code><br />
<br clear="none" /><br />
There&#8217;s a certain section of this file that talks about aliases. You can add this line of text to that section of the file&#8230;<br />
<br clear="none" /><br />
<code>alias lock='gnome-screensaver-command --lock'</code><br />
<br clear="none" /><br />
This tells Ubuntu that when you type in <em><strong>lock</strong></em>, it executes <em><strong>gnome-screensaver-command &#8211;lock</strong></em>. Click the Save button and close the text editor. The next time you login, the change will have taken effect. Try it out and see how you like it.</p>
<p>Here&#8217;s what it should look like&#8230;</p>
<p><img class="alignleft size-full wp-image-192" title="screenshot-bashrc-gedit" src="http://howtoubuntu.files.wordpress.com/2008/12/screenshot-bashrc-gedit.png" alt="screenshot-bashrc-gedit" width="500" height="322" /></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fhowto-ubuntu.net%2Fhow-to-lock-your-screen-from-the-command-line%2F&amp;linkname=How%20to%20lock%20your%20screen%20from%20the%20command%20line"><img src="http://howto-ubuntu.net/wp-content/plugins/add-to-any/share_save_256_24.png" width="256" height="24" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://howto-ubuntu.net/how-to-lock-your-screen-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>
