tag:blogger.com,1999:blog-71413929599738044982024-02-20T13:44:06.690+13:00Open-Embedded Study YardOpen Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.comBlogger75125tag:blogger.com,1999:blog-7141392959973804498.post-59269952496428641222012-05-03T10:19:00.002+12:002012-05-03T10:59:13.306+12:00Display Current System IP Address<span style="color: #666666;">arguments << "-c" << "ifconfig wlan0 | grep 'inet ' | awk '{print $2}' | sed 's/addr://'";</span><br />
<span style="color: #666666;">// or arguments << "-c" << "ifconfig eth1 | grep 'inet ' | awk '{print $2}' | sed 's/addr://'";</span><br />
<span style="color: #666666;">QProcess* process = new QProcess(this);</span><br />
<span style="color: #666666;">process->start(prog , arguments);</span><br />
<span style="color: #666666;">process->waitForFinished();</span><br />
<span style="color: #666666;">QString tmp = process->readAll();</span><br />
<span style="color: #666666;">//qDebug() << tmp;</span><br />
<span style="color: #666666;">ui->label_ip->setText(tmp);</span>Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-73076615599558397592012-04-20T16:00:00.000+12:002012-04-24T13:39:33.814+12:00Black screen after running an applicationI put my application in /etc/rc5.d/S99rmnologin to let it automatically start.
<br />
The application is running well. But the screen turns black after 1
minute. When I touched the screen, a small area, where my finger
pointed, of my application GUI show up. My application GUI gradually
appears if I continuously moving my finger on the screen. It looks like
using a mop to wipe the screen.
<br />
<br />
Solution:<br />
<br />
Take a look in /etc/rcS.d/S01psplash file. At the end of line, there is a "sleep 120 ..." command which caused the problem. After comment out this line, everything goes fine.<br />
<br />
# Timetrap against hanging with splash hiding console messages.<br />
(sleep 120; psplash-write "QUIT") &Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-77105916442351606752012-04-13T16:39:00.000+12:002012-05-01T10:11:46.217+12:00Change Gumstix Overo Booting Screen (Logo image)<br />
By default, overo boots up with its own image with progress bar. I want to display my own picture when it boots up.<br />
<br />
I follow the below website, but it is for Angstrom. I did some modification to suit my overo COM.<br />
<br />
<i>https://support.bluetechnix.at/wiki/Changing_the_splash_screen_picture</i><br />
<br />
1) bitbake psplash<br />
<br />
<div style="color: #666666;">
$ cd /build/czhang/overo-oe</div>
<div style="color: #666666;">
$ source build/profile</div>
<div style="color: #666666;">
$ bitbake psplash</div>
...<br />
<br />
2) copy make-image-header.sh file to proper place. <br />
<br />
<div style="color: #666666;">
$ cp /build/czhang/overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/psplash-angstrom-0.0+svnr422-r33/psplash/make-image-header.sh /build/czhang/overo-oe/org.openembedded.dev/recipes/psplash/files/overo</div>
<br />
3) create your own image file, make sure it is in right dimensions.<br />
<br />
<div style="color: #666666;">
$ cd /build/czhang/overo-oe/org.openembedded.dev/recipes/psplash/files/overo</div>
<div style="color: #666666;">
$ ./make-image-header.sh [your-image].png HAND</div>
<br />
back up original image head file:<br />
<div style="color: #666666;">
$ mv psplash-hand-img.h psplash-hand-img.h_orig</div>
<div style="color: #666666;">
$ mv [your-imge]-img.h psplash-hand-img.h</div>
<div style="color: #666666;">
$ cd /build/czhang/overo-oe</div>
<div style="color: #666666;">
$ source build/profile</div>
<div style="color: #666666;">
$ bitbake psplash</div>
<br />
<div style="color: red;">
Error occurred:</div>
<br />
<div style="color: #666666;">
<i>| psplash.c: In function 'main':</i></div>
<div style="color: #666666;">
<i>| psplash.c:271: error: 'POKY_IMG_WIDTH' undeclared (first use in this function)</i></div>
<div style="color: #666666;">
<i>| psplash.c:271: error: (Each undeclared identifier is reported only once</i></div>
<div style="color: #666666;">
<i>| psplash.c:271: error: for each function it appears in.)</i></div>
<div style="color: #666666;">
<i>| psplash.c:272: error: 'POKY_IMG_HEIGHT' undeclared (first use in this function)</i></div>
<div style="color: #666666;">
<i>| psplash.c:275: error: 'POKY_IMG_BYTES_PER_PIXEL' undeclared (first use in this function)</i></div>
<div style="color: #666666;">
<i>| psplash.c:276: error: 'POKY_IMG_RLE_PIXEL_DATA' undeclared (first use in this function)</i></div>
<div style="color: #666666;">
<i>| make[1]: *** [psplash.o] Error 1</i></div>
<div style="color: #666666;">
<i>| make[1]: *** Waiting for unfinished jobs....</i></div>
<div style="color: #666666;">
<i>| mv -f .deps/psplash-write.Tpo .deps/psplash-write.Po</i></div>
<div style="color: #666666;">
<i>| mv -f .deps/psplash-console.Tpo .deps/psplash-console.Po</i></div>
<div style="color: #666666;">
<i>| mv -f .deps/psplash-fb.Tpo .deps/psplash-fb.Po</i></div>
<div style="color: #666666;">
<i>| make[1]: Leaving directory `/build/czhang/overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/psplash-0.0+svnr422-r33/psplash'</i></div>
<div style="color: #666666;">
<i>| make: *** [all] Error 2</i></div>
<div style="color: #666666;">
<i>| FATAL: oe_runmake failed</i></div>
<br />
it took me a long time to figure it out. In<br />
<br />
/build/czhang/overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/psplash-0.0+svnr422-r33/psplash<br />
<br />
there are three files:<br />
psplash-hand-img.h<br />
psplash-poky-img.h<br />
psplash-bar-img.h<br />
<br />
take a look psplash-poky-img.h content where the error occurred:<br />
<div style="color: #666666;">
$ less psplash-poky-img.h</div>
<br />
/* GdkPixbuf RGB C-Source image dump 1-byte-run-length-encoded */<br />
<br />
<div style="color: #666666;">
<i>#define HAND_IMG_ROWSTRIDE (816)</i></div>
<div style="color: #666666;">
<i>#define HAND_IMG_WIDTH (272)</i></div>
<div style="color: #666666;">
<i>#define HAND_IMG_HEIGHT (363)</i></div>
<div style="color: #666666;">
<i>#define HAND_IMG_BYTES_PER_PIXEL (3) /* 3:RGB, 4:RGBA */</i></div>
<div style="color: #666666;">
<i>#define HAND_IMG_RLE_PIXEL_DATA ((uint8*) \</i></div>
<br />
After I replaced the HAND with POKY, and bitbake again, error disappeared.<br />
<br />
4) bitbake console image<br />
<br />
<span style="color: #666666;">$ bitbake omap3-console-image</span><br />
<br />
5) remember to install psplash_0.0+svnr422-r33.6_armv7a.ipk (maybe psplash-support_0.0+svnr422-r33.6_armv7a.ipk too), this is a software which can load booting image.<br />
<br />
Done! you will see the pretty image in the booting procedure.Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com1tag:blogger.com,1999:blog-7141392959973804498.post-85841253278303314962012-04-13T10:14:00.000+12:002012-04-16T14:15:12.281+12:00Modify booting scrip for Gumstix Overo Tide COMThe Tide COM has no NAND built in. When I try to change environment parameter, such as rotate screen or change<code></code> default display, it just won't work.<br /><br />The solution is to create a boot command file, e.g. <i>ubootenvcmd,</i> and add it into a <i>boot.scr</i>.<br /><br />Here is how I do it:<br /><br />1) create a <i>ubootenvcmd</i> file by using gedit. The content is something like:<br /><br /><div style="color: #666666;">setenv ethaddr 00:00:00:FF:FF:FF</div><div style="color: #666666;">setenv mpurate 720</div><div style="color: #666666;">setenv vram 4M</div><div style="color: #666666;">setenv linuxmem 176M</div><div style="color: #666666;">setenv defaultdisplay lcd43</div><div style="color: #666666;">setenv dvimode 480x272MR-16@60</div><div style="color: #666666;">setenv mmcargs ${mmcargs} omapfb.rotate=1</div><div style="color: #666666;">setenv bootcmd 'mmc init; run loaduimage; run mmcboot'</div><div style="color: #666666;">boot</div><br />2) install mkimage:<br />$ <span style="color: #666666;">sudo apt-get install uboot-mkimage</span><br /><br />3) create <i>boot.scr</i> file:<br />$ <span id="platform_code" style="color: #666666;">mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "</span><span id="platform_code" style="color: #666666;">Overo boot script</span><span id="platform_code" style="color: #666666;"></span><span id="platform_code" style="color: #666666;">" -d ubootenvcmd boot.scr</span><br /><br />ps. remember to put the <i><span style="color: black;">ubootenvcmd</span></i> file in current directory.<br /><br />4) copy <i>boot.scr</i> to your FAT partition of your SD card.<br /><br />Done :)Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-76178081797032783252012-04-10T09:19:00.000+12:002012-04-16T14:15:12.290+12:00Cross compile for i386 on 86_64 systemDown load qt-everywhere-opensource-src-4.7.0<br /><br />"configure -help" will tell you how to do the cross compile for different OS.<br /><br /><span style="color: red;">1) tell machine to compile program to 32bit OS</span><br />$ ./configure -platform linux-g++-32<br /><br />Error:<br />/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory<br />make: *** [project.o] Error 1<br /><br />Solution:<br />$ sudo apt-get install libc6-dev-i386<br /><br />Error:<br />/usr/bin/ld: cannot find -lstdc++<br />collect2: ld returned 1 exit status<br /><br />Solution:<br />$ sudo apt-get install g++-multilib<br /><br /><span style="color: red;">2) make all libraries</span><br />$ make<br /><br />3) create a "projects" folder under "qt-everywhere-opensource-src-4.7.0". put your project folder, i.e. m4works, in "projects". and also copy relative folders, qextserialport, qwt-5.2.1, into "projects". <br /><br />4) compile project relative libraries first to get 32bit libraries.<br />$ qmake qextserialport.pro<br />$ make<br />...<br /><br />5) modify project .pro file to point libraries in right directory.<br /><br />6) compile project.<br />$ qmake m4.pro<br />$ make<br /><br /><br /><br /><br />Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-13222307221908320182012-03-23T15:44:00.000+13:002012-04-16T14:15:12.328+12:00Rotate Screen in Ubuntu<br />The screen rotation function in Nvidia graphics driver is normally disabled. But We can enable it by modifying xorg.conf file.<br /><br />To do this, we need to back up xorg.conf file first.<br /><br /><div style="color: #666666;">$ sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak</div><br />Now edit the file:<br /><div style="color: #666666;">$ sudo gedit /etc/X11/xorg.conf</div><br />In the Device section that includes the line:<br /><br /> <span style="color: #666666;">Driver "nvidia"</span><br /><br />Add:<br /> <span style="color: #666666;">Option "RandRRotation" "on"</span><br /><br />It will looks like:<br /><br /><div style="color: #666666;">Section "Device"<br /> Identifier "Device0"<br /> Driver "nvidia"<br /> VendorName "NVIDIA Corporation"<br /> Option "RandRRotation" "on"<br />EndSection</div><br /><br />Then, we need to log out and log back in to restart X server.<br /><br />To rotate screen to left, use:<br /><div style="color: #666666;">$ xrandr -o left</div><br />To rotate screen to right, use:<br /><div style="color: #666666;">$ xrandr -o right</div><br />To flip screen upside down, use:<br /><div style="color: #666666;">$ xrandr -o inverted</div><br />To go back to normal, use:<br /><div style="color: #666666;">$ xrandr -o normal</div><br />Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-1127707155906768962012-01-10T08:49:00.000+13:002012-04-16T14:15:12.368+12:00还有几天就能看到妞妞了,很是期待。。。 :)Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-3187701103711686232011-12-07T12:43:00.000+13:002012-04-16T14:15:12.410+12:00Rotate Gumstix Overo Touch screenGo to u-boot environment settings,<br /><br /><div style="color: #666666;">Overo # setenv mmcargs setenv bootargs console=${console} mpurate=${mpurate} vram=${vram} omapfb.mode=dvi:${dvimode} omapfb.debug=y omapdss.def_disp=${defaultdisplay} <span style="color: red;">omabfp.rotate=1 </span>root=${mmcroot} rootfstype=${mmcrootfstype}</div><div style="color: #666666;"><br /></div><div style="color: #666666;">Overo # saveenv</div><span style="color: #666666;">Overo # reset</span><br /><br />ps: 1 --- 90° 2 --- 180° 3 --- 270°<br /><br /><span style="color: #666666;">------------------------------</span><br /><span style="color: #666666;">Several month later when I tried to rotate my another gumstix fire + LG4.3" screen, it doesn't work!</span><br /><br /><span style="color: #666666;">finally, I found at this time, the default dvimode was 1024x768. I have to change it back to 4.3" screen resolution, which is 480x272.</span><br /><span style="color: #666666;"><br /></span><br /><span style="color: #666666;">#dvimode=</span><span style="color: #666666;">480x272MR-16@60</span>Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-5755653697738437552011-11-03T13:18:00.000+13:002012-04-16T14:15:12.425+12:00Gumstix Overo Fire Wifi setup<br />1. Take a look available wireless signal:<br /><div style="color: #666666;"><br /></div><div style="color: #666666;">root@overo:~# iwconfig wlan0 essid any</div><div style="color: #666666;">root@overo:~# ifconfig wlan0 up</div><div style="color: #666666;">root@overo:~# iwlist wlan0 scan</div><br />2. Edit /etc/network/interfaces to include a section which looks like:<br /><br />a) Unencypted wifi<br /><br />Some default builds do not enable any Wifi. You may need to edit /etc/network/interfaces to include a section which looks like:<br /><br /><pre style="font-family: Times,"Times New Roman",serif;"><span style="color: #666666; font-family: Arial,Helvetica,sans-serif; font-size: small;">allow-hotplug wlan0 <br />auto wlan0 <br />iface wlan0 inet dhcp <br /> pre-up /sbin/iwconfig wlan0 essid any <br /> wireless_mode managed </span> </pre><pre> </pre>The problem is this setup is not reliable! we're waiting for a solution.<br /><br />b) WEP encryption<br /><br />Edit <i>/etc/network/interfaces</i> to have only for wlan0 (don't touch the other entries):<br /><br /><pre><span style="color: #666666; font-family: Arial,Helvetica,sans-serif; font-size: small;">iwconfig wlan0 essid "My Wireless Network"<br />iwconfig wlan0 key my-hex-key<br />ifdown wlan0<br />ifup wlan0 </span></pre><br />c) WPA encryption<br /><br />Edit <i>/etc/network/interfaces</i> to have only for wlan0 (don't touch the other entries):<br /><br /><pre style="color: #666666; font-family: inherit;">allow-hotplug wlan0<br />iface wlan0 inet dhcp<br /> pre-up wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B<br /> down killall wpa_supplicant</pre><br />There is an error in the current /etc/network/interfaces as of 2011-09-25. The pre-up line reads:<br /><br /><pre><span style="color: #666666; font-family: Arial,Helvetica,sans-serif; font-size: small;">pre-up wpa_supplicant -Dmarvell -iwlan0 -c/etc/wpa_supplicant.conf -Bw </span></pre><pre></pre><br />The "-Bw" causes a usage message to be dumpted to the screen. Make sure it is just "-B". The -Dmarvell option will yield the message "Unsupported driver 'marvell'. Change it to "-Dwext" as shown above.<br />My /etc/network/interfaces came this way from the factory, and was also that way in my build from the latest git.<br /><br />Create <i>/etc/wpa_supplicant.conf</i> containing:<br /><br /><br /><pre style="color: #666666; font-family: inherit;">ctrl_interface=/var/run/wpa_supplicant<br />ctrl_interface_group=0<br />eapol_version=1<br />ap_scan=1<br />fast_reauth=1<br /><br />network={<br /> ssid="add-your-ascii-ssid"<br /> proto=WPA2 # try WPA RSN if you WPA2 fails<br /> key_mgmt=WPA-PSK<br /> pairwise=CCMP TKIP<br /> group=CCMP TKIP<br /> scan_ssid=1<br /> psk="add-your-ascii-passphrase"<br /> priority=10<br />}</pre><br />3. Connect to network<br /><br /><br />To connect to the wireless network when the configuration is done, do the following:<br /><br />Take down the wireless network (it might already be down, but try to be sure):<br /><br /><br /><pre style="color: #666666; font-family: inherit;"># ifdown wlan0</pre><pre style="font-family: inherit;"><span style="font-size: small;"> </span></pre><pre style="font-family: inherit;"><span style="font-size: small;">Then, bring it up again:</span> </pre><pre style="color: #666666; font-family: inherit;"> </pre><pre style="color: #666666; font-family: inherit;"># ifup wlan0</pre><pre></pre><pre></pre><pre style="font-family: inherit;"> </pre><pre style="font-family: inherit;">4. Power management:</pre><pre style="font-family: inherit;"> </pre>Many users have reported issues with wifi data throughput being limited to about 100kB/second. It is theorized this is due to lack of SDIO IRQ support in the OMAP3 MMC driver. A patch is being investigated which reportedly achieves 13Mbps.<br />Additionally, the driver does not support power management at present. The use of iwconfig power commands such as the following will fail: <br /><br /><pre></pre><pre style="color: #666666; font-family: inherit;">iwconfig wlan0 power on </pre><br />Therefore, the wifi module always consumes close to 1 Watt of power when turned on.<br /><h2> <span class="mw-headline" id="NetworkManager"><br /></span></h2><pre style="font-family: inherit;"> </pre>Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-12354839808974500182011-10-28T10:38:00.000+13:002012-04-16T14:15:12.441+12:00How to Perform a Windows XP Repair InstallIt is extremely important that you backup important data that is not available from other media sources. This backup should be located on a separate hard drive, CD, DVD, network storage, etc. that will not be affected by the repair install. <br /> Please check out the warning links before attempting the Repair Install. It is to your advantage you follow the suggestions to prevent data loss and especially if you also have the capability to boot into XP, perform the steps listed in the <span style="color: #cc3300; font-family: Georgia; font-size: medium;"> <b><a href="http://www.michaelstevenstech.com/XPrepairinstall.htm#Warning1"><u>Warning #1</u></a></b></span><b><a href="http://www.michaelstevenstech.com/XPrepairinstall.htm#warning1"> </a></b>, before proceeding with the repair install.<br /> After completing [if <b>Windows</b> is still accessible] the steps listed to prevent data loss in <span class="style1"><b><a href="http://www.michaelstevenstech.com/XPrepairinstall.htm#Warning1"><u>warning #1</u></a></b></span> and you did not remedy the <b>no boot</b> situation, you can use an <b>OEM</b> XP Pro or Home, <b>"retail"</b> XP Home or Pro full or upgrade version CD of the same version Home or Pro to perform a Repair Install. <b>OEM Restore disks </b>or<b> hidden restore folders on the hard drive</b> will <b>not</b> work for the Repair Install. A Repair Install will replace the system files with the files on the XP CD used for the Repair Install. It will leave your applications and settings intact, but Windows updates will need to be reapplied. <br /> A Repair Install will replace files altered by adware and malware, but will not fix an adware, malware problem.<br /> You can use the <span class="style1"><span style="color: #cc3300;"><i><b> <a href="http://www.michaelstevenstech.com/xp_in_place_upgrade.htm" target="_self"> <u>In place upgrade</u></a></b></i></span></span> option to change a Product Key in the event you entered a key that was already activated. The In Place Upgrade also produces the same result as the Repair Install.<br /> <b>Alternate options to <a href="http://www.michaelstevenstech.com/xpfaq.html#018" target="_self"><u>Change XP Product Key</u></a></b> #18 on the FAQ list. <br /> <strong>Setup cannot continue because the version of Windows on your computer is newer than the version on the CD.</strong><br /> If you get a "Setup cannot continue because the version of Windows on your computer is newer than the version on the CD." message, if you continue, you will need to apply the SP 2 updates after the repair install completes, plus you will need to take the following steps to keep your system from being immediately infected with a virus. <br /> 1. If you connect directly to the internet without a router or hardware firewall, disconnect from the internet by physically removing the connections cable, removing a wireless card, or any other means of internet connection. <br /> 2. After the Repair install is completed, enable the XP firewall or install third party firewall software or router before connecting to the internet. <br /> If you get the "Setup cannot continue because the version of Windows on your computer is newer than the version on the CD.". You should create a slipstreamed copy of your XP CD by using the software and step by steps supplied in the links below. <br /> <a href="http://www.michaelstevenstech.com/XPrepairinstall.htm#slipstreamxpcd">Slipstream XP</a><br /> <strong>Automatic Updates </strong><br /> If you cannot download Automatic updates after the Repair install , follow the steps in the link below submitted by MS-MVP's Richard Harper and Ron Martell.<br /> <a href="http://support.microsoft.com/kb/555615/en-us">Automatic Updates stops working after a repair install of Windows XP </a><br /><br /><span style="font-size: medium;"><b>XP Repair install</b></span> Please read carefully and make sure you followed the warning links before initiating the Repair Install. You can print a text version for reference. <b><span style="color: #3f7bad;"><a href="http://www.michaelstevenstech.com/repair.txt" target="_top"><u>repair.txt</u></a></span></b><br /> <ol><li>Boot the computer using the XP CD. You may need to change the boot order in the system BIOS so the CD boots before the hard drive. Check your system documentation for steps to access the <a href="http://www.michaelstevenstech.com/bios_manufacturer.htm"><u>BIOS</u></a> and change the boot order.</li><li>When you see the "<b>Welcome To Setup</b>" screen, you will see the options below<span style="color: #3a8bb1; font-family: Verdana,Arial,Helvetica; font-size: x-small;"> </span> <span style="color: #336600; font-family: Verdana,Arial,Helvetica; font-size: x-small;"> </span> <span style="font-family: Verdana,Arial,Helvetica; font-size: x-small;">This portion of the Setup program prepares Microsoft <br /> Windows XP to run on your computer:<br /> <br /> <b>To setup Windows XP now, press ENTER.</b><br /> <br /> To repair a Windows XP installation using Recovery Console, press R.<br /> <br /> To quit Setup without installing Windows XP, press F3.</span><br /> </li><li>Press <b><span style="font-size: medium;"> <a href="http://www.michaelstevenstech.com/images/pressenterscr.jpg" title="Screenshot example">Enter</a></span></b> to start the Windows Setup. <div id="layer1" style="height: 35px; left: 105px; position: absolute; top: 1812px; width: 335px; z-index: 1;"> </div><img alt="To setup Windows XP now and Repair Install , press ENTER." border="0" height="21" src="http://www.michaelstevenstech.com/note.gif" width="15" /> <span style="font-weight: 700; text-transform: capitalize;"> <span style="color: red; font-size: medium;">do not</span></span> choose "<i><b>To repair a Windows XP installation using the Recovery Console, press</b></i> <span style="color: #3f7bad;"><b>R</b></span>", <b>(you <span style="color: red; font-size: medium;">Do Not</span> want to load Recovery Console)</b>.<span style="color: #cc3300;"> </span>I repeat, <span style="font-weight: 700; text-transform: capitalize;"> <span style="color: red; font-size: medium;">do not</span></span> choose "<i><b>To repair a Windows XP installation using the Recovery Console, press </b></i> <b><span style="color: #3f7bad;">R</span></b>". </li><li>Accept the License Agreement and Windows will search for existing Windows installations. <a href="" name="w2"></a></li><li>Select the XP installation you want to repair from the list and press <span style="font-size: medium;"><b>R</b></span><span style="color: #cc3300; font-size: medium;"> </span>to start the repair. If <span class="style5">Repair</span> is not one of the options, <span class="style4">END</span> setup. After the reboot <b>read</b> <b><a href="http://www.michaelstevenstech.com/XPrepairinstall.htm#warning2"> <span style="color: red; font-size: medium;"><u>Warning#2!</u></span></a></b></li><li>Setup will copy the necessary files to the hard drive and reboot. <i><b>Do not press any key to boot from CD when the message appears.</b></i> Setup will continue as if it were doing a clean install, but your applications and settings will remain intact. <span style="color: red;"><a href="http://www.michaelstevenstech.com/filesnotfound.htm"><u><b>If</b> you get files not found during the copying stage.</u></a></span><br /> <span style="color: red;"><b><u>Blaster worm warning</u></b></span>: Do not immediately activate over the internet when asked, enable the <a href="http://support.microsoft.com/?kbid=283673" target="_blank"> <span style="font-weight: 700; text-decoration: none;">XP firewall</span></a> before connecting to the internet. You can activate after the firewall is enabled. <span class="q0">Control Panel - Network Connections. Right click the connection you use, Properties and there is a check box on the <a href="http://www.michaelstevenstech.com/xpfirewall1.jpg">Advanced</a> page.</span><br /> <span class="q0"> <a href="http://support.microsoft.com/?kbid=833330"><u>KB 833330</u>u</a> Blaster removal</span><br /> <a href="http://www.microsoft.com/security/incident/sasser.mspx"> What You Should Know About the <b><span style="color: red;"><u>Sasser Worm</u></span></b> and Its Variants</a><br /> Microsoft Security Bulletin <a href="http://www.microsoft.com/technet/security/bulletin/ms04-011.mspx"><u>MS04-011</u> </a><br /> </li><li>Reapply <i><b>updates</b></i> or <i><b> <a href="http://www.microsoft.com/windowsxp/pro/downloads/servicepacks/sp1/"> <u>service packs</u></a></b></i> applied since initial Windows XP installation. Please note that a Repair Install using an Original pre service pack 1 or 2 XP CD used as the install media will remove SP1/SP2 respectively and service packs plus updates issued after the service packs will need to be reapplied. <span style="color: #336600;"><b> <a href="http://www.microsoft.com/windowsxp/pro/downloads/servicepacks/sp1/"> <u>Windows XP Service Pack 1</u></a></b></span><br /> <b> <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=049C9DBE-3B8E-4F30-8245-9E368D3CDB5A&displaylang=en"> <u>Service Pack 2</u></a></b><br /> <div class="style4">An option I highly recommend; is creating a Slipstreamed XP CD with SP1, SP2, etc. .</div><a href="http://www.winsupersite.com/showcase/windowsxp_sp2_slipstream.asp"> </a><a class="style4" href="" id="slipstreamxpcd" name="slipstreamxpcd"></a><a href="http://www.winsupersite.com/showcase/windowsxp_sp2_slipstream.asp"><u>Slipstreaming Windows XP with Service Pack 2 (SP2)</u></a> <span class="style1"> Good</span><br /> <a href="http://www.msfn.org/articles.php?action=show&showarticle=49"> <u>Another Slipstream step by step</u> </a> <b><span style="color: teal;">Better</span></b><br /> <a href="http://www.autopatcher.com/autostreamer.html"><u>AutoStreamer</u></a> mirror link for <a href="http://mhtools.knoware.nl/raptor/autostreamer/AutoStreamer.exe"> <u>AutoStreamer</u></a> <b><span style="color: red;">Best!!</span></b><br /> <a href="http://www.simplyguides.net/guides/using_autostreamer/using_autostreamer.html"> <u>Step by Step on AutoStreamer</u></a><br /> Printable<b> Repair Install </b>step by step<b>.<span style="color: #3f7bad;"> <a href="http://www.michaelstevenstech.com/repair.txt"><u>repair.txt</u></a></span></b><br /> <a href="http://www.michaelstevenstech.com/pdf/XPrepairinstall.pdf">XP Repair Install in PDF <u>XPrepairinstall</u></a></li></ol><h2><span style="color: red; font-family: Georgia;"> </span></h2><h2><span style="color: red; font-family: Georgia;">Warning! #1</span></h2><h2><span style="color: red; font-family: Georgia;">Should you do a repair install and is it the best choice?</span></h2>A Repair Install is not foolproof and should not be considered the cure-all fix for non-boot situations. <span class="byline">The below procedure applies only if you can still boot into Windows.</span><br /> <span class="byline"> To prevent loss of data and/or program settings, perform the following before the Repair Install.</span><br /> Manually delete the Undo_guimode.txt file from the Windows\System32 folder before you perform any of the actions that are listed in the "Symptoms" section of this article. To do this in Windows XP, type the following command at a command prompt: <br /> <kbd>del /a /f %windir%\system32\undo_guimode.txt</kbd><br /> <ol><li>From the <b>Start</b> menu, click <b>Run</b>. <a href="http://www.michaelstevenstech.com/images/cmdpmt.gif"><u>See screen shot Image</u></a></li><li>In the <b>Run</b> dialog box, in the <b>Open</b> text box, type: <b>cmd</b>. Click <b>OK</b>.</li><li>Delete the undo_guimode.txt file. In the <b>C:\Windows\System32\cmd.exe</b> dialog box, type: <b>del /a /f c:\windows\system32\undo_guimode.txt</b>. Press the ENTER key. <a href="http://www.michaelstevenstech.com/images/undo_guimode.gif"><u>See screenshot Image</u></a></li></ol>KB <a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;q312369"> <u>Q312369</u></a><br /> Check the link below for an option for recovering from a non-boot event. <a href="http://www.digitalwebcast.com/2002/03_mar/tutorials/cw_boot_toot.htm"> <span class="headline"><u>Windows XP Crashed? Here's Help</u></span><u><br /> <span class="subhead">A salvage mission into the depths of Windows XP, explained by a non-geek</span><br /> <span class="byline">by Charlie White</span></u></a> <br /> <br /> Also as a precaution the <span class="q0">windows\system32\</span><b class="red">WPA.DBL </b>and <b class="red">WPA.BAK </b>should be copied to a floppy before doing a repair install. For more information see Alex Nichol's article on <span style="color: #3f7bad;"><a href="http://aumha.org/a/wpa.htm"><b><u>XP activation</u></b>. </a></span><br /><br /><br />Additional tips to perform before initiating the Repair Install.<br />You should complete the basic requirements of backing up all files and folders that cannot be restored from other media. This includes passwords, applications purchased and downloaded from the internet without CD support, financial records and folders, digital images that cannot be replaced............... <br /> Backup copies of your registry files (in the %systemroot%\Repair folder) are also replaced after the in-place upgrade is complete. Copy these registry backups to another location before you perform an in-place upgrade/Repair Install. You may need to use them after the in-place upgrade is complete.<br /> It would also be a good idea to run the <b>Files And Settings Transfer</b><span style="color: #cc3300;"> </span>wizard<b><span style="color: #cc3300;"> </span></b><span style="color: #cc3300;"> <a href="http://www.michaelstevenstech.com/fast.html" title="Files And Settings Transfer wizard"><u>F.A.S.T</u></a></span> located on the XP CD.<br /> If you made unorthodox registry changes with third party software, there is the potential of data loss from a Repair Install. Another consideration of concern would be a power failure during the repair install could render your system un bootable and result in loss of data.<br /> The likelihood of you losing the files and folders is probably of minimal risk, but you have to expect the worst and make sure you are prepared for recovery.<br /> If you are sure you have explored all other troubleshooting avenues, then proceed with the <b><a href="http://www.michaelstevenstech.com/XPrepairinstall.htm#RI"><u>repair install</u></a></b>.<br /> <strong>If you get a warning message: "Setup cannot continue because the version of Windows on your computer is newer than the version on the CD."</strong><br /> You get this message when you use a pre-SP 1, SP2 XP CD on an XP installation that has been updated to SP1, SP2.<br /> You have the options listed below.<br /> <ol><li><a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;875350&Product=windowsxpsp2" title="Remove">Remove</a> the SP 1, SP2 update if the option is available from Add/Remove. </li><li>Create a <a href="http://www.msfn.org/articles.php?action=show&showarticle=49" title="slipstreamed XP CD">slipstreamed XP CD</a> merging the SP1 or SP2 update.<br /> 2a <a href="http://www.softpedia.com/get/Tweak/System-Tweak/Autostreamer.shtml" target="_top">Autostreamer</a> for creating a slipstreamed CD the easy way. </li><li>Purchase an XP CD with SP2 included. </li></ol><a href="http://www.winsupersite.com/showcase/windowsxp_sp2_slipstream.asp">Slipstreaming Windows XP with Service Pack 1 or 2 (SP1, SP2)</a><br /> <a href="http://www.msfn.org/articles.php?action=show&showarticle=49">Another Slipstream step by step</a><br /> AutoStreamer mirror link for AutoStreamer <br /> <a href="http://www.simplyguides.net/guides/using_autostreamer/using_autostreamer.html">Step by Step on AutoStreamer</a><br /> <a href="" name="warning2"></a><br /> <h2><span style="color: red; font-size: large;">Warning!! #2</span></h2><h2><span style="color: red; font-size: large;">If the Repair Option is not Available </span></h2><b><span style="color: red;">What should I do? </span>Most important do not ignore the information below!</b><br /> <span style="color: #006699;">I</span>f the option to Repair Install is <span style="color: red;">NOT</span> available and you continue with the install; you<span style="color: #006699;"> </span><span style="color: red;"><i>will delete</i></span><span style="color: #006699;"> </span>your <span style="color: red;"><i>Windows </i></span><i><span class="style3">folder and the</span></i><span style="color: red;"><i> Documents and Settings</i></span><span style="color: #006699;"> f</span>olders. <span style="color: red;"><i>All applications</i></span> installed that place keys in the registry will need to be re-installed and will require the original install media.<br /> You should exit setup if the repair option is <span style="color: red;">not</span> available and consider other options. I have found if the Repair option is not available, you have a few paths I have listed below to try before XP requires a <a href="http://www.michaelstevenstech.com/cleanxpinstall.html" target="_self" title="Clean install"><u>Clean install</u></a>. <br /> Another option to consider (since the cost of 100 + gig hard drives has dropped to well under $75) would be to disconnect the current hard drive and install a clean XP from retail disks or restore media to a new hard drive. You can then connect the original hard drive after configuring the jumpers to a slave drive. You can retrieve important files. One thing to remember, if a hard drive has not been formatted or written over by reinstalling, the data is accessible. The less you access a hard drive after a non-boot episode; the better your chances of retrieving your data. <br /> Very important!!<br /> If you still have the ability to access the Windows XP installation, backup all important files not restorable from other sources before attempting any recovery console or other trouble shooting attempts. <br /> <b><span style="font-size: medium;">Possible Fix by reconfiguring boot.ini using Recovery Console.</span></b><br /> 1.Boot with XP CD or 6 floppy boot disk set.<br /> 2. Press R to load the Recovery Console. <br /> 3. Type <b>bootcfg</b>. <br /> 4. This should fix any boot.ini errors causing setup not to see the XP OS <br /> install. <br /> 5. Try the repair install.<br /> <br /> <b>One more suggestion from MVP Alex Nichol</b><br /> "Reboot, this time taking the immediate R option and if the CD letter is say K: give these commands<br /> <br /> <b>copy K:\i386\ntldr C:\<br /> copy K:\i386\ntdetect.com C:\</b><br /> <br /> (two other files needed - just in case) <br /> 1. Type: <b>attrib -h -r -s C:\boot.ini del C:\boot.ini </b><br /> 2. Type: BootCfg /Rebuild<br /> <br /> which will get rid of any damaged boot.ini, search the disk for systems and make a new one. This might even result in a damaged windows reappearing; but gives another chance of getting at the repair"<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-54108433984603100622011-10-12T10:32:00.000+13:002012-04-16T14:15:12.469+12:00Load Gumstix Libraries<br />1) Install rsync pakage:<br /><div style="color: #666666;">$ scp /build/czhang/overo-oe/tmp/deploy/glibc/ipk/armv7a/rsync_3.0.6-r0.6_armv7a.ipk root@10.0.0.146://home/root/</div><br /><div style="color: #666666;">$ opkg install rsync_3.0.6-r0.6_armv7a.ipk</div><br />2) Install Qt lib:<br /><div style="color: #666666;"> $ rsync -av czhang@10.0.1.202://build/czhang/qt-everywhere-opensource-src-4.7.0/lib/* /usr/lib</div><br />3) Install serial port lib:<br /><div style="color: #666666;">$ rsync -av czhang@10.0.1.202://build/czhang/qt-everywhere-opensource-src-4.7.0/projects/qextserialport/build/libqextserialport* /usr/lib</div><br />4) Install qwt lib:<br /><span style="color: #666666;">$ rsync -av czhang@10.0.1.202:///build/czhang/qt-everywhere-opensour</span><span style="color: #666666;">ce-src-4.7.0/projects/qwt-5.2.1/lib/* /usr/lib</span><br /><br /><span style="color: #666666;"><span style="color: black;">4) Install sqlit3 lib:</span> </span><br /><div style="color: #666666;">$ scp czhang@x.x.x.x:/build/czhang/qt-everywhere-opensource-src-4.7.0/plugins/sqldrivers/libqsqlite.so /home/m4/sqldrivers</div><br />5) Install qzip lib:<br /><div style="color: #666666;"><span class="Apple-style-span">$ rsync -av czhang@10.0.1.202://build/czhang/qt-everywhere-opensource-src-4.7.0/projects/quazip-0.3/quazip/libquazip.so* /usr/lib</span></div><br /><span class="Apple-style-span">6) Install Analogwidget lib:</span><br /><span style="color: #666666;">$ scp /build/czhang/qt-everywhere-opensource-src-4.7.0/projects/AnalogWidgets/analogwidgets/libanalogwidgets_plugin.so root@10.0.0.146://usr/lib</span><br /><br /><span style="color: #666666;"> </span><br /><span class="post-author vcard"></span>Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-6947943288449091382011-10-07T15:53:00.000+13:002012-04-16T14:15:12.490+12:00Stop Bluetooth in Overo Fire<pre><span style="color: #666666;"># echo 0 > /sys/class/gpio/gpio164/value</span></pre>Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-34198280684309347242011-10-01T20:50:00.000+13:002012-04-16T14:15:12.508+12:00Create an Application Shortcut to Open Nautilus as Root in Ubuntu<br /><div style="color: #666666;">$ sudo nano /usr/share/applications/Nautilus-root.desktop</div><br />Paste the following text in the editor that comes up in Terminal:<br /><br /><div style="color: #666666;"> [Desktop Entry]<br />Name=File Browser (Root)<br />Comment=Browse the filesystem with the file manager<br />Exec=gksudo nautilus<br />Icon=file-manager<br />Terminal=false<br />Type=Application<br />Categories=Application;System;</div><br /> Hit Ctrl+X then Y<br /><br />Done!Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-5503492227491246042011-09-29T11:03:00.000+13:002012-04-16T14:15:12.533+12:00User Management<br />Create a user:<br /><div style="color: #666666;">$ useradd tech</div><br />Add password:<br /><div style="color: #666666;">$ passwd tech</div><div style="color: #666666;">Enter new UNIX password: <br />Retype new UNIX password:</div><br />Direct user to a preferred directory when the user log on:<br />usermod -d /home/tempdir/ tech<br /><br /><br />Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-14974937821172519672011-08-25T11:09:00.000+12:002012-04-16T14:15:12.544+12:00Gumstix touch screen problem<br />I re-installed file system (2Gb SD card) for my Overo gumstix. After i booted from SD, I found the touch screen did not work. So, I had a look in /dev/input directory. I can only see 'mice' in this folder, no 'touchscreen0'.<br /><br />Then I tried different way to solve the problem. I tried:<br /><div style="color: #666666;"><span>$ nand erase 240000 20000 </span><br />$ reset </div><br />When I booted gumstix, the back light of screen turned on, but nothing displays on the screen. I can see 'touchscreen0' in /dev/input. I tried '/usr/bin/ts_test'. This command can detect the position when i touched screen, but just no display.<br /><br />I thought my screen was faulty.<br /><br />After that, I took a look the u-boot environment:<br /><br /><div style="color: #666666;"># printenv</div><div style="color: #666666;"> dvimode=1024x768MR-16@60</div><div style="color: #666666;">defaultdisplay=dvi</div><br />DVI? The touch screen I am using is LCD!<br /><br />Ok, changed it to:<br /><div style="color: #666666;"># <span>setenv defaultdisplay lcd43 </span><br /><span># saveenv </span><br /><span># boot</span></div><br />Haha, screen is working.<br /><br />Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-57107240988782603552011-08-08T14:22:00.000+12:002012-04-16T14:15:12.561+12:00Install AnalogWidget in Ubuntu / Gumstix<u>Install in Ubuntu:</u><br /><br />System spec:<br /><br />Ubuntu 10.04 (lucid)<br />2.30.2 (Ubuntu 2010-06-25)<br />2.6.32-33-generic (#70-Ubuntu SMP Thu Jul 7 21:13:52 UTC 2011)<br />4.4.3 (x86_64-linux-gnu)<br />AnalogWidgets_234.zip<br /><br />Download from here:<br />http://qt-apps.org/content/show.php?content=87780&forumpage=0<br /><br />unzip it.<br /><br /><span class="Apple-style-span" style="color: #666666;">$ cd /home/czhang/Downloads/AnalogWidgets</span><br /><span class="Apple-style-span" style="color: #666666;">$ qmake AnalogWidgets.pro</span><br /><span class="Apple-style-span" style="color: #666666;">$ make</span><br /><span class="Apple-style-span" style="color: #666666;">$ sudo make install</span><br /><div><span class="Apple-style-span" style="color: #666666;">$ cp /home/czhang/Downloads/AnalogWidgets/analogwidgets/libanalogwidgets_plugin.so /home/czhang/QtSDK/QtCreator/lib/qtcreator/plugins/designer/libanalogwidgets_plugin.so</span></div><div><br /></div><div><style type="text/css">p, li { white-space: pre-wrap; }</style>In .pro file, added: <br /><pre style="margin: 0px; text-indent: 0px;"><span class="Apple-style-span" style="color: #666666;">LIBS += /home/czhang/Downloads/AnalogWidgets/analogwidgets/libanalogwidgets_plugin.so</span></pre><pre style="margin: 0px; text-indent: 0px;"><span class="Apple-style-span" style="color: #666666;">INCLUDEPATH += /home/czhang/Downloads/AnalogWidgets/analogwidgets/analogwidgets</span></pre></div><div><br /></div><div><br />Install in Gumstix:<br /><br />unzip Analogwidget.zip under:<br />/build/czhang/qt-everywhere-opensource-src-4.7.0/projects<br /><br />$ qmake AnalogWidgets.pro<br />$ make<br /><br />got some error messages according to file:<br />/build/czhang/AnalogWidgets/analogwidgets/code/chart/channel.cpp<br />/build/czhang/AnalogWidgets/analogwidgets/code/scriptwidget.cpp<br /><br />I edited these two files:<br />in channel.cpp<br /><div style="color: #666666;">void Channel::setType(unsigned int i)<br />{<br /><span style="color: orange;"> //if (i!=Line && i!=Dots)</span><br /><span style="color: orange;"> // throw "Bledny typ"; </span><br /><br />m_type = i; <br /><br />}</div><br />in scriptwidget.cpp:<br /><span style="color: #666666;">void ScriptWidget::setScript(const QString & s)</span><br /><span style="color: #666666;">{</span><br /><span style="color: #666666;"> m_script = s;</span><br /><span style="color: #666666;"> qDebug("ScriptWidget::setScript() %s",qPrintable(m_script)); </span><br /><span style="color: #666666;"> try </span><br /><span style="color: #666666;"> {</span><br /><span style="color: #666666;"> QFile file(m_script); </span><br /><span style="color: #666666;"> if (file.open( QIODevice::ReadOnly ))</span><br /><span style="color: #666666;"> {</span><br /><span style="color: #666666;"> QString src = QString(file.readAll());</span><br /><span style="color: #666666;"> QScriptValue widget = m_engine->newQObject(this);</span><br /><span style="color: #666666;"> m_engine->globalObject().setProperty(objectName(),widget);</span><br /><span style="color: #666666;"> m_engine->evaluate(src);</span><br /><span style="color: #666666;"> QScriptValue v = m_engine->uncaughtException(); </span><br /><br /><span style="color: #666666;"> if (v.isValid()) </span><br /><span style="color: #666666;"> qDebug("Error %s",qPrintable(v.toString()));</span><br /><span style="color: #666666;"> }</span><br /><span style="color: #666666;"> }</span><br /><span style="color: orange;"> //catch (std::exception & e) </span><br /><span style="color: orange;"> //{</span><br /><span style="color: orange;"> // qDebug("Wyjatek %s",e.what()); </span><br /><span style="color: orange;"> //}</span><br /><span style="color: #666666;">}// setScript </span><br /><br /><br /><span style="color: #666666;">$ scp /build/czhang/qt-everywhere-opensource-src-4.7.0/projects/AnalogWidgets/analogwidgets/libanalogwidgets_plugin.so root@10.0.0.146://usr/lib</span></div>Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-36355097640545002522011-05-31T16:41:00.000+12:002012-04-16T14:15:12.575+12:00Disable gumstix overo console login message on ttyS2In my design, I need to use second serial port (ttyS2) on overo.<br /><div>I connected SDA3 (pin 24 on chestnut43 board) to WinXP hyperterminal, and booted up Overo.</div><div>I saw all booting messages are showing in hyperterminal.</div><div><br /></div><div><div>----------------------------------------------------------- </div><div><span class="Apple-style-span" style="color: #666666;">Login timed out after 60 seconds. </span></div><div><span class="Apple-style-span" style="color: #666666;"> </span></div><div><span class="Apple-style-span" style="color: #666666;">.-------. </span></div><div><span class="Apple-style-span" style="color: #666666;">| | .-. </span></div><div><span class="Apple-style-span" style="color: #666666;">| | |-----.-----.-----.| | .----..-----.-----. </span></div><div><span class="Apple-style-span" style="color: #666666;">| | | __ | ---'| '--.| .-'| | | </span></div><div><span class="Apple-style-span" style="color: #666666;">| | | | | |--- || --'| | | ' | | | | </span></div><div><span class="Apple-style-span" style="color: #666666;">'---'---'--'--'--. |-----''----''--' '-----'-'-'-' </span></div><div><span class="Apple-style-span" style="color: #666666;"> -' | </span></div><div><span class="Apple-style-span" style="color: #666666;"> '---' </span></div><div><span class="Apple-style-span" style="color: #666666;"> </span></div><div><span class="Apple-style-span" style="color: #666666;">The Angstrom Distribution overo ttyS2 </span></div><div><span class="Apple-style-span" style="color: #666666;"> </span></div><div><span class="Apple-style-span" style="color: #666666;">Angstrom 2010.7-test-20101005 overo ttyS2 </span></div><div><span class="Apple-style-span" style="color: #666666;"> </span></div><div><span class="Apple-style-span" style="color: #666666;">overo login: root </span></div><div><span class="Apple-style-span" style="color: #666666;"> | ' | | | | </span></div><div><span class="Apple-style-span" style="color: #666666;">'---'---'--'--'--. |-----''----''--' '-----'-'-'-' </span></div><div><span class="Apple-style-span" style="color: #666666;"> -' | </span></div><div><span class="Apple-style-span" style="color: #666666;"> '---' </span></div><div><span class="Apple-style-span" style="color: #666666;"> </span></div><div><span class="Apple-style-span" style="color: #666666;">The Angstrom Distribution overo ttyS2 </span></div><div><span class="Apple-style-span" style="color: #666666;"> </span></div><div><span class="Apple-style-span" style="color: #666666;">Angstrom 2010.7-test-20101005 overo ttyS2 </span></div><div><span class="Apple-style-span" style="color: #666666;">... </span></div><div><span class="Apple-style-span" style="color: #666666;">... </span></div><div><br /></div><div>-------------------------------------------------------------------- </div><div><br /></div><div>Then, I run my program (written by Qt), the hyperterminal shows as follow: </div><div><br /></div><div>-------------------------------------------------------------------------- </div><div><span class="Apple-style-span" style="color: #666666;">QIODevice::read: Called with maxSize < 0 </span></div><div><span class="Apple-style-span" style="color: #666666;">QIODevice::read: Called with maxSize < 0 </span></div><div><span class="Apple-style-span" style="color: #666666;">QIODevice::read: Called with maxSize < 0 </span></div><div><span class="Apple-style-span" style="color: #666666;">QIODevice::read: Called with maxSize < 0 </span></div><div><span class="Apple-style-span" style="color: #666666;">QIODevice::read: Called with maxSize < 0 </span></div><div><span class="Apple-style-span" style="color: #666666;">QIODevice::read: Called with maxSize < 0 </span></div><div><span class="Apple-style-span" style="color: #666666;">QIODevice::read: Called with maxSize < 0 </span></div><div><span class="Apple-style-span" style="color: #666666;">QIODevice::read: Called with maxSize < 0 </span></div><div><span class="Apple-style-span" style="color: #666666;">QIODevice::read: Called with maxSize < 0 </span></div><div><span class="Apple-style-span" style="color: #666666;">QIODevice::read: Called with maxSize < 0 </span></div><div><span class="Apple-style-span" style="color: #666666;">QIODevice::read: Called with maxSize < 0 </span></div><div><span class="Apple-style-span" style="color: #666666;">QIODevice::read: Called with maxSize < 0 </span></div><div><span class="Apple-style-span" style="color: #666666;">QIODevice::read: Called with maxSize < 0 </span></div><div><span class="Apple-style-span" style="color: #666666;">QIODevice::read: Called with maxSize < 0 </span></div><div><span class="Apple-style-span" style="color: #666666;">... </span></div><div><span class="Apple-style-span" style="color: #666666;">... </span></div><div>------------------------------------------------------------------------- </div><div><br /></div><div>in the meantime, the string which sent from Qt program also shows in the screen. </div></div><div>I only want ttyS2 send the information from my program, not other messages.</div><div><br /></div><div>With help from Nabble forum, the following is my solution:</div><div><br /></div><div>Those messages are from the kernel. U need to change the "console" uboot environment variable, otherwise the kernel will print messages on that serial port.</div><div><br /></div><div>Take a look at uboot environment variable. to do this , boot gumsix, pushed any key to stop it booting from MMC. Then use "printenv" list all u-boot variables. </div><div>------------------------------------------ </div><div><span class="Apple-style-span" style="color: #666666;">Overo # printenv </span></div><div><span class="Apple-style-span" style="color: #666666;">bootcmd=if mmc init; then if run loadbootscript; then run bootscript; else if run loaduimagei </span></div><div><span class="Apple-style-span" style="color: #666666;">baudrate=115200 </span></div><div><span class="Apple-style-span" style="color: #666666;">loadaddr=0x82000000 </span></div><div><span class="Apple-style-span" style="color: #666666;">console=ttyS2,115200n8 </span></div><div><span class="Apple-style-span" style="color: #666666;">vram=12M </span></div><div><span class="Apple-style-span" style="color: #666666;">dvimode=1024x768MR-16@60 </span></div><div><span class="Apple-style-span" style="color: #666666;">nandargs=setenv bootargs console=${console} vram=${vram} omapfb.mode=dvi:${dvimode} omapfb.d2 </span></div><div><span class="Apple-style-span" style="color: #666666;">loadbootscript=fatload mmc 0 ${loadaddr} boot.scr </span></div><div><span class="Apple-style-span" style="color: #666666;">bootscript=echo Running bootscript from mmc ...; source ${loadaddr} </span></div><div><span class="Apple-style-span" style="color: #666666;">loaduimage=fatload mmc 0 ${loadaddr} uImage </span></div><div><span class="Apple-style-span" style="color: #666666;">mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${loadaddr} </span></div><div><span class="Apple-style-span" style="color: #666666;">nandboot=echo Booting from nand ...; run nandargs; nand read ${loadaddr} 280000 400000; boot} </span></div><div><span class="Apple-style-span" style="color: #666666;">dieid#=0ef000040000000004035c140d002011 </span></div><div><span class="Apple-style-span" style="color: #666666;">ethact=smc911x-0 </span></div><div><span class="Apple-style-span" style="color: #666666;">bootdelay=2 </span></div><div><span class="Apple-style-span" style="color: #666666;">defaultdisplay=lcd43 </span></div><div><span class="Apple-style-span" style="color: #666666;">i2cspeed=3,100 </span></div><div><span class="Apple-style-span" style="color: #666666;">bootargs=console=ttyS2,115200n8 i2c_bus=${i2cspeed} vram=12M omapfb.mode=dvi:1024x768MR-16@6t </span></div><div><span class="Apple-style-span" style="color: #666666;">mmcargs=setenv bootargs console=${console} i2c_bus=${i2cspeed} vram=12M omapfb.mode=dvi:1024t </span></div><div><span class="Apple-style-span" style="color: #666666;">stdin=serial </span></div><div><span class="Apple-style-span" style="color: #666666;">stdout=serial </span></div><div><span class="Apple-style-span" style="color: #666666;">stderr=serial </span></div><div><span class="Apple-style-span" style="color: #666666;"><br /></span></div><div><span class="Apple-style-span" style="color: #666666;">Environment size: 1279/131068 bytes </span></div><div>--------------------------------------------- </div><div><br /></div><div>the "console=ttyS2,115200n8" means send console login messages to ttyS2.</div><div><br /></div><div>After that, take a look at /etc/inittab in mmc system on 2G SD card.</div><div>-------------------------------------------------</div><div><div><span class="Apple-style-span" style="color: #666666;"># /etc/inittab: init(8) configuration.</span></div><div><span class="Apple-style-span" style="color: #666666;"># $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $</span></div><div><span class="Apple-style-span" style="color: #666666;"><br /></span></div><div><span class="Apple-style-span" style="color: #666666;"># The default runlevel.</span></div><div><span class="Apple-style-span" style="color: #666666;">id:5:initdefault:</span></div><div><span class="Apple-style-span" style="color: #666666;"><br /></span></div><div><span class="Apple-style-span" style="color: #666666;"># Boot-time system configuration/initialization script.</span></div><div><span class="Apple-style-span" style="color: #666666;"># This is run first except when booting in emergency (-b) mode.</span></div><div><span class="Apple-style-span" style="color: #666666;">si::sysinit:/etc/init.d/rcS</span></div><div><span class="Apple-style-span" style="color: #666666;"><br /></span></div><div><span class="Apple-style-span" style="color: #666666;"># What to do in single-user mode.</span></div><div><span class="Apple-style-span" style="color: #666666;">~~:S:wait:/sbin/sulogin</span></div><div><span class="Apple-style-span" style="color: #666666;"><br /></span></div><div><span class="Apple-style-span" style="color: #666666;"># /etc/init.d executes the S and K scripts upon change</span></div><div><span class="Apple-style-span" style="color: #666666;"># of runlevel.</span></div><div><span class="Apple-style-span" style="color: #666666;">#</span></div><div><span class="Apple-style-span" style="color: #666666;"># Runlevel 0 is halt.</span></div><div><span class="Apple-style-span" style="color: #666666;"># Runlevel 1 is single-user.</span></div><div><span class="Apple-style-span" style="color: #666666;"># Runlevels 2-5 are multi-user.</span></div><div><span class="Apple-style-span" style="color: #666666;"># Runlevel 6 is reboot.</span></div><div><span class="Apple-style-span" style="color: #666666;"><br /></span></div><div><span class="Apple-style-span" style="color: #666666;">l0:0:wait:/etc/init.d/rc 0</span></div><div><span class="Apple-style-span" style="color: #666666;">l1:1:wait:/etc/init.d/rc 1</span></div><div><span class="Apple-style-span" style="color: #666666;">l2:2:wait:/etc/init.d/rc 2</span></div><div><span class="Apple-style-span" style="color: #666666;">l3:3:wait:/etc/init.d/rc 3</span></div><div><span class="Apple-style-span" style="color: #666666;">l4:4:wait:/etc/init.d/rc 4</span></div><div><span class="Apple-style-span" style="color: #666666;">l5:5:wait:/etc/init.d/rc 5</span></div><div><span class="Apple-style-span" style="color: #666666;">l6:6:wait:/etc/init.d/rc 6</span></div><div><span class="Apple-style-span" style="color: #666666;"># Normally not reached, but fallthrough in case of emergency.</span></div><div><span class="Apple-style-span" style="color: #666666;">z6:6:respawn:/sbin/sulogin</span></div><div><span class="Apple-style-span" style="color: #666666;">S:2345:respawn:/sbin/getty 115200 ttyS2</span></div><div><span class="Apple-style-span" style="color: #666666;"># /sbin/getty invocations for the runlevels.</span></div><div><span class="Apple-style-span" style="color: #666666;">#</span></div><div><span class="Apple-style-span" style="color: #666666;"># The "id" field MUST be the same as the last</span></div><div><span class="Apple-style-span" style="color: #666666;"># characters of the device (after "tty").</span></div><div><span class="Apple-style-span" style="color: #666666;">#</span></div><div><span class="Apple-style-span" style="color: #666666;"># Format:</span></div><div><span class="Apple-style-span" style="color: #666666;"># <id>:<runlevels>:<action>:<process></process></action></runlevels></id></span></div><div><span class="Apple-style-span" style="color: #666666;">#</span></div><div><span class="Apple-style-span" style="color: #666666;"><br /></span></div><div><span class="Apple-style-span" style="color: #666666;">1:2345:respawn:/sbin/getty 38400 tty1</span></div></div><div>-------------------------------------------------------</div><div><br /></div><div><div>The last line sets up a login on tty1. If you have a keyboard (eg. USB keyboard via a powered HUB) and display connected, then you'd be able to login using those. I am using a chestnut43 board with LCD, and i can use tty1 on a couple of occasions when I messed up the networking.</div></div><div><br /></div><div>the command to change console environment variable are follows:</div><div><div><br /></div><div><span class="Apple-style-span" style="color: red;"># setenv console tty1 </span></div><div><span class="Apple-style-span" style="color: red;"># saveenv </span></div><div></div><div>The console setting is passed to the kernel at boot time. It Only tells the kernel where to send messages; It does not have anything to do with login terminals as that is handled by inittab and getty. I can use tty1 because it allows me to see the kernel messages on the LCD during boot. </div><div><br /></div></div>Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-68437939901858355312011-05-20T11:19:00.000+12:002012-04-16T14:15:12.588+12:00Linux hintsAfter reinstalled Ubuntu in my laptop, I tried to ssh laptop from Fedora computer. I got following error message:<br /><br /><span style="color: #666666; font-size: x-small;">[czhang@F13-64-VM projects]$ ssh czhang@10.0.0.124</span><span style="font-size: x-small;"><br style="color: #666666;" /></span><br /><span style="color: #666666; font-size: x-small;">@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</span><span style="font-size: x-small;"><br style="color: #666666;" /></span><br /><span style="color: #666666; font-size: x-small;">@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @</span><span style="font-size: x-small;"><br style="color: #666666;" /></span><br /><span style="color: #666666; font-size: x-small;">@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</span><span style="font-size: x-small;"><br style="color: #666666;" /></span><br /><span style="color: #666666; font-size: x-small;">IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!</span><span style="font-size: x-small;"><br style="color: #666666;" /></span><br /><span style="color: #666666; font-size: x-small;">Someone could be eavesdropping on you right now (man-in-the-middle attack)!</span><span style="font-size: x-small;"><br style="color: #666666;" /></span><br /><span style="color: #666666; font-size: x-small;">It is also possible that the RSA host key has just been changed.</span><span style="font-size: x-small;"><br style="color: #666666;" /></span><br /><span style="color: #666666; font-size: x-small;">The fingerprint for the RSA key sent by the remote host is</span><span style="font-size: x-small;"><br style="color: #666666;" /></span><br /><span style="color: #666666; font-size: x-small;">4e:b4:d9:05:e3:b3:81:3c:1a:f6:79:64:c1:23:b7:83.</span><span style="font-size: x-small;"><br style="color: #666666;" /></span><br /><span style="color: #666666; font-size: x-small;">Please contact your system administrator.</span><span style="font-size: x-small;"><br style="color: #666666;" /></span><br /><span style="color: #666666; font-size: x-small;">Add correct host key in /home/czhang/.ssh/known_hosts to get rid of this message.</span><span style="font-size: x-small;"><br style="color: #666666;" /></span><br /><span style="color: #666666; font-size: x-small;">Offending key in /home/czhang/.ssh/known_hosts:3</span><span style="font-size: x-small;"><br style="color: #666666;" /></span><br /><span style="color: #666666; font-size: x-small;">RSA host key for 10.0.0.124 has changed and you have requested strict checking.</span><span style="font-size: x-small;"><br style="color: #666666;" /></span><br /><span style="color: #666666; font-size: x-small;">Host key verification failed.</span><br /><br />This is because the RSA host key has changed since reinstalled the system.<br />Just remove the RSA key will solve the problem.<br /><br /><span class="Apple-style-span" style="color: #666666;">$ rm /home/czhang/.ssh/known_hosts</span>Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-1665146723651124392011-05-18T11:00:00.000+12:002012-05-01T09:17:59.548+12:00Summary of Installation All Necessary Libraries for Qt programming1) Serial port communication lib:<br />
<br />
<i><a href="http://oestudyard.blogspot.com/2009/09/add-serial-port-communication-lib-in-qt.html?zx=b682084f36b1c11d">http://oestudyard.blogspot.com/2009/09/add-serial-port-communication-lib-in-qt.html?zx=b682084f36b1c11d</a></i><br />
<br />
2) quazip lib:<br />
<div style="color: blue;">
<i><a href="http://oestudyard.blogspot.com/2011/03/linux-library-link-configuration.html">http://oestudyard.blogspot.com/2011/03/linux-library-link-configuration.html</a></i></div>
<br />
3) qwt 2D plot lib:<br />
ubuntu: <span id="goog_754250057"></span><i><a href="http://www.blogger.com/goog_754250064"></a><a href="http://oestudyard.blogspot.co.nz/2010/10/install-qwt-in-ubuntu.html">http://oestudyard.blogspot.co.nz/2010/10/install-qwt-in-ubuntu.html</a></i><br />
fedora: <i><a href="http://oestudyard.blogspot.com/2011/05/install-qwt-in-fedora-14.html">http://oestudyard.blogspot.com/2011/05/install-qwt-in-fedora-14.html</a></i><br />
gunstix: <i><a href="http://oestudyard.blogspot.com/2010/11/install-qwt-for-gumstix.html">http://oestudyard.blogspot.com/2010/11/install-qwt-for-gumstix.html</a></i><br />
<br />
4) sqlite3 database lib:<br />
ubuntu: apt-get install sqlite3<br />
gunstix: <i><a href="http://oestudyard.blogspot.com/2011/02/install-sqlite3-library-in-gumstix-for.html">http://oestudyard.blogspot.com/2011/02/install-sqlite3-library-in-gumstix-for.html</a></i><br />
<br />
5) SVN subversion control:<br />
<i><a href="http://oestudyard.blogspot.com/2010/10/subversion-control-svn.html">http://oestudyard.blogspot.com/2010/10/subversion-control-svn.html</a></i><br />
<br />
6) AnalogWidget lib:<br />
<div style="color: blue;">
<a href="http://oestudyard.blogspot.com/2011/08/install-analog-widget-in-ubuntu.html"> <i>http://oestudyard.blogspot.com/2011/08/install-analog-widget-in-ubuntu.html</i></a></div>
<br />
<br />
<br />
<br />Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-28931355737264563282011-05-17T16:03:00.000+12:002012-04-16T14:15:12.688+12:00Ubuntu 10.04 Install No Machine NXDownload DEB package from here:<br />http://www.nomachine.com/download-package.php?Prod_Id=2573<br /><br /><div style="color: #666666;">$ sudo chmod 755 /usr/lib/cups/backend/ipp</div><span style="color: #666666;">$ sudo dpkg -i nxclient_3.4.0-7_x86_64.deb</span>Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-28540593678925445772011-05-11T11:23:00.000+12:002012-04-16T14:15:12.704+12:00Install QWT in Fedora 14yum install libQtGTL<br />yum install libQtGTL-devel<br />yum install gcc-c++<br />yum install qt-devel<br /><br />1. Install Qt programm (Will be installed in /home/czhang/QtDSK)<br />2. Download qwt-6.0.0.tar.bz2<br />3. cp qwt-6.0.0.tar.bz2 /home/czhang/<br />4. tar -xjvf qwt-6.0.0.tar.bz2 <br />5. qmake-qt4<br />6. make<br />7. sudo make install<br />8. sudo cp /home/czhang/qwt-6.0.0/designer/plugins/designer/libqwt_designer_plugin.so /home/czhang/QtSDK/QtCreator/lib/qtcreator/plugins/designer<br />9 cp -a /home/czhang/qwt-6.0.0/lib/* /usr/lib64 // copy all libqwt.so libqwt.so.6 etc.<br />10 Add following codes in the end of .pro file in Qt, before build<br />LIBS += -L/usr/local/lib -lQtSvg<br />INCLUDEPATH += /usr/local/qwt-6.0.0/include<br />LIBS += -L/usr/local/qwt-6.0.0-rc5/lib -lqwtOpen Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-35732221742356820652011-05-10T12:45:00.000+12:002012-04-16T14:15:12.718+12:00Fedora 14 hints1) Check graphic card information:<br /><span style="color: #666666;">$ /sbin/lspci -nn | grep 'VGA\|NV'</span>Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-40036708194695905112011-04-13T08:34:00.000+12:002012-04-16T14:15:12.733+12:00Beginners: Learn Linux<span class="Apple-style-span" style="font-family: tahoma, arial, helvetica, verdana, sans-serif; font-size: 12px;"></span><br /><h1 style="font-size: 16px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;"><span class="Apple-style-span" style="font-weight: normal;">From (http://linuxreviews.org/beginner/#toc18)</span></h1><div><span class="Apple-style-span" style="font-weight: normal;"><br /></span></div><h1 style="color: #6b0000; font-size: 16px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">1. What is Linux?</h1><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Linux is a free Unix-type operating system for computer devices. The operating system is what makes the hardware work together with the software. The OS is the interface that allows you to do the things you want with your computer. Linux is freely available to everyone. <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">OS X</code> and <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">Windows</code> are other widely used OS.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh17g36Z4Te3xjU9qXJVPrdKwne46fC7pwB9cqNMdklmz9RpqKgywW_H-s0d5-XA_PXlCcJsTXROuMDzK2g5voRuHzvYTsEtxv1uUpHFlrZ4_Hc4MU-JjdFolopZB4XB1rnjxGzpnC1JQpa/s1600/debian-linux-5lenny-desktop.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh17g36Z4Te3xjU9qXJVPrdKwne46fC7pwB9cqNMdklmz9RpqKgywW_H-s0d5-XA_PXlCcJsTXROuMDzK2g5voRuHzvYTsEtxv1uUpHFlrZ4_Hc4MU-JjdFolopZB4XB1rnjxGzpnC1JQpa/s400/debian-linux-5lenny-desktop.png" width="400" /></a></div><br /></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Linux gives you a graphical interface that makes it easy to use your computer, yet it still allows those with know-how to change settings by adjusting <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">0</code> to <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">1</code>.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">It is only the <a href="http://www.kernel.org/" style="color: blue; text-decoration: none;">kernel</a> that is named Linux, the rest of the OS are GNU tools. A package with the kernel and the needed tools make up a <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">Linux distribution</code>. <a href="http://www.mandrakelinux.com/" style="color: blue; text-decoration: none;">Mandrake</a> , <a href="http://www.novell.com/linux" style="color: blue; text-decoration: none;">SUSE Linux</a>,<a href="http://www.gentoo.org/" style="color: blue; text-decoration: none;">Gentoo</a> and Redhat are some of the many variants. GNU/Linux OS can be used on a large number of boxes, including i386+ , Alpha, PowerPC and Sparc.</div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc2" name="toc2"></a><br /><h1 style="color: #6b0000; font-size: 16px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">2. Understanding files and folders</h1><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Linux is made with one thought in mind: <b>Everything is a file</b>.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">A blank piece of paper is called a file in the world of computers. You can use this piece of paper to write a text or make a drawing. Your text or drawing is called information. A computer file is another way of storing your information.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">If you make many drawings then you will eventually want to sort them in different piles or make some other system that allows you to easily locate a given drawing. Computers use folders to sort your files in a hieratic system.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">A file is an element of data storage in a <a href="http://linuxreviews.org/sysadmin/filesystems/" style="color: blue; text-decoration: none;">file system</a> (<a href="http://linuxreviews.org/man/fs/" style="color: blue; text-decoration: none;">file systems manual page</a>). Files are usually stored on harddrives, cdroms and other media, but may also be information stored in RAM or links to devices.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">To organize our files into a system we use <b>folders</b>. The lowest possible folder is root / where you will find the user homes called /home/.</div><pre style="background-color: #ffffee; border-bottom-color: rgb(255, 234, 165); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(255, 234, 165); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(255, 234, 165); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(255, 234, 165); border-top-style: solid; border-top-width: 1px; color: black; font-family: courier; font-size: 9px; font-weight: bold; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;">/<br /> /home/<br /> /home/mom/<br /> /home/dad/<br /></pre><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Behind every configurable option there is a simple human-readable text file you can hand-edit to suit your needs. These days most programs come with nice GUI (graphical user interface) like Mandrakes Control Center and Suses YAST that can smoothly guide you through most configuration. Those who choose can gain full control of their system by manually adjusting the configuration files from foo=yes to foo=no in an editor.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Almost everything you do on a computer involves one or more files stored locally or on a network.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Your filesystems lowest folder root / contains the following folders:</div><table align="center" cellpadding="4"><tbody><tr><td style="font-size: 12px;">/bin</td><td style="font-size: 12px;">Essential user command binaries (for use by all users)</td></tr><tr><td style="font-size: 12px;">/boot</td><td style="font-size: 12px;">Static files of the boot loader, only used at system startup</td></tr><tr><td style="font-size: 12px;">/dev</td><td style="font-size: 12px;">Device files, links to your hardware devices like /dev/sound, /dev/input/js0 (joystick)</td></tr><tr><td style="font-size: 12px;">/etc</td><td style="font-size: 12px;">Host-specific system configuration</td></tr><tr><td style="font-size: 12px;">/home</td><td style="font-size: 12px;">User home directories. This is where you save your personal files</td></tr><tr><td style="font-size: 12px;">/lib</td><td style="font-size: 12px;">Essential shared libraries and kernel modules</td></tr><tr><td style="font-size: 12px;">/mnt</td><td style="font-size: 12px;">Mount point for a temporarily mounted filesystem like /mnt/cdrom</td></tr><tr><td style="font-size: 12px;">/opt</td><td style="font-size: 12px;">Add-on application software packages</td></tr><tr><td style="font-size: 12px;">/usr</td><td style="font-size: 12px;">/usr is the second major section of the filesystem. /usr is shareable, read-only data. That means that /usr should be shareable between various FHS-compliant hosts and must not be written to. Any information that is host-specific or varies with time is stored elsewhere.</td></tr><tr><td style="font-size: 12px;">/var</td><td style="font-size: 12px;">/var contains variable data files. This includes spool directories and files, administrative and logging data, and transient and temporary files.</td></tr><tr><td style="font-size: 12px;">/proc</td><td style="font-size: 12px;">System information stored in memory mirrored as files.</td></tr></tbody></table><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">The only folder a normal user needs to use is <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">/home/you/</code> - this is where you will be keeping all your documents.</div><pre style="background-color: #ffffee; border-bottom-color: rgb(255, 234, 165); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(255, 234, 165); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(255, 234, 165); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(255, 234, 165); border-top-style: solid; border-top-width: 1px; color: black; font-family: courier; font-size: 9px; font-weight: bold; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;">/home/elvis/Documents<br /> /home/elvis/Music<br /> /home/elvis/Music/60s<br /></pre><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Files are case sensitive, "myfile" and "MyFile" are two different files.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">For more details, check out:</div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc3" name="toc3"></a><br /><h1 style="color: #6b0000; font-size: 16px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">3. Understanding users and permissions</h1><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Linux is based on the idea that everyone using a system has their own username and password.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Every file belongs to a <b>user</b> and a <b>group</b>, and has a set of given attributes (read, write and executable) for users, groups and all (everybody).</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">A file or folder can have permissions that only allows the user it belongs to to read and write to it, allowing the group it belongs to to read it and at the same time all other users can't even read the file.</div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc4" name="toc4"></a><br /><h1 style="color: #6b0000; font-size: 16px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">4. Who and what is root</h1><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Linux has one special user called <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">root</code> (this is the user name). Root is the "system administrator" and has access to all files and folders. This special user has the right to do anything.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">You should <i>never</i> log on as this user unless you actually need to do something that requires it!</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Use <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">su -</code> to temporary become root and do the things you need, again: never log into your sytem as root!</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Root is only for system maintenance, <b>this is not a regular user</b> (<a href="http://www.lindows.com/" style="color: blue; text-decoration: none;">LindowsOS</a> don't have any user management at all and uses root for everything, this is a <i>very bad</i> idea!).</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">You can execute a command as root with:</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">su -c 'command done as root'</code></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Gentoo Linux: Note that on Gentoo Linux only users that are member of the <b>wheel</b> group are allowed to su to root.</div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc5" name="toc5"></a><br /><h1 style="color: #6b0000; font-size: 16px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">5. Opening a command shell / terminal</h1><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">To learn Linux, you need to learn the shell command line in a terminal emulator.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">In KDE: <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">K</code> -> <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">System</code> -> <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">Konsoll</code> to get a command shell)</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Pressing <b>CTRL-ALT-F1</b> to <b>CTRL-ALT-F6</b> gives you the console command shell windows, while <b>CTRL-ALT-F7</b> gives you <a href="http://www.xfree86.org/" style="color: blue; text-decoration: none;">XFree86</a> (the graphical interface).</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><a href="http://dickey.his.com/xterm/" style="color: blue; text-decoration: none;">xterm</a> <a href="http://linuxreviews.org/man/xterm" style="color: blue; text-decoration: none;">(manual page)</a> is the standard XFree console installed on all boxes, run it with<b>xterm</b> (press ALT F2 in KDE and Gnome to run commands).</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Terminals you probably have installed:</div><ul style="margin-left: 1em; margin-top: 0px; padding-bottom: 5px; padding-left: 4px; padding-top: 0px;"><li style="padding-bottom: 0px; padding-top: 1px;"><b>xterm</b> <a href="http://dickey.his.com/xterm/" style="color: blue; text-decoration: none;">http://dickey.his.com/xterm/</a></li><li style="padding-bottom: 0px; padding-top: 1px;"><b>konsole</b> (KDEs terminal)</li><li style="padding-bottom: 0px; padding-top: 1px;"><b>gnome-terminal</b> (Gnomes terminal)</li></ul><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Non-standard terminals should install:</div><ul style="margin-left: 1em; margin-top: 0px; padding-bottom: 5px; padding-left: 4px; padding-top: 0px;"><li style="padding-bottom: 0px; padding-top: 1px;"><b>rxvt</b> <a href="http://www.rxvt.org/" style="color: blue; text-decoration: none;">http://www.rxvt.org/</a></li><li style="padding-bottom: 0px; padding-top: 1px;"><b>aterm</b> <a href="http://aterm.sourceforge.net/" style="color: blue; text-decoration: none;">http://aterm.sourceforge.net</a></li></ul><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc6" name="toc6"></a><br /><h1 style="color: #6b0000; font-size: 16px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">6. Your first Linux commands</h1><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Now you should have managed to open a terminal shell and are ready to try your first Linux commands. Simply ask the computer to do the tasks you want it to using it's language and press the enter key (the big one with an arrow). You can add a <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">&</code> after the command to make it run in the background (your terminal will be available while the job is done). It can be practical to do things like moving big divx movies as a background process: <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">cp movie.avi /pub &</code>. <a href="http://linuxreviews.org/beginner/jobs/" style="color: blue; text-decoration: none;">Jobs - the basics of job control</a></div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc7" name="toc7"></a><br /><h2 style="color: black; font-size: 14px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">6.1. ls - short for list</h2><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">ls lists the files in the current working folder. This is probably the first command to try out. It as a number of options described on the <a href="http://linuxreviews.org/man/ls/" style="color: blue; text-decoration: none;">ls manpage</a>.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Examples:</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">ls</code></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">ls -al --color=yes</code></div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc8" name="toc8"></a><br /><h2 style="color: black; font-size: 14px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">6.2. pwd - print name of current/working directory</h2><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">pwd</code> prints the fully resolved name of the current (working) directory. <a href="http://linuxreviews.org/man/pwd/" style="color: blue; text-decoration: none;">pwd manpage</a>.</div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc9" name="toc9"></a><br /><h2 style="color: black; font-size: 14px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">6.3. cd - Change directory</h2><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">cd stands for change (working) directory and that's what it does. The folder below you (unless you are in /, where there is no lower directory) is called "..".</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">To go one folder down:</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">cd ..</code></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Change into the folder Documents in your current working directory:</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">cd Documents</code></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Change into a folder somewhere else:</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">cd /pub/video</code></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">The / in front of pub means that the folder pub is located in the / (lowest folder).</div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc10" name="toc10"></a><br /><h1 style="color: #6b0000; font-size: 16px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">7. The basic commands</h1><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc11" name="toc11"></a><br /><h2 style="color: black; font-size: 14px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">7.1. chmod - Make a file executable</h2><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">To make a file executable and runnable by any user:</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">chmod a+x myfile</code></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Refer to the <a href="http://linuxreviews.org/man/chmod" style="color: blue; text-decoration: none;">chmod manual page</a> for more information.</div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc12" name="toc12"></a><br /><h2 style="color: black; font-size: 14px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">7.2. df - view filesystem disk space usage</h2><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">df -h</code></div><pre style="background-color: #ffffee; border-bottom-color: rgb(255, 234, 165); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(255, 234, 165); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(255, 234, 165); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(255, 234, 165); border-top-style: solid; border-top-width: 1px; color: black; font-family: courier; font-size: 9px; font-weight: bold; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;">Filesystem Size Used Avail Use% Mounted on<br /> /dev/hda3 73G 67G 2.2G 97% /<br /> tmpfs 2.0M 24K 2.0M 2% /mnt/.init.d<br /> tmpfs 252M 0 252M 0% /dev/shm<br /></pre><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">The flags: -h, --human-readable Appends a size letter such as M for megabytes to each size.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><a href="http://linuxreviews.org/man/df" style="color: blue; text-decoration: none;">df manpage</a></div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc13" name="toc13"></a><br /><h2 style="color: black; font-size: 14px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">7.3. du - View the space used by files and folders</h2><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Use <b>du</b> (Disk Usage) to view how much space files and folders occupy. Read the <a href="http://linuxreviews.org/man/du" style="color: blue; text-decoration: none;">du manual page</a> for flags and usage.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><b>du</b> is a part of <a href="http://www.gnu.org/software/fileutils/fileutils.html" style="color: blue; text-decoration: none;">fileutils</a>.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Example du usage:</div><pre style="background-color: #ffffee; border-bottom-color: rgb(255, 234, 165); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(255, 234, 165); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(255, 234, 165); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(255, 234, 165); border-top-style: solid; border-top-width: 1px; color: black; font-family: courier; font-size: 9px; font-weight: bold; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;">du -sh Documents/<br /> 409M Documents<br /></pre><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"></div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc14" name="toc14"></a><br /><h2 style="color: black; font-size: 14px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">7.4. mkdir - makes folders</h2><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Folders are created with the command <b>mkdir</b>:</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">mkdir folder</code></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">To make a long path, use mkdir -p :</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">mkdir -p /use/one/command/to/make/a/long/path/</code></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Like most programs mkdir supports -v (verbose). Practical when used in scripts.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">You can make multiple folders in <i>bash</i> and other shells with {folder1,folder2} :</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">mkdir /usr/local/src/bash/{old,new,dist,bugs}</code></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><a href="http://linuxreviews.org/man/mkdir" style="color: blue; text-decoration: none;">mkdir manual page</a></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">The command <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">rmdir</code> removes folders.</div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc15" name="toc15"></a><br /><h2 style="color: black; font-size: 14px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">7.5. passwd - changes your login password</h2><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">To change your password in Linux, type:</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">passwd</code></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">The <b>root</b> user can change the password of any user by running passwd with the user name as argument:</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">passwd jonny</code></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">will change jonnys password. Running passwd without arguments as root changes the root password.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">If you need to add several new users and give them password you can use a handy program like <a href="http://www.adel.nursat.kz/apg/" style="color: blue; text-decoration: none;">Another Password Generator</a> to generate a large set of "random" passwords.</div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc16" name="toc16"></a><br /><h3 style="color: black; font-size: 13px; margin-bottom: 2px; margin-left: 20px; margin-right: 2px; margin-top: 2px;">7.5.1. KDE</h3><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">From KDE you can change your password by going:</div><ul style="margin-left: 1em; margin-top: 0px; padding-bottom: 5px; padding-left: 4px; padding-top: 0px;"><li style="padding-bottom: 0px; padding-top: 1px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">K</code> -> <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">Settings</code> -> <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">Change Password</code></li><li style="padding-bottom: 0px; padding-top: 1px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">K</code> -> <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">Settings</code> -> <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">Control Center</code> -> <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">System Administration</code> -> <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">User Account</code></li></ul><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc17" name="toc17"></a><br /><h2 style="color: black; font-size: 14px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">7.6. rm - delete files and folders, short for remove</h2><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Files are deleted with the command <b>rm</b>:</div><pre style="background-color: #ffffee; border-bottom-color: rgb(255, 234, 165); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(255, 234, 165); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(255, 234, 165); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(255, 234, 165); border-top-style: solid; border-top-width: 1px; color: black; font-family: courier; font-size: 9px; font-weight: bold; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;">rm /home/you/youfile.txt<br /></pre><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">To delete folders, use <b>rm</b> together with <b>-f</b> (Do not prompt for confirmation) and <b>-r</b>(Recursively remove directory trees):</div><pre style="background-color: #ffffee; border-bottom-color: rgb(255, 234, 165); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(255, 234, 165); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(255, 234, 165); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(255, 234, 165); border-top-style: solid; border-top-width: 1px; color: black; font-family: courier; font-size: 9px; font-weight: bold; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;">rm -rf /home/you/foo/<br /></pre><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Like most programs rm supports -v (verbose).</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><a href="http://linuxreviews.org/man/rm" style="color: blue; text-decoration: none;">rm manual page</a></div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc18" name="toc18"></a><br /><h2 style="color: black; font-size: 14px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">7.7. ln - make symbolic links</h2><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">A symbolic link is a "file" pointing to another file.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">To make a symbolic link :</div><pre style="background-color: #ffffee; border-bottom-color: rgb(255, 234, 165); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(255, 234, 165); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(255, 234, 165); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(255, 234, 165); border-top-style: solid; border-top-width: 1px; color: black; font-family: courier; font-size: 9px; font-weight: bold; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;">ln /original/file /new/link<br /></pre><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">This makes /original/file and /new/link the same file - edit one and the other will change. The file will not be gone until both /original/file and /new/link are deleted.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">You can only do this with files. For folders, you must make a "soft" link.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">To make a soft symbolic link :</div><pre style="background-color: #ffffee; border-bottom-color: rgb(255, 234, 165); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(255, 234, 165); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(255, 234, 165); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(255, 234, 165); border-top-style: solid; border-top-width: 1px; color: black; font-family: courier; font-size: 9px; font-weight: bold; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;">ln -s /original/file /new/link<br /></pre><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Example:</div><pre style="background-color: #ffffee; border-bottom-color: rgb(255, 234, 165); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(255, 234, 165); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(255, 234, 165); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(255, 234, 165); border-top-style: solid; border-top-width: 1px; color: black; font-family: courier; font-size: 9px; font-weight: bold; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;">ln -s /usr/src/linux-2.4.20 /usr/src/linux<br /></pre><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Note that -s makes an "empty" file pointing to the original file/folder. So if you delete the folder a symlink points to, you will be stuck with a dead symlink (just <a href="http://linuxreviews.org/man/rm" style="color: blue; text-decoration: none;">rm</a> it).</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><a href="http://linuxreviews.org/man/ln" style="color: blue; text-decoration: none;">ln manual page</a></div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc19" name="toc19"></a><br /><h2 style="color: black; font-size: 14px; margin-bottom: 2px; margin-left: 10px; margin-right: 2px; margin-top: 2px;">7.8. tar archiving utility - tar.bz2 and tar.gz</h2><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><a href="http://www.gnu.org/software/tar/" style="color: blue; text-decoration: none;">tar</a> (<a href="http://linuxreviews.org/man/tar" style="color: blue; text-decoration: none;">manual page</a>) is a very handle little program to store files and folders in archives, originally made for tapestreamer backups. Tar is usually used together with <a href="http://www.gnu.org/software/gzip/gzip.html" style="color: blue; text-decoration: none;">gzip</a> (<a href="http://linuxreviews.org/man/gzip" style="color: blue; text-decoration: none;">manual page</a>) or <a href="http://sources.redhat.com/bzip2/" style="color: blue; text-decoration: none;">bzip2</a> (<a href="http://linuxreviews.org/man/bzip2" style="color: blue; text-decoration: none;">manual page</a>), comprepssion programs that make your .tar archive a much smaller .tar.gz or .tar.bz2 archive.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><b>kde</b></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">You can use the program <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">ark</code> (<code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">K</code> -> <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">Utilities</code> -> <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">Ark</code>) to handle archives in KDE. <a href="http://konqueror.kde.org/" style="color: blue; text-decoration: none;">Konqueror</a>treats file archives like normal folders, simply click on the archive to open it. The archive becomes a virtual folder that can be used to open, add or remove files just as if you were working with a normal folder.</div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc20" name="toc20"></a><br /><h3 style="color: black; font-size: 13px; margin-bottom: 2px; margin-left: 20px; margin-right: 2px; margin-top: 2px;">7.8.1. tar files (.tar.gz)</h3><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">To untar files:</div><pre style="background-color: #ffffee; border-bottom-color: rgb(255, 234, 165); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(255, 234, 165); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(255, 234, 165); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(255, 234, 165); border-top-style: solid; border-top-width: 1px; color: black; font-family: courier; font-size: 9px; font-weight: bold; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;">tar xvzf file.tar.gz<br /></pre><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">To tar files:</div><pre style="background-color: #ffffee; border-bottom-color: rgb(255, 234, 165); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(255, 234, 165); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(255, 234, 165); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(255, 234, 165); border-top-style: solid; border-top-width: 1px; color: black; font-family: courier; font-size: 9px; font-weight: bold; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;">tar cvzf file.tar.gz filedir1 filedir2 filedir2...<br /></pre><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">Note: A .tgz file is the same as a .tar.gz file. Both are also often refered to as tarballs.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">The flags: z is for gzip, v is for verbose, c is for create, x is for extract, f is for file (default is to use a tape device).</div><a href="http://www.blogger.com/post-edit.g?blogID=3459298599695430551&postID=7821291221171207448" id="toc21" name="toc21"></a><br /><h3 style="color: black; font-size: 13px; margin-bottom: 2px; margin-left: 20px; margin-right: 2px; margin-top: 2px;">7.8.2. bzip2 files (.tar.bz2)</h3><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">To unpack files:</div><pre style="background-color: #ffffee; border-bottom-color: rgb(255, 234, 165); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(255, 234, 165); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(255, 234, 165); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(255, 234, 165); border-top-style: solid; border-top-width: 1px; color: black; font-family: courier; font-size: 9px; font-weight: bold; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;">tar xjvf file.tar.bz2<br /></pre><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">To pack files:</div><pre style="background-color: #ffffee; border-bottom-color: rgb(255, 234, 165); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(255, 234, 165); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(255, 234, 165); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(255, 234, 165); border-top-style: solid; border-top-width: 1px; color: black; font-family: courier; font-size: 9px; font-weight: bold; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px;">tar cvjf file.tar.bz2 filedir1 filedir2 filedir2...<br /></pre><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">The flags: Same as above, but with j for for bzip2</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">You can also use bunzip2 file.tar.bz2 , will turn it into a tar.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">For older versions of tar, try tar -xjvf or -xYvf or -xkvf to unpack.There's a few other options it could be, they couldn't decide which switch to use for bzip2 for a while.</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">How to untar an entire directory full or archives?</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">.tar:</div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;"><code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">for i in `ls *.tar`; do tar xvf $i; done</code></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">.tar.gz: <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">for i in `ls *.tar.gz`; do tar xvfz $i; done</code></div><div style="color: black; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-size: 12px; text-align: left; text-indent: 20px;">.tar.bz2: <code style="background-color: #f3f3ff; border-bottom-color: rgb(214, 214, 255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 214, 255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 214, 255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 214, 255); border-top-style: solid; border-top-width: 1px; font-family: 'Gill Sans MT', 'Gill sans', 'Trebuchet ms', sans-serif; font-weight: bold;">for i in `ls *.tar.bz2`; do tar xvfj $i; done</code></div>Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0tag:blogger.com,1999:blog-7141392959973804498.post-28981061943849994182011-03-25T16:42:00.000+13:002012-04-16T14:15:12.766+12:00Linux library link configuration (libquazip.so)In Linux system, understanding of how system or application library works is very important. Many applications you download are source files which need to be compiled. for example: qmake, make, make install.<br />After "make" the source file (typically lib), the lib files will be created, such as:<br /><br /><span class="Apple-style-span" style="color: #666666;">ln -s libquazip.so.1.0.0 libquazip.so</span><br /><span class="Apple-style-span" style="color: #666666;">ln -s libquazip.so.1.0.0 libquazip.so.1</span><br /><span class="Apple-style-span" style="color: #666666;">ln -s libquazip.so.1.0.0 libquazip.so.1.0</span><br /><br />but these lib file are not installed in Linux system.<br />After "make install", all lib files has been installed in Linux system.<br /><br /><span class="Apple-style-span" style="color: #666666;">ln -f -s "libquazip.so.1.0.0" "/usr/local/lib/libquazip.so"</span><br /><span class="Apple-style-span" style="color: #666666;">ln -f -s "libquazip.so.1.0.0" "/usr/local/lib/libquazip.so.1"</span><br /><span class="Apple-style-span" style="color: #666666;">ln -f -s "libquazip.so.1.0.0" "/usr/local/lib/libquazip.so.1.0"</span><br /><br /><br />However, even you "make install" lib files, you may still get error message when you run Qt application. for example, I "make install" QuaZIP package, and successfully compile a test.pro which come with this package, but i still got error message when i run the program:<br /><br /><span class="Apple-style-span" style="color: red;">Starting /home/czhang/quazip-0.3/test/zip-build-desktop/zip... </span><br /><span class="Apple-style-span" style="color: red;">/home/czhang/quazip-0.3/test/zip-build-desktop/zip: error while loading shared libraries: libquazip.so.1: cannot open shared object file: No such file or directory </span><br /><span class="Apple-style-span" style="color: red;">/home/czhang/quazip-0.3/test/zip-build-desktop/zip exited with code 127</span><br /><span class="Apple-style-span" style="white-space: pre-wrap;"><br /></span><br />Why?!! I have been struggling on this problem for long time.<br /><br />Here is what i understand and solve the problem.<br /><br />First of all, take a look at "ldconfig" - configure dynamic linker run-time bindings<br />$ man ldconfig<br />All applications, if they need lib to run, will check from here first /etc/ld.so.conf<br />take a look ld.so.conf:<br /><span class="Apple-style-span" style="color: #666666;">$ cat /etc/ld.so.conf</span><br /><span class="Apple-style-span" style="color: #666666;">include /etc/ld.so.conf.d/*.conf</span><br /><span class="Apple-style-span" style="color: #666666;"><br /></span><br />It re-direct to <span class="Apple-style-span" style="color: #666666;">/etc/ld.so.conf.d</span> and all .<span class="Apple-style-span" style="color: #666666;">conf</span> file will be checked through.<br />Let's take a look at <span class="Apple-style-span" style="color: #666666;">ld.so.conf.d</span> folder<br /><span class="Apple-style-span" style="color: #666666;">$ ls /etc/ld.so.conf.d</span><br /><br /><span class="Apple-style-span" style="color: #666666;">GL.conf libasound2.conf x86_64-linux-gnu.conf</span><br /><span class="Apple-style-span" style="color: #666666;">lib32asound2.conf libc.conf Qtlib.conf</span><br /><div><br /></div><br />in here, we can see a Qtlib.conf file. If you take a look at it, you will see all Qt lib is setting in<br />/home/czhang/qtsdk-2010.04/lib<br /><br />When I "make install" QuaZip package, I got message like:<br /><br />ln -f -s "libquazip.so.1.0.0" "/usr/local/lib/libquazip.so"<br />ln -f -s "libquazip.so.1.0.0" "/usr/local/lib/libquazip.so.1"<br />ln -f -s "libquazip.so.1.0.0" "/usr/local/lib/libquazip.so.1.0"<br /><div><br /></div><br />This means all QuaZip libs are stored in /usr/local/lib/<br /><br />So, I create a new .conf file which call qauzip.conf<br />$ gedit qauzip.conf<br />add "/usr/local/lib" in it.<br /><br />From now on, when Qt tries to use QuaZip lib, it can be found.<br /><br />Re-compile my "test.pro", and run it, works! :)<br /><br />Happy end.<br /><br /><div style="color: red;">EDIT:</div>or, just simply<br />$ sudo cp -a /home/czhang/quazip-0.3/quazip libquazip* /usr/lib64<br />=================================================<br /><span class="Apple-style-span" style="color: red;">EDIT:</span><br /><br />when i compile my own program which including QuaZip, i got error messages:<br /><br /><span class="Apple-style-span" style="color: red;">error: undefined reference to `QuaZip::QuaZip(QString const&)'</span><br /><span class="Apple-style-span" style="color: red;">error: undefined reference to `QuaZip::open(QuaZip::Mode, zlib_filefunc_def_s*)'</span><br /><span class="Apple-style-span" style="color: red;">...</span><br /><br />Then I took a look .pro file,<br /><style type="text/css">p, li { white-space: pre-wrap; }</style> <br /><pre style="margin: 0px; text-indent: 0px;"><span style="color: purple;">INCLUDEPATH</span> += /home/czhang/quazip-0.3/quazip</pre><pre style="margin: 0px; text-indent: 0px;"><span style="color: purple;">LIBS</span> += -L -lquazip</pre><pre style="margin: 0px; text-indent: 0px;"></pre><br />Actually, I don't really understand the -L. After doing some studies, i learned:<br /><br />INCLUDEPATH:<br />This variable specifies the #include (normally header file) directories which should be searched when <i>compiling the project</i>.<br /><br />LIBS:<br />This variable contains a list of libraries to be linked into the project. You can use the Unix -l (library) and -L (library path) flags and qmake will do the correct thing with these libraries on Windows (namely this means passing the full path of the library to the linker). The only limitation to this is the library must exist, for qmake to find which directory a -l lib lives in.<br /><br />Therefore, my .pro file should be like:<br /><br /><br /><pre style="margin: 0px; text-indent: 0px;"><span class="Apple-style-span" style="color: red;"><span style="color: purple;">INCLUDEPATH</span> </span>+= /home/czhang/quazip-0.3/quazip</pre><pre style="margin: 0px; text-indent: 0px;"><span class="Apple-style-span" style="color: red;"><span style="color: purple;">LIBS</span> </span>+= -L/home/czhang/quazip-0.3/quazip -lquazip</pre><pre style="margin: 0px; text-indent: 0px;"><span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;">Or:</span><span class="Apple-style-span" style="color: red;"><br /></span><pre style="margin: 0px; text-indent: 0px;"><span class="Apple-style-span" style="color: red;"><span style="color: purple;">INCLUDEPATH</span> </span>+= /home/czhang/quazip-0.3/quazip</pre><pre style="margin: 0px; text-indent: 0px;"><span class="Apple-style-span" style="color: red;"><span style="color: purple;">LIBS</span> </span>+= -lquazip</pre></pre><pre style="margin: 0px; text-indent: 0px;"></pre><br /><br /><div style="color: #666666;"><span class="Apple-style-span">$ rsync -av czhang@10.0.1.202://build/czhang/qt-everywhere-op<br />ensource-src-4.7.0/projects/quazip-0.3/quazip/libquazip.so* /usr/lib</span></div>Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com1tag:blogger.com,1999:blog-7141392959973804498.post-11230523900651295892011-03-11T09:00:00.000+13:002012-04-16T14:15:12.826+12:00The moment the earth quack hit ChristchurchThought this might be of interest. This is caused by an upward force at the moment of 2 g’s gravity.<br /><br />The moment the quack hit Christchurch - as captured by a tourist<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsqKgZ9hXbdpoPoyxtkehekjSCYf2aK1P6YLTZMrmLvm1dHeHy4DHW9_e78cHRBCK6o2x3th6kfUKN-D_AGK-bxiZeBg_BLOYK23LLtkf1cKBn9phFn4pvx0EavqPwVRqW3yoZiVP1BXED/s1600/christchurch.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="257" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsqKgZ9hXbdpoPoyxtkehekjSCYf2aK1P6YLTZMrmLvm1dHeHy4DHW9_e78cHRBCK6o2x3th6kfUKN-D_AGK-bxiZeBg_BLOYK23LLtkf1cKBn9phFn4pvx0EavqPwVRqW3yoZiVP1BXED/s400/christchurch.jpg" width="400" /></a></div>Open Embedded Linux Study Gardenhttp://www.blogger.com/profile/14612998755925899107noreply@blogger.com0