Monthly Archives: March 2013

Synergy Foss “No route to host”

 

NOTE: connecting to ‘IP address’: IP address:24800
WARNING: failed to connect to server: No route to host

Problem occurred on the client side while trying connect to server.
The reason for the error was static IP address on the client machine. Thus, the server was not reachable from this end.

The client couldn’t even ping the server.

Changing IP obtaining type to DHCP fixed the issue.

How to enable gnome root account on Debian (Squeeze)

By default on a fresh Debian 6 installation gnome root login is disabled.
To enable the account follow the steps:

  1. Launch the terminal.
  2. Open the file /etc/pam.d/gdm3 with super user privileges
  3. Comment out the fifth line: auth required pam_succeed_if.so user != root quiet_success

    #%PAM-1.0
    auth requisite pam_nologin.so
    auth required pam_env.so readenv=1
    auth required pam_env.so readenv=1 envfile=/etc/default/locale
    #auth required pam_succeed_if.so user != root quiet_success
    @include common-auth
    auth optional pam_gnome_keyring.so
    @include common-account
    session required pam_limits.so
    @include common-session
    session optional pam_gnome_keyring.so auto_start
    @include common-password

  4. Save the file and reboot the system

Login as root enabled.

centOS 6.3 screen mirrored upside down

I have a Lenovo W520 laptop(graphic cards:intel and nvidia Quadro200M) with centOS 6.3 on it.

Recently, I have encountered an interesting issue I have updated the operating system using yum update command as a regular user with root privileges.
And after reboot, I logged in as the same user but everything was upside down though the screen wasn’t rotated as you can see on the photo. I couldn’t perform any activity because once I logged in, the system froze thus in order to log out I had to user “ctrl + alt + backspace” combination. I was also trying to revert to an old kernel version as it would be a logic explanation, that maybe the update failed but the issue persisted.
Luckily my root account was untouched and was able to create a new regular user and investigate further without the system reinstall.
However, I was not happy with the whole situation and had opened many threads during the investigation period unfortunately, no help from there either.

On some Saturday evening I decided to reinstall the Nvidia driver because wanted to test if the official drivers allow me to connect an external screen to my laptop.
Then, I found an interesting note saying that I must recompile my driver every time I update a kernel so, I decided to give it a try and hoping to kill two birds with one stone. Here are the steps:

  • download the latest drivers from here http://www.nvidia.com/Download/index.aspx?lang=en-us
  • make sure that your system is up to date by launching the command yum update if neccesary restart the machine
  • install the following packages:
    yum install kernel-devel kernel headers gcc make
  • make sure that you are running the latest kernel uname -r; rpm -q kernel-devel
  • blacklist nouveau by editing menu.lst
    kernel /boot/vmlinuz rdblacklist=nouveau
  • verify that your system does not use the aforementioned driver: /sbin/lsmod | grep nouveau
  • switch to runlevel 3: init 3
  • use the root account to log in and change the drivers to executable mode: chmod +x .run
  • run the driver ./.run and once completed return to level 5 init 5
  • If you can see the login window that is great otherwise carry on with tutorial:

  • use other OS or liveCD to get access to /etc/X11 folder
  • remove this file: xorg.conf and restart the machine
  • This should fix the problem.

    virsh commands

    In order to use commands listed on this page enter virsh management user interface by executing:
    $ virsh

    #to connect to local KVM hypervisor
    connect qemu:///system

    #to list running domains
    list

    #to list all domains
    list –all

    #to view the details of a particular virtual machine in xml format
    dumpxml domain_name

    general info

    //order in which to contact DNS servers (Domain Name Servers only)
    /etc/resolv.conf

    //order in which to contact the name resolvers when a process demands resolving of a host name
    /etc/nsswitch.conf

    //A list of machines that can be contacted using the network, but without the need for a domain name service
    /etc/hosts

    basic vi commands

    Command mode:
    dd – cut/delete a line
    yy – copy a line
    p – paste text
    o – create a new line below the cursor
    O – create a new line above the cursor

    Line mode:
    w – save the file
    wq – save the file and quit
    x – save the and quit
    q – quit the file
    q! – quit the file disregarding any changes

    general shell commands

    //search whatis database for strings
    apropos keyword

    //the same as above
    man -k keyword

    //displays only the manuals whose names begin with the keyword
    apropos ^keyword

    //search the exact manual name
    man -f keyword

    //shows the full path of (shell) commands
    which keyword

    //to find the alias of a command
    which -a
    alias

    //display environment variables
    env

    Viewing File Properties
    //to find out more about a file type use
    file file_name

    Manipulating files and directories
    //to create a directory
    mkdir dir_name

    //to create nested directories(subdirectories)
    mkdir -p directory/subdir1/subdir2

    //to move files
    mv src_file dest_place

    //to rename a file
    mv file_name new_file_name

    //to copy a file
    cp src_file dest_place

    //to copy directories(recursively)
    cp -R src_dir dest_dir

    //to remove a file
    rm file_name

    //to remove an empty directory
    rmdir dir_name

    //to remove a non-empty directory
    rm -r dir_name

    //to ask user for confirmation
    rm -i file_name

    //check an smb.conf configuration file for internal correctness
    testparm

    some useful commands

    //displays full database instance name:
    select * from global_name;

    //displays a sid(instance) name
    select sys_context('userenv','instance_name') from dual;

    //name of a logged user
    select user from dual;

    //name of a current instance
    select instance from v$thread;

    //name of a current instance
    select name from v$database;