Tuesday, April 17, 2012

Ubuntu - slow browser experience


Fix by doing the folowing:

From a terminal window, type in:
sudo gedit /etc/nsswitch.conf

Change your hosts config to look like this:
hosts:          files dns

Save the file and then reboot Ubuntu.


Thursday, March 8, 2012



rsync and backup files
rsync -r -t -v --progress -o -g -p -x -u -l  /fromdir/ /backupdir/

-r copies also all subdirectories within main directory
-t preserves modification times
-v verbose mode, shows more information
--progress shows progress during transfer
--delete deletes files in destination which are not present in the source
-c compares files contents by checksum
-l copies symbolic links
-z compresses files for faster transfer
-x don’t cross filesystem boundaries
-o preserves owner
-g preserves group
-p preserves permissions
-u update

Friday, March 2, 2012

Ubuntu 11.10 - VirtualBox working headless

I have the version 4.1.8.r75467 with it's extpack installed currently.

to start from command prompt:
>VBoxHeadless --startvm "VMName" &

to save and stop from  command prompt:
>VBoxManage controlvm "VMName" savestate

to lauch the remote desktop viewer from command prompt
>rdesktop -u bob -p bobpass -z -f 10.129.52.53

where bob is username and bobpass is the password and ip address of the VM machine is : 10.129.52.53

Thursday, January 26, 2012

Ubuntu 11.04 VirtualBox 4.1.2 Startup headless

Regardless of if you create a new VM or import an old one, you can start it with the command:
VBoxHeadless --startvm "Ubuntu 11.04 Server"

To stop a VM, run
VBoxManage controlvm "Ubuntu 11.04 Server" poweroff

To pause a VM, run
VBoxManage controlvm "Ubuntu 11.04 Server" pause

To reset a VM, run
VBoxManage controlvm "Ubuntu 11.04 Server" reset

To learn more about VBoxHeadless, take a look at
VBoxHeadless --help

Star headless on terminal with nohup  command:
nohup VBoxHeadless --startvm "Ubuntu 11.04 Server" &

Monday, February 28, 2011

Ubuntu - Dual Screen Setup

1) Add additional Driver: NVidia accelerated graphics driver (version current) [Recommended] and activate
2) edit  xorg.conf via menu - Administration -> NVIDIA X Server Setting
3) xorg.conf look like:
---------------------------------------------------------------------------------
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 260.19.06  (buildd@palmer)  Mon Oct  4 16:01:38 UTC 2010

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "1"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "AUO"
    HorizSync       36.5 - 54.7
    VertRefresh     40.0 - 60.0
    Option         "DPMS"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "BenQ G2420HDB"
    HorizSync       24.0 - 83.0
    VertRefresh     50.0 - 76.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro NVS 160M"
    BusID          "PCI:1:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro NVS 160M"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-0: 1440x900_60 +0+0; DFP-0: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-2: 1920x1080_60 +0+0; DFP-2: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
---------------------------------------------------------------------------------

4)Restart.
5)Done



Friday, December 31, 2010

Quick Guide setup Auto-Start script on Ubuntu 10.10 - Example nexus

Trick : to run File Browser(nautilus)  as root:
sudo nautilus

The product is installed in: /opt/server/nexus/nexus-oss-webapp-1.6.0/
The logs are in: /opt/server/nexus/nexus-oss-webapp-1.6.0/logs

1-      Give users the access to the logs dir:
sudo chmod -R 777 /opt/server/nexus/nexus-oss-webapp-1.6.0/logs

2-      Create the script and add as below:
sudo gedit /etc/init.d/nexus.sh

-------------------------------------------
# Nexus auto-start
#
# description: Auto-starts nexus
# processname: nexus
# pidfile: /var/run/nexus.pid

export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_23
export PATH=$PATH:$JAVA_HOME/bin
cd /opt/server/nexus/nexus-oss-webapp-1.6.0/bin/jsw/linux-x86-64

case $1 in
start)
     ./nexus start
     ;;
stop) 
     ./nexus stop
     ;;
restart)
     ./nexus restart
     ;;
esac  
exit 0
-------------------------------------------
3-      Make the script executable + link to execute on stop via K99 script and start via script S99

-- Make executable
sudo chmod 755 /etc/init.d/nexus.sh
sudo chmod 755 /opt/server/nexus/nexus-oss-webapp-1.6.0/bin/jsw/linux-x86-32/nexus
sudo chmod 755 /opt/server/nexus/nexus-oss-webapp-1.6.0/bin/jsw/linux-x86-32/wrapper
sudo ln -s /etc/init.d/nexus.sh /etc/rc1.d/K99nexus.sh
sudo ln -s /etc/init.d/nexus.sh /etc/rc2.d/S99nexus.sh

and all done.