how to use rdesktop command in linux

You can use the windows machine from linux OS. Using rdesktop program this is possible. Here is Linux tutorial, how to use rdesktop command in linux. Windows and Linux have made inroads into organizations around the world.

how to use rdesktop command in linux

 

how to use rdesktop command in linux
how to use rdesktop command in linux

Rdesktop is a Linux implementation of Remote Display Protocol (RDP). Windows uses RDP to connect to other Windows computers via Terminal Services. With rdesktop, you can open a remote control session on a Windows NT/2000/XP machine from a Linux box.

On fedora OS rdesktop utility is already installed. If that utility is not installed then use following command to install rdesktop
#yum install rdesktop

Use following command to use the remote desktop

[siwan@siwank-pc ~]$ rdesktop 192.168.2.45

For Full screen Use following Command.

[siwan@siwank-pc ~]$ rdesktop -f 192.168.2.45

How to minumize the rdesktop?

Use the following command. If you are in full screen mode then press ctrl + alt + enter button to back again.

This is very nice utility for Linux and Windows users. Who need to work on both the OS on same time.

how to open port 80 in linux iptables

Here we have linux tutorial for, how to open port 80 in linux iptables. Many times we need to open 80 port on linux box. Through command line opening the 80 or any port that is easy. In this tutorial I will how you can open the port 80.

how to open port 80 in linux iptables

how to open port 80 in linux iptables
how to open port 80 in linux iptables

Using following you can check the firewall setting of Linux.


[root@sonyk-pc project]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere            udp dpt:bootps
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:bootps
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http state NEW
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:vnc-server
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:vnc-server
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:patrol-snmp state NEW
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:61613 state NEW
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             192.168.122.0/24    state RELATED,ESTABLISHED
ACCEPT     all  --  192.168.122.0/24     anywhere
ACCEPT     all  --  anywhere             anywhere
REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable
REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Using following command you can open the port 80. using following command use 80 port will be open for 192.168.2.0 to 192.168.2.68 ip addresses.


[root@sonyk-pc project]# iptables -A INPUT -s 192.168.2.0/68 -d 192.168.2.16 -p tcp --dport 80 -j ACCEPT

using following command you can save the setting in iptables.


[root@sonyk-pc project]# restorecon -R /etc/sysconfig/iptables

[root@sonyk-pc project]# service iptables save

iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]

Than restart the firewall using following command

[root@sonyk-pc project]# service iptables restart
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: nat mangle filte[  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules: Using intrapositioned negation (`--option ! this`) is deprecated in favor of extrapositioned (`! --option this`).
Using intrapositioned negation (`--option ! this`) is deprecated in favor of extrapositioned (`! --option this`).
 [  OK  ]

How to set cron jobs in Linux

If you are programmer then you many times heard about cron jobs. Who are new in to programming or new about using cron jobs they always think, how schedule job in linux box.

How to set cron jobs in Linux

How to set cron jobs in Linux
How to set cron jobs in Linux

For many purpose we can use the cron jobs. Like sending emails, taking Mysql or database backup, taking file system backup or any other purpose.

What is Cron?

Cron is basically Linux program which will run on only windows.

Cron is a program that enables you to execute a command, or a script with a sequence of commands, at a specified date, time or at set intervals. The commands or scripts that you want cron to run are defined in a file called crontab, and every user has their own independent crontab file. Cron is a system program that is running all the time and is similar to the Windows scheduler which allows you to run commands/programs at predefined times and intervals.

We can pass following parameters to Cron file.

Minute = Minute of the hour, 00 to 59. * Will indicate every minute (details later)
Hour = Hour of the day in 24-hour format, 00 to 23. * Will indicate every hour (details later)
Day = Day of the month, 1 to 31. * Will indicate every day (details later)
Month = Month of the year, 1 to 12. * Will indicate every month (details later)
Day = Day of the week, 3 chars – sun, mon, tue, or numeric (0=sun, 1=mon etc)…. * Will indicate every day (details later)
Task = The command you want to execute

Now I will show you how to use the cron in Linux.

#su

#ROOT PASSWORD

#crontab -e

This will open the corn file from linux

Put you options in this file. For example

* * * * php  /var/www/html/project_name/script.php

Above script will fun after each minute.

00 18 * * php  /var/www/html/project_name/script.php

Above script will run at 6PM of day

More commands about crontab

#crontab -l

This will list cron file and all tasks which are present in cron file.

#crontab -r

This command will delete all cron jobs from cron file.

Using following command will show the all error log about cron file.

#tail -f /log/cron/error_log

how to install wine in fedora

Linux tutorial, As we wine is windows emulator for linux box. So many people thinking how to install the Wine package on Linux box.

how to install wine in fedora

how to install wine in fedora
how to install wine in fedora

That is so easy just follow my steps. Commands will look like as follows:

[root@kapilk-pc kapil]# yum install wine*
Loaded plugins: refresh-packagekit
Setting up Install Process
Package wine-tools is obsoleted by wine-core, trying to install wine-core-1.1.32-1.fc11.i586 instead
Resolving Dependencies
–> Running transaction check
—> Package wine.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-alsa.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-capi.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-cms.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-common.noarch 0:1.1.32-1.fc11 set to be updated
—> Package wine-core.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-desktop.noarch 0:1.1.32-1.fc11 set to be updated
—> Package wine-devel.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-docs.noarch 0:1.0-2.fc11 set to be updated
—> Package wine-esd.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-fonts.noarch 0:1.1.32-1.fc11 set to be updated
—> Package wine-jack.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-ldap.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-nas.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-openal.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-oss.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-pulseaudio.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-twain.i586 0:1.1.32-1.fc11 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

==================================================================================
Package Arch Version Repository Size
==================================================================================
Installing:
wine i586 1.1.32-1.fc11 updates 27 k
wine-alsa i586 1.1.32-1.fc11 updates 88 k
wine-capi i586 1.1.32-1.fc11 updates 31 k
wine-cms i586 1.1.32-1.fc11 updates 47 k
wine-common noarch 1.1.32-1.fc11 updates 86 k
wine-core i586 1.1.32-1.fc11 updates 14 M
wine-desktop noarch 1.1.32-1.fc11 updates 31 k
wine-devel i586 1.1.32-1.fc11 updates 2.7 M
wine-docs noarch 1.0-2.fc11 fedora 1.9 M
wine-esd i586 1.1.32-1.fc11 updates 41 k
wine-fonts noarch 1.1.32-1.fc11 updates 190 k
wine-jack i586 1.1.32-1.fc11 updates 43 k
wine-ldap i586 1.1.32-1.fc11 updates 94 k
wine-nas i586 1.1.32-1.fc11 updates 29 k
wine-openal i586 1.1.32-1.fc11 updates 41 k
wine-oss i586 1.1.32-1.fc11 updates 93 k
wine-pulseaudio i586 1.1.32-1.fc11 updates 50 k
wine-twain i586 1.1.32-1.fc11 updates 57 k

Transaction Summary
=========================================================================================
Install 18 Package(s)
Upgrade 0 Package(s)

Total download size: 19 M
Is this ok [y/N]: y
Downloading Packages:
(1/18): wine-1.1.32-1.fc11.i586.rpm | 27 kB 00:00
(2/18): wine-alsa-1.1.32-1.fc11.i586.rpm | 88 kB 00:00
(3/18): wine-capi-1.1.32-1.fc11.i586.rpm | 31 kB 00:00
(4/18): wine-cms-1.1.32-1.fc11.i586.rpm | 47 kB 00:00
(5/18): wine-common-1.1.32-1.fc11.noarch.rpm | 86 kB 00:00
(6/18): wine-core-1.1.32-1.fc11.i586.rpm | 14 MB 00:25
(7/18): wine-desktop-1.1.32-1.fc11.noarch.rpm | 31 kB 00:00
(8/18): wine-devel-1.1.32-1.fc11.i586.rpm | 2.7 MB 00:05
(9/18): wine-docs-1.0-2.fc11.noarch.rpm | 1.9 MB 00:02
(10/18): wine-esd-1.1.32-1.fc11.i586.rpm | 41 kB 00:00
(11/18): wine-fonts-1.1.32-1.fc11.noarch.rpm | 190 kB 00:00
(12/18): wine-jack-1.1.32-1.fc11.i586.rpm | 43 kB 00:00
(13/18): wine-ldap-1.1.32-1.fc11.i586.rpm | 94 kB 00:00
(14/18): wine-nas-1.1.32-1.fc11.i586.rpm | 29 kB 00:00
(15/18): wine-openal-1.1.32-1.fc11.i586.rpm | 41 kB 00:00
(16/18): wine-oss-1.1.32-1.fc11.i586.rpm | 93 kB 00:00
(17/18): wine-pulseaudio-1.1.32-1.fc11.i586.rpm | 50 kB 00:00
(18/18): wine-twain-1.1.32-1.fc11.i586.rpm | 57 kB 00:00
——————————————————————————————————————————–
Total 251 kB/s | 19 MB 01:18
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : wine-fonts-1.1.32-1.fc11.noarch 1/18
Installing : wine-docs-1.0-2.fc11.noarch 2/18
Installing : wine-core-1.1.32-1.fc11.i586 3/18
Installing : wine-pulseaudio-1.1.32-1.fc11.i586 4/18
Installing : wine-twain-1.1.32-1.fc11.i586 5/18
Installing : wine-capi-1.1.32-1.fc11.i586 6/18
Installing : wine-ldap-1.1.32-1.fc11.i586 7/18
Installing : wine-cms-1.1.32-1.fc11.i586 8/18
Installing : wine-openal-1.1.32-1.fc11.i586 9/18
Installing : wine-nas-1.1.32-1.fc11.i586 10/18
Installing : wine-esd-1.1.32-1.fc11.i586 11/18
Installing : wine-jack-1.1.32-1.fc11.i586 12/18
Installing : wine-oss-1.1.32-1.fc11.i586 13/18
Installing : wine-devel-1.1.32-1.fc11.i586 14/18
Installing : wine-alsa-1.1.32-1.fc11.i586 15/18
Installing : wine-common-1.1.32-1.fc11.noarch 16/18
Installing : wine-desktop-1.1.32-1.fc11.noarch 17/18
Installing : wine-1.1.32-1.fc11.i586 18/18

Installed:
wine.i586 0:1.1.32-1.fc11 wine-alsa.i586 0:1.1.32-1.fc11 wine-capi.i586 0:1.1.32-1.fc11 wine-cms.i586 0:1.1.32-1.fc11 wine-common.noarch 0:1.1.32-1.fc11 wine-core.i586 0:1.1.32-1.fc11
wine-desktop.noarch 0:1.1.32-1.fc11 wine-devel.i586 0:1.1.32-1.fc11 wine-docs.noarch 0:1.0-2.fc11 wine-esd.i586 0:1.1.32-1.fc11 wine-fonts.noarch 0:1.1.32-1.fc11 wine-jack.i586 0:1.1.32-1.fc11
wine-ldap.i586 0:1.1.32-1.fc11 wine-nas.i586 0:1.1.32-1.fc11 wine-openal.i586 0:1.1.32-1.fc11 wine-oss.i586 0:1.1.32-1.fc11 wine-pulseaudio.i586 0:1.1.32-1.fc11 wine-twain.i586 0:1.1.32-1.fc11

Complete!
[root@kapilk-pc kapil]#

have fun!

How to check Linux OS version through command prompt

Use following check Linux OS version through command linux operating system version. There are so many linux commands which are useful but sometimes you need to know about hosting server details and their operating system.

following command will useful for fedora, centos, redhat os.

#uname -a

I got the following result after this command.

Linux purab-5745 3.8.0-29-generic #42-Ubuntu SMP Tue Aug 13 19:40:39 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

If you have debian OS than, you can use following command.

cat /etc/debian_version

Normally above command will show the your kernel version information.

Following command also shows the OS version

cat /proc/version
cat /etc/redhat-release

How to setup vnc-server on fedora or linux

In this tutorial we will show you to How to setup vnc-server on fedora 11, we given you steps you install and configure the vnc server. we installed the tiger vnc server. Use following steps:

What is vnc server?

TigerVNC is a high-performance, platform-neutral implementation of VNC (Virtual Network Computing), a client/server application that allows users to launch and interact with graphical applications on remote machines. TigerVNC provides the levels of performance necessary to run 3D and video applications, and it attempts to maintain a common look and feel and re-use components, where possible, across the various platforms that it supports. TigerVNC also provides extensions for advanced authentication methods and TLS encryption.

Following commands can be used on any linux machine like centos, redhat, debian and ubuntu os.

[root@siwank-pc siwan]# yum install vnc-server

Loaded plugins: refresh-packagekit
Setting up Install Process
Package tigervnc-server-1.0.0-2.fc11.i586 already installed and latest version
Nothing to do

[root@siwank-pc siwan]# vim /etc/sysconfig/vncservers

In file use following lines (//SIWAN IS MY USER NAME, YOU NEED TO USE YOUR USERNMAE)

VNCSERVERS="59:siwan"
VNCSERVERARGS[59]="-geometry 1024x768 -nolisten tcp"

Than set your password or change for VNC-viewer

[siwan@siwank-pc ~]$ vncpasswd
Password:
Verify:

Than Became root user using following command.

[siwan@siwank-pc ~]$ su
Password:

Start the VNC server using following command. Use following command to start vnc services after rebooting

[root@siwank-pc siwan]# /sbin/service vncserver restart

[root@siwank-pc siwan]# /sbin/chkconfig vncserver on

Done!

Now you can able to use your box from vnc viewer..

How to install Imagemagick on linux and check Imagemagick

In this tutorial we will give information about, How to install Imagemagick on linux and check Imagemagick. Imagemagick is great application for image manipulation on linux box.

What is Imagemagick?

ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

install Imagemagick on linux

The functionality of ImageMagick is typically utilized from the command-line or you can use the features from programs written in your favorite language. Choose from these interfaces: G2F (Ada), MagickCore (C), MagickWand (C), ChMagick (Ch), ImageMagickObject (COM+), Magick++ (C++), JMagick (Java), L-Magick (Lisp), Lua (LuaJIT), NMagick (Neko/haXe), Magick.NET (.NET), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), IMagick (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images dynamically and automagically.

Use following command for Installing the Imagemagick
#su
#YOUR_PASSWORD
#yum install imagemagik

OR binary installtion follow this:
tar -xzf imagemagic1.2.3.4.5.6.tar.gz
cd imagemagic1.2.3.4.5.6
./configure
make
make check
make install

How to check Imagemagick on Fedora:
[root@siwank-pc html]# rpm -ql ImageMagick
/usr/bin/animate
/usr/bin/compare
/usr/bin/composite
/usr/bin/conjure
/usr/bin/convert
/usr/bin/display
/usr/bin/identify
/usr/bin/import
/usr/bin/mogrify
/usr/bin/montage
/usr/bin/stream
…….

For running the ImageMagick use following commands
#animate or #display

How to Install IE6 and IE7 on Fedora

Here in this article we will guide you to Install IE6 and IE7 on Fedora or any linux system. Now days I6 and IE7 is not used by people still I am updating this post.

Note: Don’t became root because these files will crash your linux.

Use following commands for installing the IE7 on your box.
#su
#ROOT_PASSWORD
#yum install wine cabextract
#exit
Here we are exiting the root user

#cd /tmp
#wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
#tar xvfz ies4linux-latest.tar.gz
#cd ies4linux-*
#./ies4linux –no-flash –install-ie7

I tried following command multiple times than I got succeed(6 or 7 times). Many times this command not executed properly.
#./ies4linux –no-flash –install-ie7

To launch IE6 Type on command prompt:
#ie6

To launch IE7 Type on command prompt:
#ie7

My comments
IE6 and 7 is running properly on my machine but some time it gives me error about IE7.
I am looking forward to solve that issue.

Install mp3 player and vlc player on Fedora

Play mp3 songs in fedora linux
I am using the Fedora 11 and on that I am going to install the Fluendo MP3 plugin

Install mp3 player and vlc player on Fedora

If you want to install the Fluendo MP3 plugin on Fedora 8, 9, 10 or 11
Use same steps;

Download fluendo-codecs-mp3-7-1.i386.rpm file from here:

fluendo-codecs-mp3

Use following command:
[root@localhost siwan]# rpm -i fluendo-codecs-mp3-7-1.i386.rpm

How to install the Vlc player on Fedora 8, 9, 10 or 11
root@localhost siwan]#  su
[root@localhost siwan]#  rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
[root@localhost siwan]# yum install vlc
[root@localhost siwan]# yum install mozilla-vlc (optionnal)

how to check programs installation path in linux

There are many linux distributions like fedora, redhat, centos. Each has different program installation path. Using following commands you can check programs installation path in linux

how to check programs installation path in linux

Use following commands:

</pre>
[root@localhost ]# which php
/usr/bin/php
[root@localhost ]# which ruby
/usr/bin/ruby
[root@localhost ]# php --version
PHP 5.2.9 (cli) (built: Apr 17 2009 03:42:25)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with eAccelerator v0.9.5.2, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
[root@localhost ]# ruby --version
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-linux]
[root@localhost Desktop]#