<?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>jlogday.com &#187; linux</title>
	<atom:link href="http://blog.jlogday.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jlogday.com</link>
	<description>programming, security, and other random thoughts</description>
	<lastBuildDate>Sun, 23 Aug 2009 22:16:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to keep APT from reinstalling custom packages (Ubuntu)</title>
		<link>http://blog.jlogday.com/2009/03/how-to-keep-apt-from-reinstalling-custom-packages-ubuntu/</link>
		<comments>http://blog.jlogday.com/2009/03/how-to-keep-apt-from-reinstalling-custom-packages-ubuntu/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 02:01:19 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gnome-terminal]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.jlogday.com/?p=45</guid>
		<description><![CDATA[A few weeks ago, I finally got around to upgrading my Ubuntu desktop to Hardy Heron. Like many others, I found that the cursor in gnome-terminal had inexplicably started blinking again, and there was no longer a preference to disable it. Fortunately, finding a fix was easy. Applying the patch and rebuilding the .deb package [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago, I finally got around to upgrading my Ubuntu desktop to Hardy Heron. Like <a href="http://www.nybergh.net/notes/2008/05/08/gnome-lunacy-missing-option-for-disabling-cursor-blinks-in-ubuntu-804s-gnome-terminal/">many</a> <a href="http://lwn.net/Articles/278995/">others</a>, I found that the cursor in gnome-terminal had inexplicably started blinking again, and there was <a href="https://bugs.launchpad.net/ubuntu/hardy/+source/gnome-terminal/+bug/188732">no longer a preference to disable it</a>. Fortunately, finding a <a href="http://www.jcornwall.me.uk/2008/04/hardy-heron-and-the-blinkin-terminal/">fix</a> was easy. Applying the patch and rebuilding the <code>.deb</code> package was even easier. But after installing the patched package, the update-notifier immediately informed me that there was one update available: gnome-terminal. It seems that APT prefers packages in the repository over locally installed packages.</p>
<p>I ignored this for a while, and just dealt with the &#8220;updates available&#8221; icon always being in the notification area. I tried searching google several times, and eventually came across <a href="http://ubuntuforums.org/archive/index.php/t-345861.html">this forum post</a>, which led to <a href="http://www.debian-administration.org/articles/332">this article</a> containing the answer I was looking for.</p>
<p>I could probably just pin gnome-terminal, but I want to make sure I get any future updates for it. I decided the easiest way to fix this annoyance was by appending a short string (<code>+noblink</code>) to the version.</p>
<p>First, fetch the source and update the version:</p>
<pre class="code">$ apt-get source gnome-terminal
$ cd gnome-terminal-2.22.1
$ debchange -v 2.22.1-0ubuntu2+noblink</pre>
<p>At this point, the default editor will open the <code>debian/changelog</code> file so you can describe the change. Enter a short comment, like &#8220;disable the blinkin cursor&#8221;, save the file and exit the editor.</p>
<p>Next, patch the source. Jay Cornwall&#8217;s <a href="http://www.jcornwall.me.uk/patches/gnome/gnome-terminal-2.22.1-noblink.patch">patch</a> is not currently on-line, but it&#8217;s a simple fix: just edit <code>src/terminal-screen.c</code> and change this line </p>
<pre class="code">terminal_widget_set_cursor_blinks (screen->priv->term, blink);</pre>
<p>to this</p>
<pre class="code">terminal_widget_set_cursor_blinks (screen->priv->term, FALSE);</pre>
<p>Finally, build and install the package:</p>
<pre class="code">$ debuild -rfakeroot binary
$ sudo dpkg -i ../gnome-terminal*.deb</pre>



Share and Enjoy:


	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fblog.jlogday.com%2F2009%2F03%2Fhow-to-keep-apt-from-reinstalling-custom-packages-ubuntu%2F&amp;partner=sociable" title="Print"><img src="http://blog.jlogday.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.jlogday.com%2F2009%2F03%2Fhow-to-keep-apt-from-reinstalling-custom-packages-ubuntu%2F&amp;title=How%20to%20keep%20APT%20from%20reinstalling%20custom%20packages%20%28Ubuntu%29&amp;bodytext=A%20few%20weeks%20ago%2C%20I%20finally%20got%20around%20to%20upgrading%20my%20Ubuntu%20desktop%20to%20Hardy%20Heron.%20Like%20many%20others%2C%20I%20found%20that%20the%20cursor%20in%20gnome-terminal%20had%20inexplicably%20started%20blinking%20again%2C%20and%20there%20was%20no%20longer%20a%20preference%20to%20disable%20it.%20Fortunately%2C" title="Digg"><img src="http://blog.jlogday.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fblog.jlogday.com%2F2009%2F03%2Fhow-to-keep-apt-from-reinstalling-custom-packages-ubuntu%2F&amp;title=How%20to%20keep%20APT%20from%20reinstalling%20custom%20packages%20%28Ubuntu%29&amp;notes=A%20few%20weeks%20ago%2C%20I%20finally%20got%20around%20to%20upgrading%20my%20Ubuntu%20desktop%20to%20Hardy%20Heron.%20Like%20many%20others%2C%20I%20found%20that%20the%20cursor%20in%20gnome-terminal%20had%20inexplicably%20started%20blinking%20again%2C%20and%20there%20was%20no%20longer%20a%20preference%20to%20disable%20it.%20Fortunately%2C" title="del.icio.us"><img src="http://blog.jlogday.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.jlogday.com%2F2009%2F03%2Fhow-to-keep-apt-from-reinstalling-custom-packages-ubuntu%2F&amp;t=How%20to%20keep%20APT%20from%20reinstalling%20custom%20packages%20%28Ubuntu%29" title="Facebook"><img src="http://blog.jlogday.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.jlogday.com%2F2009%2F03%2Fhow-to-keep-apt-from-reinstalling-custom-packages-ubuntu%2F&amp;title=How%20to%20keep%20APT%20from%20reinstalling%20custom%20packages%20%28Ubuntu%29&amp;annotation=A%20few%20weeks%20ago%2C%20I%20finally%20got%20around%20to%20upgrading%20my%20Ubuntu%20desktop%20to%20Hardy%20Heron.%20Like%20many%20others%2C%20I%20found%20that%20the%20cursor%20in%20gnome-terminal%20had%20inexplicably%20started%20blinking%20again%2C%20and%20there%20was%20no%20longer%20a%20preference%20to%20disable%20it.%20Fortunately%2C" title="Google Bookmarks"><img src="http://blog.jlogday.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=How%20to%20keep%20APT%20from%20reinstalling%20custom%20packages%20%28Ubuntu%29%20-%20http%3A%2F%2Fblog.jlogday.com%2F2009%2F03%2Fhow-to-keep-apt-from-reinstalling-custom-packages-ubuntu%2F" title="Twitter"><img src="http://blog.jlogday.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.jlogday.com/2009/03/how-to-keep-apt-from-reinstalling-custom-packages-ubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Starting a New X Server</title>
		<link>http://blog.jlogday.com/2009/02/starting-a-new-x-server/</link>
		<comments>http://blog.jlogday.com/2009/02/starting-a-new-x-server/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 03:10:43 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.jlogday.com/?p=7</guid>
		<description><![CDATA[This is one of those posts that is mostly for me, so the next time I need to do this I don&#8217;t have to spend 30 minutes googling obscure config file formats. (Incidentally, I had to google and muck with styles for at least 30 minutes to figure out how to keep wordpress from mangling [...]]]></description>
			<content:encoded><![CDATA[<p>This is one of those posts that is mostly for me, so the next time I need to do this I don&#8217;t have to spend 30 minutes googling obscure config file formats. (Incidentally, I had to google and muck with styles for at least 30 minutes to figure out how to keep wordpress from mangling my code snippets.)</p>
<p>I sometimes find it useful to start an extra X server to run a particular application. Full-screen games are a good example. Ordinarily, a full-screen game grabs the display and there is no way to switch back to the desktop without exiting the game completely. When run in its own X server though, it is easy to switch between servers. The following shell script shows how to do this:</p>
<pre class="code">
#!/bin/bash

display=:1
authfile=$HOME/.Xauthority

if ! xauth list "$display" | grep "$display " &gt;/dev/null 2&gt;&amp;1; then
    xauth add $display . `mcookie`
    removelist="$display"
fi

xinit /usr/bin/xterm -- $display -auth $authfile -nolisten tcp

if [ -n "$removelist" ] ; then
    xauth remove $removelist
fi
</pre>
<p>This script will start a new X server on the next available virtual terminal (normally vt8) using display <code>:1</code> and launch an xterm. Toggle between the servers using <code>ctrl-alt-F7</code> and <code>ctrl-alt-F8</code>. When the xterm exits, so does the X server.</p>
<p>If you try to run this code on a Debian-based system, though, you will get the following error:</p>
<pre class="code">
X: user not authorized to run the X server, aborting.
xinit:  Server error.
</pre>
<p>I found this out the hard way when I started using <a href="http://www.ubuntu.com/">ubuntu</a>. This is because Debian uses a wrapper to start the X server, which enforces tighter security constraints by default. To get this to work, you will need to edit the <code>/etc/X11/Xwrapper.config</code> file, and change this line:</p>
<pre class="code">allowed_users=console</pre>
<p>to this:</p>
<pre class="code">allowed_users=anybody</pre>
<p>Check the man page for <code>Xwrapper.config</code> for more options; there aren&#8217;t very many. Personally, I don&#8217;t consider this a security risk for a single-user home system.</p>



Share and Enjoy:


	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fblog.jlogday.com%2F2009%2F02%2Fstarting-a-new-x-server%2F&amp;partner=sociable" title="Print"><img src="http://blog.jlogday.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.jlogday.com%2F2009%2F02%2Fstarting-a-new-x-server%2F&amp;title=Starting%20a%20New%20X%20Server&amp;bodytext=This%20is%20one%20of%20those%20posts%20that%20is%20mostly%20for%20me%2C%20so%20the%20next%20time%20I%20need%20to%20do%20this%20I%20don%27t%20have%20to%20spend%2030%20minutes%20googling%20obscure%20config%20file%20formats.%20%28Incidentally%2C%20I%20had%20to%20google%20and%20muck%20with%20styles%20for%20at%20least%2030%20minutes%20to%20figure%20out%20how%20" title="Digg"><img src="http://blog.jlogday.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fblog.jlogday.com%2F2009%2F02%2Fstarting-a-new-x-server%2F&amp;title=Starting%20a%20New%20X%20Server&amp;notes=This%20is%20one%20of%20those%20posts%20that%20is%20mostly%20for%20me%2C%20so%20the%20next%20time%20I%20need%20to%20do%20this%20I%20don%27t%20have%20to%20spend%2030%20minutes%20googling%20obscure%20config%20file%20formats.%20%28Incidentally%2C%20I%20had%20to%20google%20and%20muck%20with%20styles%20for%20at%20least%2030%20minutes%20to%20figure%20out%20how%20" title="del.icio.us"><img src="http://blog.jlogday.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.jlogday.com%2F2009%2F02%2Fstarting-a-new-x-server%2F&amp;t=Starting%20a%20New%20X%20Server" title="Facebook"><img src="http://blog.jlogday.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.jlogday.com%2F2009%2F02%2Fstarting-a-new-x-server%2F&amp;title=Starting%20a%20New%20X%20Server&amp;annotation=This%20is%20one%20of%20those%20posts%20that%20is%20mostly%20for%20me%2C%20so%20the%20next%20time%20I%20need%20to%20do%20this%20I%20don%27t%20have%20to%20spend%2030%20minutes%20googling%20obscure%20config%20file%20formats.%20%28Incidentally%2C%20I%20had%20to%20google%20and%20muck%20with%20styles%20for%20at%20least%2030%20minutes%20to%20figure%20out%20how%20" title="Google Bookmarks"><img src="http://blog.jlogday.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Starting%20a%20New%20X%20Server%20-%20http%3A%2F%2Fblog.jlogday.com%2F2009%2F02%2Fstarting-a-new-x-server%2F" title="Twitter"><img src="http://blog.jlogday.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.jlogday.com/2009/02/starting-a-new-x-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
