<?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>Saeid Zebardast&#039;s Blog &#187; Tips</title> <atom:link href="http://zebardast.ir/en/tag/tips/feed/" rel="self" type="application/rss+xml" /><link>http://zebardast.ir/en</link> <description></description> <lastBuildDate>Sun, 23 Oct 2011 18:18:07 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator><image><title>Saeid Zebardast&#039;s Blog</title> <url>http://0.gravatar.com/avatar/1518e6b905d65cbe0a03243a199e18fc.png?s=48</url><link>http://zebardast.ir/en</link> </image> <item><title>Java: run command as root by Runtime.getRuntime().exec() in Ubuntu</title><link>http://zebardast.ir/en/java-run-command-as-root-by-runtime-getruntime-exec-in-ubuntu/</link> <comments>http://zebardast.ir/en/java-run-command-as-root-by-runtime-getruntime-exec-in-ubuntu/#comments</comments> <pubDate>Mon, 06 Dec 2010 07:53:33 +0000</pubDate> <dc:creator>Saeid Zebardast</dc:creator> <category><![CDATA[Java]]></category> <category><![CDATA[Tips]]></category><guid isPermaLink="false">http://zebardast.ir/en/?p=154</guid> <description><![CDATA[Hey a few days ago I needed to run `/etc/init.d/networking restart` command by Runtime.getRuntime().exec() in Java EE web application. The first and easiest way that came to mind was sudo without password and&#8230; It Worked! * To execute sudo without password, open /etc/sudoers by text editor like `nano`: And add your user or group to [...] Related posts:<ol><li><a href='http://zebardast.ir/en/root-terminal-in-ubuntu/' rel='bookmark' title='Root Terminal in Ubuntu'>Root Terminal in Ubuntu</a></li><li><a href='http://zebardast.ir/en/installing-sun-jdk-5-on-ubuntu-9-10-and-10-04/' rel='bookmark' title='Installing Sun JDK 5 on Ubuntu 9.10 and 10.04'>Installing Sun JDK 5 on Ubuntu 9.10 and 10.04</a></li></ol>]]></description> <content:encoded><![CDATA[<p>Hey <img src='http://zebardast.ir/en/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>a few days ago I needed to run `/etc/init.d/networking restart` command by Runtime.getRuntime().exec() in Java EE web application. The first and easiest way that came to mind was sudo without password and&#8230; It Worked!<br /> * To execute sudo without password, open /etc/sudoers by text editor like `nano`:</p><pre class="brush: bash; title: ; notranslate">
$ sudo nano /etc/sudoers
</pre><p>And add your user or group to the end of file like below:</p><pre class="brush: bash; title: ; notranslate">
# for user
USER_NAME ALL= NOPASSWD: ALL

# for group
%GROUP_NAME ALL= NOPASSWD: ALL
</pre><p>let&#8217;s see my Java code:</p><pre class="brush: java; title: ; notranslate">
String command = &quot;sudo /etc/init.d/networking restart&quot;;
Runtime runtime = Runtime.getRuntime();
try {
    Process process = runtime.exec(command);
    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
    String line;
    while ((line = bufferedReader.readLine()) != null) {
        System.out.println(line);
    }
} catch (IOException e) {
    e.printStackTrace();
}
</pre><p><strong>Troubleshooting</strong><br /> if you get `sudo: no tty present and no askpass program specified` error, make sure the user that runs command is in /etc/sudoers.</p><p>let me know if you find similar or easier way <img src='http://zebardast.ir/en/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><div class="wp-biographia-container-top" style="background-color:#FFEAA8;"><div class="wp-biographia-pic"><img alt='' src='http://1.gravatar.com/avatar/1518e6b905d65cbe0a03243a199e18fc?s=100&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D100&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-biographia-text"><h3>About <a href="http://zebardast.ir/en/author/admin/" title="Saeid Zebardast">Saeid Zebardast</a></h3><p>I'm Senior software engineer with 5+ years of professional experience includes cross-platform proficiency with considerable knowledge of programming languages especially Java and programming paradigms such as OO and development methodologies. Also I'm MySQL DBA since 2006.</p><small><a href="mailto:s&#97;&#101;&#105;&#100;.zeba&#114;&#100;a&#115;t&#64;&#103;&#109;&#97;i&#108;.&#99;&#111;&#109;" title="Send Saeid Zebardast Mail">Mail</a> | <a href="http://zebardast.ir/" title="Saeid Zebardast On The Web">Web</a> | <a href="https://twitter.com/#!/saeid" title="Saeid Zebardast On Twitter">Twitter</a> | <a href="https://www.facebook.com/saeid.zebardast" title="Saeid Zebardast On Facebook">Facebook</a> | <a href="http://www.linkedin.com/in/saeid" title="Saeid Zebardast On LinkedIn">LinkedIn</a> | <a href="https://plus.google.com/112638433061122581433" title="Saeid Zebardast On Google+">Google+</a> | <a href="http://zebardast.ir/en/author/admin/" title="More Posts By Saeid Zebardast">More Posts (31)</a></small></div></div><p><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Fjava-run-command-as-root-by-runtime-getruntime-exec-in-ubuntu%2F&amp;linkname=Java%3A%20run%20command%20as%20root%20by%20Runtime.getRuntime%28%29.exec%28%29%20in%20Ubuntu" title="Google+" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google+"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Fjava-run-command-as-root-by-runtime-getruntime-exec-in-ubuntu%2F&amp;linkname=Java%3A%20run%20command%20as%20root%20by%20Runtime.getRuntime%28%29.exec%28%29%20in%20Ubuntu" title="Facebook" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Fjava-run-command-as-root-by-runtime-getruntime-exec-in-ubuntu%2F&amp;linkname=Java%3A%20run%20command%20as%20root%20by%20Runtime.getRuntime%28%29.exec%28%29%20in%20Ubuntu" title="Twitter" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fzebardast.ir%2Fen%2Fjava-run-command-as-root-by-runtime-getruntime-exec-in-ubuntu%2F&amp;title=Java%3A%20run%20command%20as%20root%20by%20Runtime.getRuntime%28%29.exec%28%29%20in%20Ubuntu" id="wpa2a_2"><span style='display:none'>Share</span></a></p><p>Related posts:<ol><li><a href='http://zebardast.ir/en/root-terminal-in-ubuntu/' rel='bookmark' title='Root Terminal in Ubuntu'>Root Terminal in Ubuntu</a></li><li><a href='http://zebardast.ir/en/installing-sun-jdk-5-on-ubuntu-9-10-and-10-04/' rel='bookmark' title='Installing Sun JDK 5 on Ubuntu 9.10 and 10.04'>Installing Sun JDK 5 on Ubuntu 9.10 and 10.04</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://zebardast.ir/en/java-run-command-as-root-by-runtime-getruntime-exec-in-ubuntu/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Installing Sun JDK 5 on Ubuntu 9.10 and 10.04</title><link>http://zebardast.ir/en/installing-sun-jdk-5-on-ubuntu-9-10-and-10-04/</link> <comments>http://zebardast.ir/en/installing-sun-jdk-5-on-ubuntu-9-10-and-10-04/#comments</comments> <pubDate>Mon, 03 May 2010 02:21:19 +0000</pubDate> <dc:creator>Saeid Zebardast</dc:creator> <category><![CDATA[Java]]></category> <category><![CDATA[Tips]]></category> <category><![CDATA[Ubuntu]]></category><guid isPermaLink="false">http://zebardast.ir/en/?p=107</guid> <description><![CDATA[Hello As you known, Sun JDK version 1.5 or 5 is deleted from Ubuntu 10.4 and 9.10 repositories and the version 6 has been replaced. The easiest way to install Sun JDK 5 version is add its repository from Ubuntu 9.04 to the list of repositories in 9.10 and 10.04. For this purpose, follow the [...] Related posts:<ol><li><a href='http://zebardast.ir/en/webmin-installing-on-ubuntu-gutsy-gibbon-710/' rel='bookmark' title='Webmin, Installing on Ubuntu Gutsy Gibbon (7.10)'>Webmin, Installing on Ubuntu Gutsy Gibbon (7.10)</a></li><li><a href='http://zebardast.ir/en/how-to-install-gos-on-ubuntu-gutsy-gibbon/' rel='bookmark' title='How to install gOS on Ubuntu Gutsy Gibbon'>How to install gOS on Ubuntu Gutsy Gibbon</a></li><li><a href='http://zebardast.ir/en/root-terminal-in-ubuntu/' rel='bookmark' title='Root Terminal in Ubuntu'>Root Terminal in Ubuntu</a></li></ol>]]></description> <content:encoded><![CDATA[<p>Hello <img src='http://zebardast.ir/en/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>As you known, Sun <abbr title="Java Development Kit">JDK</abbr> version 1.5 or 5  is deleted from Ubuntu 10.4 and 9.10 repositories and the version 6 has been replaced.</p><p>The easiest way to install Sun JDK 5 version is add its repository from Ubuntu 9.04 to the list of repositories in  9.10 and 10.04. For this purpose, follow the steps.</p><p>1- Open /etc/apt/sources.list with a text editor like gedit:</p><pre>sudo gedit /etc/apt/sources.list</pre><p>2- Add the following lines to the end of the file then save it and close:</p><pre>  ## For sun-java5-jdk
 deb http://ir.archive.ubuntu.com/ubuntu jaunty-updates main multiverse</pre><p>3- Update the packages lists and install sun-java5-jdk:</p><pre> sudo aptitude update
 sudo aptitude install sun-java5-jdk</pre><p><em>* Above method can be used for other applications.</em></p><p>Another way to install jdk 5 is download software package and its dependencies from <a href="http://packages.ubuntu.com">packages.ubuntu.com</a>.</p><p>Good luck</p><div class="wp-biographia-container-top" style="background-color:#FFEAA8;"><div class="wp-biographia-pic"><img alt='' src='http://1.gravatar.com/avatar/1518e6b905d65cbe0a03243a199e18fc?s=100&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D100&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-biographia-text"><h3>About <a href="http://zebardast.ir/en/author/admin/" title="Saeid Zebardast">Saeid Zebardast</a></h3><p>I'm Senior software engineer with 5+ years of professional experience includes cross-platform proficiency with considerable knowledge of programming languages especially Java and programming paradigms such as OO and development methodologies. Also I'm MySQL DBA since 2006.</p><small><a href="mailto:&#115;aeid&#46;z&#101;b&#97;rdas&#116;&#64;&#103;ma&#105;l.&#99;&#111;&#109;" title="Send Saeid Zebardast Mail">Mail</a> | <a href="http://zebardast.ir/" title="Saeid Zebardast On The Web">Web</a> | <a href="https://twitter.com/#!/saeid" title="Saeid Zebardast On Twitter">Twitter</a> | <a href="https://www.facebook.com/saeid.zebardast" title="Saeid Zebardast On Facebook">Facebook</a> | <a href="http://www.linkedin.com/in/saeid" title="Saeid Zebardast On LinkedIn">LinkedIn</a> | <a href="https://plus.google.com/112638433061122581433" title="Saeid Zebardast On Google+">Google+</a> | <a href="http://zebardast.ir/en/author/admin/" title="More Posts By Saeid Zebardast">More Posts (31)</a></small></div></div><p><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Finstalling-sun-jdk-5-on-ubuntu-9-10-and-10-04%2F&amp;linkname=Installing%20Sun%20JDK%205%20on%20Ubuntu%209.10%20and%2010.04" title="Google+" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google+"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Finstalling-sun-jdk-5-on-ubuntu-9-10-and-10-04%2F&amp;linkname=Installing%20Sun%20JDK%205%20on%20Ubuntu%209.10%20and%2010.04" title="Facebook" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Finstalling-sun-jdk-5-on-ubuntu-9-10-and-10-04%2F&amp;linkname=Installing%20Sun%20JDK%205%20on%20Ubuntu%209.10%20and%2010.04" title="Twitter" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fzebardast.ir%2Fen%2Finstalling-sun-jdk-5-on-ubuntu-9-10-and-10-04%2F&amp;title=Installing%20Sun%20JDK%205%20on%20Ubuntu%209.10%20and%2010.04" id="wpa2a_4"><span style='display:none'>Share</span></a></p><p>Related posts:<ol><li><a href='http://zebardast.ir/en/webmin-installing-on-ubuntu-gutsy-gibbon-710/' rel='bookmark' title='Webmin, Installing on Ubuntu Gutsy Gibbon (7.10)'>Webmin, Installing on Ubuntu Gutsy Gibbon (7.10)</a></li><li><a href='http://zebardast.ir/en/how-to-install-gos-on-ubuntu-gutsy-gibbon/' rel='bookmark' title='How to install gOS on Ubuntu Gutsy Gibbon'>How to install gOS on Ubuntu Gutsy Gibbon</a></li><li><a href='http://zebardast.ir/en/root-terminal-in-ubuntu/' rel='bookmark' title='Root Terminal in Ubuntu'>Root Terminal in Ubuntu</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://zebardast.ir/en/installing-sun-jdk-5-on-ubuntu-9-10-and-10-04/feed/</wfw:commentRss> <slash:comments>25</slash:comments> </item> <item><title>How to posting to Identi.ca from the CLI</title><link>http://zebardast.ir/en/how-to-posting-to-identica-from-the-cli/</link> <comments>http://zebardast.ir/en/how-to-posting-to-identica-from-the-cli/#comments</comments> <pubDate>Mon, 16 Feb 2009 13:30:13 +0000</pubDate> <dc:creator>Saeid Zebardast</dc:creator> <category><![CDATA[howto]]></category> <category><![CDATA[Terminal]]></category> <category><![CDATA[Tips]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[identi.ca]]></category><guid isPermaLink="false">http://zebardast.wordpress.com/?p=48</guid> <description><![CDATA[Hi Identi.ca is an open source social networking and micro-blogging service. I like Ideni.ca. It&#8217;s good service. I use CLI (command line) everyday. I like to dented from it. It&#8217;s simple. Just install cURL: $ sudo apt-get install curl And type: $ curl -u username:password -d status="message" http://identi.ca/api/statuses/update.xml You will receive a response containing the [...] No related posts.]]></description> <content:encoded><![CDATA[<p><img src="http://zebardast.files.wordpress.com/2007/12/terminal_icon_48_48.jpg" alt="terminal - cli" align="right" /><br /> Hi <img src='http://zebardast.ir/en/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p><a href="http://identi.ca">Identi.ca</a> is an open source social networking and micro-blogging service.<br /> I like <a href="http://identi.ca">Ideni.ca</a>. It&#8217;s good service.</p><p>I use <abbr title="Command Line Interpreter">CLI</abbr> (command line) everyday. I like to dented from it. It&#8217;s simple.<br /> Just install <a href="http://curl.haxx.se/">cURL</a>:</p><pre>$ sudo apt-get install curl</pre><p>And type:</p><pre>$ curl -u username:password -d status="message" http://identi.ca/api/statuses/update.xml</pre><p>You will receive a response containing the XML coding for your post which acts as a confirmation that your post was submitted.</p><p><strong>Also you can create a shell file for this</strong><br /> Open a new text document and add the following, save it as identica.sh (or anything ending in sh):</p><pre>#!/bin/bash
curl -u username:password -d status=&#8243;$1" http://identi.ca/api/statuses/update.xml</pre><p>Make sure you change the chmod to 777 using the following command.</p><pre>$ chmod 777 /path/to/file/</pre><p>When you located the file (or add a bash prompt) it makes it simplier to identi.ca the rules. For example you can type the following to command to link to the file.</p><pre>$ ./path/to/idetica.sh "Message"</pre><div class="wp-biographia-container-top" style="background-color:#FFEAA8;"><div class="wp-biographia-pic"><img alt='' src='http://1.gravatar.com/avatar/1518e6b905d65cbe0a03243a199e18fc?s=100&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D100&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-biographia-text"><h3>About <a href="http://zebardast.ir/en/author/admin/" title="Saeid Zebardast">Saeid Zebardast</a></h3><p>I'm Senior software engineer with 5+ years of professional experience includes cross-platform proficiency with considerable knowledge of programming languages especially Java and programming paradigms such as OO and development methodologies. Also I'm MySQL DBA since 2006.</p><small><a href="mailto:&#115;&#97;e&#105;&#100;&#46;z&#101;b&#97;&#114;da&#115;&#116;&#64;g&#109;&#97;&#105;&#108;.co&#109;" title="Send Saeid Zebardast Mail">Mail</a> | <a href="http://zebardast.ir/" title="Saeid Zebardast On The Web">Web</a> | <a href="https://twitter.com/#!/saeid" title="Saeid Zebardast On Twitter">Twitter</a> | <a href="https://www.facebook.com/saeid.zebardast" title="Saeid Zebardast On Facebook">Facebook</a> | <a href="http://www.linkedin.com/in/saeid" title="Saeid Zebardast On LinkedIn">LinkedIn</a> | <a href="https://plus.google.com/112638433061122581433" title="Saeid Zebardast On Google+">Google+</a> | <a href="http://zebardast.ir/en/author/admin/" title="More Posts By Saeid Zebardast">More Posts (31)</a></small></div></div><p><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Fhow-to-posting-to-identica-from-the-cli%2F&amp;linkname=How%20to%20posting%20to%20Identi.ca%20from%20the%20CLI" title="Google+" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google+"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Fhow-to-posting-to-identica-from-the-cli%2F&amp;linkname=How%20to%20posting%20to%20Identi.ca%20from%20the%20CLI" title="Facebook" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Fhow-to-posting-to-identica-from-the-cli%2F&amp;linkname=How%20to%20posting%20to%20Identi.ca%20from%20the%20CLI" title="Twitter" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fzebardast.ir%2Fen%2Fhow-to-posting-to-identica-from-the-cli%2F&amp;title=How%20to%20posting%20to%20Identi.ca%20from%20the%20CLI" id="wpa2a_6"><span style='display:none'>Share</span></a></p><p>No related posts.</p>]]></content:encoded> <wfw:commentRss>http://zebardast.ir/en/how-to-posting-to-identica-from-the-cli/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Nested X11 environment session</title><link>http://zebardast.ir/en/nested-x11-environment-session/</link> <comments>http://zebardast.ir/en/nested-x11-environment-session/#comments</comments> <pubDate>Mon, 07 Apr 2008 19:15:28 +0000</pubDate> <dc:creator>Saeid Zebardast</dc:creator> <category><![CDATA[GNU/Linux]]></category> <category><![CDATA[howto]]></category> <category><![CDATA[KDE]]></category> <category><![CDATA[Kubuntu]]></category> <category><![CDATA[Tips]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[X11]]></category><guid isPermaLink="false">http://zebardast.wordpress.com/?p=18</guid> <description><![CDATA[Hi Instead of using a full-blown new virtual X for developing software you can use Xephyr to embed your KDE 4 session into your working KDE 3 or other X11 environment. If you want to get a minimal KDE session up and running, just launch Xephyr (available in Kubuntu as xserver-xephyr; Gentoo users compile x11-base/xorg-server [...] No related posts.]]></description> <content:encoded><![CDATA[<p><img src="http://itpencil.files.wordpress.com/2008/01/kde.png" align="right" /><br /> Hi <img src='http://zebardast.ir/en/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>Instead of using a full-blown new virtual X for developing software you can use Xephyr to embed your KDE 4 session into your working KDE 3 or other X11 environment.</p><p align="center"><a href='http://itpencil.files.wordpress.com/2008/04/nested-kde-x11-xephyr.png'><img src="http://itpencil.files.wordpress.com/2008/04/nested-kde-x11-xephyr-small.png" alt="" width="400" height="250" class="aligncenter size-medium wp-image-481" /></a></p><p>If you want to get a minimal KDE session up and running, just launch Xephyr (available in Kubuntu as xserver-xephyr; Gentoo users compile x11-base/xorg-server with USE=&#8221;kdrive&#8221;):</p><pre>Xephyr :1 -extension GLX &amp;</pre><p>You can now launch KDE:</p><pre>export DISPLAY=:1
/path/to/kde4/bin/startkde &amp;</pre><p>For other X11 environment just change /path/to/kde4 like:</p><pre>/usr/bin/startx &amp;</pre><p>or</p><pre>/usr/bin/startkde &amp;</pre><p>or</p><pre>/usr/bin/startxfce&amp;</pre><p>You can use &#8220;locate&#8221; command to find paths like:</p><pre>locate startkde</pre><p><strong>Appendix</strong><br /> • <a href="http://en.wikipedia.org/wiki/Norouz">Happy Nowruz 1387</a> (Iranian new year holiday)</p><p>Good Luck</p><div class="wp-biographia-container-top" style="background-color:#FFEAA8;"><div class="wp-biographia-pic"><img alt='' src='http://1.gravatar.com/avatar/1518e6b905d65cbe0a03243a199e18fc?s=100&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D100&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-biographia-text"><h3>About <a href="http://zebardast.ir/en/author/admin/" title="Saeid Zebardast">Saeid Zebardast</a></h3><p>I'm Senior software engineer with 5+ years of professional experience includes cross-platform proficiency with considerable knowledge of programming languages especially Java and programming paradigms such as OO and development methodologies. Also I'm MySQL DBA since 2006.</p><small><a href="mailto:&#115;ae&#105;&#100;.zeba&#114;&#100;&#97;&#115;&#116;&#64;&#103;&#109;&#97;&#105;l&#46;co&#109;" title="Send Saeid Zebardast Mail">Mail</a> | <a href="http://zebardast.ir/" title="Saeid Zebardast On The Web">Web</a> | <a href="https://twitter.com/#!/saeid" title="Saeid Zebardast On Twitter">Twitter</a> | <a href="https://www.facebook.com/saeid.zebardast" title="Saeid Zebardast On Facebook">Facebook</a> | <a href="http://www.linkedin.com/in/saeid" title="Saeid Zebardast On LinkedIn">LinkedIn</a> | <a href="https://plus.google.com/112638433061122581433" title="Saeid Zebardast On Google+">Google+</a> | <a href="http://zebardast.ir/en/author/admin/" title="More Posts By Saeid Zebardast">More Posts (31)</a></small></div></div><p><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Fnested-x11-environment-session%2F&amp;linkname=Nested%20X11%20environment%20session" title="Google+" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google+"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Fnested-x11-environment-session%2F&amp;linkname=Nested%20X11%20environment%20session" title="Facebook" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Fnested-x11-environment-session%2F&amp;linkname=Nested%20X11%20environment%20session" title="Twitter" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fzebardast.ir%2Fen%2Fnested-x11-environment-session%2F&amp;title=Nested%20X11%20environment%20session" id="wpa2a_8"><span style='display:none'>Share</span></a></p><p>No related posts.</p>]]></content:encoded> <wfw:commentRss>http://zebardast.ir/en/nested-x11-environment-session/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>What&#039;s dpkg-reconfigure</title><link>http://zebardast.ir/en/whats-dpkg-reconfigure/</link> <comments>http://zebardast.ir/en/whats-dpkg-reconfigure/#comments</comments> <pubDate>Thu, 31 Jan 2008 16:05:01 +0000</pubDate> <dc:creator>Saeid Zebardast</dc:creator> <category><![CDATA[GNU/Linux]]></category> <category><![CDATA[Tips]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[Terminal]]></category><guid isPermaLink="false">http://zebardast.wordpress.com/?p=16</guid> <description><![CDATA[Reconfigure an already installed package like gdm. dpkg-reconfigure package_name For example you can reconfigure X Server: sudo dpkg-reconfigure xserver-xorg About Saeid ZebardastI'm Senior software engineer with 5+ years of professional experience includes cross-platform proficiency with considerable knowledge of programming languages especially Java and programming paradigms such as OO and development methodologies. Also I'm MySQL DBA [...] Related posts:<ol><li><a href='http://zebardast.ir/en/about/' rel='bookmark' title='About'>About</a></li></ol>]]></description> <content:encoded><![CDATA[<p>Reconfigure an already installed package like gdm.</p><pre>dpkg-reconfigure package_name</pre><p>For example you can reconfigure X Server:</p><pre>sudo dpkg-reconfigure xserver-xorg</pre><div class="wp-biographia-container-top" style="background-color:#FFEAA8;"><div class="wp-biographia-pic"><img alt='' src='http://1.gravatar.com/avatar/1518e6b905d65cbe0a03243a199e18fc?s=100&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D100&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-biographia-text"><h3>About <a href="http://zebardast.ir/en/author/admin/" title="Saeid Zebardast">Saeid Zebardast</a></h3><p>I'm Senior software engineer with 5+ years of professional experience includes cross-platform proficiency with considerable knowledge of programming languages especially Java and programming paradigms such as OO and development methodologies. Also I'm MySQL DBA since 2006.</p><small><a href="mailto:&#115;&#97;e&#105;&#100;.&#122;&#101;b&#97;r&#100;&#97;s&#116;&#64;g&#109;ail&#46;&#99;o&#109;" title="Send Saeid Zebardast Mail">Mail</a> | <a href="http://zebardast.ir/" title="Saeid Zebardast On The Web">Web</a> | <a href="https://twitter.com/#!/saeid" title="Saeid Zebardast On Twitter">Twitter</a> | <a href="https://www.facebook.com/saeid.zebardast" title="Saeid Zebardast On Facebook">Facebook</a> | <a href="http://www.linkedin.com/in/saeid" title="Saeid Zebardast On LinkedIn">LinkedIn</a> | <a href="https://plus.google.com/112638433061122581433" title="Saeid Zebardast On Google+">Google+</a> | <a href="http://zebardast.ir/en/author/admin/" title="More Posts By Saeid Zebardast">More Posts (31)</a></small></div></div><p><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Fwhats-dpkg-reconfigure%2F&amp;linkname=What%26%23039%3Bs%20dpkg-reconfigure" title="Google+" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google+"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Fwhats-dpkg-reconfigure%2F&amp;linkname=What%26%23039%3Bs%20dpkg-reconfigure" title="Facebook" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Fwhats-dpkg-reconfigure%2F&amp;linkname=What%26%23039%3Bs%20dpkg-reconfigure" title="Twitter" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fzebardast.ir%2Fen%2Fwhats-dpkg-reconfigure%2F&amp;title=What%26%23039%3Bs%20dpkg-reconfigure" id="wpa2a_10"><span style='display:none'>Share</span></a></p><p>Related posts:<ol><li><a href='http://zebardast.ir/en/about/' rel='bookmark' title='About'>About</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://zebardast.ir/en/whats-dpkg-reconfigure/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Root Terminal in Ubuntu</title><link>http://zebardast.ir/en/root-terminal-in-ubuntu/</link> <comments>http://zebardast.ir/en/root-terminal-in-ubuntu/#comments</comments> <pubDate>Tue, 18 Dec 2007 08:38:07 +0000</pubDate> <dc:creator>Saeid Zebardast</dc:creator> <category><![CDATA[Terminal]]></category> <category><![CDATA[Tips]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[root]]></category> <category><![CDATA[sudo]]></category><guid isPermaLink="false">http://zebardast.wordpress.com/2007/12/18/root-terminal-in-ubuntu/</guid> <description><![CDATA[Hi Ubuntu has the root account disabled. You use sudo to run commands as root. if you need root access for some work: To start a root shell, but keep the current shell&#8217;s environment, use: sudo -s To start a root shell (i.e. a command window where you can run root commands), starting root&#8217;s environment [...] No related posts.]]></description> <content:encoded><![CDATA[<p><img src='http://zebardast.files.wordpress.com/2007/12/terminal_icon_48_48.jpg' alt='terminal_icon_48_48.jpg' align='right' /><br /> Hi<br /> Ubuntu <a href="https://help.ubuntu.com/community/RootSudo">has the root account disabled</a>.<br /> You use sudo to run commands as root. if you need root access for some work:</p><ul><li>To start a root shell, but keep the current shell&#8217;s environment, use:<pre>sudo -s</pre></li><li>To start a root shell (i.e. a command window where you can run root commands), starting root&#8217;s environment and login scripts, use:<pre>sudo -i</pre></li></ul><p>There is also a root terminal that is in the Applications menu. You have to right-click to edit the menu’s and add a check to the root terminal in System Tools items.</p><p>Don’t forget to type &#8216;exit&#8217; (or press Ctrl+D) to switch back to your normal user when you are done.</p><p>• <a href="https://help.ubuntu.com/community/RootSudo">More information about sudo in Ubuntu wiki</a></p><div class="wp-biographia-container-top" style="background-color:#FFEAA8;"><div class="wp-biographia-pic"><img alt='' src='http://1.gravatar.com/avatar/1518e6b905d65cbe0a03243a199e18fc?s=100&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D100&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-biographia-text"><h3>About <a href="http://zebardast.ir/en/author/admin/" title="Saeid Zebardast">Saeid Zebardast</a></h3><p>I'm Senior software engineer with 5+ years of professional experience includes cross-platform proficiency with considerable knowledge of programming languages especially Java and programming paradigms such as OO and development methodologies. Also I'm MySQL DBA since 2006.</p><small><a href="mailto:&#115;aei&#100;&#46;z&#101;b&#97;r&#100;&#97;&#115;t&#64;&#103;ma&#105;&#108;&#46;c&#111;m" title="Send Saeid Zebardast Mail">Mail</a> | <a href="http://zebardast.ir/" title="Saeid Zebardast On The Web">Web</a> | <a href="https://twitter.com/#!/saeid" title="Saeid Zebardast On Twitter">Twitter</a> | <a href="https://www.facebook.com/saeid.zebardast" title="Saeid Zebardast On Facebook">Facebook</a> | <a href="http://www.linkedin.com/in/saeid" title="Saeid Zebardast On LinkedIn">LinkedIn</a> | <a href="https://plus.google.com/112638433061122581433" title="Saeid Zebardast On Google+">Google+</a> | <a href="http://zebardast.ir/en/author/admin/" title="More Posts By Saeid Zebardast">More Posts (31)</a></small></div></div><p><a class="a2a_button_google_plus" href="http://www.addtoany.com/add_to/google_plus?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Froot-terminal-in-ubuntu%2F&amp;linkname=Root%20Terminal%20in%20Ubuntu" title="Google+" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/google.png" width="16" height="16" alt="Google+"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Froot-terminal-in-ubuntu%2F&amp;linkname=Root%20Terminal%20in%20Ubuntu" title="Facebook" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fzebardast.ir%2Fen%2Froot-terminal-in-ubuntu%2F&amp;linkname=Root%20Terminal%20in%20Ubuntu" title="Twitter" rel="nofollow" target="_blank"><img src="http://zebardast.ir/en/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fzebardast.ir%2Fen%2Froot-terminal-in-ubuntu%2F&amp;title=Root%20Terminal%20in%20Ubuntu" id="wpa2a_12"><span style='display:none'>Share</span></a></p><p>No related posts.</p>]]></content:encoded> <wfw:commentRss>http://zebardast.ir/en/root-terminal-in-ubuntu/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 25/76 queries in 0.027 seconds using disk: basic
Object Caching 2743/2815 objects using disk: basic

Served from: zebardast.ir @ 2012-02-09 10:12:29 -->
