SmartOS.
I have had problems with the keyboard using VNC to connect to a KVM guest.
Keyboard mapping I mean.
The solution working for me was:
vmadm update <uuid> qemu_extra_opts="-k it"
Friday, February 15, 2013
linux scp and umask
I use CentOS 5.x
The problem is that if I use scp or sftp to copy a file on such CentOS server, the umask is not taken in consideration.
Behavior of scp and sftp is different.
Btw, a solution is to use openssh 5, but I don't like to alter the distribution, since CentOS 5 install openssh 4.
Using google I've found different solution (pam? etc.) but no one works for me.
So, a way to make what I want is:
For sftp
vi /etc/ssh/sshd_config
...
# override default of no subsystems
# Subsystem sftp /usr/libexec/openssh/sftp-server
Subsystem sftp /bin/sh -c 'umask 0002; /usr/libexec/openssh/sftp-server'
and restart sshd
And for scp
vi /home/myuser/.bashrc
adding (0002 or what you want)
umask 0002
The problem is that if I use scp or sftp to copy a file on such CentOS server, the umask is not taken in consideration.
Behavior of scp and sftp is different.
Btw, a solution is to use openssh 5, but I don't like to alter the distribution, since CentOS 5 install openssh 4.
Using google I've found different solution (pam? etc.) but no one works for me.
So, a way to make what I want is:
For sftp
vi /etc/ssh/sshd_config
...
# override default of no subsystems
# Subsystem sftp /usr/libexec/openssh/sftp-server
Subsystem sftp /bin/sh -c 'umask 0002; /usr/libexec/openssh/sftp-server'
and restart sshd
And for scp
vi /home/myuser/.bashrc
adding (0002 or what you want)
umask 0002
Tuesday, February 5, 2013
smartos update_disks
I want to change the disk model in a KVM machine on SmartOS.
vi upddisk.json
{
"update_disks": [
{
"path": "/dev/zvol/rdsk/zones/e888a82a-bca1-49fda6d7-988debb09703-disk0",
"model": "ide"
}
]
}
vmadm update e888a82a-bca1-49fd-a6d7-988debb09703 -f upddisk.json
vmadm get e888a82a-bca1-49fd-a6d7-988debb09703
vi upddisk.json
{
"update_disks": [
{
"path": "/dev/zvol/rdsk/zones/e888a82a-bca1-49fda6d7-988debb09703-disk0",
"model": "ide"
}
]
}
vmadm update e888a82a-bca1-49fd-a6d7-988debb09703 -f upddisk.json
vmadm get e888a82a-bca1-49fd-a6d7-988debb09703
Tuesday, January 29, 2013
batch convert dv to avi xvid using ffmpeg
I am using Openindiana.
find bk/Video -type f -exec ~/mmpeg.sh {} \;
The mmpeg.sh script is based on sandipb script.
(Some variables may be unuseful).
https://github.com/alcir/mystuff/blob/master/mmpeg.sh
The converted files will go in /media/003-9VT166/converted/ directory using as name the full path starting from where find was launched.
So, the file
./bk/Video/2012_12/video01.dv
will become
/media/003-9VT166/converted/bk_Video_2012_12_video01.avi
Please note: I had no time to handle spaces in file names.
find bk/Video -type f -exec ~/mmpeg.sh {} \;
The mmpeg.sh script is based on sandipb script.
(Some variables may be unuseful).
https://github.com/alcir/mystuff/blob/master/mmpeg.sh
The converted files will go in /media/003-9VT166/converted/ directory using as name the full path starting from where find was launched.
So, the file
./bk/Video/2012_12/video01.dv
will become
/media/003-9VT166/converted/bk_Video_2012_12_video01.avi
Please note: I had no time to handle spaces in file names.
dcm4chee query study availability
This query can be useful to list in a range of time the sudies wich availability is ONLINE (0= online, 1= nearline).
SELECT distinct(study.study_iuid)
FROM series
JOIN study ON series.study_fk = study.pk
JOIN patient ON study.patient_fk = patient.pk
JOIN instance ON instance.series_fk = series.pk
where study.study_datetime >= '2000-01-01' and study.study_datetime <= '2010-01-31'
and study.availability = 0 ;
SELECT distinct(study.study_iuid)
FROM series
JOIN study ON series.study_fk = study.pk
JOIN patient ON study.patient_fk = patient.pk
JOIN instance ON instance.series_fk = series.pk
where study.study_datetime >= '2000-01-01' and study.study_datetime <= '2010-01-31'
and study.availability = 0 ;
Openindiana: install ffmpeg
pfexec pkg set-publisher -p http://pkg.openindiana.org/sfe
pfexec pkg set-publisher -p http://pkg.openindiana.org/sfe-encumbered
pfexec pkg install ffmpeg
pfexec pkg set-publisher -p http://pkg.openindiana.org/sfe-encumbered
pfexec pkg install ffmpeg
links for today
X11 connection rejected because of wrong authentication after sudo to another user
http://jianmingli.com/wp/?p=724
http://jianmingli.com/wp/?p=724
Subscribe to:
Posts (Atom)