Monday, June 7, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Speedtest can't find a server

Posted: 07 Jun 2021 10:15 AM PDT

Err:6 https://deb.parrot.sh/parrot rolling Release Could not handshake: An illegal parameter has been received. [IP: 51.178.92.105 443] Hit:7 https://download.sublimetext.com apt/stable/ InRelease Err:8 https://deb.parrot.sh/parrot rolling-security Release Could not handshake: An illegal parameter has been received. [IP: 51.178.92.105 443]

This is the error message produced when I try to run apt-get anything, it simply doesn't work. I have a 250 megabit fiber connection on which when I try to do apt-get this happens, but it seems to work just fine when I connect it to my phone's data connection and speedtest.net never ends up finding a server. Is there something wrong with my setup or is it my isp?

Can't execute sh file on embedded linux

Posted: 07 Jun 2021 10:12 AM PDT

I had no idea what firmware is this but it is a modified huawei firmware for a router. I needed a better firewall Domain name control since huawei only give 16 domain slots to be blocked. I can't afford a Pi right not but Ive managed to install openVPN Cli with custom Ui to it. No I a trying to install Pi hole on it and push all the files to /tmp in the router storage through ADB so I am guessing the firmware is sort of android Linux. Now I have access as well to Telnet but not ssh as its as modified firmware. I installed busybox as well successfully that provides me additional tools to it. I have no problems with installation that dont require root access except Pi hole which needed to have one.

tried using

root@android:/tmp/Pihole/install # sh basic-install.sh  basic-install.sh[104]: stty: not found  

I tried as well using adb shell sh as it works with my other sh scripts

~/Downloads  adb push Pihole /tmp/                                                                                                                                              ok | % | 11:48:46 PM   Pihole/: 125 files pushed, 0 skipped. 0.6 MB/s (754810 bytes in 1.141s)  ~/Downloads  adb shell sh /tmp/Pihole/install/basic-install.sh                                                                                                                  ok | % | 11:52:02 PM   /tmp/Pihole/install/basic-install.sh[104]: stty: not found  ~/Downloads  adb exec sh /tmp/Pihole/install/basic-install.sh    

This is the only info I have,

root@android:/tmp/Pihole/install # busybox uname -r  3.4.5  root@android:/tmp/Pihole/install # busybox uname                                                                                                                                  Linux    Linux version 3.4.5 (jenkins@localhost) (gcc version 4.6.x-google   20120106 (prerelease) (GCC) ) #1 PREEMPT Sun May 5 15:57:03 CST 2019  

tar creates an absolute sub directory within the compressed file

Posted: 07 Jun 2021 10:03 AM PDT

I would like to tar a folder using zstd. My folder contains subfolders a and b.

I am tar-ing using this:

tar --zstd -cvf /dest/path/to/output/archive.tar.zstd /full/path/to/src/folder

However, this causes archive.tar.zstd to contain /full/path/to/src/folder/ and instead of just folder

How do I fix this?

Help to improve a bash script to run jellyfish a multiple files in multiple directories

Posted: 07 Jun 2021 09:48 AM PDT

I have a directory tree like this:

Data/bacteria_splitted/GeneraName/chromosomes/*.fna.gz  

Where *fna.gz is a compressed fasta file:

>header  string sequence  

And each GeneraName/chromosomes directory has 1 to 1500 gzip fasta files and I want/need to run a tool called jellyfish (count subwords/n-grams/kmers in a input fasta file) in my data at these directories('Data/bacteria_splitted/GeneraName/chromosomes').

I want to put the results(mer_counts.jf) in

Results/GeneraName/chromosomes/kmers3(if i am count words with length 3)  

But jellyfish wont works in gzip files and then I need to decompress and pipe the file to jellyfish. The manual says I can use generators:

"How to read multiple files at once? Often, jellyfish can parse an input sequence file faster than gzip or fastq-dump (to parse SRA files) can output the sequence. This leads to many threads in jellyfish going partially unused. Jellyfish can be instructed to open multiple file at once. For example, to read two short read archive files simultaneously:

jellyfish count -F 2 <(fastq-dump -Z file1.sra) <(fastq-dump -Z file2.sra) ...  

Another way is to use "generators". First, create a file containing, one per line, commands to generate sequence. Then pass this file to jellyfish and the number of generators to run simultaneously. Jellyfish will spawn subprocesses running the commands passed and read their standard output for sequence. By default, the commands are run using the shell in the SHELL environment variable, and this can be changed by the -S switch. Multiple generators will be run simultaneously as specified by the -G switch. For example:

ls *.fasta.gz | xargs -n 1 echo gunzip -c > generators  jellyfish count -g generators -G 4 ...  

The first command created the command list into the 'generators' file, each command unzipping one FASTA file in the current directory. The second command runs jellyfish with 4 concurrent generators."

A generator is a file like this:

gunzip -c NC_009484.1_Acidiphilium_cryptum_JF_5_complete_genome.fna.gz  gunzip -c NC_015186.1_Acidiphilium_multivorum_AIU301_complete_genome.fna.gz  

I got something like this:

#!usr/bin/env bash    echo "Counting k-mers with JellyFish"    input='teste_name.txt'    while IFS= read -r line  do    echo "Counting kmers in $line genomes"    ls test/$line/chromosomes/*.fna.gz | xargs -n 1 echo gunzip -c > generators    jellyfish count -g generators -m 4 -s 100M -o $line'_4'.jf   done < "$input"  

But I need improve it because I have different number os fasta files to read for each genera and by my understanding, if I use generators I only count 1 fasta file by genera and not all what I need if I can anticipate the number of generators. Because the current count overwrite the previous count. There are any way I can solve this? I have not many experience with bash so... any help would be great. Thanks. Paulo

Duplicate/Export Permissions of entire file system

Posted: 07 Jun 2021 10:10 AM PDT

I was making a few modifications as root user on my server today and accidentally ran

chown -R user:user / instead of chown -R user:user .

I noticed quickly, but not fast enough to stop some of the directories from being changed.

I have a backup of the entire file system as a AWS EBS Snapshot, but it would take a long time to update everything to where my current system is.

The permissions haven't changed though.

Is there any way to copy the permissions of the entire file system from the backup and apply it to my current instance?

I'm running Amazons version of Linux.

Arch Linux's pacman not installing / updating packages (404 download error)

Posted: 07 Jun 2021 09:09 AM PDT

The whole thing started like a half a year ago, when pacman started throwing 404 errors on random package downloads, thus halting the whole package installation / update process. Executing pacman -Syyu, changing the mirrors in the /etc/pacman.d/mirrorlist never solved it, though it eventually went off in a couple of days, emerging on random other packages here and there.

Digging the issue, I've realized the requested package file was always version-wise older than its updated counterpart on the server (mirror): i.e. pacman requested mesa-21.1.1-1-x86_64.pkg.tar.zst as per recently updated official extra repository (namely pacman -Syy mesa) vs. mesa-21.1.2-1-x86_64.pkg.tar.zst located on the mirror, so the problem is that the repo is out-of-date rather than mirrors (vice versa would be totally understandable, as official repos are more or less centralized contrary to the decentralized mirror network), thus requesting the older version (already removed from the mirror in lieu of the more recent version) expectedly throws an 404 File Not Found error.

Is there any explanation to this issue, and is there any way to fix it?

Mounting parts of root filesystem read-only

Posted: 07 Jun 2021 10:11 AM PDT

I have an embedded device that I want to harden against data corruption due to unexpected power outages. It is a vanilla Ubuntu 20.04 LTS build with an app in a docker container on top, and I have established the handful of directories in the root filesystem that are touched by the app during normal operation.

My intention is to mount all but those directories read-only. Is it possible to mount some of the RFS in a RO partition and the rest in a separate RW partition, or is there a better approach to this?

Much appreciated in advance!

How to add copy paste feature for Kodi

Posted: 07 Jun 2021 08:54 AM PDT

ctrl + v doesn't paste on kodi linux, but I read somewhere it works on windows Kodi. Is it some sort of configuration problem that's why Kodi on my machine does't allow me to copy paste, if that's the case how do I fix it.

How to find out why Linux Mint won't connect to wifi?

Posted: 07 Jun 2021 08:47 AM PDT

On Linux Mint 20.1, how can I find out why can't I connect to the Wifi? I have wifi tethered from Android phone and I tried to connect as:

oem@oem-Aspire-E1-572:~$ nmcli d wifi list | grep Galaxy          0E:66:A8:6F:04:A1  Galaxy A419596            Infra  6     117 Mbit/s  100     ▂▄▆█  WPA2        oem@oem-Aspire-E1-572:~$ nmcli d wifi connect 0E:66:A8:6F:04:A1 password aaaa1111  Error: Connection activation failed: (53) The Wi-Fi network could not be found.  

I just edited the password to this post. But how can I debug why Mint won't find the network?

Regular expression does not work with Tellico (KDE5)

Posted: 07 Jun 2021 08:46 AM PDT

I installed latest version 3.4.1 of Tellico on Mageia-8. It does not work either when I use regex on Filter or use the feature Filter by Group (which automatically filters entries by group name with regular expression).

When I click on Filter icon to open Advanced Filter dialog, there's an error message:

kf.service.services: KServiceTypeTrader: serviceType "KRegExpEditor/KRegExpEditor" not found  

I installed kregexpeditor (from source) but the error is still there.

Curl - sending multipart-formdata json from file

Posted: 07 Jun 2021 08:15 AM PDT

I need to send a POST request with curl via command line. ContentType needs to be multipart/form-data

My payload is JSON, but it's really big, so I can't send it directly via curl (Argument list too long). Instead I need to require the content via a file

Without getting the content from a file everything works fine

curl "https://domain/endpoint.php" \   -F "jsondata={\"jsonkey\":\"jsonvalue\"};type=application/json"  

=>

array(1) {    ["jsondata"]=>    string(23) "{"jsonkey":"jsonvalue"}"  }  

But when I put the same (small test) json in a File and use that in my curl command. The result on the server side is different

curl "https://domain/endpoint.php" \   -F "jsondata=@curl_data3.json;type=application/json"  

=>

array(1) {    ["jsondata"]=>    array(5) {      ["name"]=>      string(15) "curl_data3.json"      ["type"]=>      string(16) "application/json"      ["tmp_name"]=>      string(14) "/tmp/php5k58m4"      ["error"]=>      int(0)      ["size"]=>      int(23)    }  }  

The file (curl_data3.json) just contains {"jsonkey":"jsonvalue"}

It seems like I'm just sending the file itself and not the content of the file :-/

How to remove \n in a string

Posted: 07 Jun 2021 10:12 AM PDT

I have a tab delimited text file where the 23rd column with string has \n in it which causes it to break to the next line.

I opened the text file in vi and enabled white space characters and I can see that the values in DESCR2 field have blank lines breaking the string.

The string is contained within tab delimited characters and I am trying to remove the \n and have the string concatenate to ABC 123 while still in 1 field .

I have tried tr -d '\n' < file.txt but that would make all the lines into 1 line. I want to only remove \n\n from that column.

I also tried sed 's/\n\n//' file.txt but it has no effect. I am able to search and replace \n\n in vi but I can't get the same result with sed.

Example:

\t"ABC\n  \n  123"\t  

Desired output:

\t"ABC 123"\t  

SSH script using file

Posted: 07 Jun 2021 09:17 AM PDT

I have been using the following script to remote into my systems:

#!/bin/bash  USERNAME=someUser  HOSTS="host1 host2 host3"  SCRIPT="pwd; ls"  for HOSTNAME in ${HOSTS} ; do      ssh -l ${USERNAME} ${HOSTNAME} "${SCRIPT}"  done  

It is becoming tedious to fill in the HOSTS=

I would like to read the hosts from a text file. How would I modify this script for that to work?

Thank you.

Make Linux bootable from laptop SD card not visible in the BIOS/UEFI Boot Options menu

Posted: 07 Jun 2021 09:34 AM PDT

I have an Acer Aspire R15 laptop, and I need to have a Linux run from the internal SD card slot. There is no SD card option available in the Boot Options menu.

I have Windows 10 installed on the main SSD, with ~100MB EFI partition (49MB free space). I have installed Arch Linux on SD card, chrooted into it, mounted EFI partition as /efi (leaving /boot on the SD card), added an UEFI record with grub-install --target=x86_64-efi --efi-directory /efi --boot-directory /boot --bootloader-id=ARCH-SD, but the problem is the SD card slot is not reachable on the early boot stage, so GRUB cannot reach /boot to load kernel and initram. I understand I need to have the kernel with "mmc_core mmc_block sdhci sdhci-pci" modules installed (via editing /etc/mkinitcpio.conf to MODULES="mmc_core mmc_block sdhci sdhci-pci" and running mkinitcpio -p linux), and I could have mounted EFI partition to /boot to have it reachable on the early stage, would the EFI partition free space be not that sparse.

So, the question is: is there a way to set up an .efi binary on the EFI partition to have it embedded a minimal kernel with SD card modules installed (disk space usage is the key), with its only purpose to make the SD card reachable, and chainload the full-featured kernel, initram etc on the SD card? Or is there any better other way? Doing so by the means of GRUB/efibootmgr/other_bootloader is preferred (rather than doing lower-level stuff that is error-prone and needs manual support on system updates). Repartitioning the main SSD, or using an USB SD adapter, or whatever similar, is not an option.

Update:

Solution #1: (yet seems more of a hack than a proper solution, other solutions welcome) As per @alex-stragies advice, I got it working by setting the boot folder on the Windows partition. The whole sequence is as follows:

  1. Mount the EFI partition to the /efi folder;
  2. Install ntfs-3g package for ntfs support, mount Windows partition to /mnt/Windows/: mount /dev/sdxY /mnt/Windows and make boot directory on it: mkdir /mnt/Windows/boot;
  3. bind the created folder to boot: mount --bind /mnt/Windows/boot /boot;
  4. (optional, yet recommended; needed for system / kernel updates only) add the above to /etc/fstab for persistence, there should be at least 4 mount records: /, /efi, /mnt/Windows, /boot (the latter bound to the boot folder on the previously mounted /mnt/Windows, add bind to its mount options);
  5. edit /etc/mkinitcpio.conf, section "HOOKS", to have block hook to be right after udev and before filesystems (the kernel modules mentioned above turned out unnecessary, SD/MMC card support is added by the block hook), then make an initrd update: mkinitcpio -p linux;
  6. make a GRUB record to UEFI: grub-install --target=x86_64-efi --efi-directory /efi --boot-directory /boot --bootloader-id=LINUX-SD;
  7. update GRUB config: grub-mkconfig -o /boot/grub/grub.cfg;
  8. reboot and choose the added LINUX-SD boot option (usually F8 or F12, or via BIOS/UEFI; might need an explicit boot record confirmation there).

That should be it. The boot chain is as follows: the UEFI shell executes grubx64.efi binary on the EFI partition, it follows the link to the Windows partition with the boot folder, GRUB loads the initrd environment with the kernel (SD card support becomes enabled at this point), the / (root) partition on the SD card is mounted, and the usual boot process continues thereafter.

How to get BIOS Device Name from Linux, same as Windows Device Manager format

Posted: 07 Jun 2021 08:19 AM PDT

My laptop has a display adapter and from Windows 10 I can see its BIOS Device Name from..

Device Manager > Display Adapters > Properties > Details > "BIOS device name"

And from there I get a pop up window saying something like: \_SB.PCI0.GFX0

How can I get that information if the same laptop is running Linux?

Cheers

Update

I need this information because I am building a hackintosh and need to build a SSDT to create a display backlight fix. I would like to help out at the Opencore project and provide a method to do this in Linux as currently the only method is to switch in to Windows and use Device Manager

I tried dmidecode and lspci and they don't give me a BIOS device name in the format that Windows does and is needed to create the SSDT.

I tried acpidump and it's getting me closer but the decompiled output has disassembly errors. It contains the string I am looking for \_SB.PCI0.GFX0 but I don't know how I would create a script to read that file and correlate it to my particular display adapter. e.g: Intel(R) HD Graphics 4000.

These are the commands I have tried so far with acpidump
I dump the ACPI tables from my system to a text file:

sudo acpidump -o acpidump.out  

Extract the binary ACPI tables from acpidump output

acpixtract -a acpidump.out  

I now have seven ssdt*.data files. I disassemble the binary table of ssdt1.dat into human source

iasl -d ssdt1.dat  

This gives a large .dsl file, this is just the first 60 lines of over a thousand..

/*   * Intel ACPI Component Architecture   * AML/ASL+ Disassembler version 20190509 (64-bit version)   * Copyright (c) 2000 - 2019 Intel Corporation   *    * Disassembling to symbolic ASL+ operators   *   * Disassembly of ssdt1.dat, Mon Jun  7 09:54:08 2021   *   * Original Table Header:   *     Signature        "SSDT"   *     Length           0x00001EED (7917)   *     Revision         0x01   *     Checksum         0x9C   *     OEM ID           "COMPAL"   *     OEM Table ID     "CRV ORB "   *     OEM Revision     0x00001000 (4096)   *     Compiler ID      "ACPI"   *     Compiler Version 0x00040000 (262144)   */  DefinitionBlock ("", "SSDT", 1, "COMPAL", "CRV ORB ", 0x00001000)  {      /*       * iASL Warning: There was 1 external control method found during       * disassembly, but only 0 were resolved (1 unresolved). Additional       * ACPI tables may be required to properly disassemble the code. This       * resulting disassembler output file may not compile because the       * disassembler did not know how many arguments to assign to the       * unresolved methods. Note: SSDTs can be dynamically loaded at       * runtime and may or may not be available via the host OS.       *       * To specify the tables needed to resolve external control method       * references, the -e option can be used to specify the filenames.       * Example iASL invocations:       *     iasl -e ssdt1.aml ssdt2.aml ssdt3.aml -d dsdt.aml       *     iasl -e dsdt.aml ssdt2.aml -d ssdt1.aml       *     iasl -e ssdt*.aml -d dsdt.aml       *       * In addition, the -fe option can be used to specify a file containing       * control method external declarations with the associated method       * argument counts. Each line of the file must be of the form:       *     External (<method pathname>, MethodObj, <argument count>)       * Invocation:       *     iasl -fe refs.txt -d dsdt.aml       *       * The following methods were unresolved and many not compile properly       * because the disassembler had to guess at the number of arguments       * required for each:       */      External (_SB_.PCI0.GFX0, DeviceObj)      External (_SB_.PCI0.GFX0._DOD, IntObj)      External (_SB_.PCI0.GFX0.AINT, MethodObj)    // Warning: Unknown method, guessing 2 arguments      External (_SB_.PCI0.GFX0.DD01._ADR, IntObj)      External (_SB_.PCI0.GFX0.DD01._DGS, IntObj)      External (_SB_.PCI0.GFX0.DD02._ADR, IntObj)      External (_SB_.PCI0.GFX0.DD02._BCL, IntObj)      External (_SB_.PCI0.GFX0.DD02._BCM, IntObj)      External (_SB_.PCI0.GFX0.DD02._BQC, IntObj)  

I think maybe I need to dissasemble ssdt1.dat such that I don't get disassembly errors and then is there a way to search that disassembled file for a device by a name like 'Intel(R) HD Graphics 4000' or that would at least be obvious this is the BIOS Device Name for my display adapter?

Maybe dmidecode, lspci and acpidump can all be combined into a script?

Any other help much appreciated.

Flex

How can I print the name of the book and author from a book text file by using command?

Posted: 07 Jun 2021 08:24 AM PDT

I have a book text file and I want to extract the name of the book and the author and use them to compose and print the following sentence in this particular format = " This is Peter Pan and it is written by James M. Barrie. "

I need to use awk or grep.

The text file I have starts like this:

The Project Gutenberg eBook of Peter Pan, by James M. Barrie    This eBook is for the use of anyone anywhere in the United States and  most other parts of the world at no cost and with almost no restrictions  whatsoever....  <more lines here>    Title: Peter Pan         Peter Pan and Wendy    Author: James M. Barrie    Release Date: July, 1991 [eBook #16]  [Most recently updated: February 15, 2021]  <hundreds of more lines>  

Asynchronous Child Process in FastCGI Script

Posted: 07 Jun 2021 09:09 AM PDT

Suppose that I want my server to sleep on any HTTP request to the path /sleep (i.e. http://hostname/sleep), but also send a complete response (HTTP 200) before sleeping.

Using nginx with FastCGI, I have configured the path in the nginx configuration:

location /sleep {      fastcgi_pass unix:/path/to/fcgiwrap.socket;      include fastcgi_params;      fastcgi_param SCRIPT_FILENAME /path/to/script.sh;  }  

This invokes the following script (/path/to/script.sh):

#!/bin/sh  # -*- coding: utf-8 -*-      echo "Content-Type: text/html"  echo      echo '<html><head><title>Sleep</title><meta charset="UTF-8" /></head><body>'  echo '<p>Sleep: '  date  echo '</p></body></html>'  sleep 1 && sudo systemctl suspend < /dev/null > /dev/null 2>&1 &  

Even though this will sleep the system, FastCGI will block until the child process completes, meaning that the web request will not complete before the system sleeps. So, how do I detach that final command from oversight by FastCGI so that the response completes, yet the command continues in the background, in this case ultimately to sleep the system?

Linux as a router to forward

Posted: 07 Jun 2021 08:27 AM PDT

How to make an OpenStack instance to forward route to another Linux machine which is not OpenStack instance but in the same LAN?

PC_A has 192.168.1.133/27.  PC_B has 192.168.1.140/27.    PC_A has 10.26.14.16/25 route.   PC_B has no 10.26.14.16/25 route.  

I want PC_B to reach 10.26.14.16/25 via PC_A.

Note: PC_B is an OpenStack Instance. It's private IP is 192.168.118.10/27 and public IP is 192.168.1.140/27.

  FW----------PC_A--------------PC_B            [192.168.1.133/27]    [192.168.1.140/27]  Public  IP of B                              [192.168.118.10/27] Private IP of B                

PC_A has 10.26.14.16/25 route. PC_B has no 10.26.14.16/25 route. I want PC_B to reach 10.26.14.16/25 via PC_A.

Docker:Error response from daemon: failed to create endpoint mvpn

Posted: 07 Jun 2021 08:27 AM PDT

Everything was working, but after creating a 1022 container suddenly I am getting this error:

docker: Error response from daemon: failed to create endpoint mvpn-1023 on network bridge: adding interface veth9e597b6 to bridge docker0 failed: exchange full  

How to make gtk button execute a terminal command when clicked using vala

Posted: 07 Jun 2021 10:04 AM PDT

How do I make it so when a gtk button is clicked it executes a terminal command using gtk3 and vala?

Can't read ~/.Xauthority after implementing NFS Kerberos mount

Posted: 07 Jun 2021 09:10 AM PDT

I'm using debian Buster where I have Kerberos, LDAP and SSSD working. I was monting my home directory to the client using NFS however I realized it was insecure. So I implemented kerberos mounting.

However when trying to login through lightdm on boot it goes black and boots me back to the lightdm login screen with no error. I found this in /var/log/syslog

Error reading existing Xauthority: Failed to open file "/home/ben/.Xauthority": Permission denied  Error writing X authority: Failed to open X authority /home/ben/.Xauthority: Permission denied  

I logged in as root from tty1 then did su ben, ran kinit and it seems I can't read/write to any file in my home directory that is owned by me only ones with read set on other.

Here is my /etc/exports from my server.

/home/ 192.168.16.0/24(rw,sec=krb5p,sync,fsid=0,crossmnt,no_subtree_check)  

Here is my /etc/fstab

192.168.16.20:/home /home nfs defaults,exec 0 0  

Clients keytab file as requested.

host/client@DOMAIN  host/client@DOMAIN  nfs/client@DOMAIN  nfs/client@DOMAIN  

NFS principals in Kadmin on server

nfs/server@DOMAIN  nfs/client@DOMAIN  

I've been debugging this for sometime and I'm really struggling to get anywhere. The mount looks like its mounted correctly. My user has a kerberos ticket. The permissions look perfect and the I can read/write with the same user just fine on the server.

Please let me know if you need any more information to help fix this issue.

Update I found this in the auth log of the server when I try to login on the client.

NEEDED_PREAUTH: ben@DOMAIN for krbtgt/DOMAIN@DOMAIN, Additional pre-authentication required  ISSUE: authtime 1622558991, etypes {rep=18 tkt=18 ses=18}, ben@DOMAIN for krbtgt/DOMAIN@DOMAIN  

However I don't know why as I'm running ntp on the server and have ntpdate on the client pointing to the server. Also if I run watch -n 1 date -R on the client and server, place the terminal windows side by side they show the exact same time. This error also appears when authenticating with kinit so I'm not sure if it's related to the issue.

how to use ipu3-cio camera in linux

Posted: 07 Jun 2021 09:24 AM PDT

I have a Thinkpad X1 Tablet (gen 2) with a front and back integrated camera running Ubuntu 19:10. The cameras appear to be detected:

$ v4l-info

v4l2 device info [/dev/video0] ###

general info VIDIOC_QUERYCAP driver : "ipu3-cio2" card : "Intel IPU3 CIO2" bus_info : "PCI:0000:00:14.3" version : 5.3.18 capabilities : 0x84201000 [?,?,STREAMING,(null)]

standards

inputs VIDIOC_ENUMINPUT(0) index : 0 name : "camera" type : CAMERA audioset : 0 tuner : 0 std : 0x0 [] status : 0x0 []

controls

When I start cheese I have 4 cameras labeled "ipu3-imgu". When I run guvcview I have 10 devices labeled "ipu3-imgu" which the system puts at /dev/video0-9 and four devices labeled "Intel IPU3 CIO2" which are /dev/video10-13.

But none of these work. Does anyone have a laptop with this kind of camera running Linux?

Does anyone know of a resource on debugging this kind of camera in Linux?

Linux backup utility for incremental backups

Posted: 07 Jun 2021 09:27 AM PDT

I'm looking for a backup utility with incremental backups, but in a more complicated way.

I tried rsync, but it doesn't seem to be able to do what I want, or more likely, I don't know how to make it do that.

So this is an example of what I want to achieve with it. I have the following files:

testdir  ├── picture1  ├── randomfile1  ├── randomfile2  └── textfile1  

I want to run the backup utility and basically create an archive (or a tarball) of all of these files in a different directory:

$ mystery-command testdir/ testbak  testbak  └── 2020-02-16--05-10-45--testdir.tar  

Now, let's say the following day, I add a file, such that my structure looks like:

testdir  ├── picture1  ├── randomfile1  ├── randomfile2  ├── randomfile3  └── textfile1  

Now when I run the mystery command, I will get another tarball for that day:

$ mystery-command testdir/ testbak  testbak  ├── 2020-02-16--05-10-45--testdir.tar  └── 2020-02-17--03-24-16--testdir.tar  

Here's the kicker: I want the backup utility to detect the fact that picture1, randomfile1, randomfile2 and textfile1 have not been changed since last backup, and only backup the new/changed files, which in this case is randomfile3, such that:

tester@raspberrypi:~ $ tar -tf testbak/2020-02-16--05-10-45--testdir.tar   testdir/  testdir/randomfile1  testdir/textfile1  testdir/randomfile2  testdir/picture1  tester@raspberrypi:~ $ tar -tf testbak/2020-02-17--03-24-16--testdir.tar   testdir/randomfile3  

So as a last example, let's say the next day I changed textfile1, and added picture2 and picture3:

$ mystery-command testdir/ testbak  testbak/  ├── 2020-02-16--05-10-45--testdir.tar  ├── 2020-02-17--03-24-16--testdir.tar  └── 2020-02-18--01-54-41--testdir.tar  tester@raspberrypi:~ $ tar -tf testbak/2020-02-16--05-10-45--testdir.tar   testdir/  testdir/randomfile1  testdir/textfile1  testdir/randomfile2  testdir/picture1  tester@raspberrypi:~ $ tar -tf testbak/2020-02-17--03-24-16--testdir.tar   testdir/randomfile3  tester@raspberrypi:~ $ tar -tf testbak/2020-02-18--01-54-41--testdir.tar   testdir/textfile1  testdir/picture2  testdir/picture3  

With this system, I would save space by only backing up the incremental changes between each backup (with obviously the master backup that has all the initial files), and I would have backups of the incremental changes, so for example if I made a change on day 2, and changed the same thing again on day 3, I can still get the file with the change from day 2, but before the change from day 3.

I think it's kinda like how GitHub works :)

I know I could probably create a script that runs a diff and then selects the files to backup based on the result (or more efficiently, just get a checksum and compare), but I want to know if there's any utility that can do this a tad easier :)

Failed to Raise Network interfaces Debian 9 Fresh

Posted: 07 Jun 2021 10:03 AM PDT

i have a Debian 9 64bit server and fresh installed. Just noticed that the Networking manager is not working properly since my Webinterface kinda doesnt like that.

root@mail:/etc/network/interfaces.d# ifup -v eth0    ifup: configuring interface eth0=eth0 (inet) /bin/run-parts  --exit-on-error --verbose /etc/network/if-pre-up.d run-parts: executing /etc/network/if-pre-up.d/bridge run-parts: executing /etc/network/if-pre-up.d/wpasupplicant /bin/ip addr add  173.212.217.24/255.255.255.0 broadcast 173.212.217.255           dev eth0 label eth0 RTNETLINK answers: File exists ifup: failed to bring up eth0  

Any idea?

How to find IP address from mac address by spoofed request to DHCP server?

Posted: 07 Jun 2021 10:16 AM PDT

EDIT the selected answer solves the broader problem that I was trying to solve, which is "Given selected mac addresses, how do I efficiently find each mac addresses corresponding IP address on the local network?".

ORIGINAL: I need to write a program to find out the IP addresses of machines on my local network.

I have the mac address of the machines.

Given that DHCP servers return the same IP address for a given mac address, would it be possible somehow to send a DHCP request to the server, insert the known mac address, and capture the response, which presumably has the correct IP address in it for that mac address?

FURTHER INFORMATION: I tried arpwatch and found it to be unreliable. Much more satisfactory was addrwatch https://github.com/fln/addrwatch

Window manager with wayland?

Posted: 07 Jun 2021 09:01 AM PDT

I was wondering if there is a up-to-date list with the common window managers and their status with Wayland, i.e. what is working, what is not, and how usable they are (especially Gnome and KDE). I only know that there were some problems with KDE and Wayland in november (KDE 5.5), but I do not know the current status both for KDE and Gnome. Is there a list for both (and others, not so well-known?)?

Convert video to exactly the same format as another video

Posted: 07 Jun 2021 08:55 AM PDT

Suppose I have two video files A and B.

Now I want to convert A to the same format (i.e. same container, same audio and video codec), same bitrate, size etc. as B.

Is there a way to do this automatically (i.e. without extracting the information manually and giving it manually as input parameters) using a command line tool (or even a GUI tool)?

How to remap keyboard shortcut for context menu in Xubuntu

Posted: 07 Jun 2021 09:57 AM PDT

I'm using Xubuntu 14.04 and typing on a keyboard without "Windows" and "context menu" keys (Unicomp Model M). Currently, I get context menu (mouse right-click) with Shift+F10, but when touch-typing, I often miss F10 key. I wanted to create keyboard shortcut (Alt+F1) for context menu, so when I opened keyboard settings in Xfce I expected to find definition of that shortcut (like I did for Whisker Menu, which I remapped to Alt+`), but it wasn't there.

Is it possible to run pure GNU?

Posted: 07 Jun 2021 09:11 AM PDT

On the GNU Project webpage, there's a subsection called "All GNU packages" which lists the various software in the GNU project.

Are there any GNU distributions which use only these packages -- i.e. a "pure" GNU operating system that runs on only GNU packages?

I'm not particularly interested on whether this would be a practical operating system, just if it's theoretically possible to run GNU Hurd with purely the GNU packages. If not, what kind of software must still be implemented to achieve this goal (i.e. what's missing)?

If GNU Hurd is the limiting factor, than if an exception is made for the kernel, would a pure GNU OS be possible using the Linux kernel?

How can I change what's displayed at a login shell?

Posted: 07 Jun 2021 08:34 AM PDT

I'm getting more familiar with tweaking the way things look in a shell via the prompt (.bashrc), but I'm now trying to change the initial stuff displayed when I first log in. On my EC2 instance, this is what I see when I log in:

         __|  __|_  )  Fedora 8           _|  (     /    32-bit          ___|\___|___|        Welcome to:         Wowza Media Server 2 for Amazon EC2          Version: 2.0.0.08  

On my home Mint computer, here's what I see when I log in:

Welcome to Linux Mint 11 Katya (GNU/Linux 2.6.38-8-generic x86_64)    Welcome to Linux Mint  * Documentation:  http://www.linuxmint.com    Last login: Tue Jun 21 17:44:05 2011  

Where is this defined? How can I tweak it for some mad ASCII art ACTION?

No comments:

Post a Comment