Set external monitor as the primary monitor
xrandr --output VGA1 --primary
xrandr --output VGA1 --auto --pos 0x0 --output LVDS1 --auto --below VGA1
after that use the monitor settings to adjust position
going back to laptop screen only
xrandr --output VGA1 --off --output LVDS1 --auto
Given that I'm using a laptop and my laptop screen identified as LVDS1 and the external monitor as VGA1, I set up three icons that run a script, to switch between clone, dual with LVDS1 as primary, and dual with VGA1 as primary.
Using the text editor Kate I created three files with the names:
VGA1-Primary.sh
LVDS1-Primary.sh
Clone-Monitors.sh
The text contents of VGA1-Primary.sh are:
xrandr --output VGA1 --right-of LVDS1
xrandr --output VGA1 --primary
The text contents of LVDS1-Primary.sh are:
xrandr --output LVDS1 --left-of VGA1
xrandr --output LVDS1 --primary
The text contents of Clone-Monitors.sh are:
xrandr --output LVDS1 --auto --output VGA1 --auto --same-as LVDS1
Thursday, October 13, 2011
Tuesday, October 4, 2011
enable disable touchpad
Method #1
xinput list gets the name of the touchpad... for me it's "PS/2 Generic Mouse"
then white this shell script on desktop
#!/bin/sh
DEVICE="PS/2 Generic Mouse"
if [ `xinput list-props "$DEVICE" |awk '/Device Enabled/ { print $4}'` -eq 0 ]; then
xinput --set-prop "$DEVICE" "Device Enabled" 1
else
xinput --set-prop "$DEVICE" "Device Enabled" 0
fi
Method #2
disable: modprobe -r psmouse
enable: modprobe psmouse
xinput list gets the name of the touchpad... for me it's "PS/2 Generic Mouse"
then white this shell script on desktop
#!/bin/sh
DEVICE="PS/2 Generic Mouse"
if [ `xinput list-props "$DEVICE" |awk '/Device Enabled/ { print $4}'` -eq 0 ]; then
xinput --set-prop "$DEVICE" "Device Enabled" 1
else
xinput --set-prop "$DEVICE" "Device Enabled" 0
fi
Method #2
disable: modprobe -r psmouse
enable: modprobe psmouse
Wednesday, April 6, 2011
Enable/Disable CPUs in Linux
cd /sys/devices/system/cpu
ls -l ... shows cpus
grep processor /proc/cpuinfo
echo 0 > cpuN/online ... disables that cpu
echo 1 > cpuN/online ... enables that cpu
or
use kernel boot parameters maxcpus=XX
ls -l ... shows cpus
grep processor /proc/cpuinfo
echo 0 > cpuN/online ... disables that cpu
echo 1 > cpuN/online ... enables that cpu
or
use kernel boot parameters maxcpus=XX
Sunday, March 6, 2011
Friday, March 4, 2011
compile kernel with broken make-kpkg
apt-get install fakeroot build-essential crash kexec-tools makedumpfile kernel-wedge
apt-get build-dep linux
apt-get install git-core libncurses5 libncurses5-dev libelf-dev asciidoc binutils-dev
export CONCURRENCY_LEVEL=ncpu+1
make menuconfig
make-kpkg --initrd --append-to-version=**** kernel-image kernel-headers
... this will fail ...
make -j (ncpu+1)
make modules
make modules_install
make install
cd /boot
mkinitramfs -o initrd.img-2.6.25 2.6.25
# update-grub
use startup manager
apt-get install startupmanager
# vi /boot/grub/menu.lst
title Debian GNU/Linux, kernel 2.6.25 Default
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hdb1 ro
initrd /boot/initrd.img-2.6.25
savedefault
boot
apt-get build-dep linux
apt-get install git-core libncurses5 libncurses5-dev libelf-dev asciidoc binutils-dev
export CONCURRENCY_LEVEL=ncpu+1
make menuconfig
make-kpkg --initrd --append-to-version=**** kernel-image kernel-headers
... this will fail ...
make -j (ncpu+1)
make modules
make modules_install
make install
cd /boot
mkinitramfs -o initrd.img-2.6.25 2.6.25
# update-grub
use startup manager
apt-get install startupmanager
# vi /boot/grub/menu.lst
title Debian GNU/Linux, kernel 2.6.25 Default
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hdb1 ro
initrd /boot/initrd.img-2.6.25
savedefault
boot
Subscribe to:
Posts (Atom)