-
v4l2rtspserver
v4l2rtspserver
インストール
Code:$ sudo apt-get install cmake $ cd ~/ $ git clone https://github.com/mpromonet/v4l2rtspserver.git $ cd v4l2rtspserver $ cmake . $ make $ sudo make install
Code:$ sudo modprobe bcm2835-v4l2
Code:$ v4l2rtspserver -W 1920 -H 1080 -F 30
コンパイルログを見る限りH265にも対応してそうな感じですが、指定方法が分からなかった。。。Posted 11-01-2023 at 10:00 AM by ted_chou12
Updated 11-01-2023 at 10:07 AM by ted_chou12 -
Telnet SMTP
Cool! Thanks! FWIW:
https://stackoverflow.com/questions/...ands-via-gmailPosted 05-10-2021 at 11:42 PM by !!! -
Generating Private Public Key
do this:
openssl genrsa -out google.com.pem 1024
openssl req -x509 -new -nodes -key google.com.pem -sha256 -days 390 -out google.com.cer
-----
Country Name (2 letter code) [AU]:TW
State or Province Name (full name) [Some-State]:Taipei
Locality Name (eg, city) []:Taipei
Organization Name (eg, company) [Internet Widgits Pty Ltd]:3D-Products
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:*.google.com
Email Address []:webmaster@3d-products.comPosted 01-17-2020 at 11:30 AM by ted_chou12 -
Generating Private Public Key
openssl req -x509 -new -nodes -key privatekey.pem -sha256 -days 1 -out publickey.cerPosted 11-28-2019 at 08:53 AM by ted_chou12 -
Generating Private Public Key
Quote:C:\Program Files\OpenSSL-Win64\bin>openssl req -x509 -new -nodes -key privatekey.pem -sha256 -days 1 -out publickey.cer
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:TW
State or Province Name (full name) [Some-State]:Taipei
Locality Name (eg, city) []:Taipei
Organization Name (eg, company) [Internet Widgits Pty Ltd]:3D-Products.com
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:google.com
Email Address []:webmaster@3d-products.comPosted 11-28-2019 at 08:51 AM by ted_chou12 -
ibus input How TO
Hi there.
Sorry I didn't see your post earlier, it was 2 years ago...
Still need the issue?Posted 11-28-2019 at 03:54 AM by ted_chou12 -
Squid3.5
Squid Windows
Quote:2019/11/27 23:20:28 kid1| WARNING: no_suid: setuid(0): (22) Invalid argument
(ssl_crtd): Uninitialized SSL certificate database directory: /usr/share/squid/ssl_db. To initialize, run "ssl_crtd -c -s /usr/share/squid/ssl_db".Code:C:\Squid\lib\squid\ssl_crtd -c -s C:\Squid\usr\share\squid\ssl_db
Posted 11-27-2019 at 08:22 AM by ted_chou12
Updated 11-28-2019 at 10:08 AM by ted_chou12 -
Squid3.5
Squid Windows
Code:# # Recommended minimum configuration: # # Example rule allowing access from your local networks. # Adapt to list your (internal) IP networks from where browsing # should be allowed acl localnet src 10.0.0.0/8 # RFC1918 possible internal network acl localnet src 172.16.0.0/12 # RFC1918 possible internal network acl localnet src 192.168.0.0/16 # RFC1918 possible internal network acl localnet src fc00::/7 # RFC 4193 local private network range acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines acl SSL_ports port 443 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https acl Safe_ports port 70 # gopher acl Safe_ports port 210 # wais acl Safe_ports port 1025-65535 # unregistered ports acl Safe_ports port 280 # http-mgmt acl Safe_ports port 488 # gss-http acl Safe_ports port 591 # filemaker acl Safe_ports port 777 # multiling http acl CONNECT method CONNECT # # Recommended minimum Access Permission configuration: # # Only allow cachemgr access from localhost http_access allow localhost manager http_access deny manager # Deny requests to certain unsafe ports http_access deny !Safe_ports # Deny CONNECT to other than secure SSL ports http_access deny CONNECT !SSL_ports # We strongly recommend the following be uncommented to protect innocent # web applications running on the proxy server who think the only # one who can access services on "localhost" is a local user #http_access deny to_localhost # # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS # # Example rule allowing access from your local networks. # Adapt localnet in the ACL section to list your (internal) IP networks # from where browsing should be allowed http_access allow localnet http_access allow localhost always_direct allow all ssl_bump server-first all sslproxy_cert_error deny all sslproxy_flags DONT_VERIFY_PEER sslcrtd_program /lib/squid/ssl_crtd -s /usr/share/squid/ssl_db -M 4MB sslcrtd_children 8 startup=1 idle=1 acl step1 at_step SslBump1 ssl_bump peek step1 ssl_bump bump all # And finally deny all other access to this proxy http_access deny all # Squid normally listens to port 3128 http_port 3128 http_port 3129 ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB key=/etc/squid/ssl_cert/google.com.private cert=/etc/squid/ssl_cert/google.com.cert # Uncomment the line below to enable disk caching - path format is /cygdrive/<full path to cache folder>, i.e. #cache_dir aufs /cygdrive/d/squid/cache 3000 16 256 # Leave coredumps in the first cache dir coredump_dir /var/cache/squid # Add any of your own refresh_pattern entries above these. refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern . 0 20% 4320 request_header_add X-GoogApps-Allowed-Domains "hennge.com" all dns_nameservers 8.8.8.8 208.67.222.222 max_filedescriptors 3200
Posted 11-27-2019 at 08:17 AM by ted_chou12 -
Squid3.5
squid.conf
Code:acl CONNECT method CONNECT http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access allow all #dns_v4_first on #http_access allow purge localhost #http_access deny purge # # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS # always_direct allow all #ssl_bump client-first all sslproxy_cert_error allow all sslproxy_flags DONT_VERIFY_PEER sslcrtd_program /usr/local/squid/libexec/ssl_crtd -s /usr/local/squid/var/lib/ssl_db -M 4MB sslcrtd_children 8 startup=1 idle=1 #sslproxy_cipher HIGH:MEDIUM:!RC4:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS acl step1 at_step SslBump1 ssl_bump peek step1 ssl_bump bump all #ssl_bump bump monitoredSites !serverIsBank #ssl_bump terminate blocked_https #ssl_bump splice all #http_access allow localnet #http_access allow localhost request_header_add X-GoogApps-Allowed-Domains "hennge.com" all #request_header_add Test "Value" all coredump_dir /var/spool/squid
Posted 11-26-2019 at 06:25 PM by ted_chou12 -
ibus input How TO
Does it still work on Slackware64 14.2 ?
The folder xinput.d does not exist, and the file could not be created.Posted 04-17-2017 at 09:36 AM by limpingstone -
Posted 09-13-2013 at 02:36 PM by ted_chou12 -
audio with tv tuner card
mencoder -oac copy -ovc copy -o test2.avi mms://Posted 09-13-2013 at 11:43 AM by ted_chou12 -
bluetooth how to, hcitool, obexftp, rfcomm
if you lack "OBEX File Transfer" or something like "OBEX FTP", ANND you are using an android fone, you could try downloading bluetooth file transfer by searching for "OBEX" in googleplay. And the service appears as:
Code:Service Name: OBEX FTP Service RecHandle: 0x10007 Service Class ID List: UUID 128: 00001106-0000-1000-8000-00805f9b34fb Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 30
Posted 03-03-2013 at 08:33 AM by ted_chou12 -
sync folder script
Found this useful info:Quote:I've created two samba shares, /media/disk1 and /media/disk2
say the structure is like this:
/media/disk1/dir1
/media/disk1/dir2 links to /media/disk1/dir1
/media/disk2/dir1 links to /media/disk1/dir1
so I can access /media/disk1/dir1 and /media/disk1/dir2 from samba share, but I cannot access /media/disk2/dir1, on Windows 7 it throws:
Quote:
[Window Title]
Location is not available
[Content]
N:\dir1 is not accessible.
Access is denied.
[OK]
In conclusion, symbolic inside the same drive is okay, but when cross-drive links happened, I cannot access them..
Is there anything I have missing or done wrongly? Thanks.
--------------------------------------------------------------------------------
Last edited by qip; January 10th, 2011 at 07:03 AM..
qip
View Public Profile
Send a private message to qip
Find More Posts by qip
January 10th, 2011 #2
PatchesTheCaveman
Has an Ubuntu Drip
Join Date: Oct 2009
Location: Tucson, AZ
Beans: 782
Ubuntu 10.10 Maverick Meerkat Re: samba share cannot access symbolic links to other drives
--------------------------------------------------------------------------------
You need to set
Code:
follow symlinks = yes
wide links = yesfor the share in smb.conf for Samba to follow symlinks out of the file share.
ETA: You will also need to add:
Code:
unix extensions = noto your [global] sections for security reasons. For more information, see http://www.ubuntu.com/usn/usn-918-1
Posted 02-19-2013 at 04:44 AM by ted_chou12 -
ntp server for vectorlinux
I notice the old ntp server is off by 5 MINUTES!! These are the official Taiwanese ntp servers, I am pretty sure they are well maintained:
tick.stdtime.gov.tw
tock.stdtime.gov.tw
time.stdtime.gov.tw
clock.stdtime.gov.tw
watch.stdtime.gov.twPosted 02-08-2013 at 08:17 PM by ted_chou12 -
how to wake on lan?
Please note that you have to disable the old alarm first, if you want
to set a new alarm. Otherwise, you get an error. Example:
echo 12345 > /sys/class/rtc/rtc0/wakealarm
echo 0 > /sys/class/rtc/rtc0/wakealarm
echo 23456 > /sys/class/rtc/rtc0/wakealarmPosted 10-13-2012 at 08:52 PM by ted_chou12 -
how to wake on lan?
Sources:
http://www.debian-administration.org/articles/122
Quote:
Turning on computers remotely
Posted by Steve on Wed 20 Apr 2005 at 08:42
Tags: boot, network booting, wakeonlan
To save power it's often useful to turn systems off, but of course when you do that you cannot use them! This is especially frustrating when you turn off a machine which is physically remote from you, but it doesn't need to be. Many modern PCs have the ability to be remotely "woken up" and turned on.
"WakeOnLan" is the term which is used for remotely powering on machines, as this is done by sending "magic network packets" to switch on machines.
To use wakeonlan you'll need either:
•A network card which supports WakeOnLan, which usually has a jumper which connects to your system's motherboard.
•An on-board network interface which supports this functionality.
Many modern systems with on-board NICs support wakeonlan, but it must be enabled in the BIOS. (Look for the option in the "power management" section of your BIOS, it might be called "wakeonlan", "netboot", or "wake on ring events").
If you have the requisite hardware support can see if it's enabled by your system by running the ethtool command, this shows whether the wakeonlan option is supported by your card, and whether it is enabled.
If you don't have this installed run:
apt-get install ethtool
Once it's installed run it with the name of your network interface:
root@lappy:~# ethtool eth0
Settings for eth0:
Supports Wake-on: g
Wake-on: d
Link detected: yes
Here we can see that wakeonlan support is available because of the g, but it's disabled. (This is explained in the manpage which you can read with "man ethtool"). To enable the magic packet support run:
root@lappy:~# ethtool -s eth0 wol g
Now you should be able to see that it's turned on:
root@lappy:~# ethtool eth0
Settings for eth0:
Supports Wake-on: g
Wake-on: g
Link detected: yes
Now that you know it's turned on you need to do one more thing. Wakeonlan software requires that you know the MAC address of the machine you wish to switch on, rather than the IP address.
To determine the MAC address you can either:
•Discover it on the machine itself before it is switched off, by using ifconfig
•Determine it remotely, whilst the machine is powered on and running.
To determine the MAC address via ifconfig just run it:
skx@mystery:~$ /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:0A:E6:F6:A3:F4
inet addr:192.168.1.80 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20a:e6ff:fef6:a3f4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2218390 errors:0 dropped:0 overruns:0 frame:0
TX packets:3098440 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1624008578 (1.5 GiB) TX bytes:1368310661 (1.2 GiB)
Interrupt:10 Base address:0xd400
Here the MAC address is 00:0A:E6:F6:A3:F4, it's on the first line and is described as the "HWaddr" or "hardware address".
If you're looking for the MAC address of another machine upon your LAN you can ping the machine, then look at the arp cache.
For example if I wished to determine the MAC address of the machine sun.my.flat from my current host I'd run the following two commands:
kx@mystery:~$ ping -c 1 sun
PING sun.my.flat (192.168.1.1) 56(84) bytes of data.
64 bytes from sun (192.168.1.1): icmp_seq=1 ttl=64 time=0.202 ms
--- sun.my.flat ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.202/0.202/0.202/0.000 ms
skx@mystery:~$ /usr/sbin/arp sun
Address HWtype HWaddress Flags Mask Iface
sun ether 08:00:20:C2:1E:F6 C eth0
The arp command shows the machine's MAC address, the ping being required first to make sure that my current machine knew the MAC address in the first place.
Once you have the MAC address you can shutdown the system you wish to test, and then attempt to restart it remotely.
There are several pieces of software for sending the wakeonlan packets inside the Debian archive:
•etherwake ◦Requires root privileges and available in all Debian distributions.
•wakeonlan ◦Can be used by all users, but only in the Sarge (testing) and unstable (Sid) repositories
I'm going to use wakeonlan, since it's already installed and can be used by non-root users:
skx@mystery:~$ wakeonlan 08:00:20:C2:1E:F6
Sending magic packet to 255.255.255.255:9 with 08:00:20:C2:1E:F6
This sends the magic wake on lan packet to the machine on the LAN with the hardware address "08:00:20:C2:1E:F6" which we previously determined belonged to the machine sun.
If all goes well the machine will begin to boot shortly after recieving the packet.
Quote:How to automatically wake up your computer at a particular time ( Resume by RTC alarm in Arch Linux )
August 15, 2011 by Rag Sagar.V രാഗ് സാഗര്*.വി
My ISP provides unlimited download from 2am to 8am. So i was not able to sleep after 2 from the time i switched to the new broadband plan. Keeping the system on and setting a cronjob to start downloading after 2 was an option. But i was more concerned about the increasing electricity charge, than my sleep. Besides it is my social responsibility to save energy as a gonna-be software engineer . After a bit of googling and hacking i was able to wake up my system at a particular time. Here i am going to explain how i made my arch linux system to boot automatically at 2 am.
The configuration is done in Arch Linux. For automatic wakeup it needs a BIOS which supports RTC alarm. Most of them manufactured after 2000 supports this feature.
1) Check if your BIOS supports automatic wakeup
Execute the command below as root.
1
# grep rtc /var/log/messages.log
2
rtc_cmos 00:03: RTC can wake from S4
3
rtc0: alarms up to one month
If you can find something like this in the output.It says that the system can wakeup and a wakeup time can be setup.
2) Enable automatic wakeup in BIOS
Go to your BIOS setup, Under Power Management search for something like “Wake by RTC Alarm” or “Resume by RTC alarm” or “RTC resume”.Then enable it.
3) Set the hardware clock time standard as UTC
Edit the /etc/rc.conf file as root and set the HARDWARECLOCK variable to UTC
1
[ragsagar@h4ckb0x ~]$ grep ^HARDWARECLOCK /etc/rc.conf
2
HARDWARECLOCK="UTC"
Make sure that your timezone is set correctly in /etc/rc.conf
More help : https://wiki.archlinux.org/index.php/Time
4) Set the alarm time
Execute the following commands as root
1
# echo 0 > /sys/class/rtc/rtc0/wakealarm
2
# echo `date '+%s' -d '+ 5 minutes'` > /sys/class/rtc/rtc0/wakealarm
This will set the the alarm time as 5 minutes into the future.
Now run
1
$ cat /sys/class/rtc/rtc0/wakealarm
If the output of above command is something like “1313383930″, the alarm is set. It is epoch time. If it doesn’t yield any result make sure that the HARDWARECLOCK variable is set to UTC and reboot and try again to set the alarm time.
Now run
1
$ cat /proc/driver/rtc
Go through rtc_time, alrm_time and alrm_date and check if they are correct(will be in UTC).Turn off the system and leave the power on. Check if the system is booting automatically after five mintues.
5) Setting the alarm to a particular time and date.
To set the alarm to woke up the system at 16th Aug 2:05am, Run the following as root
1
# echo 0 > /sys/class/rtc/rtc0/wakealarm
2
# date --date "Aug 16 , 2011 02:05:00" +%s > /sys/class/rtc/rtc0/wakealarm
You can convert the epoch time to readable format and check the alarm time is correct.
1
[root@h4ckb0x ragsagar]# cat /sys/class/rtc/rtc0/wakealarm
2
1313440500
3
[root@h4ckb0x ragsagar]# date -d @1313440500 +%F" "%T
4
2011-08-16 02:05:00
Note : The mythtv wiki about acpi wakeup says that setting the hardware clock after setting alarm will disable the alarm while most of the linux distribution sets hardware clock during shutdown. They suggest to disable hardware clock adjusting during shutdown. To do that in Archlinux set the HARDWARECLOCK=”" in /etc/rc.conf . But in my arch system the alarm was not working when i set HARDWARECLOCK=”" whereas it worked when i gave HARDWARECLOCK=”UTC”. So if the wake up alarm is not working do try after changing the value of this variable.
To start downloading when the system boots up, i added a cronjob to restart the router at 2:15 and 7:45 (to account the download in happy hours). Also added “transmission-gtk” to the gnome-session-properties. So that transmission will be launched on startup and downloading will be started.Posted 10-06-2012 at 02:17 PM by ted_chou12 -
by less than a day probably due to the hardware clock being incorrectly set
reload sound card
fuser -k /dev/dspPosted 09-28-2012 at 03:30 AM by ted_chou12 -
ntp server for vectorlinux
Not sure what you mean.
I tested now ntp with vector Linux and it seems to run ok.
For the occasional user ntpdate someserver is fine.
If you want to run the ntp daemon, I've found a good tutorial for slackware that is applicable to vector linux:
http://humanreadable.nfshost.com/sdeg/ntpd.htm
Went you install ntp package, with gslapt for example, the /etc/ntp.conf and /etc/rc.d/rc.ntpd files are created automatically. But you have to make sure rc.ntpd file is executable by running chmod+x /etc/rc.d/rc.ntpd
RegardsPosted 09-07-2012 at 11:52 AM by oldpenguin -
ibus input How TO
For launching ibus at startup, you must addCode:ibus-daemon -rxd
Posted 08-24-2012 at 06:16 AM by ted_chou12