Showing posts with label Fedora-Linux. Show all posts
Showing posts with label Fedora-Linux. Show all posts

Wednesday, May 14, 2014

How to enable old closing position in Vim

Please add below lines in Vimrc


if has("autocmd")
   au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
         \| exe "normal! g'\"" | endif
endif

Saturday, March 29, 2014

virtualBox ERROR - Kernel driver not installed (rc = -1908)

1.This command will display modules of virtualbox
#cat /etc/sysconfig/modules/VirtualBox.modules
2.Now  i want fix this problem using ‘systemd-modules-load.service’.insert this in “virtualbox.conf”
## vi /usr/lib/modules-load.d/virtualbox.conf
#Loading VirtualBox modules
vboxdrv
vboxnetflt
vboxnetadp
and restart service
# systemctl restart systemd-modules-load.service # systemctl status systemd-modules-load.service
finally reboot and it will work fine. without any error!!!

Tuesday, March 12, 2013

Passwordless SSH

                                            
SUPPOSE CLIENT TRY TO CONNECT REMOTE SERVER.

cd $HOME [or just type cd and then enter]


the server HOME directory permission 750


chmod 700 .ssh
cd .ssh            # goto .ssh folder where below files exist


To generate id_rsa.pub and id_rsa execute below command. Press enter
if it asks for anything
[If id_rsa.pub already there no need to do this. ]
ssh-keygen -t rsa

chmod to below files on both servers.
chmod 600 authorized_keys
chmod 644 known_hosts
chmod 640 id_rsa.pub
chmod 600 id_rsa

hostkey located in: /etc/ssh/ssh_host_rsa_key.pub
To show fingerprint: ssh-keygen -l -f ssh_host_rsa_key.pub

Append remote server's hostkey to client's(local) known_hosts file
with IP as below 
[IP hostkey= comment_to_describe_key]:

Append client server's(Local) id_rsa.pub key to remote server's authorized_keys
as below.
ssh-rsa key= comment_to_describe_key 
Now connect to remote servers as below example:
ssh ruser@1.2.3.4

It should not prompt you any password
 
NOTE-- There may be slight changes from OS to OS as in some OS keys been copied automatically. 

Sunday, March 3, 2013

Some useful Linux utilities-- useful tips

1- Sync two folders (below syncing each second)
         'watch -n 1 rsync -avz source destination'
 It also take care of directory structure.Also can sync remote system directory without mounting it.

2- bzcat,bzless,zcat etc commands are very useful to display the contents of single large compressed file(in some GB). If  any-time such large file need to be processed than use any of these command and pipe output to the programme which will process it.


3- Run command at remote system

ssh gauravp@machine "\unix_command"
or
ssh -n gauravp@machine "unix_command"
or
echo "unix_command"|ssh gauravp@machine

Saturday, March 2, 2013

connect internet using wvdial in Linux

Change wvdial.conf for connect to different internet connection--netconnect,bsnl,airtel

to connect command is-- wvdial dialer_name.

For reliance net connect+ its mandatory to provide username & password.

Note- A slight modification on this file will work for other ISP or other countries too.

/etc/wvdial.conf

[Dialer netconnect]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Stupid Mode = 1
Modem Type = Analog Modem
New PPPD = yes
Baud = 9600
ISDN = 0
Modem = /dev/ttyUSB0
Phone = #777
Username = ur_number
Password =  ur_number
Baud = 9600

[Dialer bsnl]
Init1 = ATE0V1
Init2 = AT+CFUN=6
Init3 = AT+CGDCONT=1,"IP","bsnlnet"
Stupid Mode = 1
Modem Type = USB Modem
Phone = *99#
Modem = /dev/ttyACM0
Username = { }
Password = { }
Baud = 460800

[Dialer airtel]
Init1 = ATZ
Init2 = at+cgdcont=1,"ip","airtelgprs.com"
Stupid Mode = 1
Modem Type = USB Modem
ISDN = 0
Phone = *99***1#
Modem = /dev/ttyUSB0
Username = a
Password = a
Baud = 9600

Saturday, February 2, 2013

Problems- upgrading Fedora 16 to 17

If you have existing Fedora 16 or greater in your system and want to upgrade to fedora 17 using "iso" image than below is the trick to add entry into fedora 16 or onward.

 Please add this entry into "/etc/grub.d/40_custom" file and run command "grub2-mkconfig".

menuentry "Fedora 17 Linux" {
        set root=(hd0,1)
        linux /boot/vmlinuz repo=hd:/dev/sda3:/
        initrd /boot/initrd.img
    }
Some details about above entry-
vmlinuz and initrd.img files has been copied into /boot directory of F16 or above from fedora 17.dvd.iso after loop mounting.This boot partition is in /dev/sda1. Hence the entry set root=(hd0,1).

"repo=hd:/dev/sda3:/" will tell that iso image is in harddisk's partition /dev/sda3 and in root directory.You can give directory structure if image resides into some directory structure.

NOTE- Fedora 17 onward there are more simpler mechanism available.




If someone face below error after upgrading fedora 16 to 17 than here is quick resolution of these problems

==> wvdial is throwing below error.
"--> Modem initialized.
wvdial: utils/wvtask.cc:409: static void WvTaskMan::_stackmaster(): Assertion `magic_number == -0x123678' failed.
Aborted (core dumped)"

please install "libwvstreams" package using yum.
yum -y update libwvstreams

Friday, January 18, 2013

Transparent setting of terminal is not showing actual windows

if the transparent settings in terminal just shows the desktop background and not the actual windows that are opened behind the terminal just fire below command

gconftool-2 -s '/apps/metacity/general/compositing_manager' --type bool true

and check the progress of running tasks without switching application windows.

Thursday, March 8, 2012

F16 won't power off after shutdown

This problem is because of some bug in kernel. To get rid of this problem please edit  file name "/etc/default/grub" and add power_off=1to  GRUB_CMDLINE_LINUX like below.

GRUB_CMDLINE_LINUX="rd.md=0 rd.lvm=0 rd.dm=0  KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0 LANG=en_US.UTF-8 power_off=1"


OR


this problem only seems to be in 3.1.X.X kernel. You can upgrade your kernel to 3.2.X.X to get rid of it.

Wednesday, February 22, 2012

Convert CHM to PDF in (Fedora) Linux

if you are looking for a CHM to PDF convector (Open Source & Free to use) for Linux , then please visit
http://blog.randell.ph/2010/04/03/convert-chm-to-pdf-in-fedora-linux/