<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>fethilale blog</title>
	<atom:link href="http://blog.fethilale.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fethilale.com</link>
	<description></description>
	<lastBuildDate>Mon, 26 Apr 2010 21:42:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Foldername.exe Virus Cleanup Tool</title>
		<link>http://blog.fethilale.com/foldername-exe-virus-cleanup-tool/</link>
		<comments>http://blog.fethilale.com/foldername-exe-virus-cleanup-tool/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 21:41:33 +0000</pubDate>
		<dc:creator>fethilale</dc:creator>
				<category><![CDATA[Viruses]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[foldername.exe]]></category>
		<category><![CDATA[foldername.exe virus]]></category>
		<category><![CDATA[virus]]></category>
		<category><![CDATA[Virus Cleanup]]></category>

		<guid isPermaLink="false">http://blog.fethilale.com/?p=133</guid>
		<description><![CDATA[I wrote a program for deleting Foldername.exe virus. Must be executed in the virus directory. There must not be exe file on the folder. Open notepad, copy the code into it and save something.bat. :: Written by Mustafa CANTURK :: http://www.fethilale.com :: Licensed under GPL @echo off for /f &#34;tokens=*&#34; %%a in ('dir /a /b')]]></description>
			<content:encoded><![CDATA[<p>I wrote a program for deleting <strong>Foldername.exe</strong> virus. </p>
<ul>
<li>Must be executed in the virus directory.</li>
<li>There must not be exe file on the folder.</li>
<li>Open notepad, copy the code into it and save <strong>something.bat</strong>.</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="batch" style="font-family:monospace;">:: Written by Mustafa CANTURK
:: http://www.fethilale.com
:: Licensed under GPL
@echo off
for /f &quot;tokens=*&quot; %%a in ('dir /a /b') do (
	attrib -S -H &quot;%%a&quot;
)
rm *.exe
rm autorun.inf
pause</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.fethilale.com/foldername-exe-virus-cleanup-tool/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>QT and Linking Other Libraries</title>
		<link>http://blog.fethilale.com/qt-and-linking-other-libraries/</link>
		<comments>http://blog.fethilale.com/qt-and-linking-other-libraries/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 17:48:38 +0000</pubDate>
		<dc:creator>fethilale</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[QT]]></category>
		<category><![CDATA[linker]]></category>
		<category><![CDATA[linking]]></category>
		<category><![CDATA[qt linker]]></category>
		<category><![CDATA[qt linking]]></category>
		<category><![CDATA[qt linking library]]></category>
		<category><![CDATA[qt windows library]]></category>
		<category><![CDATA[windows library]]></category>
		<category><![CDATA[winsock]]></category>

		<guid isPermaLink="false">http://blog.fethilale.com/?p=89</guid>
		<description><![CDATA[I started QT and trying to write some small programs. In one program, I wanted to send mail. Found a code how to send mail in C++ (uses winsock library, not QT&#8217;s) and integrated it to my program. But how, I gives some bunch of errors. They were linking errors. ... /mailer.cpp:17: undefined reference to]]></description>
			<content:encoded><![CDATA[<p>I started QT and trying to write some small programs. In one program, I wanted to send mail. Found a code how to send mail in C++ (uses <strong><code>winsock </code></strong>library, <strong>not QT&#8217;s</strong>) and integrated it to my program.  But how, I gives some bunch of errors. They were linking errors.</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">... <span style="color: #339933;">/</span>mailer.<span style="color: #202020;">cpp</span><span style="color: #339933;">:</span><span style="color: #0000dd;">17</span><span style="color: #339933;">:</span> undefined reference to `WSAStartup@<span style="color: #0000dd;">8</span><span style="color: #ff0000;">'
...</span></pre></div></div>

<p>Then a little research helped to me: <a href="http://stackoverflow.com/questions/1137323/qt-mingw32-undefined-reference-errors-unable-to-link-a-lib">This link</a>.</p>
<p>Open your project file (<strong><code>&lt;projectname&gt;.pro</code></strong>):</p>
<p><a href="http://blog.fethilale.com/wp-content/uploads/qtest.png"><img src="http://blog.fethilale.com/wp-content/uploads/qtest.png" alt="" title="The QT Project File" width="272" height="138" class="aligncenter size-full wp-image-105" /></a></p>
<p> and add the line:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">LIBS <span style="color: #339933;">+=</span> <span style="color: #339933;">&lt;</span> WHERE<span style="color: #339933;">-</span>YOUR<span style="color: #339933;">-</span>LIBRARY<span style="color: #339933;">-</span>FILE<span style="color: #339933;">-</span>IS<span style="color: #339933;">-</span>LOCATED <span style="color: #339933;">&gt;</span></pre></div></div>

<p>If your library is located in <strong><code>[QTDIR]\mingw\lib</code></strong> directory, you can just add the name of it (without its filename extension: <em>.a</em>):</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">LIBS <span style="color: #339933;">+=</span> libwsock32</pre></div></div>

<p>If you are developing in linux, the <strong>default library directory</strong>(or one of the library directories) might be <strong><code>/usr/lib</code></strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fethilale.com/qt-and-linking-other-libraries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Process Invisibility</title>
		<link>http://blog.fethilale.com/linux-process-invisibility/</link>
		<comments>http://blog.fethilale.com/linux-process-invisibility/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 23:54:52 +0000</pubDate>
		<dc:creator>fethilale</dc:creator>
				<category><![CDATA[Kernel Development]]></category>
		<category><![CDATA[invisible process]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[kernel modification]]></category>
		<category><![CDATA[kernel programming]]></category>
		<category><![CDATA[linux kernel]]></category>
		<category><![CDATA[process invisibility]]></category>

		<guid isPermaLink="false">http://blog.fethilale.com/?p=58</guid>
		<description><![CDATA[Hello again, we have given a project in System Programming course. It was expected you to alter the kernel code for process invisibility, when you ps, process can not be seen in the output, if process invisibility flag is &#8220;1&#8243;. The project was modifying the linux kernel for process invisibility, writing a system call for]]></description>
			<content:encoded><![CDATA[<p>Hello again, we have given a project in System Programming course. It was expected you to alter the kernel code for process invisibility, when you <code>ps</code>, process can not be seen in the output, if process invisibility flag is &#8220;1&#8243;.</p>
<p>The project was modifying the linux kernel for process invisibility, writing a system call for setting the invisibility flag and writing a user-space program.</p>
<p>Project was developed at Xubuntu 9.10 guest on Windows 7 host. Eclipse (with CDT and Remote System Explorer plugins) was the development IDE. Putty SSH client was also used for executing commands and “command copy/paste” availability. <a href="http://www.virtualbox.org">VirtualBox </a>was the virtual machine supervisor.</p>
<p><strong><span style="color: red;">ATTENTION: This code is experimental. If you try, it will be your own responsibility.</span></strong><br />
<span id="more-58"></span><br />
<strong>Preliminaries</strong></p>
<p>First you must install <code>linux-source</code> and <code>kernel-package</code> packages. And then extract the package. You can install <code>fakeroot </code>package for compiling the kernel without becoming root.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> linux-source kernel-package
<span style="color: #c20cb9; font-weight: bold;">tar</span> xjvf usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>linux-source<span style="color: #000000; font-weight: bold;">*</span></pre></div></div>

<p><strong><br />
Modifications on Kernel</strong></p>
<p><strong>.</strong>(dot, the current directory) is /usr/src/linux or /usr/src/linux-KERNEL_VERSION.</p>
<ol>
<li>. In <strong>./include/linux/sched.h</strong>, <code>task_struct</code> structure (the process descriptor), we add an invisible flag to describe process’ invisibility:

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">struct</span> task_struct <span style="color: #009900;">&#123;</span>
	...
      ...
	<span style="color: #993333;">int</span> invisible<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>In <strong>./kernel/sched.c</strong>, we altered <code>task_rq_lock</code>, <code>task_rq_unlock</code> and <code>find_process_by_pid</code> function to non-static because of the fact that they were called in another object file.

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> <span style="color: #993333;">static</span> <span style="color: #993333;">struct</span> rq <span style="color: #339933;">*</span>task_rq_lock<span style="color: #009900;">&#40;</span><span style="color: #993333;">struct</span> task_struct <span style="color: #339933;">*</span>p<span style="color: #339933;">,</span> <span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> <span style="color: #339933;">*</span>flags<span style="color: #009900;">&#41;</span> 
<span style="color: #339933;">&gt;</span> <span style="color: #993333;">struct</span> rq <span style="color: #339933;">*</span>task_rq_lock<span style="color: #009900;">&#40;</span><span style="color: #993333;">struct</span> task_struct <span style="color: #339933;">*</span>p<span style="color: #339933;">,</span> <span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> <span style="color: #339933;">*</span>flags<span style="color: #009900;">&#41;</span>
<span style="color: #339933;">&lt;</span> <span style="color: #993333;">static</span> <span style="color: #000000; font-weight: bold;">inline</span> <span style="color: #993333;">void</span> task_rq_unlock<span style="color: #009900;">&#40;</span><span style="color: #993333;">struct</span> rq <span style="color: #339933;">*</span>rq<span style="color: #339933;">,</span> <span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> <span style="color: #339933;">*</span>flags<span style="color: #009900;">&#41;</span> 
<span style="color: #339933;">&gt;</span> <span style="color: #000000; font-weight: bold;">inline</span> <span style="color: #993333;">void</span> task_rq_unlock<span style="color: #009900;">&#40;</span><span style="color: #993333;">struct</span> rq <span style="color: #339933;">*</span>rq<span style="color: #339933;">,</span> <span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> <span style="color: #339933;">*</span>flags<span style="color: #009900;">&#41;</span>
<span style="color: #339933;">&lt;</span> <span style="color: #993333;">static</span> <span style="color: #993333;">struct</span> task_struct <span style="color: #339933;">*</span>find_process_by_pid<span style="color: #009900;">&#40;</span>pid_t pid<span style="color: #009900;">&#41;</span> 
<span style="color: #339933;">&gt;</span> <span style="color: #993333;">struct</span> task_struct <span style="color: #339933;">*</span>find_process_by_pid<span style="color: #009900;">&#40;</span>pid_t pid<span style="color: #009900;">&#41;</span></pre></div></div>

</li>
<li>In <strong>./include/linux/init_task.h</strong> <code>INIT_TASK</code> macro is added a line to setting the value of invisibility flag creation on “process zero”:

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">.<span style="color: #202020;">invisible</span>		<span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span></pre></div></div>

</li>
<li>. <code>dup_task_struct</code> function in <strong>./kernel/fork.c</strong> has a new line setting the value of invisibility flag on forked process:

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">tsk<span style="color: #339933;">-&gt;</span>invisible <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>In ./fs/proc/base.c has many additions and modifications where controlling the task structure’s nullity status. It has been added invisibility control of the process.<br />
<strong>ATTENTION:</strong> Most of<code> if(task_struct type)</code> check is altered to <code> if(task_struct type &amp;&amp; task_struct type->invisible)</code> or another if(task_struct type->invisible) check added. Some of checks didn&#8217;t changed. I don&#8217;t know how definitely where they are.</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"> 	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>task<span style="color: #339933;">-&gt;</span>invisible<span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">goto</span> out_no_task<span style="color: #339933;">;</span>
<span style="color: #339933;">---</span>
<span style="color: #339933;">&lt;</span> 	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>task<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #339933;">&gt;</span> 	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>task <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #339933;">!</span>task<span style="color: #339933;">-&gt;</span>invisible<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></div></div>

</li>
<li>./fs/proc/array.c has modifications about adding the invisibility status of a process in /proc/pid/status.

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> 		<span style="color: #ff0000;">&quot;Gid:<span style="color: #000099; font-weight: bold;">\t</span>%d<span style="color: #000099; font-weight: bold;">\t</span>%d<span style="color: #000099; font-weight: bold;">\t</span>%d<span style="color: #000099; font-weight: bold;">\t</span>%d<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #339933;">&gt;</span> 		<span style="color: #ff0000;">&quot;Gid:<span style="color: #000099; font-weight: bold;">\t</span>%d<span style="color: #000099; font-weight: bold;">\t</span>%d<span style="color: #000099; font-weight: bold;">\t</span>%d<span style="color: #000099; font-weight: bold;">\t</span>%d<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
<span style="color: #339933;">&gt;</span> 		<span style="color: #ff0000;">&quot;Invisible:<span style="color: #000099; font-weight: bold;">\t</span>%d<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span>
&nbsp;
<span style="color: #339933;">&lt;</span> 		cred<span style="color: #339933;">-&gt;</span>gid<span style="color: #339933;">,</span> cred<span style="color: #339933;">-&gt;</span>egid<span style="color: #339933;">,</span> cred<span style="color: #339933;">-&gt;</span>sgid<span style="color: #339933;">,</span> cred<span style="color: #339933;">-&gt;</span>fsgid<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&gt;</span> 		cred<span style="color: #339933;">-&gt;</span>gid<span style="color: #339933;">,</span> cred<span style="color: #339933;">-&gt;</span>egid<span style="color: #339933;">,</span> cred<span style="color: #339933;">-&gt;</span>sgid<span style="color: #339933;">,</span> cred<span style="color: #339933;">-&gt;</span>fsgid<span style="color: #339933;">,</span>
<span style="color: #339933;">&gt;</span> 		p<span style="color: #339933;">-&gt;</span>invisible<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
</ol>
<p><strong>System Call</strong></p>
<ol>
<li>In order to create our own system call, we defined it in <strong>./arch/x86/include/asm/unistd_32.h</strong> as:

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#define __NR_SYSTEM_CALL_NAME	THE_LAST_NUMBER+1</span></pre></div></div>

</li>
<p>Last number was 336 in my code, and my process name was <code>set_proc_invisibility</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#define __NR_set_proc_invisibility	337</span></pre></div></div>

<li> In order to create our own system call, we defined it in <strong>./include/linux/syscall.h</strong> as:

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">asmlinkage <span style="color: #993333;">long</span> sys_set_proc_invisibility<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> pid<span style="color: #339933;">,</span><span style="color: #993333;">int</span> status<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>In order to create our own system call, we defined it in <strong>./arch/x86/kernel/syscall_table_32.S</strong> as:

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">.<span style="color: #993333;">long</span> sys_set_proc_invisibility</pre></div></div>

</li>
<li>We created a new directory (./procinvis) in <strong>/usr/src/linux</strong> to implement our system call. We added procinvis/ to Makefile. Thereby, gcc will compile ./procinvis/ directory too.</li>
<p>And the system call:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &lt;linux/kernel.h &gt;</span>
<span style="color: #339933;">#include &lt;linux/linkage.h &gt;</span>
<span style="color: #339933;">#include &lt;linux/sched.h &gt;</span>
<span style="color: #339933;">#include &lt;linux/unistd.h &gt;</span>
<span style="color: #339933;">#include &lt;linux/moduleparam.h &gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">extern</span> <span style="color: #993333;">struct</span> task_struct <span style="color: #339933;">*</span>find_process_by_pid<span style="color: #009900;">&#40;</span>pid_t pid<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">extern</span> <span style="color: #993333;">struct</span> rq <span style="color: #339933;">*</span>task_rq_lock<span style="color: #009900;">&#40;</span><span style="color: #993333;">struct</span> task_struct <span style="color: #339933;">*</span>p<span style="color: #339933;">,</span> <span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> <span style="color: #339933;">*</span>flags<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">extern</span> <span style="color: #000000; font-weight: bold;">inline</span> <span style="color: #993333;">void</span> task_rq_unlock<span style="color: #009900;">&#40;</span><span style="color: #993333;">struct</span> rq <span style="color: #339933;">*</span>rq<span style="color: #339933;">,</span> <span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> <span style="color: #339933;">*</span>flags<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #993333;">static</span> <span style="color: #993333;">int</span> uid<span style="color: #339933;">;</span>
module_param<span style="color: #009900;">&#40;</span>uid<span style="color: #339933;">,</span><span style="color: #993333;">int</span><span style="color: #339933;">,</span><span style="color: #208080;">0600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
asmlinkage <span style="color: #993333;">long</span> sys_set_proc_invisibility<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> pid<span style="color: #339933;">,</span><span style="color: #993333;">int</span> status<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #993333;">long</span> retval <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>status <span style="color: #339933;">!=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> status <span style="color: #339933;">!=</span> <span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		printk<span style="color: #009900;">&#40;</span>KERN_ALERT<span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;INVISIBILITY: Wrong input for the status flag.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #339933;">-</span><span style="color: #0000dd;">1</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #993333;">struct</span> task_struct <span style="color: #339933;">*</span>tsk<span style="color: #339933;">;</span>
	<span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> flags<span style="color: #339933;">;</span>
	<span style="color: #993333;">struct</span> rq <span style="color: #339933;">*</span>rq<span style="color: #339933;">;</span>
	tsk <span style="color: #339933;">=</span> find_process_by_pid<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>pid_t<span style="color: #009900;">&#41;</span> pid<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	rq <span style="color: #339933;">=</span> task_rq_lock<span style="color: #009900;">&#40;</span>tsk<span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;</span>flags<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	tsk<span style="color: #339933;">-&gt;</span>invisible <span style="color: #339933;">=</span> status<span style="color: #339933;">;</span>
	task_rq_unlock<span style="color: #009900;">&#40;</span>rq<span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;</span>flags<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> retval<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<li> To compile our system call the Makefile is:

<div class="wp_syntax"><div class="code"><pre class="make" style="font-family:monospace;">obj<span style="color: #004400;">-</span>y <span style="color: #004400;">:=</span> procinvis<span style="color: #004400;">.</span>o</pre></div></div>

</li>
</ol>
<p><strong>Userspace Test Program</strong></p>
<p>To test our system call we have a user space program:<br />
<code>procinvis.h</code></p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include</span>
&nbsp;
<span style="color: #339933;">#define __NR_set_proc_invisibility 337</span>
<span style="color: #808080; font-style: italic;">/*_syscall2( long, set_proc_invisibility, int, pid, int, status);*/</span>
&nbsp;
<span style="color: #993333;">long</span> set_proc_invisibility<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> pid<span style="color: #339933;">,</span> <span style="color: #993333;">int</span> status<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> syscall<span style="color: #009900;">&#40;</span>__NR_set_proc_invisibility<span style="color: #339933;">,</span>pid<span style="color: #339933;">,</span>status<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><code>procinvis.c</code></p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &lt;linux/kernel.h&gt;</span>
<span style="color: #339933;">#include &lt;linux/linkage.h&gt;</span>
<span style="color: #339933;">#include &lt;linux/sched.h&gt;</span>
<span style="color: #339933;">#include &lt;linux/unistd.h&gt;</span>
<span style="color: #339933;">#include &lt;linux/moduleparam.h&gt;</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">extern</span> <span style="color: #993333;">struct</span> task_struct <span style="color: #339933;">*</span>find_process_by_pid<span style="color: #009900;">&#40;</span>pid_t pid<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">extern</span> <span style="color: #993333;">struct</span> rq <span style="color: #339933;">*</span>task_rq_lock<span style="color: #009900;">&#40;</span><span style="color: #993333;">struct</span> task_struct <span style="color: #339933;">*</span>p<span style="color: #339933;">,</span> <span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> <span style="color: #339933;">*</span>flags<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">extern</span> <span style="color: #000000; font-weight: bold;">inline</span> <span style="color: #993333;">void</span> task_rq_unlock<span style="color: #009900;">&#40;</span><span style="color: #993333;">struct</span> rq <span style="color: #339933;">*</span>rq<span style="color: #339933;">,</span> <span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> <span style="color: #339933;">*</span>flags<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #993333;">static</span> <span style="color: #993333;">int</span> uid<span style="color: #339933;">;</span>
module_param<span style="color: #009900;">&#40;</span>uid<span style="color: #339933;">,</span><span style="color: #993333;">int</span><span style="color: #339933;">,</span><span style="color: #208080;">0600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
asmlinkage <span style="color: #993333;">long</span> sys_set_proc_invisibility<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> pid<span style="color: #339933;">,</span><span style="color: #993333;">int</span> status<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #993333;">long</span> retval<span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>status <span style="color: #339933;">!=</span> <span style="color: #0000dd;">0</span> <span style="color: #339933;">&amp;&amp;</span> status <span style="color: #339933;">!=</span> <span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		printk<span style="color: #009900;">&#40;</span>KERN_ALERT<span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;INVISIBILITY: Wrong input for the status flag.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #339933;">-</span><span style="color: #0000dd;">99</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #993333;">struct</span> task_struct <span style="color: #339933;">*</span>tsk<span style="color: #339933;">;</span>
	<span style="color: #993333;">unsigned</span> <span style="color: #993333;">long</span> flags<span style="color: #339933;">;</span>
	<span style="color: #993333;">struct</span> rq <span style="color: #339933;">*</span>rq<span style="color: #339933;">;</span>
	tsk <span style="color: #339933;">=</span> find_process_by_pid<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>pid_t<span style="color: #009900;">&#41;</span> pid<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	rq <span style="color: #339933;">=</span> task_rq_lock<span style="color: #009900;">&#40;</span>tsk<span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span>flags<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	tsk<span style="color: #339933;">-&gt;</span>invisible <span style="color: #339933;">=</span> status<span style="color: #339933;">;</span>
	task_rq_unlock<span style="color: #009900;">&#40;</span>rq<span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span>flags<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> retval<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong>Compiling Kernel</strong></p>
<p>To compile the kernel:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">make-kpkg <span style="color: #660033;">-initrd</span> <span style="color: #660033;">-append-to-version</span>=-custom kernel_image kernel_headers</pre></div></div>

<p>to <strong>re</strong>compile the kernel:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> debian
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> -
make-kpkg <span style="color: #660033;">-initrd</span> <span style="color: #660033;">-append-to-version</span>=-custom kernel_image kernel_headers</pre></div></div>

<p>And it is installed to system via:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">dpkg</span> –i ..<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">*</span>.deb</pre></div></div>

<p>Restart your system and open with your custom kernel:</p>
<p><a href="http://blog.fethilale.com/wp-content/uploads/1.png"><img class="aligncenter size-full wp-image-67" title="Custom compiled kernel GRUB screen" src="http://blog.fethilale.com/wp-content/uploads/1.png" alt="" width="656" height="561" /></a></p>
<p>And the working of our kernel:</p>
<p><a href="http://blog.fethilale.com/wp-content/uploads/5.png"><img class="aligncenter size-full wp-image-68" title="Working of or kernel" src="http://blog.fethilale.com/wp-content/uploads/5.png" alt="" width="675" height="323" /></a></p>
<p><a href="http://blog.fethilale.com/wp-content/uploads/6.png"><img class="aligncenter size-full wp-image-69" title="/proc/pid/status" src="http://blog.fethilale.com/wp-content/uploads/6.png" alt="" width="526" height="87" /></a></p>
<p>If you have any question you can <a href="http://blog.fethilale.com/contact/">contact</a> me.</p>
<p>My modifications: <a href='http://blog.fethilale.com/wp-content/uploads/process_invisibility.zip'>Process Invisibility Download Link</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fethilale.com/linux-process-invisibility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SHA512 hashing on Java</title>
		<link>http://blog.fethilale.com/sha512-hashing-on-java/</link>
		<comments>http://blog.fethilale.com/sha512-hashing-on-java/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 23:27:32 +0000</pubDate>
		<dc:creator>fethilale</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[hashing]]></category>
		<category><![CDATA[md5]]></category>
		<category><![CDATA[secure hash algorithm]]></category>
		<category><![CDATA[sha-256]]></category>
		<category><![CDATA[sha-512]]></category>
		<category><![CDATA[sha2]]></category>
		<category><![CDATA[sha256]]></category>
		<category><![CDATA[sha512]]></category>

		<guid isPermaLink="false">http://blog.fethilale.com/?p=41</guid>
		<description><![CDATA[Hello! For my school project, I had been tought of crypting passwords of users. Due to the fact that, SHA1 algorithm has security problems (link) , I have decided using a SHA2. SHA2 has 3 variants: SHA256, SHA384 and SHA512. While I was searching how to implement SHA2 on Java,  I have found this link.]]></description>
			<content:encoded><![CDATA[<p>Hello! For my school project, I had been tought of crypting passwords of users. Due to the fact that, SHA1 algorithm has security problems (<a href="http://en.wikipedia.org/wiki/SHA_hash_functions#SHA-1" target="_blank">link</a>) , I have decided using a SHA2. SHA2 has 3 variants: SHA256, SHA384 and SHA512. While I was searching how to implement SHA2 on Java,  I have found this <a href="http://www.bilgisayarkavramlari.com/2009/11/02/java-crypto-ve-security-kutuphaneleri-ile-kriptografi/" target="_blank">link</a>.</p>
<p>For SHA512 that code works:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.security.*</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> cryptotest <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">NoSuchAlgorithmException</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003399;">MessageDigest</span> md<span style="color: #339933;">;</span>
        <span style="color: #003399;">String</span> message <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;password&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
            md<span style="color: #339933;">=</span> <span style="color: #003399;">MessageDigest</span>.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SHA-512&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            md.<span style="color: #006633;">update</span><span style="color: #009900;">&#40;</span>message.<span style="color: #006633;">getBytes</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">byte</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> mb <span style="color: #339933;">=</span> md.<span style="color: #006633;">digest</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #003399;">String</span> out <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> mb.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">byte</span> temp <span style="color: #339933;">=</span> mb<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #003399;">String</span> s <span style="color: #339933;">=</span> <span style="color: #003399;">Integer</span>.<span style="color: #006633;">toHexString</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Byte</span><span style="color: #009900;">&#40;</span>temp<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>s.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    s <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;0&quot;</span> <span style="color: #339933;">+</span> s<span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                s <span style="color: #339933;">=</span> s.<span style="color: #006633;">substring</span><span style="color: #009900;">&#40;</span>s.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                out <span style="color: #339933;">+=</span> s<span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>out.<span style="color: #006633;">length</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;CRYPTO: &quot;</span> <span style="color: #339933;">+</span> out<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">NoSuchAlgorithmException</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ERROR: &quot;</span> <span style="color: #339933;">+</span> e.<span style="color: #006633;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>If you want to hash password with SHA256, you can change the line:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">md<span style="color: #339933;">=</span> <span style="color: #003399;">MessageDigest</span>.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SHA-512&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>to</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">md<span style="color: #339933;">=</span> <span style="color: #003399;">MessageDigest</span>.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SHA-256&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>For others:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">md<span style="color: #339933;">=</span> <span style="color: #003399;">MessageDigest</span>.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;MD5&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
md<span style="color: #339933;">=</span> <span style="color: #003399;">MessageDigest</span>.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SHA&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
md<span style="color: #339933;">=</span> <span style="color: #003399;">MessageDigest</span>.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SHA-1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
md<span style="color: #339933;">=</span> <span style="color: #003399;">MessageDigest</span>.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SHA-384&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.fethilale.com/sha512-hashing-on-java/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>KDE4 and Dual Monitors</title>
		<link>http://blog.fethilale.com/kde4-and-dual-monitors/</link>
		<comments>http://blog.fethilale.com/kde4-and-dual-monitors/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 15:20:49 +0000</pubDate>
		<dc:creator>fethilale</dc:creator>
				<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[double monitor]]></category>
		<category><![CDATA[dual monitor]]></category>
		<category><![CDATA[kde4]]></category>
		<category><![CDATA[multi monitor]]></category>
		<category><![CDATA[multiple monitor]]></category>
		<category><![CDATA[twin]]></category>

		<guid isPermaLink="false">http://blog.fethilale.com/?p=11</guid>
		<description><![CDATA[KDE4 has brought a new concept to desktop by Plasma. However, it was not considered that Plasma should work on more than one monitors. It has rumours that KDE 4.2 has a fix for multi-monitoring, this fix is not working. While I was searching for the problem, I found an alternative solution to monitoring on <a href="http://forum.kde.org/separate-x-sessions-on-dual-screens-for-kde4-t-12180-2.html#pid73036" target="_blank">KDE-Forums</a> (It redirects to <a href="http://en.gentoo-wiki.com/wiki/X.Org/Dual_Monitors#Independent_Dual_Head_in_KDE_4.2" target="_blank">Gentoo-Wiki</a>).]]></description>
			<content:encoded><![CDATA[<p>KDE4 has brought a new concept to desktop by Plasma. However, it was not considered that Plasma should work on more than one monitors. It has rumours that KDE 4.2 has a fix for multi-monitoring, this fix is not working. While I was searching for the problem, I found an alternative solution to monitoring on <a href="http://forum.kde.org/separate-x-sessions-on-dual-screens-for-kde4-t-12180-2.html#pid73036" target="_blank">KDE-Forums</a> (It redirects to <a href="http://en.gentoo-wiki.com/wiki/X.Org/Dual_Monitors#Independent_Dual_Head_in_KDE_4.2" target="_blank">Gentoo-Wiki</a>).</p>
<ol>
<li>Backup your xorg.conf file (/etc/X11/xorg.conf ).

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>X11<span style="color: #000000; font-weight: bold;">/</span>xorg.conf <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>X11<span style="color: #000000; font-weight: bold;">/</span>xorg.conf.backup</pre></div></div>

</li>
<li>Configure your xorg.conf file for dual monitors. I don&#8217;t now how ATI is configured, but for NVIDIA you can use <code>nvidia-settings</code> program. You must configure both screen as seperate screen. Your main screen&#8217;s height should be greater than second&#8217;s and Xinerama should be disabled.  Then click &#8220;Save to X Configuration File&#8221; and save it.
<dl id="attachment_12" class="wp-caption alignnone" style="width: 477px;">
<dt class="wp-caption-dt"><img class="size-full wp-image-12" title="nvidia-settings" src="http://blog.fethilale.com/wp-content/uploads/nvidia.png" alt="nvidia-settings" width="467" height="437" /></dt>
</dl>
</li>
<li>Install ICEWM by your default repository manager.<br />
For Gentoo:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">emerge <span style="color: #660033;">-av</span> icewm</pre></div></div>

</li>
<li>Restart your Xorg server by
<pre>Ctrl+Alt+Backspace.</pre>
</li>
<li>Open a console then write:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">DISPLAY</span>=<span style="color: #ff0000;">&quot;:0.1&quot;</span> icewm</pre></div></div>

</li>
<li>If you want to work with &#8220;icewm&#8221; every start of your computer:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'DISPLAY=&quot;:0.1&quot; icewm &amp;'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>YOUR_KDE_FOLDER<span style="color: #000000; font-weight: bold;">/</span>Autostart<span style="color: #000000; font-weight: bold;">/</span>icewmstart.sh</pre></div></div>

<p>If folder name is &#8220;.kde&#8221;:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'DISPLAY=&quot;:0.1&quot; icewm &amp;'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.kde<span style="color: #000000; font-weight: bold;">/</span>Autostart<span style="color: #000000; font-weight: bold;">/</span>icewmstart.sh</pre></div></div>

</li>
</ol>
<p>And then my dual monitors <img src='http://blog.fethilale.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p><img src="http://blog.fethilale.com/wp-content/uploads/dualmonitors-300x225.jpg" alt="dualmonitors" title="dualmonitors" width="300" height="225" class="alignnone size-medium wp-image-34" /></p>
<p>If your second monitor left of the main monitor you can configure <code>xorg.conf</code> file like this:<br />
Find the line:
<pre>    Screen      1  "Screen1" RightOf "Screen0"</pre>
<p>Then change to:
<pre>    Screen      1  "Screen1" LeftOf "Screen0"</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.fethilale.com/kde4-and-dual-monitors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hello World!</title>
		<link>http://blog.fethilale.com/hello-world/</link>
		<comments>http://blog.fethilale.com/hello-world/#comments</comments>
		<pubDate>Sat, 30 May 2009 04:22:11 +0000</pubDate>
		<dc:creator>fethilale</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.fethilale.com/wordpress/?p=1</guid>
		<description><![CDATA[Your welcome. It&#8217;s my first blog!]]></description>
			<content:encoded><![CDATA[<p>Your welcome. It&#8217;s my first blog!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fethilale.com/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
