12/04/2019

ZYXEL NSA 325v2 - nfs-shares

I added nfs shares via the Web-GUI and realized the nfs-shares show up but there are no folders or files at all though the free space is recognized.

so i did:
$ showmount -e 192.168.0.53 (#that's my NAS-Server IP-Adress)
/i-data/9e799388/nfs/photo  *
/i-data/9e799388/nfs/music  *
/i-data/9e799388/nfs/admin  *
/i-data/9e799388/nfs/public *
So the shared folders are in a nfs folder newly created and they are all empty. I wanted to share already existing folders.

so i did:
$ ssh admin@192.168.0.53
moved to:
$ cd /etc/idata/9e799388
There are all the folders where data is stored on the NAS and the newly created nfs-folder with my nfs-shares.
$ ls
admin        lost+found   nfs          photo        sysvol
aquota.user  music        opt          public       video
I want to share the folders admin, music, photo and pulic.
So via ssh i open:
$ export TERM=xterm
$ sudo nano /etc/exports

/i-data/9e799388/nfs/photo  *
/i-data/9e799388/nfs/music  *
/i-data/9e799388/nfs/admin  *
/i-data/9e799388/nfs/public *
 Just cut the /nfs, save the file wth strg+o and exit with strg+x.
 Then do:
$ sudo exportfs -ra
Exit the ssh-session and do again:
$ showmount -e 192.168.0.53
/i-data/9e799388/photo  *
/i-data/9e799388/music  *
/i-data/9e799388/admin  *
/i-data/9e799388/public *

After that all the stored files show up after do something like:
$ sudo mount -t nfs 192.168.0.53:/i-data/9e799388/photo /folder/where/you/want/to/mount



11/13/2019

linux toggle audio out

to find out about sinks:
$ pacmd list-sinks

to change sinks:
$ pacmd set-default-sink indexnumber

script to toggle:
#!/bin/bash 

new_sink=$(pacmd list-sinks | grep index | tee /dev/stdout | grep -m1 -A1 "* index" | tail -1 | cut -c12-)

echo "Setting default sink to: $new_sink";
pacmd set-default-sink $new_sink
pacmd list-sink-inputs | grep index | while read line
do
echo "Moving input: ";
echo $line | cut -f2 -d' ';
echo "to sink: $new_sink";
pacmd move-sink-input `echo $line | cut -f2 -d' '` $new_sink

done

 

11/09/2019

mpv show playlist keyboard shortcut



open ~/.config/mpv/input.conf with your favorite texteditor

add a shortcut:

shows playlist (bigger fonts than OSC):
ctrl+p show-text "${playlist}"

this displays the playlist the way the OSC does:
ctrl+p script-message osc-playlist

11/03/2019

thunar customized action: play dsf-audio with mpv

I wanded to do a customized Action in Thunar to play dsf files from a folder.

Name: dsf
Command: mpv %f --force-window
File pattern: *
Appears if selection contains: Directories, Other Files



to play it via my FIIO X5 (24bit/192kHz), Volume via mpv:

Name: fiiodsf
Command: mpv %f --force-window --audio-device=alsa/front:CARD=DAC,DEV=0
File pattern: *
Appears if selection contains: Directories, Other Files


to determine audio device:

$ mpv --audio-device=help

List of detected audio devices:
  'auto' (Autoselect device)
  'pulse/alsa_output.usb-SmartAction_FiiO_USB_Audio_Class_2.0_DAC_0007-01.analog-stereo' (FiiO USB Audio Class 2.0 DAC Analog Stereo)
  'pulse/alsa_output.pci-0000_00_03.0.hdmi-stereo' (Internes Audio Digital Stereo (HDMI))
  'alsa' (Default (alsa))
  'alsa/jack' (JACK Audio Connection Kit)
  'alsa/hdmi:CARD=HDMI,DEV=0' (HDA Intel HDMI, HDMI 0/HDMI Audio Output)
  'alsa/hdmi:CARD=HDMI,DEV=1' (HDA Intel HDMI, HDMI 1/HDMI Audio Output)
  'alsa/hdmi:CARD=HDMI,DEV=2' (HDA Intel HDMI, HDMI 2/HDMI Audio Output)
  'alsa/hdmi:CARD=HDMI,DEV=3' (HDA Intel HDMI, HDMI 3/HDMI Audio Output)
  'alsa/hdmi:CARD=HDMI,DEV=4' (HDA Intel HDMI, HDMI 4/HDMI Audio Output)
  'alsa/usbstream:CARD=HDMI' (HDA Intel HDMI/USB Stream Output)
  'alsa/sysdefault:CARD=PCH' (HDA Intel PCH, ALC892 Analog/Default Audio Device)
  'alsa/front:CARD=PCH,DEV=0' (HDA Intel PCH, ALC892 Analog/Front speakers)
  'alsa/surround21:CARD=PCH,DEV=0' (HDA Intel PCH, ALC892 Analog/2.1 Surround output to Front and Subwoofer speakers)
  'alsa/surround40:CARD=PCH,DEV=0' (HDA Intel PCH, ALC892 Analog/4.0 Surround output to Front and Rear speakers)
  'alsa/surround41:CARD=PCH,DEV=0' (HDA Intel PCH, ALC892 Analog/4.1 Surround output to Front, Rear and Subwoofer speakers)
  'alsa/surround50:CARD=PCH,DEV=0' (HDA Intel PCH, ALC892 Analog/5.0 Surround output to Front, Center and Rear speakers)
  'alsa/surround51:CARD=PCH,DEV=0' (HDA Intel PCH, ALC892 Analog/5.1 Surround output to Front, Center, Rear and Subwoofer speakers)
  'alsa/surround71:CARD=PCH,DEV=0' (HDA Intel PCH, ALC892 Analog/7.1 Surround output to Front, Center, Side, Rear and Woofer speakers)
  'alsa/iec958:CARD=PCH,DEV=0' (HDA Intel PCH, ALC892 Digital/IEC958 (S/PDIF) Digital Audio Output)
  'alsa/usbstream:CARD=PCH' (HDA Intel PCH/USB Stream Output)
  'alsa/sysdefault:CARD=DAC' (FiiO USB Audio Class 2.0 DAC, USB Audio/Default Audio Device)
  'alsa/front:CARD=DAC,DEV=0' (FiiO USB Audio Class 2.0 DAC, USB Audio/Front speakers)
  'alsa/surround21:CARD=DAC,DEV=0' (FiiO USB Audio Class 2.0 DAC, USB Audio/2.1 Surround output to Front and Subwoofer speakers)
  'alsa/surround40:CARD=DAC,DEV=0' (FiiO USB Audio Class 2.0 DAC, USB Audio/4.0 Surround output to Front and Rear speakers)
  'alsa/surround41:CARD=DAC,DEV=0' (FiiO USB Audio Class 2.0 DAC, USB Audio/4.1 Surround output to Front, Rear and Subwoofer speakers)
  'alsa/surround50:CARD=DAC,DEV=0' (FiiO USB Audio Class 2.0 DAC, USB Audio/5.0 Surround output to Front, Center and Rear speakers)
  'alsa/surround51:CARD=DAC,DEV=0' (FiiO USB Audio Class 2.0 DAC, USB Audio/5.1 Surround output to Front, Center, Rear and Subwoofer speakers)
  'alsa/surround71:CARD=DAC,DEV=0' (FiiO USB Audio Class 2.0 DAC, USB Audio/7.1 Surround output to Front, Center, Side, Rear and Woofer speakers)
  'alsa/iec958:CARD=DAC,DEV=0' (FiiO USB Audio Class 2.0 DAC, USB Audio/IEC958 (S/PDIF) Digital Audio Output)
  'alsa/usbstream:CARD=DAC' (FiiO USB Audio Class 2.0 DAC/USB Stream Output)
  'jack' (Default (jack))


 when i choose alsa/sysdefault:CARD=DAC as output i get 48kHz/ 24bit. 

6/04/2019

linux make WakeOnLan work

1. Check BIOS Settings
 
2. OS Settings


$ sudo ethtool eth0
 Settings for eth0:
 Supported ports: [ TP ]
 Supported link modes:   10baseT/Half 10baseT/Full 
                         100baseT/Half 100baseT/Full 
                         1000baseT/Full 
 Supported pause frame use: No
 Supports auto-negotiation: Yes
 Advertised link modes:  10baseT/Half 10baseT/Full 
                         100baseT/Half 100baseT/Full 
                         1000baseT/Full 
 Advertised pause frame use: No
 Advertised auto-negotiation: Yes
 Speed: 1000Mb/s
 Duplex: Full
 Port: Twisted Pair
 PHYAD: 1
 Transceiver: internal
 Auto-negotiation: on
 MDI-X: on (auto)
 Supports Wake-on: pumbg
 Wake-on: d
 Current message level: 0x00000007 (7)
          drv probe link
 Link detected: yes



Wake-on Modes:
 
p   Wake on PHY activity
u   Wake on unicast messages
m   Wake on multicast messages
b   Wake on broadcast messages
a   Wake on ARP
g   Wake on MagicPacket™
s   Enable SecureOn™ password for MagicPacket™
d   Disable (wake on nothing). This option clears all previous options.
 
 
 
change to "g Wake on MagicPacket™":


$ ethtool -s eth0 wol g


 ---------------------------------------------------------------------------------------
Change permanent:

as "/etc/rc.local" is executed while boot, just put it there:

 
$ sudo nano /etc/rc.local

#!/bin/sh -e 

# rc.local 

# This script is executed at the end of each multiuser runlevel. 
# Make sure that the script will "exit 0" on success or any other 
# value on error. 

# In order to enable or disable this script just change the execution 
# bits. 

sleep 5 
ethtool -s eth0 wol g 
exit 0 

--------------------------------------------------------------------------------------

on ArchLinux i installed wol-systemd from AUR

$ yay -S wol-systemd

 

enable & start the service:

$ systemctl enable wol@eth0

$ systemctl start wol@eth0 

____________________________________________________________________________________

 
what stopped my machine from starting via WOL:


$ sudo nano /etc/default/tlp

or

$ sudo nano /etc/tlp.conf

look for: # Disable wake on LAN: Y/N.
               WOL_DISABLE=Y
change to: WOL_DISABLE=N