Lanrathttp://lanrat.com/A cool site for mods, hacks, and more.Lanrathttp://lanrat.com/img/rat.jpghttp://lanrat.com/http://lanrat.com/linux/active-directoryUse Active Directory for Linux loginsmrlanrat2010-09-04 20:25:26<p> This is a simple how-to on using Microsoft's Active Directory for user authentication on Linux systems. The method described in this guide should work for Cent OS, Red Hat Enterprise Linux (RHEL), and Fedora. Debian based distributions do not the the tools used in this method and require a different setup. This guide used Cent OS 5.5 with a minimal text only install, however it should apply the same to other compatible versions of Linux.</p> <h2> Installing the Software</h2> <p> We will need two packages installed to join the Active Directory (AD) domain and use it for user authentication, authconfig and samba-common. authconfig should be installed by default but with a minimal install you will need to install samba. Install them with the following command:</p> <div id="code"> yum install samba-common authconfig</div> <h2> Setting up Authconfig</h2> <p> Start authconfig by running  authonfig-tui, if you have a graphical desktop such as gnome installed you can launch it from System->Administration->Authentication but this guide will cover the text/cli version. But the same steps apply to both methods.</p> <ol> <li> Under user information select "Use Windbind"</li> <li> Under authentication select "Use MD5 Passwords", "Use Shadow Passwords", "Use Windbind Authentication", and "Local authorization is Sufficient".</li> <li> Your screen should look like this:<img alt="authconfig-tui setup for active directory" src="http://lh3.ggpht.com/_55LVV0RexIc/TIMP6wm8JzI/AAAAAAAABYA/IXZSaDAxM5s/s800/authconfig1.png" /></li> <li> Click Next</li> <li> Change the "Security Model" to "domain"</li> <li> Under “Domain" enter your active directory domain.</li> <li> Enter the FQDN (fully-qualified domain name) of your domain servers, if you have more than one you can separate them with a comma.</li> <li> The ADS realm is the full domain, it must be in call caps.</li> <li> To allow users to login change the template shell to /bin/bash, or whatever shell you prefer.</li> <li> The screen should now look like this, but with your correct information:<img alt="authconfig domain settings" src="http://lh5.ggpht.com/_55LVV0RexIc/TIMP7PC91AI/AAAAAAAABYE/trXpsrKP7wU/s800/authconfig2.png" style="width: 717px; height: 398px;" /></li> <li> Select OK.</li> </ol> <h2> Setting Up Samba</h2> <p> Now you need to edit /etc/samba/smb.conf. You will see many of the settings you just entered in this file, however we still need to manually change one value that authconfig does not do for us. Look for "windbind use default domain" and change it from false to true.</p> <h2> Setting up PAM</h2> <p> PAM controls user logins. and we need to create a home directory for domain users on their first login. All domain users will have a home directory in /home/Domain/user, where Domain is your domain and user is their username. Create the Domain folder inside the /home directory with the mkdir command as root.</p> <p> Next we need to enable the user's home directory creation in PAM. Edit /etc/pam.d/system-auth. Scroll to the end of the file and at the end add this:</p> <div id="code"> session optional pam_mkhomedir.so</div> <p> Save the file and exit. To make these changes take effect we need to restart the windbind service and the oddjobd service. This can usually be done with the service command. I will not cover that here.</p> <h2> Joining the Domain</h2> <p> Now that the system is configured correctly we will actually join the system to the Active Directory domain. run the "authconfig-tui" program again. Click next. And this time on the second screen select "Join Domain". Enter a domain administrator's username and password and join the domain. After entering the credentials select OK to save and exit.</p> <p> You are now done, you should be able to log out (as root) and log in as any domain member. Upon first login your come directory should be created automatically.</p> http://lanrat.com/linux/active-directorylinuxhttp://lanrat.com/projects/car-inverterBuild Your Own Car Power Invertermrlanrat2010-08-28 12:28:09<p> A car inverter will take the 12 volts DC from your car; usually from your cigarette lighter and turn it into 110 volts AC, which is what you get out of your home power outlets. This allows you to plug household electronics into your car. the most common would probably be your laptop. Home UPS systems do the same thing, except instead of using a car outlet they use a 12 volt battery. I used a old home UPS system I had laying around that had a bad battery. (We don't use the battery in this mod)</p> <h2> Preparing the UPS</h2> <p> Here is the UPS before any modifications:</p> <p style="text-align: center;"> <img alt="" src="http://lh4.ggpht.com/_55LVV0RexIc/THAmKwkIu7I/AAAAAAAABVc/0N9q3MaSkJE/s288/IMG_0079.JPG" style="width: 288px; height: 216px;" /></p> <p> Only half of the outlets on the device are given power from the UPS system, the rest act as a regular surge strip. The first thing I did was rewire the "surge" outlets to be wired into the UPS power so that all of the outlets would be provided power from the UPS system.</p> <p style="text-align: center;"> <img alt="" src="http://lh6.ggpht.com/_55LVV0RexIc/THAmLb0M1yI/AAAAAAAABVk/JS7-pcKP3tc/s288/IMG_0082.JPG" style="width: 288px; height: 216px;" /><img alt="" src="http://lh6.ggpht.com/_55LVV0RexIc/THAmLjFvjYI/AAAAAAAABVo/y27kFWlAG2A/s288/IMG_0083.JPG" style="width: 288px; height: 216px;" /></p> <p> Next I took a car plug adapter I had lying around and conected it to the battery termiinals after removing the battery.</p> <p style="text-align: center;"> <img alt="" src="http://lh4.ggpht.com/_55LVV0RexIc/THAmL0YI2LI/AAAAAAAABWg/NxEhgs4npFw/s288/IMG_0084.JPG" style="width: 288px; height: 216px;" /><img alt="" src="http://lh4.ggpht.com/_55LVV0RexIc/THAm9jgJIUI/AAAAAAAABWk/_592PveLZxw/s288/IMG_0085.JPG" style="width: 288px; height: 216px;" /></p> <h2> Testing</h2> <p> The UPS system was working and outputting ~106 volts AC from a car's 12 volts outlet. Here you can see it in action with my meter and a wireless router.</p> <p style="text-align: center;"> <img alt="" src="http://lh5.ggpht.com/_55LVV0RexIc/THAm-eVjFnI/AAAAAAAABV4/ShxiFLvDyuI/s288/IMG_0087.JPG" style="width: 288px; height: 216px;" /><img alt="" src="http://lh3.ggpht.com/_55LVV0RexIc/THAm-uY81II/AAAAAAAABV8/ceLNTN56Qmw/s288/IMG_0090.JPG" style="width: 288px; height: 216px;" /></p> <p> This worked great, but the UPS has a buzzer in it which stayed on. The purpose of this buzzer was to notify you that your power is out and that you are on battery power. However it serves us no purpose and is just really annoying. I fixed it by unsoldering the buzzer from the main circuit board.</p> <h2> Some Final Modifications</h2> <p> In addition to movie the buzzer, I also wanted to make the device smaller as half of it is empty space due to the lack of a battery.</p> <p> I started my moving two of the LEDs that are on the batter end over to the power switch. I moved just the Power and Overload LEDs, the rest served no use for an inverter.</p> <p style="text-align: center;"> <img alt="" src="http://lh5.ggpht.com/_55LVV0RexIc/THAm_JtIpOI/AAAAAAAABWw/dhLrkDBvpOk/s288/IMG_0111.JPG" style="width: 288px; height: 216px;" /><img alt="" src="http://lh4.ggpht.com/_55LVV0RexIc/THAnRysoKpI/AAAAAAAABWM/anQpacEsrRA/s288/IMG_0114.JPG" style="width: 288px; height: 216px;" /></p> <p> I used a pipe saw to cut of the battery compartment, there was already a divider on the inside that would now act as the outside wall on that end.</p> <p style="text-align: center;"> <img alt="" src="http://lh3.ggpht.com/_55LVV0RexIc/THAnR9QXglI/AAAAAAAABWQ/TlpvAzDl770/s288/IMG_0117.JPG" style="width: 288px; height: 216px;" /><img alt="" src="http://lh6.ggpht.com/_55LVV0RexIc/THAn6huP9dI/AAAAAAAABWY/2v-3CnEyy4o/s288/IMAG0005.jpg" style="width: 288px; height: 216px;" /></p> <p> This ups works perfectly as a power inverter. I have used it on several road trips just fine, And because it was intended to be a computer UPS, it can power 350 watts, which is much more than your average car inverter.</p> http://lanrat.com/projects/car-inverterprojectshttp://lanrat.com/n810/computer-gpsN810 as Computer GPSmrlanrat2010-08-21 12:17:45<p> This guide will tell you how to let a windows computer make use of your N810's GPS as if it was its own. While the Nokia N810 does not have the best GPS in the world it is still better than no GPS. On a recent road trip I wanted a way to visualize my trip route on a more powerful device than my N810's 400Mhz possessor and <a href="https://garage.maemo.org/projects/maemo-mapper/" target="_blank">Maemo Mapper</a>. I wanted the full use of my laptop, <a href="http://earth.google.com/" target="_blank">Google Earth</a> and the internet.</p> <h3> Preparing The Tablet</h3> <p> The built in GPS software does not allow us do do anything advanced like this. We will be using <a href="http://maemo.org/downloads/product/OS2008/minigpsd/" target="_blank">Minigpsd</a> as a replacement for the built in GPS interface software. Minigpsd allows for many more advanced options for the GPS, and may even assist in getting locks faster. Install Minigpsd from the above link. After the installation is complete open up the settings and click the "Advanced" button. Here you will be able to see and set the ports Minigpsd communicates on. You can either leave them at their defaults or change them however you see fit. Below is a screenshot of my configuration.</p> <p style="text-align: center;"> <img alt="N810 Minigpsd setup" src="http://lh6.ggpht.com/_55LVV0RexIc/S7ZG_0YYDRI/AAAAAAAABFU/uhvZ6RgFziU/n810-minigpsd.png" style="width: 400px; height: 240px;" /></p> <p> Now you need to network the Tablet and your Computer. In my case (On a road trip) I was unable to have an access point around, especially in a moving car. So I used an Ad-Hoc Wireless network. But you can use any method you want, including Bluetooth Pan or over your cellular network. I will not go into how to set this up here.</p> <h3> Preparing The Computer</h3> <p> Assuming that your computer is now networked to your N810 you will need software than can take the GPS data from the N810 over the network and bring it to the computer in a form it can use. The best software that I could find that does this is <a href="http://www.hw-group.com/products/hw_vsp/index_en.html" target="_blank">HW Group's Virtual Serial Port</a>. This software will take the GPS data and make a virtual serial port. From your computer's point of view it will think that there is a serial GPS attached to it.</p> <p> Simply start the virtual serial port software up and create a new virtual serial port. It will need an IP address and port. the IP is the IP of your tablet and the port is the "gps direct" port. n the above example is it 22947. Once the port is created make sure your N810 is on and pingable from your computer, and GPSD is running.</p> <h3> Testing It Out</h3> <p> Your computer should now see your N810 as a RAW serial GPS device. To test it out install some GPS aware software. I used <a href="http://earth.google.com/" target="_blank">Google Earth</a>.</p> <p> On Google Earth open Tools -> GPS -> Realtime you should see the following:</p> <p style="text-align: center;"> <img alt="Google Earth NMEA GPS" src="http://lh6.ggpht.com/_55LVV0RexIc/THAePW9A8RI/AAAAAAAABVQ/xoSPiKyTNsU/s400/GE GPS.png" style="width: 295px; height: 400px;" /></p> <p> If you want to start tracking of the N810, click start. You can change the frequency of the position updates by changing the "Polling interval".</p> <p> An alternate method of setting this up without the use of any serial-port emulator on the computer is to use Google Earth's Network Link function. This will allow Google Earth to look on the N810 for a kml file containing its current longitude and latitude, and use that instead. This KML file can be found on GPSD's internal web server. On the above example we can see I have it set to run on port 8888. Below is my example configuration:</p> <p style="text-align: center;"> <img alt="Google Earth Network Link" src="http://lh4.ggpht.com/_55LVV0RexIc/THAePQcmtDI/AAAAAAAABVU/5Q5ty5IDMb4/s400/GE Net.png" style="width: 400px; height: 388px;" /></p> <p> I suggest you uncheck "Allow this folder to be expanded" because this file will only contain one updating set of points. also, if you want to use this for real time tracking set the "Time-Based Refresh" to Periodically, and the number of seconds you want between updates. the lower the more smooth the movement will appear.</p> <p> This concept should work with any GPSD compatible device, including other computers and some modern <a href="http://code.google.com/p/gpstether/" target="_blank">cell phones</a>. And is in now way limited to Google Earth. I have also tested it with <a href="http://www.netstumbler.com/downloads/" target="_blank">NetStumbler </a>and <a href="http://www.metageek.net/products/inssider" target="_blank">inSSIDer</a>.</p> http://lanrat.com/n810/computer-gpsn810http://lanrat.com/android/incredible-video-outHTC Incredible Video Outmrlanrat2010-06-02 20:33:55<p> I recently got a HTC Incredible to replace my aging LG Chocolate. One feature of the Incredible was video out. Specifically the ability to output composite video to a TV. The cable was first demoed by WireFly here: <a href="http://www.youtube.com/watch?v=eJyt463AoOA" target="_blank">http://www.youtube.com/watch?v=eJyt463AoOA</a> And since then <a href="http://www.droidforums.net/forum/droid-incredible-accessories/41047-micro-mini-usb-incredible.html" target="_blank">threads </a>like <a href="http://androidforums.com/htc-incredible/68032-tv-out-cable-htc-incredible.html" target="_blank">these</a> have started trying to hunt down the cable. And it looks like one day it may be sold <a href="http://shop.htcpedia.com/index.php?dispatch=products.view&product_id=875&compability_product=757" target="_blank">Here </a>or <a href="http://www.bensbazaar.com/htc-oem-brand-name-av-micro-cable-for-htc-incredible-73h0034800m.html" target="_blank">Here</a>. But for the time being this cable is not being sold anywhere, and there is a rumor that it may never be commercially sold.</p> <p> Luckily smokeynerd over at <a href="http://forum.xda-developers.com" target="_blank">XDA Developers</a> made a cable for himself and got the pinouts of the extra 7 pins in the Incredible's Micro-USB port. See this thread: <a href="http://forum.xda-developers.com/showthread.php?p=6647344" target="_blank">http://forum.xda-developers.com/showthread.php?p=6647344</a>. With this information I set out to make my own cable. My first attempt was just to verify that it worked, and it was a success. I used alligator clips and needles to make the connection to the video out and ground. But this was not a practical solution because I needed to hold the needles in just the right place so that they would make contact. </p> <p style="text-align: center;"> <img alt="First video out cable" src="http://lh6.ggpht.com/_55LVV0RexIc/TAchUXHNeFI/AAAAAAAABKI/LwOoI6YTbec/IMAG0125.jpg" style="width: 344px; height: 206px;" /></p> <p> Now that I knew that it worked I set out to find something a little more practical. I found a ribbon cable that was just the right size and had the correct pin alignment in an old laptop, (By old I mean it was so old it used the same processor as a desktop, think under 100Mhz). Without thinking twice I scrapped the laptop and used the cable. This ribbon cable was not enough on its own, I also used a standard micro-usb cable to hold it in place, which also allowed the Incredible to charge/sync while the video out is in use. I used two alligator clips much like I did the first time to make the connections to the TV. Below you can see the ribbon cable and micro-USB.</p> <p style="text-align: center;"> <img alt="Ribbion cable" src="http://lh3.ggpht.com/_55LVV0RexIc/TAckCS0WMaI/AAAAAAAABKg/ILdCK4Ugp-g/s912/IMAG0126.jpg" style="width: 328px; height: 196px;" /><img alt="" src="http://lh3.ggpht.com/_55LVV0RexIc/TAcsimI9wpI/AAAAAAAABKo/tJzGc17CdL8/s800/P1020021.JPG" style="width: 335px; height: 252px;" /></p> <p> Here is a video of the final result:</p> <p style="text-align: center;"> <object height="505" width="640"><param name="movie" value="http://www.youtube.com/v/fAA15n0T-G0&hl=en_US&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed allowfullscreen="true" allowscriptaccess="always" height="505" src="http://www.youtube.com/v/fAA15n0T-G0&hl=en_US&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999" type="application/x-shockwave-flash" width="640"></embed></object></p> <p> It works, but I will still be looking into improving it, specifically removing the need for alligator clips. I also noticed that a few pixels are being cut off. This is not a limitation of my cable, this is probably software related, but could possibly have something to do with the Incredible's video out hardware. When In landscape mode about 5 pixels are missing from the left and when in portrait, both the top and bottom are being cut off. There are also bars on the TV (At least on mine) that go around the entire image, reducing the Incredible's viewing aria. I was also unable to get the audio to work via this connector, and the Incredible disables its speaker when using video out, however the headphone output still works.</p> <p> <strong>UPDATE:</strong> I was able to fix the missing pixels and bars by adjusting my TV's "picture size". But I need to re-adjust it every time it switched from landscape to portrait or vise-versa. Hopefully this is just a problem with this particular TV. Below you can see the Phone's screen without any bars or missing pixels on my TV.</p> <p style="text-align: center;"> <img alt="" src="http://lh3.ggpht.com/_55LVV0RexIc/TAcsi4xEi4I/AAAAAAAABKs/2phaaFaEzPk/s800/P1020022.JPG" style="width: 436px; height: 326px;" /></p> <h3> More To Come Soon</h3> <p> <strong>Links</strong></p> <ul> <li> <a href="http://forum.xda-developers.com/showthread.php?p=6647344" target="_blank">Fourm thread with pinouts</a></li> <li> <a href="http://www.youtube.com/watch?v=fAA15n0T-G0" target="_blank">Youtube Demo</a></li> </ul> http://lanrat.com/android/incredible-video-outandroidhttp://lanrat.com/linux/pxeBuilding a PXE Servermrlanrat2010-04-18 18:35:39<p> PXE is a method for booting an operating system over a network, it stands for Pre Executable environment. Here I will show you how to build a PXE server to boot and or install operating systems over your network.</p> <h3> Installing the server OS</h3> <p> I made this server inside vmware, however the steps are the same if you are using a different virtual machine server or a physical machine. I used Debian 5.0 and used the netinstall iso. Since we will only be needing a bare debian install and just a few extra packages there is no need to download/install the entire OS.</p> <p> Once you boot the installer follow all the installation prompts and enter the values that apply to you (language/timezone/password/etc). When taksel rins I would recommend unselecting all the options to get the smallest install possible. <img alt="tasksel in debain" src="http://lh4.ggpht.com/_55LVV0RexIc/S8u3wqWmWTI/AAAAAAAABG8/aiAdGVReUPM/pxe1.png" /></p> <p> After this the installation will finish, the computer will reboot and you will be presented with a login prompt.</p> <h3> Installing and Setting up the required Services</h3> <p> Now that you have a fresh install of debian install the required packages</p> <div id="code"> apt-get install tftpd-hpa dhcp3-server lftp</div> <p> This will install the tfp server and a dhcp server. the two programs needed to load files over pxe. Next we need to configure the network to be static. edit /etc/network/interfaces and change the network configuration to something like this:</p> <div id="code"> iface eth1 inet static<br /> address 192.168.1.6<br /> netmask 255.255.255.0<br /> gateway 192.168.1.1</div> <p> Now bring back up the network interface with ifdown eth0 ifup eth0 to have the new settings take affect.</p> <p> Next we want to edit /etc/dhcp3/dhcpd.conf. this is the configuration file for the dhcp server. You can look at the default file to see how it is setup, but we don't need it. replace it with:</p> <div id="code"> allow booting;<br /> allow bootp;<br /> <br /> option domain-name-servers 192.168.1.1;<br /> default-lease-time 86400;<br /> max-lease-time 604800;<br /> authoritative;<br /> <br /> subnet 192.168.1.0 netmask 255.255.255.0 {<br />         range 192.168.1.100 192.168.1.200;<br />         filename "pxelinux.0";<br />         next-server 192.168.1.6;<br />         option subnet-mask 255.255.255.0;<br />         option broadcast-address 192.168.1.255;<br />         option routers 192.168.1.1;<br /> }</div> <p> This will configure your dhcp server to hand out addresses between 192.168.1.100-200, use a router of 192.168.1.1. And if the dhcp client asks the dhcp server for boot information it will tell it to load a file named pxelinux.0 from 192.168.1.6, which is our server. DHCP is now setup.</p> <p> Now we need to edit the tftp settings. Edit /etc/default/tftpd-hpa. Change the RUN_DAMON to yes and change the options directory to /tftp, save and close the file. Noe run "mkdir -p /tftp" to create our tftp folder. this will be the server root.</p> <p> Now start the PXE server with:</p> <div id="code"> /etc/init.d/dhcp3-server start<br /> /etc/init.d/tftpd-hpa start</div> <h3> Setting up the PXE tftp folder</h3> <p> in the root of the tftp folder we need to have pxelinux.0. this is the file that our dhcp server tells the client to download. You can download the latest version from here: <a href="http://www.kernel.org/pub/linux/utils/boot/syslinux/" target="_blank">http://www.kernel.org/pub/linux/utils/boot/syslinux/</a> you will need pxelinux.0 found in the core folder of the zip. Place pxelinux.0 in the /tftp folder. Next create a pxelinux.cfg folder inside /tftp. And inside the pxelinux.cfg folder create a default file. This file will contain the boot information for clients if there is not a file that matched their MAC address. If there is one it would be in the pxelinux.cfg folder. Inside of default put:</p> <div id="code"> DISPLAY boot.txt<br /> <br /> DEFAULT debian_install<br /> <br /> LABEL debian_installl<br />         kernel debian/etch/i386/linux<br />         append vga=normal initrd=debian/lenny/i386/initrd.gz  --<br /> <br /> LABEL memtest<br />         kernel memdisk<br />         append initrd=memtest.img  --<br /> <br /> LABEL DSL<br />         kernel dsl/linux24<br />         append ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 initrd=dsl/minirt24.gz nomce noapic quiet BOOT_IMAGE=knoppix  --<br /> <br /> PROMPT 1<br /> TIMEOUT 0</div> <p> And now create a boot.txt in your /tftpd folder with the following contents:</p> <div id="code"> =PXE Boot Menu=<br /> +++++++++++++++<br /> options are:<br /> <br /> debian_install<br /> DSL<br /> memtest</div> <p> Now the boot.txt will be displayed allowing you to enter a label that is defined in default and it will boot that kernel with the given options. You can edit default and boot.txt however you like. In the examples iv given you have the option to install debian, boot memtest, or boot damn small linux. However we are still missing a vital part of the pxe server. We need the actual boot files. You can download the debian files <a href="http://ftp.uk.debian.org/debian/dists/etch/main/installer-i386/current/images/netboot/debian-installer/i386" target="_blank">HERE</a> The DSL and memtest files can be found on their appropriate websites.</p> <p> Each boot option should go in its own folder inside the /tftp folder. In the above example debian is in the debian folder, dsl is in dsl. However because memtest is only a single file i put it directly in the tftpd root. Remember you must edit the default file to contain the correct boot arguments and kernel for what you are trying to boot.</p> <p> Happy Network Booting!</p> <p> <a href="http://syslinux.zytor.com/wiki/index.php/PXELINUX" target="_blank">PXE from Syslinux</a></p> http://lanrat.com/linux/pxelinuxhttp://lanrat.com/linux/switch-ethSwitch Network Interface in Linuxmrlanrat2010-04-07 08:54:58<p> This guide will tell you how to rename or switch network controller names in Linux. Often when installing Linux the installer will automatically pick the names of the network controllers. And for some reson the order it names them is almost always not the order I want them in. I usually like the primary/onboard card eth0, and all addin cards eth1-n, however the installer often has its own ideas. So this is how to correct it!</p> <p> First off we need to tell the kernel which name gets associated with which physical card. On Debian based systems the information is in /etc/udev/rules.d/70-persistent-net.rules and on Redhat based systems it is in /etc/sysconfig/network-scripts/ifcfg-ethX. You will need to edit thoes files as root. In each file will be a line for each network controller with its mac address, driver, and name. You want to just edit the name to be what you want. For me that is often just changing eth0 to eth1 and vise versa. When you are done you may save these files.</p> <p> Next you need to configure the IP information for the controllers. Edit (as root) /etc/network/interfaces. This file contains the IP address settings for each adapter. If you want eth0 to USE DHCP use:</p> <div id="code"> auto eth0<br /> iface eth0 inet dhcp</div> <p> If you want to settup a static IP address use:</p> <div id="code"> iface eth1 inet static<br /> address 192.168.1.5<br /> netmask 255.255.255.0<br /> gateway 192.168.1.1</div> <p> But obviously change the settings to fit your needs.</p> <p> Now save that file and apply reboot to apply the changes.</p> <p> <a href="http://serverfault.com/questions/48848/switch-eth0-and-eth1-in-ubuntu-server" target="_blank">Stack Overflow Question on this</a></p> <h3> Manual temporary configuration</h3> <p> As you should know ifup ethX turns on the network interface and ifdown ethX turns it off, but these only work if the above interfaces file is configured correctly. If the file is configured incorrectly or you want to temporarily use a different configuration you can do so with these commands. Note that the adapter must be in the "down" state before issuing these. you can do this by running "idfown ethX"</p> <div id="code"> ifconfig [device] [static ip ] netmask [network mask] gateway [router ip] up</div> <p> Or</p> <div id="code"> ifconfig [device] dhcp start</div> <p> This will bring your current network adapter up with a temporary configuration which will be cleared next time the adapter is brought down (either manually or by a reboot)</p> http://lanrat.com/linux/switch-ethlinuxhttp://lanrat.com/code/html5-cubeHTML 5 Cubemrlanrat2010-03-31 23:31:41<p> HTML 5 allows you to create 3D objects. Using CSS you can create isometric objects. I will demo this by building a cube in html. First we need to start off with a div.</p> <div id="code"> <div id="cke_pastebin"> div class="cube"></div> <div id="cke_pastebin"> <div class="face top"></div></div> <div id="cke_pastebin"> <div class="face left"></div></div> <div id="cke_pastebin"> <div class="face right"></div></div> <div id="cke_pastebin"> </div></div> </div> <p> Next we need to setup the CSS for our cube.</p> <div id="code"> <div id="cke_pastebin"> .cube {</div> <div id="cke_pastebin">     position: absolute;</div> <div id="cke_pastebin">     top: 1000px;</div> <div id="cke_pastebin">     left: 360px;</div> <div id="cke_pastebin"> }</div> <div id="cke_pastebin"> .face {</div> <div id="cke_pastebin">     position: absolute;</div> <div id="cke_pastebin">     width: 200px;</div> <div id="cke_pastebin">     height: 200px;</div> <div id="cke_pastebin">     overflow: hidden;</div> <div id="cke_pastebin">     font-family: monospace;</div> <div id="cke_pastebin">     font-size: 24px;</div> <div id="cke_pastebin"> }</div> <div id="cke_pastebin"> .top {</div> <div id="cke_pastebin">     top: 0;</div> <div id="cke_pastebin">     left: 89px;</div> <div id="cke_pastebin">     background: #fff;</div> <div id="cke_pastebin">     color: #999;</div> <div id="cke_pastebin">     -webkit-transform: rotate(-45deg) skew(15deg, 15deg);</div> <div id="cke_pastebin">     -moz-transform: rotate(-45deg) skew(15deg, 15deg);</div> <div id="cke_pastebin"> }</div> <div id="cke_pastebin"> .left {</div> <div id="cke_pastebin">     top: 155px;</div> <div id="cke_pastebin">     left: 0;</div> <div id="cke_pastebin">     background: #999;</div> <div id="cke_pastebin">     color: #333;</div> <div id="cke_pastebin">     -webkit-transform: rotate(15deg) skew(15deg, 15deg);</div> <div id="cke_pastebin">     -moz-transform: rotate(15deg) skew(15deg, 15deg);</div> <div id="cke_pastebin"> }</div> <div id="cke_pastebin"> .right {</div> <div id="cke_pastebin">     top: 155px;</div> <div id="cke_pastebin">     left: 178px;</div> <div id="cke_pastebin">     background: #ccc;</div> <div id="cke_pastebin">     color: #666;</div> <div id="cke_pastebin">     -webkit-transform: rotate(-15deg) skew(-15deg, -15deg);</div> <div id="cke_pastebin">     -moz-transform: rotate(-15deg) skew(-15deg, -15deg);</div> <div id="cke_pastebin"> }</div> </div> <p> Now you can place whatever you want into your divs and it will be placed on the cube. Below is an example:</p> <style media="screen" type="text/css"> .cube { position: absolute; top: 1210px; left: 360px; } .face { position: absolute; width: 200px; height: 200px; overflow: hidden; font-family: monospace; font-size: 24px; } .top { top: 0; left: 89px; background: #fff; color: #999; -webkit-transform: rotate(-45deg) skew(15deg, 15deg); -moz-transform: rotate(-45deg) skew(15deg, 15deg); } .left { top: 155px; left: 0; background: #999; color: #333; -webkit-transform: rotate(15deg) skew(15deg, 15deg); -moz-transform: rotate(15deg) skew(15deg, 15deg); } .right { top: 155px; left: 178px; background: #ccc; color: #666; -webkit-transform: rotate(-15deg) skew(-15deg, -15deg); -moz-transform: rotate(-15deg) skew(-15deg, -15deg); }</style> <div class="cube"> <div class="face top"> <img height="200" src="http://lanrat.com/_old/img/rat.jpg" width="200" /></div> <div class="face left"> Lorem ipsum dolor sitamet, consectetur adipiscing elit. Nam eget dolor dui. Phasellus metus mauris, tincidunt ut porttitor quis, auctor vitae felis.</div> <div class="face right"> <textarea cols="22" rows="12">Hello World! This is a textarea. Type Here!</textarea></div> </div> <p> <a href="http://www.zachstronaut.com/lab/isocube.html" target="_blank"><br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> 3D cube Demo I used for this example</a></p> http://lanrat.com/code/html5-cubecodehttp://lanrat.com/linux/sshSSH Tips and Tricksmrlanrat2010-03-30 20:40:50<h3> Part 1 - Screen</h3> <p> Screen is a program that can create virtual terminals inside your current session. If you are used to a tabbed web browser you can think about it as adding tabs to your terminal. And if your server allows it can allow you to disconnect sessions and keep then running in the background, even if you log out.</p> <p> You can install screen on debian with apt-get by running "sudo apt-get install screen" and "yum install screen" for rpm based systems.</p> <p> Start screen by running:</p> <div id="code"> $ screen</div> <p> The first time you run screen it will create a new window. this window is just like the session you left behind to enter screen. you can tun any program you usually would have. and exit or close the window by typing exit and pressing enter.</p> <p> Now got the fun part! Enter a new screen session by running screen. You can now run any program you like and leave it running, start your cli mail client or wget a large file. Now press Ctrl-a and then c. This will create a new windows (or tab if you will) in your current screen session. Ctrl-a is the screen hotkey to allow the user to enter a command to screen and not the currently running program or the current shell. In the previous example Ctrl-a c we told screen we where going to give it a command and then gave it the C command which stands for Create, as you can guess this created a new screen window.</p> <p> Some of the important screen commands are Ctrl-a k: kills the current window, same as typing exit. Ctrl-a w: lists all open windows, Ctrl-a n: go to the next window or cycles through the available windows. Ctrl-a d: this will detach the current sessions, this allows the sessions to run in the background while you are droppecked back into your shell. You can resume the session anytime later (even after logging out) by running:</p> <div id="code"> screen -r <name of session></div> <p> You can view a list of the available screen sessions by running:</p> <div id="code"> screen -ls</div> <p> However there is a wildcard resume that will resume the last open session or create one if there are none, to resume any open session run:</p> <div id="code"> screen -R</div> <p> Screen can also do much more, If you want to learn more take a look at the screen manual.</p> <h3> Part 2 - Sceen as a proxy</h3> <p> Openshh server has the ability to be used as a <a href="http://en.wikipedia.org/wiki/SOCKS" target="_blank">SOCKS</a> proxy. Using it as a socks proxy will allow you to run your proxyed applications network traffic through the ssh server.</p> <h4> Windows with putty</h4> <p> You can use putty to allow a windows client to connect to the ssh/socks proxy. On the putty client go to the Tunnels page and enter any source port you want, this will be the port that you will tell your local application to use at the proxy server port. Leave the destionation field blank and select the dynamic checkbox. Select Add to add the port. It should look like this:</p> <p> <img alt="Putty configured for socks proxy" src="http://lh3.ggpht.com/_55LVV0RexIc/S7LpscALObI/AAAAAAAABEo/bfJ5by_QjPY/putty socks.jpg" style="width: 454px; height: 440px;" /></p> <p> From here once you connect to the ssh server the port you specified on 127.0.0.1 or localhost will open as a socks proxy.</p> <h4> Linux</h4> <p> To connect to an ssh server and use it as a SOCKS proxy using linux connect to the ssh server the way you normally would but add -D <port> as a paramater. -D tells the destionation port to be dynamic and <port> is the port that will listen for the proxy server on the local computer, just remember if you are not root locally your port needs to be over 1024. Here is an example:</p> <div id="code"> ssh -D 1234 mrlanrat@sshserver.com</div> <p>  </p> <h4> Using the Proxy</h4> <p> Here is an example setting up the proxy with Firefox, it should be a similar configuration for other programs.<img alt="Firefox configuration for socks proxy." src="http://lh5.ggpht.com/_55LVV0RexIc/S7LwFIR2-BI/AAAAAAAABEs/C-mdNL_OvXM/firefox socks.jpg" style="width: 413px; height: 469px;" /></p> <h3> Part 3 - X11 Forwarding</h3> <p> X11 forwarding allows you to run X or graphical applications on the server over ssh. To forward X programs over ssh on Linux apply the -X paramater, below is an example.</p> <div id="code"> ssh -X user@host</div> <p> If you want to compress the X information while it is being transferd apply the -c argument.</p> <div id="code"> ssh -c -X user@host</div> <p> If And you can start X11 applications and allow the shell to still remain active by applying a '&' to the end of the application. example:</p> <div id="code"> firefox &</div> <div>  </div> <p> If you want to start the complete X desktop over ssh and not just a single application you can run:</p> <div id="code"> srartx</div> <p> On windows you can enable ssh in putty by clicking the enable X11 forwarding checkbox in the X11 tab. screenshot below:</p> <p> <img alt="Putty with x11 forwarding" src="http://lh5.ggpht.com/_55LVV0RexIc/S7LyMNIWseI/AAAAAAAABE0/YaLYk2fQRTc/putty-x11.jpg" style="width: 456px; height: 442px;" /></p> <h3> Part 4 - Reverse SSH</h3> <p> You can ssh into a server that is behind a NAT through a reverse ssh server. Put simply the server would need to ssh into either the client machine or a machine that the client has access to, like a middleman. When the server sshes into the other computer you will need to have it tunnel its port 22 (or the port that ssh is running on) to any port on the computer client or midleman that the server is sshing to. Below is an example of this: </p> <div id="code"> ssh -R 2222:localhost:22 user@client</div> <p> This assumes that port 2222 is the port the client or middleman will have open that will allow the client to ssh into the server. user@client is the user and host of the client or middleman server. From there have the client either ssh into itself or the middleman server and it will be tunneled into the server.</p> http://lanrat.com/linux/sshlinuxhttp://lanrat.com/projects/carCar Aux Modmrlanrat2009-11-14 19:36:01<p>Here is How I added a AUX inputs to my Delco Radio/CD player and a nice mount for my N810.</p> <h3>Part 1 - Adding The AUX Input</h3> <p>First off This worked on my Delco radio. It may work on yours, it may not. On My radio there is a nice AUX button right under the CD button. This goes to a AUX connector on the back of the unit. This is Delco AUX plug. It was meant to to to a separate tape deck. Unfortunately this plug needs an intelligent device connected to it to enable itself. If you are interested the pinout is <a href="http://underthedash.com/viewthread.php?tid=728" target="_blank">Here</a>. There is also a device you can buy that will plug into this AUX port and give you a normal RCA connection, but the idea of this is to spend as little money as possible and have the fun of doing it yourself</p> <p><strong>Warning:</strong> If you disconnect your radio from your car battery or any other source of power it may lock itself, this is part of the anti-theft feature. If your radio locks itself there is a link at the bottom with unlocking instructions.</p> <p>The idea is to splice into the CD's input with your own input. Here is the connector and the pins you will need. The ground is in between the Left and Right, but you can use any ground.<br /> <a href="http://lh3.ggpht.com/_55LVV0RexIc/SR95hgdt3_I/AAAAAAAAAj0/Vn1vhAg_-sA/s800/cd_conector.jpg" target="_blank"><img src="http://lh3.ggpht.com/_55LVV0RexIc/SR95hgdt3_I/AAAAAAAAAj0/Vn1vhAg_-sA/s288/cd_conector.jpg" /></a><a href="http://lh4.ggpht.com/_55LVV0RexIc/SR95h7yRDeI/AAAAAAAAAj8/m4wks7E_SMY/s800/cd_plug.jpg" target="_blank"><img src="http://lh4.ggpht.com/_55LVV0RexIc/SR95h7yRDeI/AAAAAAAAAj8/m4wks7E_SMY/s288/cd_plug.jpg" /></a></p> <br /> <p>Here is my dash before the mod<br /> <img src="http://lh4.ggpht.com/_55LVV0RexIc/SR9xdiO6b4I/AAAAAAAAAhc/83InN774U6E/s288/before.jpg" /><img src="http://lh6.ggpht.com/_55LVV0RexIc/SR9xglm84tI/AAAAAAAAAhg/cc9pn8eXQGc/s288/before1.jpg" /></p> <br /> <p>Opening the Radio<br /> <img src="http://lh5.ggpht.com/_55LVV0RexIc/SR9xjs5_ouI/AAAAAAAAAhk/QelgT9DRbT4/s288/open1.jpg" /><img src="http://lh3.ggpht.com/_55LVV0RexIc/SR9xrKCrkvI/AAAAAAAAAhs/NwTBO8xPWsE/s288/workspace.jpg" /></p> <br /> <p>Splicing the needed wires<br /> <img src="http://lh6.ggpht.com/_55LVV0RexIc/SR9xnXYNp5I/AAAAAAAAAho/Xe7uov5Ze_4/s288/inside.jpg" /><img src="http://lh5.ggpht.com/_55LVV0RexIc/SR9x1FsRhqI/AAAAAAAAAh4/Rnv2pjDeq1g/s288/wires_conected.jpg" /></p> <p>I wired my 3.5mm AUX jack in the front of the unit. It barely fit. It would have been a lot easer to run the wires out of the unit and mount it elsewhere in your car. Anyway the idea is when you are on the CD input it will use the audio from the CD player unless there is a jack in the AUX input. I used a Radio Shack part # 274-0246 similar jacks will work but they may not allow you to switch from CD to AUX. Here is the wiring diagram of the jack. <div id="code"> Pin 1 - Ground - connect to radio ground<br /> Pin 2 - Left Channel - wire from CD connector on main circuit board<br /> Pin 3 - Left Channel - wire coming from CD player module<br /> Pin 4 - Right Channel - wire coming from CD player module<br /> Pin 5 - Right Channel - wire from CD connector on main circuit board<br /> </div> <br /> <img src="http://lh5.ggpht.com/_55LVV0RexIc/SR988yayXhI/AAAAAAAAAkE/AkpzDt9y-6I/s800/274-0246.jpg" /></p> <br /> <br /> <p>Here is the jack wired through the front panel<br /> <img src="http://lh6.ggpht.com/_55LVV0RexIc/SR9yUs8QZBI/AAAAAAAAAiU/LcAQzIwTyVA/s288/conecting_front_jack.jpg" /><img src="http://lh5.ggpht.com/_55LVV0RexIc/SR9yPQmIQhI/AAAAAAAAAiQ/vZnL6ql4RSE/s288/audio_jack.jpg" /></p> <br /> <p>Testing it with my N810 before I put it all together<br /> <img src="http://lh3.ggpht.com/_55LVV0RexIc/SR9zGZPWjbI/AAAAAAAAAjE/VfD51XoZscI/s288/testing_bottom_off.jpg" /><img src="http://lh5.ggpht.com/_55LVV0RexIc/SR9zAzbOOhI/AAAAAAAAAi8/YGS_DwodYfs/s288/more_testing.jpg" /></p> <br /> <p>Putting it all back together<br /> <img src="http://lh5.ggpht.com/_55LVV0RexIc/SR9ykSRgyaI/AAAAAAAAAik/yecpUwuuUkM/s288/inside_wires_conected.jpg" /><img src="http://lh6.ggpht.com/_55LVV0RexIc/SR9zWSY1SfI/AAAAAAAAAjQ/KqDjVrHdsy0/s288/before3.jpg" /></p> <br /> <h3>Part 2 - N810 Mount</h3> <p>I did not want spend the money to buy the rest of the mount that the N810 came with, or make anything that was too permanent. So I took the N810 half of the mount (the part the N810 came with) and decided to mount it in the empty slot in my dash. To do that I just screwed the end of it into a 3.5 inch long 2x4, and painted black to match. Here is the completed mount on its own, and in my dash.<br /> <img src="http://lh5.ggpht.com/_55LVV0RexIc/SR9zcbCgryI/AAAAAAAAAjc/OQnx7jnLlGs/s288/N810_mount.jpg" /><img src="http://lh4.ggpht.com/_55LVV0RexIc/SR9zfY77j2I/AAAAAAAAAjg/-yB6t3ba-2Q/s288/mount_in_place1.jpg" /></p> <br /> <h3>Part 3 - Finished!</h3> <p>Here is the final product with the N810 all hooked up<br /> <img src="http://lh5.ggpht.com/_55LVV0RexIc/SR9zka8cKwI/AAAAAAAAAjo/2w5JLX-VkTg/s288/N810_mounted.jpg" /><img src="http://lh6.ggpht.com/_55LVV0RexIc/SR9znDJ6JZI/AAAAAAAAAjs/FMxn5Tu9U2E/s288/all_done.jpg" /></p> <p><strong>Update:</strong> I also got a N810 cat charger to keep it going, playing lots of audio can drain the battery, and with canola I can keep the screen lit so I can always see what is playing.</p> <p><strong>Update 2:</strong> When using the AUX in you need to turn the volume up really high, that means that when you unplug it it will be extra loud, and hurt your speakers. in addition since the wires are so close together some of the CD player's sound signal will get mixed in with your AUX input due to electromagnetic radiation. To fix that I made an audio CD with 80 minutes of silence. I used Audacity to create one long audio file, then burned it to a CD. It fixed this problem. I will upload a compresses ISO if this disk soon.</p> <a href="http://picasaweb.google.com/mrlanrat/CarMod" target="_blank">To see more and higher resolution photos go to the picasa gallery</a> <br /> <br /> <h3>Related Links</h3> <p> <a href="http://www.ls1tech.com/forums/showthread.php?t=688297" target="_blank">Where I got the mod idea and information from</a><br /> <a href="http://www.automotiveforums.com/vbulletin/showthread.php?t=310354" target="_blank">Directions to unlock your radio</a><br /> <a href="http://www.ls1tech.com/forums/showthread.php?t=612644" target="_blank">More assorted pinouts</a><br /> </p>http://lanrat.com/projects/carprojectshttp://lanrat.com/linux/conkyConkymrlanrat2009-11-14 19:34:55<p> Conky is a system monitor for linux. It can tell you almost anyhting your computer, sutch as CPU useage, memory useage, network infomration, and almost anything else. Here is what my Conky configuration looks like on my desktop.</p> <p> <a href="http://lh6.ggpht.com/_55LVV0RexIc/SRi8gEwpcJI/AAAAAAAAAew/kMQj4MeyvsA/s1280/Screenshot.png" target="_blank"><img src="http://lh6.ggpht.com/_55LVV0RexIc/SRi8gEwpcJI/AAAAAAAAAew/kMQj4MeyvsA/s288/Screenshot.png" /></a> <img align="top" src="http://lh6.ggpht.com/_55LVV0RexIc/SRi4afSEqvI/AAAAAAAAAeU/hs0oCE_FI0I/s800/conky.png" /></p> <p> To install Conky on a RPM based distribution run</p> <div id="code"> # yum install conky</div> <p> Or on a Debain based distribution run</p> <div id="code"> $ sudo apt-get install conky</div> <p> <br /> To get yours to look like that you need to put a file named .conkyrc in your home folder. Your home folder is usually /home/<username>.</p> <p> This conky setup is very dynamic. It will display 1-4 possessors or cores, display the main root file system, up to 5 removable drives, and it will show all of the active network interface (wireless, wired, and wireless broadband) If you use a different network configuration for example two wired connections you can remove one of the unused ones and replace it with ypurs, or just add another entry.</p> <p> My .conkyrc file looks like this</p> <div id="code"> <pre> # Conky configuration # Set to yes if you want Conky to be forked in the background background no # Font size? font Sans:size=8 # Use Xft? use_xft yes # Text alpha when using Xft xftalpha 0.9 # Update interval in seconds update_interval 1.0 # This is the number of times Conky will update before quitting. # Set to zero to run forever. total_run_times 0 # Text alignment, other possible values are commented #alignment top_left #alignment top_right #alignment bottom_left alignment bottom_right #alignment none # Create own window instead of using desktop (required in nautilus) own_window yes # If own_window is yes, you may use type normal, desktop or override own_window_type normal # Use pseudo transparency with own_window? own_window_transparent yes # If own_window_transparent is set to no, you can set the background colour here own_window_colour black # If own_window is yes, these w# Text alignment, other possible values are commented #alignment top_left #alignment top_right #alignment bottom_left alignment bottom_right #alignment none # If own_window is yes, these window manager hints may be used own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager # Use double buffering (reduces flicker, may not work for everyone) double_buffer yes # Minimum size of text area minimum_size 200 5 # Draw shades? draw_shades yes # Draw outlines? draw_outline no # Draw borders around text draw_borders no # Draw borders around graphs draw_graph_borders yes # Default colors and also border colors default_color white default_shade_color black default_outline_color black # Text alignment, other possible values are commented #alignment top_left alignment top_right #alignment bottom_left #alignment bottom_right #alignment none # Gap between borders of screen and text # same thing as passing -x at command line gap_x 12 gap_y 35 # Subtract file system buffers from used memory? no_buffers no # set to yes if you want all text to be in uppercase uppercase no # number of cpu samples to average # set to 1 to disable averaging cpu_avg_samples 1 # number of net samples to average # set to 1 to disable averaging net_avg_samples 1 # Force UTF8? note that UTF8 support required XFT override_utf8_locale no TEXT ${color white}SYSTEM: $nodename $machine ${hr 1}${color} Uptime: $alignr$uptime CPU: ${alignr}${freq_dyn} MHz Processes: ${alignr}$processes ($running_processes running) Load: ${alignr}$loadavg ${if_existing /sys/devices/system/cpu/cpu0}CPU1 ${alignr}${cpu cpu1}% ${cpubar cpu1 4}${endif}${if_existing /sys/devices/system/cpu/cpu1} CPU2 ${alignr}${cpu cpu2}% ${cpubar cpu2 4}${endif}${if_existing /sys/devices/system/cpu/cpu2} CPU3 ${alignr}${cpu cpu3}% ${cpubar cpu3 4}${endif}${if_existing /sys/devices/system/cpu/cpu3} CPU4 ${alignr}${cpu cpu4}% ${cpubar cpu4 4}${endif} ${cpugraph 20} Ram ${alignr}$mem / $memmax ($memperc%) ${membar 4} Swap ${alignr}$swap / $swapmax ($swapperc%) ${swapbar 4} Highest CPU $alignr CPU% MEM% ${top name 1}$alignr${top cpu 1}${top mem 1} ${top name 2}$alignr${top cpu 2}${top mem 2} ${top name 3}$alignr${top cpu 3}${top mem 3} Highest MEM $alignr CPU% MEM% ${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1} ${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2} ${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3} ${color white}FILESYSTEMS ${hr 1}${color} Root ${alignr}${fs_free /} / ${fs_size /} ${fs_bar 4 /}${if_mounted /media/disk} Disk1 ${alignr}${fs_free /media/disk} / ${fs_size /media/disk} ${fs_bar 4 /media/disk}${endif}${if_mounted /media/disk-1} Disk2 ${alignr}${fs_free /media/disk-1} / ${fs_size /media/disk-1} ${fs_bar 4 /media/disk-1}${endif}${if_mounted /media/disk-2} Disk3 ${alignr}${fs_free /media/disk-2} / ${fs_size /media/disk-2} ${fs_bar 4 /media/disk-2}${endif}${if_mounted /media/disk-3} Disk4 ${alignr}${fs_free /media/disk-3} / ${fs_size /media/disk-3} ${fs_bar 4 /media/disk-3}${endif}${if_mounted /media/disk-4} Disk5 ${alignr}${fs_free /media/disk-4} / ${fs_size /media/disk-4} ${fs_bar 4 /media/disk-4}${endif} ${color white}NETWORK ${hr 1}${color} ${if_existing /sys/class/net/eth0/operstate up}IP (eth0):$alignr${addr eth0} Down: ${downspeed eth0} k/s ${alignr}Up: ${upspeed eth0} k/s ${downspeedgraph eth0 20,90} ${alignr}${upspeedgraph eth0 20,90} Total: ${totaldown eth0} ${alignr}Total: ${totalup eth0} ${endif}${if_existing /sys/class/net/wlan0/operstate up}IP (wlan0):$alignr${addr wlan0} AP: ${wireless_essid wlan0} ${alignr}Bitrate: ${wireless_bitrate wlan0} Down: ${downspeed wlan0} k/s ${alignr}Up: ${upspeed wlan0} k/s ${downspeedgraph wlan0 20,90} ${alignr}${upspeedgraph wlan0 20,90} Total: ${totaldown wlan0} ${alignr}Tota: ${totalup wlan0} ${endif}${if_existing /sys/class/net/ppp0/operstate}IP (ppp0):$alignr${addr ppp0} Down: ${downspeed ppp0} k/s ${alignr}Up: ${upspeed ppp0} k/s ${downspeedgraph ppp0 20,90} ${alignr}${upspeedgraph ppp0 20,90} Total: ${totaldown ppp0} ${alignr}Total: ${totalup ppp0}${endif} </pre> </div> <p> Or you can download my .conkyrc as a textfile <a href="conkyrc.txt" target="_blank">Here</a><br /> <a href="http://conky.sourceforge.net/" target="_blank">The Conky homepage</a></p> http://lanrat.com/linux/conkylinuxhttp://lanrat.com/linux/extract-compile-installExtract, Compile, and Install Anything in Linuxmrlanrat2009-11-14 19:30:14<p>From time to time every Linux user will run across a program that does not come in a nice packaged DEB or RPM. Often in the form of a tar.gz, tgz, tar.bz, tar, gz, tar.bz2 or tbz2 format. This is how you can make use of them. Remember to have a compiler installed and any dependencys for the software you installing.</p> <h3>Extract</h3> <p>To uncompress your file run the following command that applies to your extension.</p> <div id="code"> $ tar -zxvf file.tar.gz<br /> $ tar -zxvf file.tgz<br /> $ tar -jxvf file.tar.bz<br /> $ tar -xvf file.tar<br /> $ gunzip file.gz<br /> $ tar jxf file.tar.bz2<br /> $ tar jxf file.tbz2 </div> <br /> <h3>Compile</h3> <p>Often software will come with a readme or install file that should give you instructions on how to install it and any required dependencys as well as how use it. It will probaly say the same I have here, or something similar. Once you extract the source, cd into the newly created directory.</p> <div id="code"> $ ls<br /> $ cd path-to-software/ </div> <p>Now as root configure the software, this sets up the software and compiler for your system.</p> <div id="code"> # ./configure<br /> # make </div> <br /> <h3>Install</h3> <p>Okay, now for the last and simplist step, the install.</p> <div id="code"> # make install </div> <p>Everything should have gone well, enjoy your new software!</p> http://lanrat.com/linux/extract-compile-installlinuxhttp://lanrat.com/programs/pidgin-smiliesPidgin Smiliesmrlanrat2008-11-16 20:35:32<p> I use pidgin as my main IM client, but I have always felt that it has a lack of smilies, so here is my own custom smilies theme. It contains 120 smilies. I have also made a lite version that only contains 90. I got the smilies from a phpbb smilie theme, because they went well with the default smilie theme.</p> <h3> Mass Pidgin Smilies</h3> <p> <a href="http://lh6.ggpht.com/_55LVV0RexIc/SR9l5q-MCDI/AAAAAAAAAfY/My_4KgqdxqY/mass-pidgin-smilies.png" target="_blank"><img src="http://lh6.ggpht.com/_55LVV0RexIc/SR9l5q-MCDI/AAAAAAAAAfY/My_4KgqdxqY/s288/mass-pidgin-smilies.png" /></a></p> <h3> Mass Pidgin Smilies Lite</h3> <p> <a href="http://lh3.ggpht.com/_55LVV0RexIc/SR9l58HAa8I/AAAAAAAAAfg/bOXDO71aKmc/mass-pidgin-smilies-lite.png" target="_blank"><img src="http://lh3.ggpht.com/_55LVV0RexIc/SR9l58HAa8I/AAAAAAAAAfg/bOXDO71aKmc/s288/mass-pidgin-smilies-lite.png" /></a></p> <p> <a href="../files/mass-pidgin-smilies.tar.gz">Download Mass Pidgin Smilies Here</a></p> <p> <a href="../files/mass-pidgin-smilies-lite.tar.gz">Download Mass Pidgin Smilies Lite Here</a></p> http://lanrat.com/programs/pidgin-smiliesprogramshttp://lanrat.com/n810/otgN810 USB OTG Adaptermrlanrat2008-11-12 20:02:53<p>The Nokia N810 has an OTG or On-The-Go USB controller, it allows for the device to function is both client and host mode. By default it is is client mode so when you plug it into your computer it acts as a USB storage device. It can be put into host mode by feature running a program on the tablet that will put it into host mode or use the OTG trigger. The USB plug on the tablet has 5 pins rather than just the standers 4 USB uses. If the extra pin is grounded it will put the N810 into host mode.</p> <p>The same is true for the N800, but the N800 uses a Mini USB connector. The N810 uses Micro USB</p> <ul>This is what I used to make my adapter <li>USB Extension Cable (any cable with a female USB type A connector will work)</li> <li>Micro USB cable with male connector</li> <li>Solder</li> <li>Shrink tubing/Electrical Tape</li> </ul> <p>Cut the two cables and separate the wires<br /> <img src="http://lh4.ggpht.com/_55LVV0RexIc/SAJudKuFqGI/AAAAAAAAAK8/6xJkQgEH6vA/s288/100_1330.JPG" /><img src="http://lh6.ggpht.com/_55LVV0RexIc/SAJufquFqJI/AAAAAAAAALU/_hVL28-JxMQ/s288/100_1333.JPG" /></p> <p>This it is as simple as connecting the same color wires together, red to red, black to black, green to green, white to white, and finally the shield. I put each individual wire in shrink tubing and then the two wires in a larger piece of shrink tubing. I tried to ground the fifth pin to have it be a true OTG cable, but my soldering iron is too big and the connector is too small. (see the out of focus picture below). If anyone has any suggestions please let me know in the comments. So for now I am using one of the programs that can put the tablet in host mode for you.<br /> <img src="http://lh4.ggpht.com/_55LVV0RexIc/SAJukKuFqOI/AAAAAAAAAL8/-35s8Zsb9Tc/s288/100_1338.JPG" /><img src="http://lh5.ggpht.com/_55LVV0RexIc/SAJuqauFqTI/AAAAAAAAAMk/UzEoYni_2_c/s288/100_1343.JPG" /></p> <p>Testing Time! The Device can power the devices, but it will drain your battery faster. I have tested it with USB flash drives, memory card readers, USB hubs, keyboards, and CD-ROM drives All worked fine with no problem (The CD drive had to be manually mounted)<br /> <img src="http://lh6.ggpht.com/_55LVV0RexIc/SAJuuquFqWI/AAAAAAAAANA/S2zFNbc7vbg/s288/100_1346.JPG" /><img src="http://lh3.ggpht.com/_55LVV0RexIc/SAJuU6uFqCI/AAAAAAAAAKc/XG7x6sJ4nLE/s288/DSCF0436.JPG" /><img src="http://lh4.ggpht.com/_55LVV0RexIc/SAaV-KuFqZI/AAAAAAAAAPU/0QoHTFJM4IQ/s288/DSCF0476.JPG" /> </p> http://lanrat.com/n810/otgn810http://lanrat.com/linux/compizCompiz-Fusion on Fedora 9mrlanrat2008-11-11 19:42:18<p>Ok, so you have Fedora 9 up and running but now you want all those cool Compiz Effects. Ill show you how! </p> <p>First off install the Livna repository, It will have your graphics card drivers. (At the time of writing they only have the Nvidia Drivers for Fedora 9, ATI should be out soon) Download and install the RPM <a href="http://rpm.livna.org/rlowiki/" target="_blank">http://rpm.livna.org/rlowiki/</a> </p> <p>Now install your video card driver. <div id="code"> # yum install kmod-nvidia </div> </p> <br /> <p>Now you want to restart X to start using the new driver. You can ether reboot or press <Ctrl> + <Alt> + <Backspace> (Warning: this will log you out immediately.) </p> <p>From here you can click on System > Preferences > Look and Feel > Desktop Effects and enable them and it should work. But that is just Compiz, not Compiz Fusion.</p> <p>If you want Compiz Fusion disable the built in Compiz and install these <div id="code"> # yum install compiz-fusion compiz-manager compiz-fusion-extras compiz-fusion-extras-gnome gnome-compiz-manager libcompizconfig compiz-fusion-gnome ccsm compizconfig-backend-gconf </div> </p> <br /> <p>Now that you have them all installed open up System > Preferences > Look and Feel > CompizConfig Settings Manager and Click on Preferences And make sure that "GConf Configuration Backend" is selected. This tells Compiz to use the Gnome window manager.</p> <p>Now we need to tell Fedora to use Compiz-Fusion instead of just Compiz when it boots up. With your Text editor of choice open up /usr/bin/gnome-wm <div id="code"> # gedit /usr/bin/gnome-wm </div> Or <div id="code"> # nano /usr/bin/gnome-wm </div> </p> <br /> <p>Look for where it says "gconf" and replace it with "ccp" (no quotes). For me it was on line 129 and looked like this: <div id="code"> OPT4=gconf </div> Change to: <div id="code"> OPT4=ccp </div> </p> <br /> <p>Now Reboot for the changed on the config file to take affect. Once you have rebooted go back to System > Preferences > Look and Feel > Desktop Effects and Enable the desktop effects, enable the wobbley windows and the desktop cube. They should take affect immediately. And now you can go to System > Preferences > Look and Feel > CompizConfig Settings Manager and enable/disable/change any settings you want. Again the changes will take affect immediately.</p> <p>You are now done! <br /> A good guide for what most of the Compiz-Fusion plugins can be found here <a href="http://forlong.blogage.de/article/2008/4/26/How-to-set-up-Compiz-Fusion-074" target="_blank">http://forlong.blogage.de/article/2008/4/26/How-to-set-up-Compiz-Fusion-074</a></p> http://lanrat.com/linux/compizlinuxhttp://lanrat.com/n810/mplayer-volumeMPlayer Volumemrlanrat2006-11-16 20:33:28<p>I use MPlayer to play all my videos and movies on my tablet. That way I dont need to spend the time to convert them to the format the default media player wants. But a problem that I quicky ran into was that unless my surounding enviroment is compoletly silent, I couldent hear anything, even with all the volume bars maxed out. But this was not the case with audio files, I could hear them just fine. So this is how to increase the default max volume in mplayer.</p> <p>Mplayer uses a config file found in /etc/mplayer/mplayer.conf to get its settings, all we need to do is add 2 lines to it. Here are the 2 lines.</p> <div id="code"> softvol = yes<br /> softvol-max = 500 </div> <p>"softvol = yes" tells MPlayer to use a software volume controll on top of the hardware one. "softvol-max = 500" Tells it the max value to allow the volume to operate at. It is a percent so 100 would be unchanged, 200 would be double. the max it allows is 10000, but be carfull, if what you are playing is already loud you can dammage your speakers. I dont recomend setting it higher than 500.</p> <p>I do plan on making a deb that you can install which will automaticky increase your volume, but untill then this is the way to do it.</p> http://lanrat.com/n810/mplayer-volumen810