<?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>Alex Sleat &#187; switch</title>
	<atom:link href="http://alexsleat.co.uk/tag/switch/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexsleat.co.uk</link>
	<description>/home/alex</description>
	<lastBuildDate>Sat, 04 Feb 2012 22:11:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Switching Between Two Resolutions in Linux</title>
		<link>http://alexsleat.co.uk/2011/10/24/switching-between-two-resolutions-in-linux/</link>
		<comments>http://alexsleat.co.uk/2011/10/24/switching-between-two-resolutions-in-linux/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 19:56:06 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Arch Linux]]></category>
		<category><![CDATA[blog1]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[10.10]]></category>
		<category><![CDATA[11.04]]></category>
		<category><![CDATA[11.10]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[isadora]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[katya]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[resolution]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[settings]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[tv]]></category>
		<category><![CDATA[xorg]]></category>
		<category><![CDATA[xrandr]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=22690</guid>
		<description><![CDATA[<br/><p>I have a TV and my monitor connected to my PC by a VGA switch box but what&#8217;s annoying is they aren&#8217;t the same resolution. This causes problems because I can&#8217;t see what I&#8217;m doing when I have switched to TV and usually have to leave the setting manager open so that when I [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I have a TV and my monitor connected to my PC by a VGA switch box but what&#8217;s annoying is they aren&#8217;t the same resolution. This causes problems because I can&#8217;t see what I&#8217;m doing when I have switched to TV and usually have to leave the setting manager open so that when I change between them I just have to hit return and the resolution changes. That&#8217;s great and all but it&#8217;s far more effort than I want for something I do fairly often.</p>
<p>My plan was initially to create two xorg.conf files and switch between them using a script, I figured this would be the easiest way even though I haven&#8217;t messed around with xorg stuff for a few years ever since things just started working better in Linux. Turns out I couldn&#8217;t even find where they keep the xorg.conf file, it sure isn&#8217;t in /etc/X11 where it was the last time I looked..</p>
<p>On the search for this file though I came across another useful tool called xrandr, which essentially allows you to change the resolution from the command line.</p>
<blockquote>
<p style="text-align: left;">Xrandr is used to set the size, orientation and/or reflection of the outputs for a<br />
screen. It can also set the screen size.</p>
<p style="text-align: left;">If invoked without any option, it will dump the state of the outputs, showing the<br />
existing modes for each of them, with a &#8216;+&#8217; after the preferred mode and a &#8216;*&#8217;<br />
after the current mode.</p>
<p style="text-align: left;">There are a few global options. Other options modify the last output that is spec‐<br />
ified in earlier parameters in the command line. Multiple outputs may be modified<br />
at the same time by passing multiple &#8211;output options followed immediately by<br />
their corresponding modifying options.</p>
</blockquote>
<p style="text-align: right;">For more information on xrandr check out the <a href="http://linux.die.net/man/1/xrandr">manual page</a> (or type <em>man xrandr</em> in terminal).</p>
<p style="text-align: left;">It turns out it&#8217;s an extremely easy tool to use, with a command as simple as the following changing the resolution:</p>
<div class="dean_ch" style="white-space: wrap;">xrandr &#8211;output VGA1 &#8211;mode 1440&#215;900</div>
<p>So the next thing I did was create the following script which allows the resolution to switch between 1440&#215;900 and 1360&#215;768 (my monitor and my TV native resolutions).</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re3">#!/bin/bash</span></p>
<p><span class="re2">TV=</span><span class="st0">&quot;1360 x 768&quot;</span><br />
<span class="re2">MONITOR=</span><span class="st0">&quot;1440 x 900&quot;</span></p>
<p><span class="re2">TEST=</span><span class="st0">&quot;$(xrandr | grep current | sed -e &#8216;s/.*current //;s/, maximum.*//&#8217;)&quot;</span></p>
<p><span class="re3">#echo <span class="re1">$TEST</span></span></p>
<p><span class="kw1">if</span> <span class="br0">&#91;</span> <span class="st0">&quot;$TEST&quot;</span> == <span class="st0">&quot;$MONITOR&quot;</span> <span class="br0">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xrandr &#8211;output VGA1 &#8211;mode 1360&#215;768</p>
<p><span class="kw1">elif</span> <span class="br0">&#91;</span> <span class="st0">&quot;$TEST&quot;</span> == <span class="st0">&quot;$TV&quot;</span> <span class="br0">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xrandr &#8211;output VGA1 &#8211;mode 1440&#215;900</p>
<p><span class="kw1">else</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">exit</span></p>
<p><span class="kw1">fi</span></div>
<p>This script simply checks what the current resolution is being used and then toggles between the two set resolutions.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/10/24/switching-between-two-resolutions-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo: Disable Mouse Scroll to Switch Desktop &#8211; OpenBox</title>
		<link>http://alexsleat.co.uk/2011/05/15/howto-disable-mouse-scroll-to-switch-desktop-openbox/</link>
		<comments>http://alexsleat.co.uk/2011/05/15/howto-disable-mouse-scroll-to-switch-desktop-openbox/#comments</comments>
		<pubDate>Sun, 15 May 2011 19:39:46 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Arch Linux]]></category>
		<category><![CDATA[blog1]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[arch]]></category>
		<category><![CDATA[archbang]]></category>
		<category><![CDATA[blackbox]]></category>
		<category><![CDATA[change]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[openbox]]></category>
		<category><![CDATA[swap]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=16061</guid>
		<description><![CDATA[<br/><p>Open up the openbox config file, it should be located in /home/username/.config/openbox/ but if it&#8217;s not you might have to do a little digging. </p> nano /~.config/openbox/rc.xml <p>Find the following lines and remove or comment them out, you can use Ctrl+W in nano to find:</p> &#160; &#160; &#160;&#60;mousebind action=&#34;Click&#34; button=&#34;Up&#34;&#62; &#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Open up the openbox config file, it should be located in /home/username/.config/openbox/ but if it&#8217;s not you might have to do a little digging. </p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">nano</span> /~.config/openbox/rc.xml</div>
<p>Find the following lines and remove or comment them out, you can use Ctrl+W in nano to find:</p>
<div class="dean_ch" style="white-space: wrap;"> &nbsp; &nbsp; &nbsp;<span class="sc3"><span class="re1">&lt;mousebind</span> <span class="re0">action</span>=<span class="st0">&quot;Click&quot;</span> <span class="re0">button</span>=<span class="st0">&quot;Up&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;action</span> <span class="re0">name</span>=<span class="st0">&quot;DesktopPrevious&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/mousebind<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;mousebind</span> <span class="re0">action</span>=<span class="st0">&quot;Click&quot;</span> <span class="re0">button</span>=<span class="st0">&quot;Down&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;action</span> <span class="re0">name</span>=<span class="st0">&quot;DesktopNext&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/mousebind<span class="re2">&gt;</span></span></span></div>
<p>Note: XML comments are as follow:<-- Comment --></p>
<p>Save with Ctrl+X, Y, Enter (if you&#8217;re using nano) and restart OpenBox (Preferences -> OpenBox Config -> Restart) and all should be done.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/05/15/howto-disable-mouse-scroll-to-switch-desktop-openbox/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HowTo: Switch the Window Menu Buttons Back to the Right – Ubuntu 10.04 / 10.10 / 11.04</title>
		<link>http://alexsleat.co.uk/2010/05/03/howto-swap-the-window-menu-buttons-back-to-the-right-ubuntu-lucid-10-04/</link>
		<comments>http://alexsleat.co.uk/2010/05/03/howto-swap-the-window-menu-buttons-back-to-the-right-ubuntu-lucid-10-04/#comments</comments>
		<pubDate>Mon, 03 May 2010 10:10:05 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[change]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[gconf]]></category>
		<category><![CDATA[gconf-editor]]></category>
		<category><![CDATA[gconftool]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[isadora]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[katya]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[lucid lynx]]></category>
		<category><![CDATA[Maverick Meerkat]]></category>
		<category><![CDATA[menu buttons]]></category>
		<category><![CDATA[move]]></category>
		<category><![CDATA[Natty Narwhal]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[swap]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=51</guid>
		<description><![CDATA[<br/><p>I’m not an OSX person and personally prefer my minimise, maximise and close buttons to be in that order on the right, which they are not as default on the new Ubuntu 10.04 (Lucid Lynx) so here’s how you can swap them back to their rightful place (pun intended).</p> <p>This can be done either [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I’m not an OSX person and personally prefer my minimise, maximise and close buttons to be in that order on the right, which they are not as default on the new Ubuntu 10.04 (Lucid Lynx) so here’s how you can swap them back to their rightful place (pun intended).</p>
<p><strong>This can be done either of two ways:</strong><br />
<em>Use the following one line command to edit gconf (for more info type man gconftool):</em></p>
<div class="dean_ch" style="white-space: wrap;">gconftool -s /apps/met&gt;gconftool -s /apps/met&gt;gconftool -s /apps/metacity/general/button_layout -t string menu:minimize,maximize,close</div>
<p><strong>OR</strong><br />
<em>Using gconf-editor (the GUI version):</em></p>
<ol>
<li>In terminal type: <em>gconf-editor</em></li>
<li>Navigate to /apps/metacity/general</li>
<li>Change button_layout to: <em>menu:minimize,maximize,close</em></li>
<li>Hit enter and you are done.</li>
</ol>
<p><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/Lzy3jLvO59s&#038;hl=en_GB&#038;fs=1&#038;color1=0x3a3a3a&#038;color2=0x999999&#038;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Lzy3jLvO59s&#038;hl=en_GB&#038;fs=1&#038;color1=0x3a3a3a&#038;color2=0x999999&#038;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2010/05/03/howto-swap-the-window-menu-buttons-back-to-the-right-ubuntu-lucid-10-04/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

