Sunday, May 2, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


How can I determine what (potentially) modprobe configuration is required to make a Rodecaster Pro work?

Posted: 02 May 2021 10:36 AM PDT

I want to use a Rodecaster Pro mixer to run my audio. It runs fine on my laptop, but not on my desktop (both running Ubuntu 20.04 with kernel 5.8.18).

On my desktop, the input from microphones are working, but sound output is played very slow and distorted as if sampled down - interestingly media playback e.g. from YouTube is slowed down on my screen as well. Never seen something like that before :-)

I have more details down below, but the most likely hint that I have so far comes from running dmesg -w on both my machines when plugging in the Rodecaster. The output is:

desktop

[ 1584.269734] usb 1-4: new high-speed USB device number 7 using xhci_hcd  [ 1584.516203] usb 1-4: New USB device found, idVendor=19f7, idProduct=0011, bcdDevice= 2.11  [ 1584.516208] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3  [ 1584.516210] usb 1-4: Product: RODECaster Pro  [ 1584.516212] usb 1-4: Manufacturer: RODE Microphones  [ 1584.516213] usb 1-4: SerialNumber: 00000000001A  [ 1584.538745] hid-generic 0003:19F7:0011.0007: hiddev3,hidraw6: USB HID v1.10 Device [RODE Microphones RODECaster Pro] on usb-0000:16:00.0-4/input0  [ 1584.553970] usb 1-4: parse_audio_format_rates_v2v3(): unable to retrieve number of sample rates: set it to a predefined value (clock 1).  [ 1584.580768] usb 1-4: parse_audio_format_rates_v2v3(): unable to retrieve number of sample rates: set it to a predefined value (clock 1).  

laptop

[ 122.098370] usb 2-2: new high-speed USB device number 4 using xhci_hcd  [ 122.246967] usb 2-2: New USB device found, idVendor=19f7, idProduct=0011, bcdDevice= 2.11  [ 122.246973] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3  [ 122.246976] usb 2-2: Product: RODECaster Pro  [ 122.246979] usb 2-2: Manufacturer: RODE Microphones  [ 122.246982] usb 2-2: SerialNumber: 00000000001A  [ 122.285806] hid: raw HID events driver (C) Jiri Kosina  [ 122.301802] usb 2-2: parse_audio_format_rates_v2v3(): unable to retrieve number of sample rates: set it to a predefined value (clock 1).  [ 122.303041] usb 2-2: parse_audio_format_rates_v2v3(): unable to retrieve number of sample rates: set it to a predefined value (clock 1).  [ 122.304413] usbcore: registered new interface driver snd-usb-audio  [ 122.307003] usbcore: registered new interface driver usbhid  [ 122.307005] usbhid: USB HID core driver  [ 122.348391] hid-generic 0003:19F7:0011.0001: hiddev0,hidraw0: USB HID v1.10 Device [RODE Microphones RODECaster Pro] on usb-0000:00:14.0-2/input0  

So, as far as I understand, on my laptop some interface driver is loaded that does the job, right? But not on my desktop. How can I further check what might be different on both platforms to determine what I can do to make the Rodecaster Pro work on my desktop, too? I have learned something about how sound works on Linux already - and I am willing to learn more :-D I assume it might be some form of modprobe configuration problem?

More details

  • I have already tried to use different USB ports, 2.0 and 3.0, etc. Didn't make a difference.

  • I have disabled other audio devices via pavucontrol - to no avail.

  • I have disabled the motherboard's audio card and I have removed all other audio output interfaces physically - removed a Soundblaster and my graphics card that could output audio via HDMI. Didn't make a difference.

  • I have booted a plain Ubuntu 21.04 from a pen drive (with not other audio hardware inside) - didn't work.

  • I killed pulse audio (pulseaudio -k) and ran a wav sample using aplay. Sound is still distorted.

  • The Rodecaster Pro registers as a USB HID device, but does not support the UAC2_CS_RANGE usb function call. That's why special handling was introduced to the Linux kernal (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/sound/usb/format.c?h=v5.8#n412), but that's fine - well, listed in pulse audio at least.

  • My Rodecaster Pro runs firmware 2.1.1, but that's should not be relevant, since it's working on my laptop.

How do I install a package of json-c to a “standard prefix”?

Posted: 02 May 2021 10:33 AM PDT

OS : OEL 7.7 I'm currently trying to install the latest tpm2-tss, It's installed, but as usual the version is very old (1.4.0-3 compared to 3.0.1) Running ./configure as per the "INSTALL" document, I found some problems below even after installing the json-c pkg .

configure: error: Package requirements (json-c) were not met:

No package 'json-c' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables JSONC_CFLAGS and JSONC_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

For reference :

#yum install json-c Loaded plugins: ulninfo Package json-c-0.11-4.el7_0.x86_64 already installed and latest version Nothing to do

rpm -qa | grep json-c

json-c-0.11-4.el7_0.i686 json-c-devel-0.11-4.el7_0.i686 json-c-0.11-4.el7_0.x86_64

AWK print the number of calumn and "ERROR" if it has an empty field and the numer of column and "CORRECT" if it has no empty fileds

Posted: 02 May 2021 10:07 AM PDT

I have a csv that looks as follows:

id,tester,company,chief,previous_test,test,date,result,cost  6582983b-61d4-4371-912d-bbc76bb8208b,Audrey Feest,Pagac-Gorczany,Claudine Moakson,18/02/2019,Passwords,20/05/2020,none,£11897.96  a9f7da04-28cc-4d79-81f2-f911fa23d6ca,Zachery Howe,Crooks Inc,Ranique Dawks,15/07/2018,Eavesdropping,08/17/2020,normal,£2567.87  b751eb22-0cbb-48dd-98a1-2064014441aa,Audrey Feest,Graham-Armstrong and Becker,Peyter Gullen,30/06/2018,Passwords,30/11/2020,none,£14271.56  

Using awk I want to print the number of all the rows and a comment "CORRECT" if the column has no empty fields and "ERROR" if the column contains one or more empty fields.

I have this:

cat test_results.csv | awk -F"," '{for(i=1;i<=NF;i++) if($i=="") print NR, "ERROR"; else print NR, "CORRECTO"}'  1 CORRECT  1 ERROR  1 CORRECT  2 CORRECT  2 CORRECT  2 ERROR  

Unfortunately this command searches for every null space in a row and gives back the row number for every empty and correct field it encounters.

How can I change it to get single number of each column with a comment "CORRECT" if there are no empty fields in a column or ERROR if there is one or more empty filed in it?

Desired output:

1 ERROR  2 ERROR  3 CORRECT  4 CORRECT  5 ERROR   

awk: add two columns to csv that are the multiplication of a constant by the last column

Posted: 02 May 2021 10:21 AM PDT

I am trying to add two new columns to a csv file, that contain the multiplication of the last column to a constant. This last column is formed by the pound symbol and followed by a number.

Input:

id,tester,company,chief,previous_test,test,date,result,cost  6582983b-61d4-4371-912d-bbc76bb8208b,Audrey Feest,Pagac-Gorczany,Claudine Moakson,18/02/2019,Passwords,20/05/2020,none,£11897.96  

Expected Output:

id,tester,company,chief,previous_test,test,date,result,cost,day,euro,dollar  6582983b-61d4-4371-912d-bbc76bb8208b,Audrey Feest,Pagac-Gorczany,Claudine Moakson,18/02/2019,Passwords,20/05/2020,none,¬£11897.96,13682.65€,$16538.16  

What I've done so far is take a substring of this column and create another two with it, but all I get is two copies of the last column without the pound symbol:

awk -F, -v OFS="," 'NR==1 { print $0,"euro,dollar"; next }  { w = substr($9, 2);    u = substr($9, 2);    print $0, w, u }' file.csv  

All I have to do now is multiply those 2 columns by a constant each (1.15 and 1.39 respectively) and add the symbols to each column (€ and $), but I get stuck using the print command at the end.

How to propertly permanently rename network interface in LXLE?

Posted: 02 May 2021 09:38 AM PDT

I have a LXLE 18.04 LTS and wlan adapter with name wlp7s0b1, which I'm not comfortable with.

Recommended by all /etc/udev/rules.d/70-persistent-net.rules is not present in my installation, although udev is. /lib/udev/rules.d/75-persistent-net-generator.rules is successfully missing from my distribution and udevadm trigger --action=add doesn't change anything.

I successfully created a link: ln -s /lib/udev/rules.d/80-net-setup-link.rules /etc/udev/rules.d/80-net-setup-link.rules, but there was no list devices therefore did not help.

/etc/network/interfaces in my installation does not contain anything useful, as a netplan.

During my attempts to find at least something, I came across the output of the sudo udevadm info /sys/class/net/wlp7s0b1 command:

P: /devices/pci0000:00/0000:00:15.3/0000:07:00.0/bcma0:1/net/wlp7s0b1  E: DEVPATH=/devices/pci0000:00/0000:00:15.3/0000:07:00.0/bcma0:1/net/wlp7s0b1  E: DEVTYPE=wlan  E: ID_BUS=pci  E: ID_MM_CANDIDATE=1  E: ID_MODEL_FROM_DATABASE=BCM4313 802.11bgn Wireless Network Adapter  E: ID_MODEL_ID=0x4727  E: ID_NET_NAME_MAC=wlx60d8190f1e84  E: ID_NET_NAME_PATH=wlp7s0b1  E: ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.  E: ID_PATH=pci-0000:07:00.0-bcma-1  E: ID_PATH_TAG=pci-0000_07_00_0-bcma-1  E: ID_PCI_CLASS_FROM_DATABASE=Network controller  E: ID_PCI_SUBCLASS_FROM_DATABASE=Network controller  E: ID_VENDOR_FROM_DATABASE=Broadcom Limited  E: ID_VENDOR_ID=0x14e4  E: IFINDEX=3  E: INTERFACE=wlp7s0b1  E: SUBSYSTEM=net  E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/wlp7s0b1  E: TAGS=:systemd:  E: USEC_INITIALIZED=37531623  

In this output, I am very interested in pci-0000:07:00.0-bcma-1. I believe this can be used as a unique identifier instead of a MAC. I would not like to be tied to MAC, since it can be changed with utilities like macchanger, and then, probably, the old name can return. Or is there a binding to the permanent MAC embedded in the chip?

How do I permanently change the name of an interface based on its ID_PATH using udev? Is this renaming method correct?

What is ExecStart=?

Posted: 02 May 2021 09:35 AM PDT

I try to understand what is Execstart= exactly. I have checked some documentation.

Here, it says:

ExecStart=: This specifies the full path and the arguments of the command to be executed to start the process. This may only be specified once (except for "oneshot" services). If the path to the command is preceded by a dash "-" character, non-zero exit statuses will be accepted without marking the unit activation as failed.

For a kube-apiserver service of K8s, i have found this:

ExecStart=/usr/local/bin/kube-apiserver  --advertise-address=${INTERNAL_IP}  --allow-privileged=true  --apiserver-count=3  --authorization-mode=Node,RBAC  --bind-address=0.0.0.0  --enable-swagger-ui=true  --etcd-servers=https://127.0.0.1:2379  --event-ttl=1h  --runtime-config=api/all  --service-cluster-ip-range=10.32.0.0/24  --service-node-port-range=30000-32767  --v=2  

So where do we declare ExecStart ? Inside an executable? Or in a config file of a service?

Mapping the Linux keyboard to match MacOS keys

Posted: 02 May 2021 09:15 AM PDT

I use a Linux PC at work but a MacBook at home, and the constant switch between keyboard layouts is bothersome. I would love a way to "remap" the keys of my Ubuntu computer so that they would function in the same way as my MacBook and feel "natural" to my fingers.

Basically, I would like the Left Alt key to function as a Ctrl key, the Win key as an Option key, and the Ctrl key as an Alt key. I'd also like the Caps Lock to toggle language input settings if possible.

custom kernel module not being compiled

Posted: 02 May 2021 08:42 AM PDT

I'm playing with linux kernel, trying to write some modules. I added them in the linux sources, under /drivers/my_module/my_module.c. (I'm using kernel 4.9, on debian 9, make 4.1)

Here it is:

#include <linux/module.h>    __init static int my_module_init(void)  {      pr_info("Hello World!\n");      return 0;  }    __exit static void my_module_exit(void)  {      return;  }    module_init(my_module_init);  module_exit(my_module_exit);  

I wrote a simple Kconfig and Makefile : Makefile: obj-$(CONFIG_MY_MODULE) += my_module.o Kconfig:

menu "My first module"    config MY_MODULE          bool "My module"          help          The dumbest kernel module you could find on the market !    endmenu  

I added it in the Kconfig and Makefile in /drivers :

Kconfig : source "drivers/my_module/Kconfig"

Makefile: obj-$(CONFIG_MY_MODULE) += my_module/

I thought, so far so good, however, when i add my CONFIG_MY_MODULE=y in the .config file of linux, it is not compiled when i run make (it does no appear in the compile output, and nothing appears in the traces when booting the kernel), and i can't understand why. My guess is that it has to do with the variable not being defined in the drivers/Makefile, but it seems that other modules uses the same strategy, and they are compiled with the kernel.

So i guess i'm missing something, but i can't really figure out what.

Linux Kernel vs Distro & Installation process and requirements (ARM vs x86) - How It Actually Works?

Posted: 02 May 2021 08:34 AM PDT

Hi everyone (from noobs to geeks and SU!),

I am one of the beginners that can't sleep at night if I didn't get it right, so here's my questions about Linux and the whole installation process and how it works:

We all know that OS's require processing unit and storage to properly function. We all understand that processing unit includes various components depending on the type on computer it defines. We can obviously name the core components, like Processor, RAM, mother-board and storage, and most of us understand the reason those exist and we all can imagine in a way, the way those work with each other so they bound into this amazing machine we all use in way or another.

What is annoying these days is that it's hard to understand if the OS is built for the HW or vice-versa.

I have hardly tried to understand why can't we install what-ever OS on what-ever machine. Like all machines are built on the same architecture (mother-board, CPU, RAM, storage and other modules) but you can hardly install Linux on any machine out there, not to mention Windows or Mac OS.

Is there a chance we can get a clear answer why is this so unachievable?

I am using Linux as the main OS, and this has happened since the day I first installed it. It took me not more than 6 months to delete Win10 from the dual-boot grub menu. I am so grateful to Linux community and I want to thank all developers to make Linux happen, and I am confident that if it stays the way it is at the moment it will easily dominate the OS-usage charts of the future. It might lack some user-friendliness in some ways but still is so amazing that we will wait for the dev's to make all our requirements possible.

But how does it work... Actually the reason I am writing all these sentimental sentences is to be able to understand how does Linux actually works. For example I use an AMD based ultrabook that has an CPU that is able to run any OS. The thing that catches me is that I would love to install Linux on my tablet as well. I use a Galaxy Tab S4 (with a keyboard and a mouse). Yes, DEX is amazing, but standing in front of it today, I was wondering "THIS THING COULD BE A LINUX MACHINE!" And I started shoveling for ways to install Linux on it. So far I did install an Ubuntu version of Linux that runs from terminal. That is amazing but still... Is it that impossible to install a full fledged Linux distro on a machine that has an ARM based CPU, RAM and storage?

Please let me understand why is this impossible and if there is any work-around's to make it possible! And if there is someone able to explain properly why Linux cannot be installed on this machine in an easy manner, as if it is installed on a laptop or desktop.

Kind regards, and thank you for your time and patience with the noobs! :)

LVM + how to remove physical volume

Posted: 02 May 2021 09:47 AM PDT

from lsblk we have the following:

NAME               MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT  sda                  8:0    0 372.6G  0 disk  ├─sda1               8:1    0   500M  0 part  /boot  └─sda2               8:2    0 372.1G  0 part    ├─vger-root      253:0    0    50G  0 lvm   /    ├─vger-swap      253:1    0     4G  0 lvm   [SWAP]    └─vger-lv_var    253:2    0 318.1G  0 lvm   /var  .  .  .    sdr                 65:16   0 372.6G  0 disk  ├─sdr1              65:17   0   512M  0 part  └─sdr2              65:18   0 372.1G  0 part    └─qw127            9:127  0   372G  0 raid1      ├─vger-lv_swap 253:3    0    16G  0 lvm      └─vger-lv_root 253:4    0   100G  0 lvm  

this below configuration defined the raid1 mirror software raid1

and from pvs we have the following

 PV         VG   Fmt  Attr PSize   PFree    /dev/qw127 vger lvm2 a--  371.98g 155.98g    /dev/sda2  vger lvm2 a--  372.12g  60.00m  

is it possible to remove the PV - /dev/qw127 vger lvm2 a-- 371.98g 155.98g ?

so we get only this from pvs

 PV         VG   Fmt  Attr PSize   PFree    /dev/sda2  vger lvm2 a--  372.12g  60.00m  

when we do:

 pvmove /dev/qw127    Physical Volume "/dev/qw127" not found in Volume Group "vger"    vgreduce vger /dev/qw127    Failed to find physical volume "/dev/qw127".  

we get the above failed

How to redirect all outgoing 21/22 port traffic via proxy

Posted: 02 May 2021 08:02 AM PDT

I need to setup some chain for ssh connections. How i can proxy all outgoing ssh/ftp traffic to my local proxy port with iptables?

Linux IO concept of non-controlling terminal

Posted: 02 May 2021 07:56 AM PDT

When one runs bash as init bash doesn't have a controlling terminal.

But it still can write to and read from the terminal configured in the console parameter in the kernel command line.

Then if I run busybox login I suppose it starts a session and acquires a controlling terminal because backspace starts working and I can exit with CTRL+C. And it's still using the same terminal that the bash without a controlling terminal used (ttyAMA0 UART in my case).

So I suppose besides the concept of controlling terminal there should be another concept of the terminal that is used by a process when there is no controlling terminal.

I'm trying to find the name of the concept to read up on it.

Frequent Disconnects on Linux

Posted: 02 May 2021 09:58 AM PDT

I have problems with my internet connection on a Debian Linux Distribution (Zorin OS). I am connected to the router with an ethernet cable.

They do not occur with windows on the same hardware and do not happen from a specific trigger as far as I can tell but seem random. I suspect that every now and then the connection to the router is lost for a second or so. These are the problems that manifest:

  • Downloads will almost never finish on the first try. I usually need to restart them every 2-3 times because there was a "network error"
  • Chrome regularly (almost every second page I open) shows an error "ERR_NETWORK_CHANGED". It always works after a reload.
  • SSE connections are always dropped after a few seconds even though the reconnect always works flawlessly
  • ssh-connections to my server are constantly dropped with the error packet_write_wait: Connection to myserver-ip port 22: Broken pipe

Unfortunately I have no idea how to further debug or fix this problem since I can't even consistently replicate it.

Strange empty bash_history-*.tmp files in my $HOME folder

Posted: 02 May 2021 07:58 AM PDT

There are exactly 169 empty .bash_history-*.tmp in my home folder that were created on the same day (April 16 2021) without my knowledge. Files have only read and write permission for the owner. I am not sure what made this to happen. It has never happened in 5 years of my Linux journey(Both desktop and servers). Even stranger thing is that my default shell is not bash but its zsh. It would be great if someone could help me figure out what actually happened(if possible) or has it happened to someone else before? thank you in advance. Here it is

.-(~)(user@host)  `-->> find . -name '.*.tmp'  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-01407.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-01810.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-02487.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-03675.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08255.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08260.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08283.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08326.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08434.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08450.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08550.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08581.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08649.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08676.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08683.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08697.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08698.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08712.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08717.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08742.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08743.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08819.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08841.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08878.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08884.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08904.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08914.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-08962.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09060.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09116.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09157.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09201.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09212.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09228.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09247.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09248.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09265.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09274.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09283.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09331.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09366.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09397.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09445.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09501.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09507.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09548.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09597.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09632.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09701.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09760.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09904.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-09992.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-10059.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-10158.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-10166.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-10170.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-10320.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-10536.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-10594.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-10631.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-10714.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-10753.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-11127.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-11189.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-11494.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-11514.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-11697.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-11774.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-11827.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-11973.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12002.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12266.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12316.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12331.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12357.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12377.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12393.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12399.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12400.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12405.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12413.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12417.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12435.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12475.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12513.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12563.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12644.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12648.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12656.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12743.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12779.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12801.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12803.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12817.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12868.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-12971.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13005.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13013.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13020.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13033.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13042.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13047.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13065.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13074.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13089.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13090.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13092.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13094.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13097.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13099.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13145.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13162.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13184.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13202.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13203.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13206.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13208.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13218.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13219.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13220.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13250.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13313.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13316.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13320.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13322.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13323.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13341.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13360.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13388.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13489.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13530.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13566.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13575.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13576.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13630.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13640.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13675.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-13717.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14153.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14156.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14167.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14204.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14254.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14256.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14265.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14267.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14331.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14332.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14359.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14368.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14693.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14792.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14922.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14923.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14928.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14931.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14933.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14943.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14947.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14951.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14955.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-14968.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-30961.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-31005.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-31110.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-31142.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-32057.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-32358.tmp  -rw-------   1 user user   0 Apr 16 17:40 .bash_history-32434.tmp  

FYI: someone helped me find a similar post on archlinuxforum but it doesn't answer my question.

lm_sensors not reporting individual core temps on AM4/B450

Posted: 02 May 2021 07:46 AM PDT

This is the output from sensors on my machine, Ryzen 5 3600X on a Biostar B450MH:

amdgpu-pci-0a00  Adapter: PCI adapter  vddgfx:      725.00 mV  fan1:           0 RPM  (min =    0 RPM, max = 3630 RPM)  edge:         +45.0°C  (crit = +100.0°C, hyst = -273.1°C)                         (emerg = +105.0°C)  junction:     +45.0°C  (crit = +110.0°C, hyst = -273.1°C)                         (emerg = +115.0°C)  mem:          +46.0°C  (crit = +105.0°C, hyst = -273.1°C)                         (emerg = +110.0°C)  power1:       10.00 W  (cap = 190.00 W)    acpitz-acpi-0  Adapter: ACPI interface  temp1:        +38.0°C  (crit = +127.0°C)    k10temp-pci-00c3  Adapter: PCI adapter  Tctl:         +38.1°C  Tdie:         +38.1°C  Tccd1:        +39.5°C  

I ran sensors-detect prior to this and allowed all checks to be made. Shouldn't k10temp be reporting individual core temperatures like coretemp for Intel CPUs?

Elapsed time counting

Posted: 02 May 2021 09:28 AM PDT

I have a small script (basically very easy this is the first I wrote) and likes to know the elapsed time, how long it takes when it is finished.

Is it possible to count the difference between the two variable? ($SSS and $EEE), I did try with the $SECONDS as well but it gives 0 as a result.

Probably a different way needs to be used to make this work, so I need need regarding how can I solve this.

My script:

echo "****************************************************************************"  SECONDS=0  #!/bin/bash  SSS=$(date '+%Y.%m.%d. @ %H:%M:%S')  echo "Start time: ${SSS}"  echo ""  echo "Starting update and upgrade"  echo "==================================="  sudo apt-get update && sudo apt-get upgrade -y  echo ""  echo "Starting autoremove"  echo "==================================="  sudo apt-get autoremove -y  echo ""  echo "Starting autoclean"  echo "==================================="  sudo apt-get autoclean -y  echo ""  echo "Check for Pi-Hole update"  echo "==================================="  sudo pihole -up  echo ""  echo "Starting gravity update for Pi-Hole"  echo "==================================="  sudo pihole -g  echo ""  EEE=$(date '+%Y.%m.%d. @ %H:%M:%S')  echo "Start time: ${SSS}"  echo "End   time: ${EEE}"  duration=$SECONDS  echo "Elapsed time $(($duration / 60)) minutes and $(($duration % 60)) seconds."  echo "****************************************************************************"  

backslash (\) position in nftables grammar

Posted: 02 May 2021 10:00 AM PDT

As the webpage describe:
nftables guide

; = more commands or parameters to follow  \ = break a rule into multiple lines  

For the command :

nft add chain ip traffic-filter output { type filter hook output priority 0 \; policy accept\; }  

I read it as

nft add chain ip traffic-filter output {             type filter hook output priority 0 ;             policy accept ;   }  

What puzzle me is the position of \,why not put it behind : to break lines such as :

nft add chain ip traffic-filter output { type filter hook output priority 0 ;\ policy accept ; \}  

?

USB camera not working, recognized as keyboard

Posted: 02 May 2021 09:36 AM PDT

Plugging in a USB UVC camera is being detected, but recognized as a keyboard, on a laptop running Fedora 34.

cheese does not see this camera as an input device, only the built-in webcam.

How can I get the camera to be detected correctly?

journalctl output:

kernel: usb 2-2: new high-speed USB device number 5 using xhci_hcd  kernel: usb 2-2: New USB device found, idVendor=1a40, idProduct=0801, bcdDevice= 1.00  kernel: usb 2-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0  kernel: usb 2-2: Product: USB 2.0 Hub  kernel: hub 2-2:1.0: USB hub found  kernel: hub 2-2:1.0: 4 ports detected  upowerd[1618]: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb2/2-2  kernel: usb 2-2.4: new high-speed USB device number 6 using xhci_hcd  kernel: usb 2-2.4: New USB device found, idVendor=2b16, idProduct=6689, bcdDevice= 6.19  kernel: usb 2-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3  kernel: usb 2-2.4: Product: DP 5M CAM  kernel: usb 2-2.4: Manufacturer: SunplusIT Inc  kernel: usb 2-2.4: SerialNumber: 01.00.00  kernel: uvcvideo: Found UVC 1.00 device DP 5M CAM (2b16:6689)  kernel: input: DP 5M CAM: DP 5M CAM as /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2.4/2-2.4:1.0/input/input22  mtp-probe[6920]: checking bus 2, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2.4"  mtp-probe[6920]: bus: 2, device: 6 was not an MTP device  /usr/libexec/gdm-x-session[2187]: (II) config/udev: Adding input device DP 5M CAM: DP 5M CAM (/dev/input/event19)  /usr/libexec/gdm-x-session[2187]: (**) DP 5M CAM: DP 5M CAM: Applying InputClass "evdev keyboard catchall"  /usr/libexec/gdm-x-session[2187]: (**) DP 5M CAM: DP 5M CAM: Applying InputClass "libinput keyboard catchall"  /usr/libexec/gdm-x-session[2187]: (**) DP 5M CAM: DP 5M CAM: Applying InputClass "system-keyboard"  /usr/libexec/gdm-x-session[2187]: (II) Using input driver 'libinput' for 'DP 5M CAM: DP 5M CAM'  /usr/libexec/gdm-x-session[2187]: (II) systemd-logind: got fd for /dev/input/event19 13:83 fd 76 paused 0  /usr/libexec/gdm-x-session[2187]: (**) DP 5M CAM: DP 5M CAM: always reports core events  /usr/libexec/gdm-x-session[2187]: (**) Option "Device" "/dev/input/event19"  /usr/libexec/gdm-x-session[2187]: (**) Option "_source" "server/udev"  /usr/libexec/gdm-x-session[2187]: (II) event19 - DP 5M CAM: DP 5M CAM: is tagged by udev as: Keyboard  /usr/libexec/gdm-x-session[2187]: (II) event19 - DP 5M CAM: DP 5M CAM: device is a keyboard  /usr/libexec/gdm-x-session[2187]: (II) event19 - DP 5M CAM: DP 5M CAM: device removed  /usr/libexec/gdm-x-session[2187]: (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2.4/2-2.4:1.0/input/input22/event19"  /usr/libexec/gdm-x-session[2187]: (II) XINPUT: Adding extended input device "DP 5M CAM: DP 5M CAM" (type: KEYBOARD, id 16)  /usr/libexec/gdm-x-session[2187]: (**) Option "xkb_layout" "us,ca"  /usr/libexec/gdm-x-session[2187]: (**) Option "xkb_variant" ",multix"  /usr/libexec/gdm-x-session[2187]: (II) event19 - DP 5M CAM: DP 5M CAM: is tagged by udev as: Keyboard  /usr/libexec/gdm-x-session[2187]: (II) event19 - DP 5M CAM: DP 5M CAM: device is a keyboard  mtp-probe[6952]: checking bus 2, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2.4"  mtp-probe[6952]: bus: 2, device: 6 was not an MTP device  /usr/libexec/gdm-x-session[6954]: The XKEYBOARD keymap compiler (xkbcomp) reports:  /usr/libexec/gdm-x-session[6954]: > Error:            Key <MDSW> added to map for multiple modifiers  /usr/libexec/gdm-x-session[6954]: >                   Using Mod3, ignoring Mod5.  /usr/libexec/gdm-x-session[6954]: > Warning:          Could not resolve keysym XF86FullScreen  /usr/libexec/gdm-x-session[6954]: Errors from xkbcomp are not fatal to the X server  

lsusb -vv output:

Bus 002 Device 010: ID 2b16:6689 SunplusIT Inc DP 5M CAM  Device Descriptor:    bLength                18    bDescriptorType         1    bcdUSB               2.00    bDeviceClass          239 Miscellaneous Device    bDeviceSubClass         2     bDeviceProtocol         1 Interface Association    bMaxPacketSize0        64    idVendor           0x2b16     idProduct          0x6689     bcdDevice            6.19    iManufacturer           1 SunplusIT Inc    iProduct                2 DP 5M CAM    iSerial                 3 01.00.00    bNumConfigurations      1    Configuration Descriptor:      bLength                 9      bDescriptorType         2      wTotalLength       0x021f      bNumInterfaces          2      bConfigurationValue     1      iConfiguration          0       bmAttributes         0x80        (Bus Powered)      MaxPower              500mA      Interface Association:        bLength                 8        bDescriptorType        11        bFirstInterface         0        bInterfaceCount         2        bFunctionClass         14 Video        bFunctionSubClass       3 Video Interface Collection        bFunctionProtocol       0         iFunction               4 DP 5M CAM      Interface Descriptor:        bLength                 9        bDescriptorType         4        bInterfaceNumber        0        bAlternateSetting       0        bNumEndpoints           1        bInterfaceClass        14 Video        bInterfaceSubClass      1 Video Control        bInterfaceProtocol      0         iInterface              4 DP 5M CAM        VideoControl Interface Descriptor:          bLength                13          bDescriptorType        36          bDescriptorSubtype      1 (HEADER)          bcdUVC               1.00          wTotalLength       0x006d          dwClockFrequency       48.000000MHz          bInCollection           1          baInterfaceNr( 0)       1        VideoControl Interface Descriptor:          bLength                18          bDescriptorType        36          bDescriptorSubtype      2 (INPUT_TERMINAL)          bTerminalID             1          wTerminalType      0x0201 Camera Sensor          bAssocTerminal          0          iTerminal               0           wObjectiveFocalLengthMin      0          wObjectiveFocalLengthMax      0          wOcularFocalLength            0          bControlSize                  3          bmControls           0x0000000a            Auto-Exposure Mode            Exposure Time (Absolute)        VideoControl Interface Descriptor:          bLength                11          bDescriptorType        36          bDescriptorSubtype      5 (PROCESSING_UNIT)        Warning: Descriptor too short          bUnitID                 2          bSourceID               1          wMaxMultiplier      16384          bControlSize            2          bmControls     0x0000157f            Brightness            Contrast            Hue            Saturation            Sharpness            Gamma            White Balance Temperature            Backlight Compensation            Power Line Frequency            White Balance Temperature, Auto          iProcessing             0           bmVideoStandards     0x1d            None            PAL - 625/50            SECAM - 625/50            NTSC - 625/50        VideoControl Interface Descriptor:          bLength                29          bDescriptorType        36          bDescriptorSubtype      6 (EXTENSION_UNIT)          bUnitID                 3          guidExtensionCode         {0fb885c3-68c2-4547-90f7-8f47579d95fc}          bNumControls            5          bNrInPins               1          baSourceID( 0)          2          bControlSize            4          bmControls( 0)       0x1f          bmControls( 1)       0x00          bmControls( 2)       0x00          bmControls( 3)       0x00          iExtension              0         VideoControl Interface Descriptor:          bLength                29          bDescriptorType        36          bDescriptorSubtype      6 (EXTENSION_UNIT)          bUnitID                 4          guidExtensionCode         {63610682-5070-49ab-b8cc-b3855e8d221d}          bNumControls           25          bNrInPins               1          baSourceID( 0)          3          bControlSize            4          bmControls( 0)       0xff          bmControls( 1)       0xff          bmControls( 2)       0x77          bmControls( 3)       0x07          iExtension              0         VideoControl Interface Descriptor:          bLength                 9          bDescriptorType        36          bDescriptorSubtype      3 (OUTPUT_TERMINAL)          bTerminalID             5          wTerminalType      0x0101 USB Streaming          bAssocTerminal          0          bSourceID               4          iTerminal               0         Endpoint Descriptor:          bLength                 7          bDescriptorType         5          bEndpointAddress     0x87  EP 7 IN          bmAttributes            3            Transfer Type            Interrupt            Synch Type               None            Usage Type               Data          wMaxPacketSize     0x0010  1x 16 bytes          bInterval               8      Interface Descriptor:        bLength                 9        bDescriptorType         4        bInterfaceNumber        1        bAlternateSetting       0        bNumEndpoints           0        bInterfaceClass        14 Video        bInterfaceSubClass      2 Video Streaming        bInterfaceProtocol      0         iInterface              0         VideoStreaming Interface Descriptor:          bLength                            14          bDescriptorType                    36          bDescriptorSubtype                  1 (INPUT_HEADER)          bNumFormats                         1          wTotalLength                   0x00d3          bEndPointAddress                  129          bmInfo                              0          bTerminalLink                       5          bStillCaptureMethod                 1          bTriggerSupport                     0          bTriggerUsage                       0          bControlSize                        1          bmaControls( 0)                     4        VideoStreaming Interface Descriptor:          bLength                            11          bDescriptorType                    36          bDescriptorSubtype                  6 (FORMAT_MJPEG)          bFormatIndex                        1          bNumFrameDescriptors                6          bFlags                              1            Fixed-size samples: Yes          bDefaultFrameIndex                  1          bAspectRatioX                       0          bAspectRatioY                       0          bmInterlaceFlags                 0x00            Interlaced stream or variable: No            Fields per frame: 1 fields            Field 1 first: No            Field pattern: Field 1 only          bCopyProtect                        0        VideoStreaming Interface Descriptor:          bLength                            30          bDescriptorType                    36          bDescriptorSubtype                  7 (FRAME_MJPEG)          bFrameIndex                         1          bmCapabilities                   0x01            Still image supported          wWidth                           1920          wHeight                          1080          dwMinBitRate                829440000          dwMaxBitRate                829440000          dwMaxVideoFrameBufferSize     4147200          dwDefaultFrameInterval         400000          bFrameIntervalType                  1          dwFrameInterval( 0)            400000        VideoStreaming Interface Descriptor:          bLength                            30          bDescriptorType                    36          bDescriptorSubtype                  7 (FRAME_MJPEG)          bFrameIndex                         2          bmCapabilities                   0x01            Still image supported          wWidth                           2592          wHeight                          1944          dwMinBitRate                1612431360          dwMaxBitRate                1612431360          dwMaxVideoFrameBufferSize    10077696          dwDefaultFrameInterval         500000          bFrameIntervalType                  1          dwFrameInterval( 0)            500000        VideoStreaming Interface Descriptor:          bLength                            30          bDescriptorType                    36          bDescriptorSubtype                  7 (FRAME_MJPEG)          bFrameIndex                         3          bmCapabilities                   0x01            Still image supported          wWidth                           1280          wHeight                           720          dwMinBitRate                368640000          dwMaxBitRate                368640000          dwMaxVideoFrameBufferSize     1843200          dwDefaultFrameInterval         400000          bFrameIntervalType                  1          dwFrameInterval( 0)            400000        VideoStreaming Interface Descriptor:          bLength                            30          bDescriptorType                    36          bDescriptorSubtype                  7 (FRAME_MJPEG)          bFrameIndex                         4          bmCapabilities                   0x01            Still image supported          wWidth                            640          wHeight                           480          dwMinBitRate                122880000          dwMaxBitRate                122880000          dwMaxVideoFrameBufferSize      614400          dwDefaultFrameInterval         400000          bFrameIntervalType                  1          dwFrameInterval( 0)            400000        VideoStreaming Interface Descriptor:          bLength                            30          bDescriptorType                    36          bDescriptorSubtype                  7 (FRAME_MJPEG)          bFrameIndex                         5          bmCapabilities                   0x01            Still image supported          wWidth                           1600          wHeight                          1200          dwMinBitRate                768000000          dwMaxBitRate                768000000          dwMaxVideoFrameBufferSize     3840000          dwDefaultFrameInterval         400000          bFrameIntervalType                  1          dwFrameInterval( 0)            400000        VideoStreaming Interface Descriptor:          bLength                            30          bDescriptorType                    36          bDescriptorSubtype                  7 (FRAME_MJPEG)          bFrameIndex                         6          bmCapabilities                   0x01            Still image supported          wWidth                           2048          wHeight                          1936          dwMinBitRate                1268776960          dwMaxBitRate                1268776960          dwMaxVideoFrameBufferSize     7929856          dwDefaultFrameInterval         500000          bFrameIntervalType                  1          dwFrameInterval( 0)            500000        VideoStreaming Interface Descriptor:          bLength                             6          bDescriptorType                    36          bDescriptorSubtype                 13 (COLORFORMAT)          bColorPrimaries                     1 (BT.709,sRGB)          bTransferCharacteristics            1 (BT.709)          bMatrixCoefficients                 4 (SMPTE 170M (BT.601))      Interface Descriptor:        bLength                 9        bDescriptorType         4        bInterfaceNumber        1        bAlternateSetting       1        bNumEndpoints           1        bInterfaceClass        14 Video        bInterfaceSubClass      2 Video Streaming        bInterfaceProtocol      0         iInterface              0         Endpoint Descriptor:          bLength                 7          bDescriptorType         5          bEndpointAddress     0x81  EP 1 IN          bmAttributes            5            Transfer Type            Isochronous            Synch Type               Asynchronous            Usage Type               Data          wMaxPacketSize     0x00c0  1x 192 bytes          bInterval               1      Interface Descriptor:        bLength                 9        bDescriptorType         4        bInterfaceNumber        1        bAlternateSetting       2        bNumEndpoints           1        bInterfaceClass        14 Video        bInterfaceSubClass      2 Video Streaming        bInterfaceProtocol      0         iInterface              0         Endpoint Descriptor:          bLength                 7          bDescriptorType         5          bEndpointAddress     0x81  EP 1 IN          bmAttributes            5            Transfer Type            Isochronous            Synch Type               Asynchronous            Usage Type               Data          wMaxPacketSize     0x0180  1x 384 bytes          bInterval               1      Interface Descriptor:        bLength                 9        bDescriptorType         4        bInterfaceNumber        1        bAlternateSetting       3        bNumEndpoints           1        bInterfaceClass        14 Video        bInterfaceSubClass      2 Video Streaming        bInterfaceProtocol      0         iInterface              0         Endpoint Descriptor:          bLength                 7          bDescriptorType         5          bEndpointAddress     0x81  EP 1 IN          bmAttributes            5            Transfer Type            Isochronous            Synch Type               Asynchronous            Usage Type               Data          wMaxPacketSize     0x0200  1x 512 bytes          bInterval               1      Interface Descriptor:        bLength                 9        bDescriptorType         4        bInterfaceNumber        1        bAlternateSetting       4        bNumEndpoints           1        bInterfaceClass        14 Video        bInterfaceSubClass      2 Video Streaming        bInterfaceProtocol      0         iInterface              0         Endpoint Descriptor:          bLength                 7          bDescriptorType         5          bEndpointAddress     0x81  EP 1 IN          bmAttributes            5            Transfer Type            Isochronous            Synch Type               Asynchronous            Usage Type               Data          wMaxPacketSize     0x0280  1x 640 bytes          bInterval               1      Interface Descriptor:        bLength                 9        bDescriptorType         4        bInterfaceNumber        1        bAlternateSetting       5        bNumEndpoints           1        bInterfaceClass        14 Video        bInterfaceSubClass      2 Video Streaming        bInterfaceProtocol      0         iInterface              0         Endpoint Descriptor:          bLength                 7          bDescriptorType         5          bEndpointAddress     0x81  EP 1 IN          bmAttributes            5            Transfer Type            Isochronous            Synch Type               Asynchronous            Usage Type               Data          wMaxPacketSize     0x0320  1x 800 bytes          bInterval               1      Interface Descriptor:        bLength                 9        bDescriptorType         4        bInterfaceNumber        1        bAlternateSetting       6        bNumEndpoints           1        bInterfaceClass        14 Video        bInterfaceSubClass      2 Video Streaming        bInterfaceProtocol      0         iInterface              0         Endpoint Descriptor:          bLength                 7          bDescriptorType         5          bEndpointAddress     0x81  EP 1 IN          bmAttributes            5            Transfer Type            Isochronous            Synch Type               Asynchronous            Usage Type               Data          wMaxPacketSize     0x03b0  1x 944 bytes          bInterval               1      Interface Descriptor:        bLength                 9        bDescriptorType         4        bInterfaceNumber        1        bAlternateSetting       7        bNumEndpoints           1        bInterfaceClass        14 Video        bInterfaceSubClass      2 Video Streaming        bInterfaceProtocol      0         iInterface              0         Endpoint Descriptor:          bLength                 7          bDescriptorType         5          bEndpointAddress     0x81  EP 1 IN          bmAttributes            5            Transfer Type            Isochronous            Synch Type               Asynchronous            Usage Type               Data          wMaxPacketSize     0x0a80  2x 640 bytes          bInterval               1      Interface Descriptor:        bLength                 9        bDescriptorType         4        bInterfaceNumber        1        bAlternateSetting       8        bNumEndpoints           1        bInterfaceClass        14 Video        bInterfaceSubClass      2 Video Streaming        bInterfaceProtocol      0         iInterface              0         Endpoint Descriptor:          bLength                 7          bDescriptorType         5          bEndpointAddress     0x81  EP 1 IN          bmAttributes            5            Transfer Type            Isochronous            Synch Type               Asynchronous            Usage Type               Data          wMaxPacketSize     0x0b20  2x 800 bytes          bInterval               1      Interface Descriptor:        bLength                 9        bDescriptorType         4        bInterfaceNumber        1        bAlternateSetting       9        bNumEndpoints           1        bInterfaceClass        14 Video        bInterfaceSubClass      2 Video Streaming        bInterfaceProtocol      0         iInterface              0         Endpoint Descriptor:          bLength                 7          bDescriptorType         5          bEndpointAddress     0x81  EP 1 IN          bmAttributes            5            Transfer Type            Isochronous            Synch Type               Asynchronous            Usage Type               Data          wMaxPacketSize     0x0be0  2x 992 bytes          bInterval               1      Interface Descriptor:        bLength                 9        bDescriptorType         4        bInterfaceNumber        1        bAlternateSetting      10        bNumEndpoints           1        bInterfaceClass        14 Video        bInterfaceSubClass      2 Video Streaming        bInterfaceProtocol      0         iInterface              0         Endpoint Descriptor:          bLength                 7          bDescriptorType         5          bEndpointAddress     0x81  EP 1 IN          bmAttributes            5            Transfer Type            Isochronous            Synch Type               Asynchronous            Usage Type               Data          wMaxPacketSize     0x13c0  3x 960 bytes          bInterval               1      Interface Descriptor:        bLength                 9        bDescriptorType         4        bInterfaceNumber        1        bAlternateSetting      11        bNumEndpoints           1        bInterfaceClass        14 Video        bInterfaceSubClass      2 Video Streaming        bInterfaceProtocol      0         iInterface              0         Endpoint Descriptor:          bLength                 7          bDescriptorType         5          bEndpointAddress     0x81  EP 1 IN          bmAttributes            5            Transfer Type            Isochronous            Synch Type               Asynchronous            Usage Type               Data          wMaxPacketSize     0x13fc  3x 1020 bytes          bInterval               1  Device Qualifier (for other device speed):    bLength                10    bDescriptorType         6    bcdUSB               2.00    bDeviceClass          239 Miscellaneous Device    bDeviceSubClass         2     bDeviceProtocol         1 Interface Association    bMaxPacketSize0        64    bNumConfigurations      1  can't get debug descriptor: Resource temporarily unavailable  Device Status:     0x0000    (Bus Powered)    

Bash - remove dashes and new-lines before replacing new-lines with spaces

Posted: 02 May 2021 09:41 AM PDT

I have a bunch of text files in the following format:

Lorem ipsum dolor sit amet,  consetetur sadipscing elitr,  sed diam nonumy eirmod tempor  invidunt ut labore et dolore  magna aliquyam erat, sed diam  voluptua. - At vero eos et accu-  sam et justo duo dolores et ea  rebum. - Stet clita kasd guber-  gren, no sea takimata sanctus  est Lorem ipsum dolor sit amet.  

How can I print this as continuous text on the command line, but with removing the syllable division on the line ends:

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. - At vero eos et accusam et justo duo dolores et ea rebum. - Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.  

I could use tr '\n' ' ' to convert the new-lines into spaces

The problem is tr can only replace one character and I would need some command to remove the -\n in advance. How can I achieve this on the bash comman-line?

Use xmlstarlet to remove an entire element that matches an attribute value?

Posted: 02 May 2021 10:32 AM PDT

My question is similar to sed - Delete XML node containing certain element - Unix & Linux Stack Exchange. Trying to implement the suggestions there has kept me busy all day, but I haven't managed to get anything to work, so I am posting a question.

Within a bash script, I need to remove an entire <folder> element when the id attribute matches a given value. I'm actually using user-groups to do part of this. Say a user is not in the group folder_a; then the entire <folder> element with attribute id=".Folder_A" should be deleted from config.xml. (I also delete the folder from disk.)

My bash script looks like this:

#!/bin/bash    grouplist=$(groups $theuser);  for foldername in '.Folder_A' '.Folder_B'; do    grpnm="${foldername,,}"|sed -e 's/^.//'    if ! [[ $grouplist =~ ${grpnm} ]]; then      perl -0777 -pe "s|(<folder.*?</folder>)|$1=~ /id=\"$foldername\"/?"":$1|gse" config.xml > config.xml      rm -fr "$foldername"    else      echo "permitting access to ${foldername}"    fi  done  

The perl command is not working. It is just one of many variants I have tried. I also tried sed. I would prefer to use xmlstarlet, but I had even more trouble with it.

Edit - I just found this answer: https://unix.stackexchange.com/a/339089/393289 It helped me come up with this:

xml ed -d '//configuration/folder[contains(@id,".Folder_A")]' config.xml  

I feel like I am closer now. (I tried to upvote that answer but I don't have enough rep yet.) However, I can't translate the attribute name into a bash variable yet due to the quote marks or something else.

BTW, how do I make that perform an in-place edit (similar to the sed -i command) once I get it working?

Here's an example config.xml file:

    <?xml version="1.0"?>      <configuration version="32">          <folder id=".Folder_A" label=".Folder_A" path="~/Sync/.Folder_A" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">              <filesystemType>basic</filesystemType>              <device id="123ABC" introducedBy="">                  <encryptionPassword/>              </device>              <device id="987ZYX" introducedBy="">                  <encryptionPassword/>              </device>              <minDiskFree unit="">0</minDiskFree>              <versioning>                      <cleanupIntervalS>0</cleanupIntervalS>              </versioning>              <copiers>0</copiers>              <disableSparseFiles>false</disableSparseFiles>              <disableTempIndexes>false</disableTempIndexes>              <paused>false</paused>              <weakHashThresholdPct>25</weakHashThresholdPct>              <markerName>.stfolder</markerName>          </folder>          <folder id=".Folder_B" label="Corporate (.Folder_B)" path="~/Sync/.Folder_B" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="5" ignorePerms="true" autoNormalize="false">              <filesystemType>basic</filesystemType>              <device id="123ABC" introducedBy="">                  <encryptionPassword/>              </device>              <device id="987ZYX" introducedBy="">                  <encryptionPassword/>              </device>              <minDiskFree unit="">0</minDiskFree>              <versioning>                      <cleanupIntervalS>0</cleanupIntervalS>              </versioning>              <copiers>0</copiers>              <disableSparseFiles>false</disableSparseFiles>              <disableTempIndexes>false</disableTempIndexes>              <paused>false</paused>              <weakHashThresholdPct>25</weakHashThresholdPct>              <markerName>.stfolder</markerName>          </folder>          <device id="123ABC" name="laptop" compression="always" introducer="false" skipIntroductionRemovals="false" introducedBy="">              <paused>false</paused>              <autoAcceptFolders>true</autoAcceptFolders>              <maxSendKbps>0</maxSendKbps>              <maxRecvKbps>0</maxRecvKbps>              <maxRequestKiB>0</maxRequestKiB>              <untrusted>false</untrusted>          </device>          <device id="987ZYX" name="desktop" compression="always" introducer="false" skipIntroductionRemovals="false" introducedBy="">              <paused>false</paused>              <autoAcceptFolders>true</autoAcceptFolders>              <maxSendKbps>0</maxSendKbps>              <maxRecvKbps>0</maxRecvKbps>              <maxRequestKiB>0</maxRequestKiB>              <untrusted>false</untrusted>          </device>          <gui enabled="true" tls="true" debugging="false">              <address>127.0.0.1:8384</address>              <apikey>98qewr0qe9r</apikey>              <theme>default</theme>          </gui>          <ldap/>          <options>              <listenAddress></listenAddress>              <maxSendKbps>0</maxSendKbps>              <maxRecvKbps>0</maxRecvKbps>              <reconnectionIntervalS>60</reconnectionIntervalS>              <relaysEnabled>false</relaysEnabled>              <relayReconnectIntervalM>10</relayReconnectIntervalM>              <startBrowser>false</startBrowser>              <urAccepted>-1</urAccepted>              <urSeen>3</urSeen>              <urUniqueID/>              <urPostInsecurely>false</urPostInsecurely>              <urInitialDelayS>1800</urInitialDelayS>              <restartOnWakeup>true</restartOnWakeup>              <upgradeToPreReleases>false</upgradeToPreReleases>              <keepTemporariesH>24</keepTemporariesH>              <cacheIgnoredFiles>false</cacheIgnoredFiles>              <progressUpdateIntervalS>5</progressUpdateIntervalS>              <limitBandwidthInLan>false</limitBandwidthInLan>              <overwriteRemoteDeviceNamesOnConnect>false</overwriteRemoteDeviceNamesOnConnect>              <tempIndexMinBlocks>10</tempIndexMinBlocks>              <trafficClass>0</trafficClass>              <defaultFolderPath>~/Sync/</defaultFolderPath>              <maxFolderConcurrency>0</maxFolderConcurrency>              <crashReportingEnabled>false</crashReportingEnabled>              <databaseTuning>auto</databaseTuning>              <maxConcurrentIncomingRequestKiB>0</maxConcurrentIncomingRequestKiB>              <announceLANAddresses>false</announceLANAddresses>              <sendFullIndexOnUpgrade>false</sendFullIndexOnUpgrade>          </options>      </configuration>  

This is a config.xml example for syncthing.

How do I create a compressed buildroot system image that expands to fill the available storage of the media it is flashed to?

Posted: 02 May 2021 08:18 AM PDT

I need to make a Buildroot system for various x86_64 EFI systems with varying storage sizes, but unfortunately, the pc_x86_64_efi config creates an img file with a fixed partition size, not one that expands to the full size of the media it is flashed to. If I want it to fill the various drives, I need to manually specify the size of the drive in the filesystem config, and then recompile, which is a major pain, and ends up making a massive 128GB+ image file. I tried causing it to resize from within the running system using resize2fs, but that did not work. Ideally I would like it to either expand to the full size of the drive when it is flashed, or to have it resize when it first boots. Is this possible, or is it outside the limits of Buildroot?

locale issue on newly CentOS install

Posted: 02 May 2021 09:11 AM PDT

I made several CentOS 7 install lately using the NetInstall CD and all is going well, installation finishes, I can access the server. However when I try to connect to the server using ssh afterwards, I get :

-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory  

indeed typing "locale" I get:

# locale  locale: Cannot set LC_CTYPE to default locale: No such file or directory  locale: Cannot set LC_ALL to default locale: No such file or directory  LANG=en_US.utf8  LC_CTYPE=UTF-8  LC_NUMERIC="en_US.utf8"  LC_TIME="en_US.utf8"  LC_COLLATE="en_US.utf8"  LC_MONETARY="en_US.utf8"  LC_MESSAGES="en_US.utf8"  LC_PAPER="en_US.utf8"  LC_NAME="en_US.utf8"  LC_ADDRESS="en_US.utf8"  LC_TELEPHONE="en_US.utf8"  LC_MEASUREMENT="en_US.utf8"  LC_IDENTIFICATION="en_US.utf8"  LC_ALL=  

Set up is:

# cat /etc/locale.conf  LANG="en_US.utf8"  [root@moria ~]# localectl list-locales | grep en_US  en_US  en_US.iso88591  en_US.iso885915  en_US.utf8  

So nothing fancy, it's a fresh out of the box updated CentOS.

Trying to set it I get :

# localectl set-locale LC_TYPE=en_US.utf8  Failed to issue method call: Invalid Locale data.  

So my question: What am I missing? How to set this up correctly. Many thanks!

Addition of two floating point numbers using shell script

Posted: 02 May 2021 08:56 AM PDT

I am trying to add two floating point numbers together using shell script. I have tried this:

#!/bin/bash  if [ $# != 2 ]; then      echo "2 arguments are required "      exit  else      x=$1      y=$2      sum = $x + $y      echo ` sum = $sum | bc `  fi  

When I provide two arguments to the command line, for example:

bash filename.sh 2.4 5  

... it gives me an error: [ 2 != 2 ] command not found

How to download portion of video with youtube-dl command?

Posted: 02 May 2021 10:11 AM PDT

I am using Ubuntu, and the youtube-dl command is working absolutely fine.

However, now I want to download only a portion a video that is too long. So I want to download only a few minutes of that video, e.g. from minute 13 to minute 17.

Is there any way to do that?

Cannot add host to icingaweb2

Posted: 02 May 2021 07:29 AM PDT

I installed Icinga2 and icingaweb2. I have the dashboard, view of hosts, services, etc. I can log in, log out, etc.

Ok, now I want to monitor something. So I added a host to /etc/icinga2/conf.d/hosts, like this:

object Host "myhost" {    display_name "My first host"    address "X.X.X.X"    check_command "hostalive"  }  

Then I reloaded icinga2 and expected to see myhost in Overview/Hosts on the icingaweb2 dashboard, but despite my efforts all the time I see 0 hosts and the empty list.

Why icingaweb2 isn't displaying hosts added this way?

Best Regards,
Kamil

How to debug an udev rule (in /etc/udev/rules.d/...)

Posted: 02 May 2021 10:12 AM PDT

I'm creating a new basic rule

/etc/udev/rules.d/10-myrule.rules  

containing:

KERNEL!="sdb*", GOTO="auto_mount_end"  ACTION=="add", RUN+="/usr/bin/mount /dev/sdb1 /media"  LABEL="auto_mount_end"  

I saved, rebooted, and inserted a SD card (recognized by /dev/sdb1, I see it with dmesg), but nothing happens. When I do manually mount /dev/sdb1 /media, it works.

How can I troubleshoot / debug such an udev rule?

Note: I'm using ArchLinux, but it should be the same on any distro?

Gnome, nautilus copy files to USB stops at 100% or near

Posted: 02 May 2021 09:01 AM PDT

I had similar issues before but i don't remember how i solved it.

When i try to copy something to USB stick, with FAT, it stops near the end, sometimes at 100%. And of course, when i transfer the memory stick somewhere else, it doesn't contain complete file. (file is a movie!)

I tried to mount device with mount -o flush, but i get same issue.

Also, i did format the USB stick with new FAT partition...

Any idea what cold i do?

p.s. I believe it's not related to OS, which is Debian, and i believe that coping from SSD drive doesn't make it stuck.

How to to resize an ext4 partition from the command line?

Posted: 02 May 2021 10:13 AM PDT

What's the easiest way to resize an ext4 partition (or any type partition depending on the method) from the command line (potentially with the fewest commands, but also the easiest to understand)?

Using a tool like Gparted is obviously easy in a GUI, but what about in the command line? I guess text-based GUIs can count for the answer too since it's technically still in the command line. It just needs to be easy.

By partition I mean a simple partition on a single disk of a personal computer (e.g. on a laptop). For example, I want to resize /dev/sda4. There's no RAIDs, there's not more than one disk drive, there's not anything complicated here. Just a simple partition on a single disk (/dev/sdaX on /dev/sda).

How to convert grub config to use kernel device names instead of UUID

Posted: 02 May 2021 10:06 AM PDT

I've got a bunch of identical systems on which I want to clone the same openSUSE 12.3 installation.

I've set up clonezilla on PXE server.

After appling the disk-image of on another machine, it fails to boot.

This is because all the partitions are referred to be their UUIDs instead of the kernel-assigned name (sda1, sda2, etc).

How do I configure grub to be using the kernel names instead of the UUID so that the image can be truly ported to the other systems?

I have tried setting GRUB_DISABLE_LINUX_UUID=true in /etc/default/grub and then run grub2-mkconfig -o /boot/grub2/grub.cfg. I have also changed the entry in /etc/fstab.

After these changes, the system still boots fine on the source machine, but doesn't boot on all the others. Grub loads, but only shows the word "GRUB" and thats all. Nothing else happens.

My current grub.cfg is the following:

#  # DO NOT EDIT THIS FILE  #  # It is automatically generated by grub2-mkconfig using templates  # from /etc/grub.d and settings from /etc/default/grub  #    ### BEGIN /etc/grub.d/00_header ###  if [ -s $prefix/grubenv ]; then    load_env  fi  set default="${saved_entry}"    if [ x"${feature_menuentry_id}" = xy ]; then    menuentry_id_option="--id"  else    menuentry_id_option=""  fi    export menuentry_id_option    if [ "${prev_saved_entry}" ]; then    set saved_entry="${prev_saved_entry}"    save_env saved_entry    set prev_saved_entry=    save_env prev_saved_entry    set boot_once=true  fi    function savedefault {    if [ -z "${boot_once}" ]; then      saved_entry="${chosen}"      save_env saved_entry    fi  }    function load_video {    if [ x$feature_all_video_module = xy ]; then      insmod all_video    else      insmod efi_gop      insmod efi_uga      insmod ieee1275_fb      insmod vbe      insmod vga      insmod video_bochs      insmod video_cirrus    fi  }    if [ x$feature_default_font_path = xy ] ; then     font=unicode  else  insmod part_msdos  insmod ext2  set root='hd0,msdos5'  if [ x$feature_platform_search_hint = xy ]; then    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5'  5613d48c-eedb-4389-91bc-e49de73a1cc4  else    search --no-floppy --fs-uuid --set=root 5613d48c-eedb-4389-91bc-e49de73a1cc4  fi      font="/usr/share/grub2/unicode.pf2"  fi    if loadfont $font ; then    set gfxmode=auto    load_video    insmod gfxterm    set locale_dir=$prefix/locale    set lang=en_US    insmod gettext  fi  terminal_output gfxterm  insmod part_msdos  insmod ext2  set root='hd0,msdos5'  if [ x$feature_platform_search_hint = xy ]; then    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5'  5613d48c-eedb-4389-91bc-e49de73a1cc4  else    search --no-floppy --fs-uuid --set=root 5613d48c-eedb-4389-91bc-e49de73a1cc4  fi  insmod gfxmenu  loadfont ($root)/boot/grub2/themes/openSUSE/ascii.pf2  loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans10.pf2  loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans12.pf2  loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans-Bold14.pf2  insmod png  set theme=($root)/boot/grub2/themes/openSUSE/theme.txt  export theme  if [ x${boot_once} = xtrue ]; then    set timeout=0  elif sleep --interruptible 0 ; then    set timeout=5  fi  ### END /etc/grub.d/00_header ###    ### BEGIN /etc/grub.d/10_linux ###  menuentry 'openSUSE 12.3' --class 'opensuse-12-3' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-5613d48c-eedb-4389-91bc-e49de73a1cc4' {      load_video      set gfxpayload=keep      insmod gzio      insmod part_msdos      insmod ext2      set root='hd0,msdos5'      if [ x$feature_platform_search_hint = xy ]; then        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5'  5613d48c-eedb-4389-91bc-e49de73a1cc4      else        search --no-floppy --fs-uuid --set=root 5613d48c-eedb-4389-91bc-e49de73a1cc4      fi      echo    'Loading Linux 3.7.10-1.4-default ...'      linux   /boot/vmlinuz-3.7.10-1.4-default root=/dev/sda5   splash=silent acpi=on barrier=off reboot=pci  init=linuxrc splash=silent quiet showopts      echo    'Loading initial ramdisk ...'      initrd  /boot/initrd-3.7.10-1.4-default  }  submenu 'Advanced options for openSUSE 12.3' $menuentry_id_option 'gnulinux-advanced-5613d48c-eedb-4389-91bc-e49de73a1cc4' {      menuentry 'openSUSE 12.3, with Linux 3.7.10-1.4-default' --class 'opensuse-12-3' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.7.10-1.4-default-advanced-5613d48c-eedb-4389-91bc-e49de73a1cc4' {          load_video          set gfxpayload=keep          insmod gzio          insmod part_msdos          insmod ext2          set root='hd0,msdos5'          if [ x$feature_platform_search_hint = xy ]; then            search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5'  5613d48c-eedb-4389-91bc-e49de73a1cc4          else            search --no-floppy --fs-uuid --set=root 5613d48c-eedb-4389-91bc-e49de73a1cc4          fi          echo    'Loading Linux 3.7.10-1.4-default ...'          linux   /boot/vmlinuz-3.7.10-1.4-default root=/dev/sda5   splash=silent acpi=on barrier=off reboot=pci  init=linuxrc splash=silent quiet showopts          echo    'Loading initial ramdisk ...'          initrd  /boot/initrd-3.7.10-1.4-default      }      menuentry 'openSUSE 12.3, with Linux 3.7.10-1.4-default (recovery mode)' --class 'opensuse-12-3' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.7.10-1.4-default-recovery-5613d48c-eedb-4389-91bc-e49de73a1cc4' {          load_video          set gfxpayload=keep          insmod gzio          insmod part_msdos          insmod ext2          set root='hd0,msdos5'          if [ x$feature_platform_search_hint = xy ]; then            search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5'  5613d48c-eedb-4389-91bc-e49de73a1cc4          else            search --no-floppy --fs-uuid --set=root 5613d48c-eedb-4389-91bc-e49de73a1cc4          fi          echo    'Loading Linux 3.7.10-1.4-default ...'          linux   /boot/vmlinuz-3.7.10-1.4-default root=/dev/sda5  showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe          echo    'Loading initial ramdisk ...'          initrd  /boot/initrd-3.7.10-1.4-default      }  }    ### END /etc/grub.d/10_linux ###    ### BEGIN /etc/grub.d/20_linux_xen ###  ### END /etc/grub.d/20_linux_xen ###    ### BEGIN /etc/grub.d/20_memtest86+ ###  ### END /etc/grub.d/20_memtest86+ ###    ### BEGIN /etc/grub.d/20_ppc_terminfo ###  ### END /etc/grub.d/20_ppc_terminfo ###    ### BEGIN /etc/grub.d/30_os-prober ###  menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-52EA4C7AEA4C5C7B' {      insmod part_msdos      insmod ntfs      set root='hd0,msdos1'      if [ x$feature_platform_search_hint = xy ]; then        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  52EA4C7AEA4C5C7B      else        search --no-floppy --fs-uuid --set=root 52EA4C7AEA4C5C7B      fi      chainloader +1  }  ### END /etc/grub.d/30_os-prober ###    ### BEGIN /etc/grub.d/40_custom ###  # This file provides an easy way to add custom menu entries.  Simply type the  # menu entries you want to add after this comment.  Be careful not to change  # the 'exec tail' line above.  ### END /etc/grub.d/40_custom ###    ### BEGIN /etc/grub.d/41_custom ###  if [ -f  ${config_directory}/custom.cfg ]; then    source ${config_directory}/custom.cfg  elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then    source $prefix/custom.cfg;  fi  ### END /etc/grub.d/41_custom ###    ### BEGIN /etc/grub.d/90_persistent ###  ### END /etc/grub.d/90_persistent ###  

How can I set my default shell to start up tmux

Posted: 02 May 2021 09:26 AM PDT

I would like my default bash shell to go straight into tmux instead of my always having to type tmux every time.

No comments:

Post a Comment