Create the file ~/.xsession
with only one line in it: xfce4-session
rsync on an alternate ssh port
rsync -e "ssh -p 44" --progress -rtva myuser@myserver.x:/some/directory/ /somewhere/
fullscreen vs windowed SheepShaver (MacOS classic emulator)
The SheepShaver preferences file is in your user’s home, for instance mine is in /Users/robertodircio/.sheepshaver_prefs
the setting to enable fullscreen is:
screen dga/0/0
to have windowed mode, change that to:
screen win/800/600
Clear linux cached memory
if you want to clear the linux cached memory run “echo 3 > /proc/sys/vm/drop_caches”
root@pc:~# free total used free shared buffers cached Mem: 3951136 2979376 971760 0 29704 2488576 -/+ buffers/cache: 461096 3490040 Swap: 3050492 2268 3048224 root@pc:~# echo 3 > /proc/sys/vm/drop_caches root@pc:~# free total used free shared buffers cached Mem: 3951136 511264 3439872 0 1828 99752 -/+ buffers/cache: 409684 3541452 Swap: 3050492 2268 3048224
it clears it all 🙂
liveupgrade if you have SVM metadevices
if you have SVM (solaris volume manager,disk suite,metadevices), you can still liveupgrade….
consider this scenario, the OS lives in mirrored disks d0,d3,d4,d6:
root@myserver # df -h | grep -i md /dev/md/dsk/d0 4.9G 3.2G 1.7G 66% / /dev/md/dsk/d3 9.9G 4.1G 5.7G 42% /usr /dev/md/dsk/d4 9.9G 3.4G 6.3G 35% /var /dev/md/dsk/d6 101G 7.5G 93G 8% /opt /dev/md/dsk/d5 4.9G 4.6G 336M 94% /spare
the metadevices look like this:
d0 -m d10 d20 1 d10 1 1 c1t0d0s0 d20 1 1 c1t1d0s0 d6 -m d16 d26 1 d16 1 1 c1t0d0s6 d26 1 1 c1t1d0s6 d5 -m d15 d25 1 d15 1 1 c1t0d0s5 d25 1 1 c1t1d0s5 d4 -m d14 d24 1 d14 1 1 c1t0d0s4 d24 1 1 c1t1d0s4 d3 -m d13 d23 1 d13 1 1 c1t0d0s3 d23 1 1 c1t1d0s3 d1 -m d11 d21 1 d11 1 1 c1t0d0s1 d21 1 1 c1t1d0s1
So we create two Boot Environments (BE), sol10u6(the current), and sol10u9(the one that will be upgraded)
lucreate -c sol10u6 -n sol10u9
-m /:/dev/md/dsk/d40:ufs,mirror -m /:/dev/dsk/c1t0d0s0:detach,attach,preserve
-m /usr:/dev/md/dsk/d43:ufs,mirror -m /usr:/dev/dsk/c1t0d0s3:detach,attach,preserve
-m /var:/dev/md/dsk/d44:ufs,mirror -m /var:/dev/dsk/c1t0d0s4:detach,attach,preserve
-m /opt:/dev/md/dsk/d46:ufs,mirror -m /opt:/dev/dsk/c1t0d0s6:detach,attach,preserve
Notice we create the alternate metadevices d40,d43,d44 and d46, to substitute d0,d3,d4 and d6 in the sol10u9 BE.
when we boot from the sol10u6 BE we will still see d0,d3,d4 and d6, when we boot the sol10u9 BE we will see d40,d43,d44 and d46.
Next, we create the file to skip auto registration:
# echo "autoreg=disable" > /var/tmp/no-autoreg
Now we run the upgrade:
# luupgrade -k /var/tmp/no-autoreg -u -n sol10u9 -s /sol10u9
after the upgrade, we activate the sol10u9 BE
# luactivate sol10u9
Now, we restart the server, do not use “reboot”!
# init 6
Luckily the server comes up with sol10u9
run silent emcgrab
great for scripting 🙂
# ./emcgrab -quiet -legal
create a pptpd vpn server
1. Install pptpd.
sudo apt-get install pptpd
2. the contents of my pptpd.conf:
option /etc/ppp/pptpd-options debug dump logwtmp localip 192.168.2.6 remoteip 192.168.2.230-239
The local IP address is the IP address of your server, the one in ifconfig. The remote IPs are a range you would like the remote user to use on your LAN.
3. My /etc/ppp/pptpd-options:
name pptpd refuse-pap refuse-chap refuse-mschap require-mschap-v2 require-mppe-128 proxyarp nodefaultroute lock nobsdcomp
4. Add user names and passwords for the users you want to give access to your vpn.
rdpm pptpd mypassword *
5. Enable ipv4 forwarding in /etc/sysctl.conf:
net.ipv4.ip_forward=1
6. enable the ipv4 forwarding setting
sysctl -p
7. restart pptpd
/etc/init.d/pptpd restart
add zfs from another spool to your swap.
All the documentation tells you need to use rpool, and if you do a zfs create my pool/swap, it will not appear in /dev/zvol……
it works this way:
zfs create -V 10G anotherpool/swap
then it appears in /dev/zvol and you add it
swap -a /dev/zvol/dsk/anotherpool/swap
two finger scrolling for touchpad in lenovo t400
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 4 xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 8 xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 1 1 xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Edge Scrolling" 0 0 0 xinput set-button-map "SynPS/2 Synaptics TouchPad" 1 2 3 5 4 6 7 8 9 10 11 12
get /dev/dm* device mappings
[root@aserver tmp]# for d in $(ls /sys/block/dm-*/dev); do echo -n “$d “;cat $d ; done
/sys/block/dm-0/dev 253:0
/sys/block/dm-10/dev 253:10
/sys/block/dm-11/dev 253:11
/sys/block/dm-1/dev 253:1
/sys/block/dm-2/dev 253:2
/sys/block/dm-3/dev 253:3
/sys/block/dm-4/dev 253:4
/sys/block/dm-5/dev 253:5
/sys/block/dm-6/dev 253:6
/sys/block/dm-7/dev 253:7
/sys/block/dm-8/dev 253:8
/sys/block/dm-9/dev 253:9
[root@aserver tmp]# ls -la /dev/mapper/
total 0
drwxr-xr-x 2 root root 300 Sep 9 00:38 .
drwxr-xr-x 17 root root 31840 Sep 24 17:37 ..
crw——- 1 root root 10, 63 Sep 9 00:37 control
brw-rw—- 1 root disk 253, 11 Sep 9 00:38 oradg-ora_backups_vol
brw-rw—- 1 root disk 253, 9 Sep 9 00:38 oradg-ora_log_vol
brw-rw—- 1 root disk 253, 8 Sep 9 00:38 oradg-ora_opt_vol
brw-rw—- 1 root disk 253, 10 Sep 9 00:38 oradg-ora_vendor_vol
brw-rw—- 1 root disk 253, 5 Sep 9 00:37 sysvg-home
brw-rw—- 1 root disk 253, 1 Sep 9 00:37 sysvg-opt
brw-rw—- 1 root disk 253, 7 Sep 9 00:37 sysvg-optCA
brw-rw—- 1 root disk 253, 0 Sep 9 00:37 sysvg-root
brw-rw—- 1 root disk 253, 6 Sep 9 00:37 sysvg-swap
brw-rw—- 1 root disk 253, 4 Sep 9 00:37 sysvg-tmp
brw-rw—- 1 root disk 253, 2 Sep 9 00:37 sysvg-usr
brw-rw—- 1 root disk 253, 3 Sep 9 00:37 sysvg-var