Category: XWindows

Ubuntu 12.10 and Discrete Video Card

One of the main driver things that I have to install is the video card.  My laptop has a discrete video card.  Without installing the driver, the graphics seem to work pretty well, but with the driver, I get a very noticeable improvement in power consumption.  After installing the driver, the battery lasts significantly longer.  Also, glxspheres does a nice job of showing the graphics performance difference with and without the acceleration.

Read More

Sudo Plus X11 Forwarding

I originally published this script on my PeopleSoft Blog, but since it is as much Linux related, I thought it should go here, too.

The problem was that I was trying to install the Oracle Database via SSH using the GUI installer.  The sudo command was breaking my X11 forwarding.

I found the answer on the “Bag of Tricks” blog:

Bag of Tricks: x forwarding and sudo for oracle installs

Here’s my version:

</p>
<p>#!/bin/sh</p>
<p>user=$1<br />
if [ -z &quot;$user&quot; ]; then<br />
 user=&lt;default user&gt;<br />
fi</p>
<p>displayNum=`echo $DISPLAY | sed -e 's/^.*://' -e 's/\.[0123456789]*//'`<br />
echo &quot;Display # = $displayNum&quot;<br />
cookie=`xauth list | grep &quot;:$displayNum&quot;`<br />
echo &quot;Cookie = $cookie&quot;<br />
cookiename=`echo $cookie | sed 's/\s*MIT-MAGIC.*$//'`<br />
echo &quot;Cookie Name: $cookiename&quot;<br />
echo &quot;user = $user&quot;<br />
sudo -u $user bash -c &quot;xauth list; xauth add $cookie; bash; xauth remove $cookiename&quot;</p>
<p>