トップ 追記

Masa's blog

検索キーワード:

2018年06月17日 bind-9.13.1 dnssec validating ./NS: got insecure response; parent indicates it should be secure [長年日記]

_ bind-9.13.1 dnssec validating ./NS: got insecure response; parent indicates it should be secure

I have done version-up to bind-9.13.1 from bind-9.13.0.

but it can't work properly with following messages :(

validating ./NS: got insecure response; parent indicates it should be secure
validating ./NS: no valid signature found
validating myh.no-ip.org/AAAA: bad cache hit (org/DS)

I don't know why, but I have made DESSEC off :P

/etc/named.conf

dnssec-validation no;

then everything goes fine :)


2018年04月12日 xrdp-0.9.6 and xorgxrdp-0.2.6 on Slackware-14.2(64) [長年日記]

_ How to build xrdp-0.9.6

$ tar xvf xrdp-0.9.6.tar.gz
$ cd xrdp-0.9.6
$ ./bootstrap
$ ./configure
$ ./configure --disable-pam --disable-painter --disable-rfxcodec
$ make
# make install

_ How to build xorgxrdp-0.2.6

$ tar xvf  xorgxrdp-0.2.6.tar.gz
$ cd xorgxrdp-0.2.6
$ ./bootstrap
$ ./configure
$ make
# make install

_ How to fix login failure

I could not login with next error message in /var/log/xrdp-sesman.log.

[20180412-01:46:53] [INFO ] Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
[20180412-01:47:03] [ERROR] X server for display 10 startup timeout
[20180412-01:47:03] [CORE ] waiting for window manager (pid 19184) to exit
[20180412-01:47:03] [ERROR] X server for display 10 startup timeout
[20180412-01:47:03] [ERROR] another Xserver might already be active on display 10 - see log
[20180412-01:47:03] [DEBUG] aborting connection...

I fixed this issue by next command :)

# echo "allowed_users=anybody" >>/etc/X11/Xwrapper.config

2018年03月19日 Build of firefox-59.0.1 on Slackware-14.2(64) [長年日記]

_ Build of firefox-59.0.1 on Slackware-14.2(64)

about:config

no longer `general.useragent.locale=ja_JP' is not used.

Use next.

intl.locale.requested=ja_JP

Environment

I got following message with firefox-59.0.1 on youtube and I couldn't get any sound, even I have installed pulseaudio :(

You may need to install the required PulseAudio software

I must need following environment variable to fix this :)

export MOZ_DISABLE_CONTENT_SANDBOX=1

or it also fix this to start pulseaudio in ~/.xinitrc like following.

/usr/bin/pulseaudio --start --log-target=syslog &

Environmet variable for plugin.

export MOZ_PLUGIN_PATH=/usr/lib64/mozilla/plugins

2018年01月25日 Build firefox-58.0 on Slackware-14.2(64) [長年日記]

_ Build

$ cd ~m-ito/tmp
$ tar xvf firefox-58.0.source.tar.xz
$ cd firefox-58.0
$ vi .mozcofig
export LDFLAGS="-latomic"
. $topsrcdir/browser/config/mozconfig
ac_add_options --enable-optimize
ac_add_options --enable-default-toolkit=cairo-gtk3
ac_add_options --disable-debug
ac_add_options --disable-tests
$ curl https://sh.rustup.rs -sSf | sh
$ PATH="/home/m-ito/.cargo/bin:/usr/local/autoconf-2.13/bin:${PATH}"; export PATH
$ export LANG=C; export LC_ALL=C
$ rustup update
$ ./mach build && ./mach build package

_ Install

# mkdir /usr/local/firefox-58.0
# cd /usr/local/firefox-58.0
# tar xvf /home/m-ito/tmp/firefox-58.0/obj-x86_64-pc-linux-gnu/dist/firefox-58.0.en-US.linux-x86_64.tar.bz2

2018年01月21日 How to make working stably `PLANEX GW-USNano2 802.11n Wireless Adapter [Realtek]' [長年日記]

_ 'PLANEX GW-USNano2' is unstable with Slackware-14.2's native driver.

I'm using `PLANEX GW-USNano2' for USB wireless adapter on Slackware-14.2(64). But it often disconnect with native driver rtl8291cu :(

_ How to fix

Use P.Varet's rtl8192cu-fixes for driver :)

Install dkms-2.4.0.tar.gz first.

# wget https://slackbuilds.org/slackbuilds/14.2/development/dkms.tar.gz
# tar xvf dkms.tar.gz
# cd dkms
# wget https://github.com/dell/dkms/archive/v2.4.0/dkms-2.4.0.tar.gz
# sh dkms.SlackBuild
# installpkg /tmp/dkms-2.4.0-x86_64-1_SBo.tgz

Install rtl8192cu-fixes

# git clone https://github.com/pvaret/rtl8192cu-fixes.git
# dkms add ./rtl8192cu-fixes
# dkms install 8192cu/1.10
# depmod -a
# cp ./rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d/
# cp ./rtl8192cu-fixes/8192cu-disable-power-management.conf /etc/modprobe.d/
# reboot

After that, `PLANEX GW-USNano2' works very fine(I don't face suddenly disconnect).

_ misc

Mr. P.Varet said in his github page

!! This driver is DEPRECATED !!
The new rtl8xxxu driver initially introduced in kernel 4.4 works pretty well these days, and you almost certainly should prefer it to this repository.

But I think P.Varet's driver is still more stable than Slackware-14.2's native driver in Kernel 4.4.14.


2017年11月05日 Fix for `East Asian Ambiguous Character Width(EAW )' [長年日記]

_ How to Fix

Get UTF-8-EAW-FULLWIDTH.gz

# cp UTF-8-EAW-FULLWIDTH.gz /usr/share/i18n/charmaps/
# cd /usr/share/i18n/charmaps/
# localedef -f UTF-8-EAW-FULLWIDTH -i ja_JP ja_JP.UTF-8

_ Undo

# localedef -f UTF-8 -i ja_JP ja_JP.UTF-8

Awesome!


2017年10月27日 powershell server and client [長年日記]

_ psserver.ps1

#
# ex. psserver.ps1 12345 "^192\.168\.0\.[0-9][0-9]*$"
#
#     schtasks /create /s _IP_ /u _DOMAIN_\administrator /p _ADMIN_PASSWORD_ /ru _DOMAIN_\administrator /rp _ADMIN_PASSWORD_ /sc onstart /tn "_TITLE_" /tr "'powershell' '-NoProfile' '-ExecutionPolicy' 'Unrestricted' '-File' 'C:\temp\psserver.ps1' '12345' '^127\.0\.0\.1$|^192\.168\.0\.[0-9][0-9]*$'" /rl HIGHEST /f
#
#------------------------------------------------------------
# Argument
#------------------------------------------------------------
$port = $args[0]
$allowip = $args[1]

#------------------------------------------------------------
# Function
#------------------------------------------------------------
#
# return: line data for success
#         $null for failure
#
Function readLine($rd){
	try {
		$line = $reader.readLine()
	}catch{
		$line = $null
	}
	return $line
}
#
# return: $true for success
#         $false for failure
#
Function writeLine($wd, $line){
	$stat = $true
	try {
		$wd.writeLine($line)
		$wd.Flush()
	}catch{
		$stat = $false
	}
	return $stat
}
#
# return: $true for success
#         $false for failure
#
Function runAndReturnResalt($wd, $cmd){
	$stat = $true
	try {
		Invoke-Expression $cmd |
		Out-String -stream |
		Foreach-Object {
			$res = $_ -replace " *$", ""
			if ((writeLine $wd (":"+ $res)) -eq $false){
				$stat = $false
				break
			}
		}
	}catch{
		$stat = $false
	}
	return $stat
}
#------------------------------------------------------------
# Main procedure
#------------------------------------------------------------
$endpoint = New-Object System.Net.IPEndPoint([System.Net.IPAddress]::Any, $port)
$server = New-Object System.Net.Sockets.TcpListener $endpoint
$server.start()

$shutdown = $false
while (-not $shutdown){
	$client = $server.AcceptTcpClient()
	if ($client.Client.RemoteEndPoint.Address.IPAddressToString -match $allowip){
		$stream = $client.GetStream()
		$reader = New-Object IO.StreamReader($stream,[Text.Encoding]::Default)
		$writer = New-Object IO.StreamWriter($stream,[Text.Encoding]::Default)
		while (($line = readLine $reader) -ne $null -and (-not $shutdown)){
			if ($line -match "^@shutdown$"){
				$shutdown = $true
			}else{
				if ((runAndReturnResalt $writer $line) -ne $true){
					$stat = writeLine $writer ("Failed : " + $line)
				}
			}
			$stat = writeLine $writer "__END__"
		}
		$writer.Close()
		$reader.Close()
		$stream.Close()
		$client.Close()
		$writer = $null
		$reader = $null
		$stream = $null
		$client = $null
	}else{
		$client.Close()
		$client = $null
	}
}

$server.stop()

_ psclient.ps1

#
# ex. psclient.ps1 192.168.0.1 12345 "dir *.txt"
#
#------------------------------------------------------------
# Argument
#------------------------------------------------------------
$addr = $args[0]
$port = $args[1]
$cmd = $args[2]

#------------------------------------------------------------
# Functions
#------------------------------------------------------------
#
# return: line data for success
#         $null for failure
#
Function readLine($rd){
	try {
		$line = $reader.readLine()
	}catch{
		$line = $null
	}
	return $line
}
#
# return: $true for success
#         $false for failure
#
Function writeLine($wd, $line){
	$stat = $true
	try {
		$wd.writeLine($line)
		$wd.Flush()
	}catch{
		$stat = $false
	}
	return $stat
}

#------------------------------------------------------------
# Main procedure
#------------------------------------------------------------
$client = New-Object System.Net.Sockets.TcpClient ($addr, $port)
$stream = $client.GetStream()
$reader = New-Object IO.StreamReader($stream,[Text.Encoding]::Default)
$writer = New-Object IO.StreamWriter($stream,[Text.Encoding]::Default)

$stat = writeLine $writer $cmd
$line = readLine $reader
while ($line -ne $null -and $line -ne "__END__"){
	$line -replace "^:", ""
	$line = readLine $reader
}

$writer.Close()
$reader.Close()
$stream.Close()
$client.Close()

2017年10月20日 Using named pipe with PowerShell [長年日記]

_ `echo' Server

$shutdown = $false
while (-not $shutdown){
        $pipe = New-Object System.IO.Pipes.NamedPipeServerStream "NamedPipeForEcho",InOut
        $pipe.WaitForConnection()
        $buf = New-Object byte[] 1024
        $loop = $true
        while($loop) {
                try {
                        $len = $pipe.Read($buf, 0, $buf.Length)
                        $cmd = [System.Text.Encoding]::Unicode.GetString($buf, 0, $len)
                        if($cmd -match '^exit|^quit|^shutdown') {
                                $loop = $false
                                if($cmd -match '^shutdown') {
                                        $shutdown = $true
                                }
                        } else {
                                $wb = [System.Text.Encoding]::Unicode.GetBytes($cmd)
                                $pipe.Write($wb, 0, $wb.Length)
                        }
                }catch{
                        $loop = $false
                }
        }
        $pipe.Close()
}

_ Client

$pipe = New-Object System.IO.Pipes.NamedPipeClientStream ".", "NamedPipeForEcho",InOut
$pipe.Connect()
$buf = New-Object byte[] 1024

$wb = [System.Text.Encoding]::Unicode.GetBytes("Hello, world.")
$pipe.Write($wb, 0, $wb.Length)
$len = $pipe.Read($buf, 0, $buf.Length)
[System.Text.Encoding]::Unicode.GetString($buf, 0, $len)

$wb = [System.Text.Encoding]::Unicode.GetBytes("exit")
$pipe.Write($wb, 0, $wb.Length)
#$wb = [System.Text.Encoding]::Unicode.GetBytes("shutdown")
#$pipe.Write($wb, 0, $wb.Length)

2017年10月08日 llvm-3.9 or later was required to build firefox-56 on Slackware-14.2 [長年日記]

_ I had to do version up llvm-3.8 to llvm-3.9.1 to build firefox-56.0.1

_ llvm.Slackbuild

_ Build

# sh llvm.SlackBuild

_ Install

# installpkg /tmp/llvm-3.9.1-x86_64-2.txz

And then I got success to build firefox-56 ;)


2017年09月24日 How to read QRCode by using zbar-0.10 on Slackware-14.2 [長年日記]

_ Build of zbar-0.10 on Slackware-14.2

  • ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h
  • tar xvf zbar-0.10.tar.bz2
  • cd zbar-0.10
  • ./configure && make && make install
  • rm /usr/include/linux/videodev.h

_ qrcode.sh

#! /bin/sh
LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so zbarcam /dev/video0 |\
while :
do
	read i
	if [ "X$i" = "X" ]
	then
		break
	else
		isUrl=`echo $i | egrep 'https*://'`
		if [ "X${isUrl}" != "X" ]
		then
			url=`echo $i | sed -e 's/^.*http/http/'`
			echo detected URL is ${url}
			/usr/local/firefox/firefox/firefox ${url}
		else
			echo Ignore $i
		fi
	fi
done