Is the quote of bash -c" itself only used for containing and differing the quotes of other commands inside it? Posted: 25 Aug 2021 10:26 AM PDT the title maybe sound a little confusing, I mean, For example, as default bash -c " echo ' smth ' " if echo requires a double quotes for itself usage, echo " #!$smth " then bash -c will have to use a single quote instead, to differ echo 's double qutoes so bash -c ' echo " #!$smth " ' And there is no difference for bash -c between single and double quotes. Do I understand right or please don't hesitate correct me. Thanks. |
How do apps switch to a window on another workspace in Gnome Shell? Posted: 25 Aug 2021 08:59 AM PDT In Gnome Shell, certain apps can switch workspace to another window. For example, if you have Firefox windows on two workspaces and you type the URL of a tab already open in another workspace, it allows you to select "Switch to Tab" and you will be dragged to the other workspace. It turns out that Eclipse does a similar thing. I have an app built on Eclipse and I would like to avoid this behaviour. But without understanding the mechanism that is being used I cannot easily find a way to bypass it. How does this work? |
Distribution-agnostic package search and installation Posted: 25 Aug 2021 10:12 AM PDT I'm trying to figure out a distribution-agnostic way to install packages providing specific executables or files. I know that it is impossible to get this perfect, but I think I have something that is almost good enough and I was hoping that maybe someone has an idea on how to improve upon it. Basically I've written a script that provides an abstraction layer around the most common package managers: commandAvailable() { command -v $1 &> /dev/null; } if commandAvailable dnf; then updatePackageInfo() { dnf check-update; } searchPath() { dnf provides $1 2> /dev/null | grep ' : ' | head -1 | cut -d'.' -f1 | rev | cut -d'-' -f 2- | rev; } searchBin() { searchPath {/bin,/sbin,/usr/bin/,/usr/sbin}/$1; } install() { dnf install -y $@; } elif commandAvailable yum; then updatePackageInfo() { yum check-update; } searchPath() { yum provides $1 2> /dev/null | grep ' : ' | head -1 | cut -d'.' -f1 | rev | cut -d'-' -f 2- | rev; } searchBin() { searchPath {/bin,/sbin,/usr/bin/,/usr/sbin}/$1; } install() { yum install -y $@; } elif commandAvailable apt-get; then updatePackageInfo() { apt-get update && if ! commandAvailable apt-file; then install apt-file; fi && apt-file update; } searchPath() { apt-file search $1 | head -1 | cut -d':' -f1; } searchBin() { searchPath {/bin,/sbin,/usr/bin/,/usr/sbin}/$1; } install() { apt-get install -y $@; } elif commandAvailable pacman; then updatePackageInfo() { pacman -Sy && pacman -Fy; } searchPath() { pacman -F $1 | head -1 | rev | cut -d' ' -f2 | rev; } searchBin() { pacman -F $1 | grep -B 1 -P " (usr/bin|usr/sbin|bin|sbin)/$1" | head -1 | cut -d' ' -f1; } install() { pacman -S --noconfirm $@; } elif commandAvailable zypper; then updatePackageInfo() { zypper refresh; } searchPath() { zypper search -f $1 | grep " | package" | head -1 | tr -d ' ' | cut -d'|' -f2; } searchBin() { searchPath {/bin,/sbin,/usr/bin/,/usr/sbin}/$1; } install() { zypper --non-interactive install "$@"; } elif commandAvailable emerge; then updatePackageInfo() { emerge-webrsync -v && if ! commandAvailable e-file; then install app-portage/pfl; fi; } searchPath() { e-file $1 | grep -P "(\[I\]| \* )" | sed 's/*//g' | sed 's/\[I\]//g' | tr -d ' '; } searchBin() { searchPath /usr/bin/$1; searchPath /usr/sbin/$1; searchPath /bin/$1; searchPath /sbin/$1; } install() { emerge $@; } fi searchBins() { for executable in "$@"; do searchBin $executable; done | tr "\n" " "; echo; } searchPaths() { for path in "$@"; do searchPath $path; done | tr "\n" " "; echo; } installPkgWithPath() { install $(searchPath "$1"); } installPkgsWithPaths() { install $(searchPaths $@); } installPkgWithExecutable() { install $(searchBin $1); } installPkgsWithExecutables() { install $(searchBins $@); } The functions it creates can be used like this: updatePackageInfo # Equivalent to apt-get update installPkgWithPath "curl/curl.h" # Installs the package containing the header file curl/curl.h installPkgsWithPaths "curl/curl.h" "/usr/bin/wget" # Installs multiple packages by file paths installPkgWithExecutable curl # Install the package that provides the `curl` executable installPkgsWithExecutables curl wget make # Install all packages required to get these 3 executables This basically works fine on Fedora, RHEL, Debian, Arch, Gentoo, OpenSuse (and many more I would think). But it does not work on Ubuntu for example because Ubuntu doesn't have the required apt-file package (unless you enable the Universe repository that provides it). Another thing that doesn't work is installing things like vlc in Fedora. On Fedora you would usually enable the RPM Fusion repositories for that. And I'm sure other distributions have similar situations. What I have considered is maybe adding a --force flag that, when set, causes these repositories to be searched and added if needed. But I would hate to end up in a situation where I have to maintain lists of repositories. My hope is that most distributions somehow reference these semi-trusted repositories in a way that I don't have to maintain a list of repositories for every distribution. Any ideas? |
How to find every months secound day Posted: 25 Aug 2021 10:06 AM PDT How to get second day(date) of every month (like 2 August,2 September) in Unix shell scripting |
How to check if LSI20320IE is working without LTO TAPE in Ubuntu 20.04 LTS Posted: 25 Aug 2021 09:14 AM PDT I have done a lspci -vv to check if my Driver for the LSI20320IE SCSI Controller ( Data-Sheet ) is correct installed. (The LSI-drivers are from here MPTLINUX_RHEL4_SLES9_PH14-3.13.04.00-2.zip and I did running alien on terminal command prompt in the directory pkg-2/dkms to convert the two rpms into Debian packages and then gdebi <deb-package-name> to install the two DEBIAN -Packages) : It sheems so that this was fine, but how can I test if the SCSI controller is working. I have no LTO2 Drive yet, but soon. A HP LTO Ultrium 960 should be running on my Ubuntu 20.04LTS PC. My output of lspci -vv is a follows: 05:08.0 SCSI storage controller: Broadcom / LSI 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev c1) Subsystem: Hewlett-Packard Company SC11Xe Ultra320 Single Channel PCIe x4 SCSI Host Bus Adapter (412911-B21) Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 32 (4000ns min, 1500ns max), Cache Line Size: 64 bytes Interrupt: pin A routed to IRQ 26 Region 0: I/O ports at d000 [size=256] Region 1: Memory at f5720000 (64-bit, non-prefetchable) [size=128K] Region 3: Memory at f5700000 (64-bit, non-prefetchable) [size=128K] Expansion ROM at f5600000 [disabled] [size=1M] Capabilities: <access denied> Kernel driver in use: mptspi Kernel modules: mptspi Thanks for any useful advices. |
Isolate content of curly brackets which can contain nested curly brackets Posted: 25 Aug 2021 10:16 AM PDT In a TeX file, I've the following command \q{aaa}{blablabla} and I want to isolate the argument blablabla . I've figured it out using sed: sed 's/\q{([^}\{])}{([^}\{])}/\2/g' and it works well. The issue is when there is nested curly brackets in the pattern I want to keep the inner curly brackets. In other words, in case of \q{aaa}{blablabla \label{BBB}} the desired output would be blablabla \label{BBB} We could imagine several LaTeX commands in a row I'd like to keep, for instance \q{aaa}{blablabla \label{BBB} blablabla \includegraphics{ccc.eps} blablabla \cite{somebody_year}} The desired output for such an extreme MWE would be blablabla \label{BBB} blablabla \includegraphics{ccc.eps} blablabla \cite{somebody_year} blablabla \begin{itemize} \item AAA \item BBB \end{itemize} blablabla to conclude Such an example is a very (maybe too much) complicated one as the final goal of my search is to optimize revision of manuscrits (during the review process). Not sure it can be done in a one-line sed ... |
Would it be necessary to wait/sleep the bash script before rebooting the system after executing commands? Posted: 25 Aug 2021 07:19 AM PDT I wrote a bash script that enables me to have all my cloud servers with a base configuration. Upon completing the script, I'd like to know if I should put a timer for 30 seconds (or so) before rebooting the system. I'm not sure if linux, specifically Debian, needs time to post-process any installation/upgrades before reboot and what command before issuing the reboot would ensure that the system is no longer 'busy' such as wait or sleep. # Install and Update packages apt-get update apt-get -y install <list-of-packages> apt-get -y dist-upgrade # Reboot System reboot |
bash strict mode fails to assign pipeline output to variable by using grep with :space: Posted: 25 Aug 2021 06:48 AM PDT I hope someone has an idea about my issue. The current minimal example fails, if I'm trying to assign a command/pipeline output to a variable due to the grep "[[:space:]]" expression for bash in the strict mode. #/bin/bash set -euo pipefail egrep -v '>' file | grep "[[:space:]]" | wc -l var=`egrep -v '>' file | grep "[[:space:]]" | wc -l` echo $var var=$(egrep -v '>' file | grep "[[:space:]]" | wc -l) fails as well. I'm out of ideas. |
is it a good idea to use "sudo bash -c" instead of "sudo" forever? Posted: 25 Aug 2021 08:15 AM PDT 1st of all, we are talking about Debian/Ubuntu OS only. 2nd of all, we are talking about a non-root user with sudo privilege only. So question is, Is there any occasion that can not use sudo bash -c 'command' but only sudo command ? is it a good idea to use sudo bash -c instead of sudo forever? |
cat ./* >> large.txt decreases in size Posted: 25 Aug 2021 10:17 AM PDT I'm a novice in bash scripting. I wrote a script that concatenates many files from different directories into large files #!/bin/bash for f in foo/$1/*; do if [ -d "$f" ]; then for d in $f/*; do if [ -d "$d" ]; then file=$( echo ${d##*/} ) mkdir -p bar/$1/"$file"/fastq/ cat $d/*/fastq_pass/* >> bar/$1/"$file"/fastq/$file.fastq.gz fi done fi done I've noticed that some of merged files lost 1-2 GB in size, which is weird because other files are ok. When I tried to do cat foo/* >> bar/largefile.fastq.gz there was no loss. So it's definitely because of my script. Where's error? |
Setting NOPASSWD for a user still promts for a password Posted: 25 Aug 2021 07:51 AM PDT I am trying to set up an ansible user following a tutorial. They set NOPASSWD to ALL for the ansible user, which allowed them to -become root whenever they needed with no password involved. I tried to do the same and am long unable to get the same result. Running CentOS 8, the following lines from visudo file: ## Same thing without a password %wheel ALL=(ALL) NOPASSWD: ALL ansible ALL=(ALL) NOPASSWD: ALL cloud_user ALL=(ALL) NOPASSWD: ALL I'm using cloud_user for login since root login is restricted, but I still need root to install software through ansible. I surfed the internet about the order of the users in the list, but as you can see the cloud_user is the last one and is never mentioned again in the file. I assume that should allow me to use root on it without password. The issue is that cloud_user is still prompted for password in sudo commands, and ansible says "Missing sudo password". sudo -ll output: Sudoers entry: RunAsUsers: ALL Options: !authenticate Commands: ALL Sudoers entry: RunAsUsers: ALL Options: !authenticate Commands: ALL Sudoers entry: RunAsUsers: ALL Options: !authenticate Commands: ALL Sudoers entry: RunAsUsers: ALL Commands: ALL Sudoers entry: RunAsUsers: ALL Commands: ALL Sudoers entry: RunAsUsers: ALL Commands: ALL Sudoers entry: RunAsUsers: ALL Commands: ALL Sudoers entry: RunAsUsers: ALL Commands: ALL Sudoers entry: RunAsUsers: ALL Commands: ALL Sudoers entry: RunAsUsers: ALL Commands: ALL Sudoers entry: RunAsUsers: ALL Commands: ALL Sudoers entry: RunAsUsers: ALL Commands: ALL Sudoers entry: RunAsUsers: ALL Commands: ALL Sudoers entry: RunAsUsers: ALL Commands: ALL Sudoers entry: RunAsUsers: ALL Commands: ALL |
Print contents of a file only after last occurrence of a token? Posted: 25 Aug 2021 08:52 AM PDT I have long-running programs that can restart their internal state. I want to see the log file entries only for the most recent state (to load into vim's quickfix). How can I show all lines after the last occurrence of the string "STARTING SESSION"? My current solution (log files are sometimes gigabytes long, so I never look at more than the last 5000 lines): tail -n5000 logfile.log | grep -B5000 -v -e 'STARTING SESSION'> shortened.log This works well when sessions produce a lot of logging, but if I have shorter logs with many restarts, it includes multiple sessions. Essentially, I want something like a --reverse flag that would make grep search from the end of the file instead of the start: grep --reverse --after-context=5000 --max-count=1 'STARTING SESSION' logfile.log Similar to Print line after nth occurrence of a match, but I want the last occurrence. Almost the same as Getting text from last marker to EOF in POSIX.2 except that I don't have a POSIX requirement and my files are large. I'd prefer efficient solutions with gnu utils (I'm using mingw64). |
How to increase vmalloc or virtual memory or VAS on Android kernel Posted: 25 Aug 2021 10:39 AM PDT According to the faqs right here https://support.huaweicloud.com/intl/en-us/ug-exagear-kunpengdevps/kunpengexagear_06_0045.html Q7: What is the virtual address range of ExaGear? A: The length of the virtual address used in the current version is 48 bits. If the virtual address space allowed by the kernel is less than this length, a segment fault occurs during startup. And mine is seems to be VmallocTotal: 251658176 kB .../files/home # cat /proc/meminfo MemTotal: 1901768 kB MemFree: 64648 kB MemAvailable: 788060 kB Buffers: 21928 kB Cached: 724336 kB SwapCached: 22612 kB Active: 814312 kB Inactive: 514180 kB Active(anon): 443404 kB Inactive(anon): 150372 kB Active(file): 370908 kB Inactive(file): 363808 kB Unevictable: 6448 kB Mlocked: 256 kB SwapTotal: 524280 kB SwapFree: 88824 kB Dirty: 204 kB Writeback: 0 kB AnonPages: 574304 kB Mapped: 443764 kB Shmem: 5340 kB Slab: 99992 kB SReclaimable: 40620 kB SUnreclaim: 59372 kB KernelStack: 28480 kB PageTables: 34204 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 1475164 kB Committed_AS: 59355964 kB VmallocTotal: 251658176 kB VmallocUsed: 95312 kB VmallocFilt: 5688 kB VmallocChunk: 251445860 kB Im thinking of recompile the kernel its an android kernel which parameter should i change and to what value ? My kernel config file that im trying to recompilh https://pastebin.com/qE8Rp5S5 This is the kernel im trying to build https://github.com/DarkJoker360/android_kernel_huawei_alice in case maybe modify vmalloc.h to increase its size ?idk |
Pulseaudio errors - relevant files: Debian Posted: 25 Aug 2021 09:23 AM PDT I have inherited software which communicates with a MIDI device, so ALSA and pulseaudio are both involved. On the system B I have built from the ground, there are errors such as No protocol specified xcb_connection_has_error() returned true and in the syslog: Aug 24 17:43:29 debianl016 pulseaudio[2206]: [pulseaudio] client-conf-x11.c: xcb_connection_has_error() returned true Aug 24 17:43:29 debianl016 pulseaudio[2204]: [pulseaudio] client-conf-x11.c: xcb_connection_has_error() returned true Aug 24 17:43:29 debianl016 rtkit-daemon[1216]: Successfully made thread 2215 of process 2215 (/usr/bin/pulseaudio) owned by '2003' high priority at nice level -11. Aug 24 17:43:29 debianl016 rtkit-daemon[1216]: Supervising 1 threads of 1 processes of 1 users. Aug 24 17:43:29 debianl016 pulseaudio[2215]: [pulseaudio] main.c: Daemon startup without any loaded modules, refusing to work. Aug 24 17:43:29 debianl016 pulseaudio[2206]: [pulseaudio] main.c: Daemon startup failed. Aug 24 17:43:29 debianl016 rtkit-daemon[1216]: Successfully made thread 2217 of process 2217 (/usr/bin/pulseaudio) owned by '2003' high priority at nice level -11. Aug 24 17:43:29 debianl016 rtkit-daemon[1216]: Supervising 1 threads of 1 processes of 1 users. Aug 24 17:43:29 debianl016 pulseaudio[2217]: [pulseaudio] main.c: Daemon startup without any loaded modules, refusing to work. Aug 24 17:43:29 debianl016 pulseaudio[2204]: [pulseaudio] main.c: Daemon startup failed. Aug 24 17:43:29 debianl016 kernel: [ 338.958104] usb 1-2.4: USB disconnect, device number 9 Aug 24 17:43:29 debianl016 kernel: [ 339.256760] usb 1-2.4: new full-speed USB device number 12 using xhci_hcd Aug 24 17:43:30 debianl016 kernel: [ 339.447919] usb 1-2.4: New USB device found, idVendor=04d8, idProduct=0059 Aug 24 17:43:30 debianl016 kernel: [ 339.447939] usb 1-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Aug 24 17:43:30 debianl016 kernel: [ 339.447953] usb 1-2.4: Product: Lighted Rockers 01-016 Aug 24 17:43:30 debianl016 kernel: [ 339.447964] usb 1-2.4: Manufacturer: Aug 24 17:43:30 debianl016 kernel: [ 339.447976] usb 1-2.4: SerialNumber: 01-016 Aug 24 17:43:30 debianl016 mtp-probe: checking bus 1, device 12: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.4" Aug 24 17:43:30 debianl016 mtp-probe: bus: 1, device: 12 was not an MTP device Aug 24 17:46:27 debianl016 systemd-timesyncd[276]: interval/delta/delay/jitter/drift 512s/+0.002s/0.025s/0.005s/+53ppm Aug 24 17:47:13 debianl016 minissdpd[753]: 1 new devices added Aug 24 17:47:13 debianl016 minissdpd[753]: 1 new devices added Aug 24 17:47:13 debianl016 minissdpd[753]: 1 new devices added Aug 24 17:47:13 debianl016 minissdpd[753]: 1 new devices added Aug 24 17:51:59 debianl016 pulseaudio[2839]: [pulseaudio] client-conf-x11.c: xcb_connection_has_error() returned true Aug 24 17:51:59 debianl016 rtkit-daemon[1216]: Successfully made thread 2871 of process 2871 (/usr/bin/pulseaudio) owned by '2003' high priority at nice level -11. Aug 24 17:51:59 debianl016 rtkit-daemon[1216]: Supervising 1 threads of 1 processes of 1 users. Aug 24 17:51:59 debianl016 pulseaudio[2871]: [pulseaudio] main.c: Daemon startup without any loaded modules, refusing to work. Aug 24 17:51:59 debianl016 pulseaudio[2839]: [pulseaudio] main.c: Daemon startup failed. Aug 24 17:51:59 debianl016 pulseaudio[2870]: [pulseaudio] client-conf-x11.c: xcb_connection_has_error() returned true Aug 24 17:51:59 debianl016 rtkit-daemon[1216]: Successfully made thread 2874 of process 2874 (/usr/bin/pulseaudio) owned by '2003' high priority at nice level -11. Aug 24 17:51:59 debianl016 rtkit-daemon[1216]: Supervising 1 threads of 1 processes of 1 users. Aug 24 17:51:59 debianl016 pulseaudio[2874]: [pulseaudio] main.c: Daemon startup without any loaded modules, refusing to work. Aug 24 17:51:59 debianl016 pulseaudio[2870]: [pulseaudio] main.c: Daemon startup failed. I also have a correct system A where pulseaudio is correctly configured, using lightdm. System B is on Gnome. BOTH are Debian 8 Jessie. How can I compare relevant files across systems A and B to avoid these pulseaudio related errors? Already verified: /etc/pulse/ is identical for systems A and B EDIT: After a thorough reinstall of pulseaudio, errors persist. Current syslog: Aug 24 18:42:26 debianl016 pulseaudio[4461]: [pulseaudio] client-conf-x11.c: xcb_connection_has_error() returned true Aug 24 18:42:26 debianl016 pulseaudio[4462]: [pulseaudio] client-conf-x11.c: xcb_connection_has_error() returned true Aug 24 18:42:26 debianl016 rtkit-daemon[1216]: Successfully made thread 4471 of process 4471 (/usr/bin/pulseaudio) owned by '2003' high priority at nice level -11. Aug 24 18:42:26 debianl016 rtkit-daemon[1216]: Supervising 1 threads of 1 processes of 1 users. Aug 24 18:42:26 debianl016 pulseaudio[4471]: [pulseaudio] module-alsa-card.c: Failed to find a working profile. Aug 24 18:42:26 debianl016 pulseaudio[4471]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="1" name="usb-CLASSIC_ORGAN_WORKS_CLASSIC_Lighted_Rockers_01-016_01-016-00-C01016" card_name="alsa_card.usb-CLASSIC_ORGAN_WORKS_CLASSIC_Lighted_Rockers_01-016_01-016-00-C01016" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed. Aug 24 18:42:26 debianl016 rtkit-daemon[1216]: Supervising 1 threads of 1 processes of 1 users. Aug 24 18:42:26 debianl016 rtkit-daemon[1216]: Successfully made thread 4483 of process 4471 (/usr/bin/pulseaudio) owned by '2003' RT at priority 5. Aug 24 18:42:26 debianl016 rtkit-daemon[1216]: Supervising 2 threads of 1 processes of 1 users. Aug 24 18:42:26 debianl016 rtkit-daemon[1216]: Supervising 2 threads of 1 processes of 1 users. Aug 24 18:42:26 debianl016 rtkit-daemon[1216]: Successfully made thread 4484 of process 4471 (/usr/bin/pulseaudio) owned by '2003' RT at priority 5. Aug 24 18:42:26 debianl016 rtkit-daemon[1216]: Supervising 3 threads of 1 processes of 1 users. Aug 24 18:42:26 debianl016 pulseaudio[4471]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally with the following error: No protocol specified Aug 24 18:42:26 debianl016 pulseaudio[4471]: [pulseaudio] server-lookup.c: Autolaunch error: X11 initialization failed. Aug 24 18:42:26 debianl016 pulseaudio[4471]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally with the following error: No protocol specified Aug 24 18:42:26 debianl016 pulseaudio[4471]: [pulseaudio] main.c: Autolaunch error: X11 initialization failed. Aug 24 18:42:26 debianl016 rtkit-daemon[1216]: Successfully made thread 4488 of process 4488 (/usr/bin/pulseaudio) owned by '2003' high priority at nice level -11. Aug 24 18:42:26 debianl016 rtkit-daemon[1216]: Supervising 4 threads of 2 processes of 1 users. Aug 24 18:42:26 debianl016 pulseaudio[4488]: [pulseaudio] pid.c: Daemon already running. pulseaudio --dump-modules: module-alsa-card ALSA Card module-alsa-sink ALSA Sink module-alsa-source ALSA Source module-always-sink Always keeps at least one sink loaded even if it's a null one module-augment-properties Augment the property sets of streams with additional static information module-card-restore Automatically restore profile of cards module-cli Command line interface module-cli-protocol-tcp Command line interface protocol (TCP sockets) module-cli-protocol-unix Command line interface protocol (UNIX sockets) module-combine Compatibility module (module-combine rename) module-combine-sink Combine multiple sinks to one module-console-kit Create a client for each ConsoleKit session of this user module-dbus-protocol D-Bus interface module-default-device-restore Automatically restore the default sink and source module-detect Detect available audio hardware and load matching drivers module-device-manager Keep track of devices (and their descriptions) both past and present and prioritise by role module-device-restore Automatically restore the volume/mute state of devices module-echo-cancel Echo Cancellation module-equalizer-sink General Purpose Equalizer module-esound-sink ESOUND Sink module-filter-apply Load filter sinks automatically when needed module-filter-heuristics Detect when various filters are desirable module-http-protocol-tcp HTTP (TCP sockets) module-http-protocol-unix HTTP (UNIX sockets) module-intended-roles Automatically set device of streams based on intended roles of devices module-ladspa-sink Virtual LADSPA sink module-loopback Loopback from source to sink module-match Playback stream expression matching module module-mmkbd-evdev Multimedia keyboard support via Linux evdev module-native-protocol-fd Native protocol autospawn helper module-native-protocol-tcp Native protocol (TCP sockets) module-native-protocol-unix Native protocol (UNIX sockets) module-null-sink Clocked NULL sink module-null-source Clocked NULL source module-oss OSS Sink/Source module-pipe-sink UNIX pipe sink module-pipe-source UNIX pipe source module-position-event-sounds Position event sounds between L and R depending on the position on screen of the widget triggering them. module-remap-sink Virtual channel remapping sink module-remap-source Virtual channel remapping source module-rescue-streams When a sink/source is removed, try to move its streams to the default sink/source module-role-cork Mute & cork streams with certain roles while others exist module-role-ducking Apply a ducking effect based on streams roles module-rtp-recv Receive data from a network via RTP/SAP/SDP module-rtp-send Read data from source and send it to the network via RTP/SAP/SDP module-rygel-media-server UPnP MediaServer Plugin for Rygel module-simple-protocol-tcp Simple protocol (TCP sockets) module-simple-protocol-unix Simple protocol (UNIX sockets) module-sine Sine wave generator module-sine-source Sine wave generator source module-stream-restore Automatically restore the volume/mute/device state of streams module-suspend-on-idle When a sink/source is idle for too long, suspend it module-switch-on-connect When a sink/source is added, switch to it module-switch-on-port-available n/a module-systemd-login Create a client for each login session of this user module-tunnel-sink Tunnel module for sinks module-tunnel-sink-new Create a network sink which connects via a stream to a remote PulseAudio server module-tunnel-source Tunnel module for sources module-tunnel-source-new Create a network source which connects via a stream to a remote PulseAudio server module-udev-detect Detect available audio hardware and load matching drivers module-virtual-sink Virtual sink module-virtual-source Virtual source module-virtual-surround-sink Virtual surround sink module-volume-restore Compatibility module module-x11-bell X11 bell interceptor module-x11-cork-request Synthesize X11 media key events when cork/uncork is requested module-x11-publish X11 credential publisher module-x11-xsmp X11 session management aplay -l: **** List of PLAYBACK Hardware Devices **** Failed to create secure directory (/run/user/1000/pulse): Permission denied card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2] Subdevices: 1/1 Subdevice #0: subdevice #0 kern.log on restarting the MIDI communications program: Aug 25 10:42:43 debianl016 pulseaudio[1584]: Failed to create secure directory (/run/user/1000/pulse): Permission denied Aug 25 10:42:43 debianl016 pulseaudio[1584]: Failed to generate socket path. Aug 25 10:42:43 debianl016 pulseaudio[1584]: Failed to load module "module-cli-protocol-unix" (argument: ""): initialization failed. Aug 25 10:42:43 debianl016 pulseaudio[1584]: Failed to create secure directory (/run/user/1000/pulse): Permission denied Aug 25 10:42:43 debianl016 pulseaudio[1584]: Failed to generate socket path. Aug 25 10:42:43 debianl016 pulseaudio[1584]: Failed to load module "module-cli-protocol-unix" (argument: ""): initialization failed. Aug 25 10:42:43 debianl016 pulseaudio[1584]: Failed to create secure directory (/run/user/1000/pulse): Permission denied Aug 25 10:42:43 debianl016 pulseaudio[1584]: Failed to generate socket path. Aug 25 10:42:43 debianl016 pulseaudio[1584]: Failed to load module "module-cli-protocol-unix" (argument: ""): initialization failed. Aug 25 10:42:44 debianl016 pulseaudio[1584]: Failed to create secure directory (/run/user/1000/pulse): Permission denied Aug 25 10:42:44 debianl016 pulseaudio[1584]: Failed to generate socket path. Aug 25 10:42:44 debianl016 pulseaudio[1584]: Failed to load module "module-cli-protocol-unix" (argument: ""): initialization failed. Aug 25 10:42:44 debianl016 pulseaudio[1584]: Failed to create secure directory (/run/user/1000/pulse): Permission denied Aug 25 10:42:44 debianl016 pulseaudio[1584]: Failed to generate socket path. Aug 25 10:42:44 debianl016 pulseaudio[1584]: Failed to load module "module-cli-protocol-unix" (argument: ""): initialization failed. Aug 25 10:42:56 debianl016 pulseaudio[1584]: Failed to create secure directory (/run/user/1000/pulse): Permission denied Aug 25 10:43:00 debianl016 pulseaudio[2110]: Stale PID file, overwriting. Aug 25 10:43:00 debianl016 pulseaudio[2110]: Failed to find a working profile. Aug 25 10:43:00 debianl016 pulseaudio[2110]: Failed to load module "module-alsa-card" (argument: "device_id="1" name="usb-CLASSIC_ORGAN_WORKS_CLASSIC_Lighted_Rockers_01-016_01-016-00-C01016" card_name="alsa_card.usb-CLASSIC_ORGAN_WORKS_CLASSIC_Lighted_Rockers_01-016_01-016-00-C01016" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed. Aug 25 10:43:00 debianl016 pulseaudio[2110]: Unable to contact D-Bus: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. Aug 25 10:43:00 debianl016 pulseaudio[2110]: Unable to contact D-Bus: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. CONCLUSION: I had to apt-get purge pulseaudio and remove pulse-related files in /usr/share/alsa in order for the MIDI program to work - it seems as if pulseaudio was interfering with the communication. |
How to install apps on separate HDD in Linux (Fedora) Posted: 25 Aug 2021 07:53 AM PDT I migrated from Windows to Linux. I have 96GB SSD disk, where I have my Fedora installed. The external HDD is 1TB. On MS-Windows I had my OS installed on SSD disk and every app I was installing to HDD. How can I achieve this in Linux? I tried to mount my HDD to /opt, when I tried to install google-chrome it crashed. Total 3.9 MB/s | 86 MB 00:22 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Running scriptlet: google-chrome-unstable-94.0.4606.12-1.x86_64 1/1 Installing : google-chrome-unstable-94.0.4606.12-1.x86_64 1/1 Error unpacking rpm package google-chrome-unstable-94.0.4606.12-1.x86_64 Errors occurred during transaction. Verifying : google-chrome-unstable-94.0.4606.12-1.x86_64 1/1 Completion plugin: Generating completion cache... Failed: google-chrome-unstable-94.0.4606.12-1.x86_64 Failed: google-chrome-unstable-94.0.4606.12-1.x86_64 Error: Transaction failed Disk is mounted like /opt /dev/sda2 vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset |
Nano line numbers are wrong, and sometimes appear on the wrong side of the file Posted: 25 Aug 2021 07:22 AM PDT When I open any file in nano and line numbers are enabled, the line numbers are completely wrong, and appear on the wrong side! This happens with any file. Here's one example: The actual file seems correct: ➜ ngnix-proxy-manager cat -A docker-compose.yml version: "3"$ services:$ app:$ image: 'jc21/nginx-proxy-manager:latest'$ restart: unless-stopped$ ports:$ # Public HTTP Port:$ - '80:80'$ # Public HTTPS Port:$ - '443:443'$ # Admin Web Port:$ - '81:81'$ # Add any other Stream port you want to expose$ # - '21:21' # FTP$ environment:$ # These are the settings to access your db$ DB_MYSQL_HOST: "db"$ DB_MYSQL_PORT: 3306$ DB_MYSQL_USER: "npm"$ DB_MYSQL_PASSWORD: "npm"$ DB_MYSQL_NAME: "npm"$ # If you would rather use Sqlite uncomment this$ # and remove all DB_MYSQL_* lines above$ # DB_SQLITE_FILE: "/data/database.sqlite"$ # Uncomment this if IPv6 is not enabled on your host$ # DISABLE_IPV6: 'true'$ volumes:$ - ./data:/data$ - ./letsencrypt:/etc/letsencrypt$ depends_on:$ - db$ db:$ image: 'jc21/mariadb-aria:latest'$ restart: unless-stopped$ environment:$ MYSQL_ROOT_PASSWORD: 'npm'$ MYSQL_DATABASE: 'npm'$ MYSQL_USER: 'npm'$ MYSQL_PASSWORD: 'npm'$ volumes:$ - ./data/mysql:/var/lib/mysql$ ➜ ngnix-proxy-manager od -c docker-compose.yml 0000000 v e r s i o n : " 3 " \n s e r 0000020 v i c e s : \n a p p : \n 0000040 i m a g e : ' j c 2 1 / n 0000060 g i n x - p r o x y - m a n a g 0000100 e r : l a t e s t ' \n r 0000120 e s t a r t : u n l e s s - s 0000140 t o p p e d \n p o r t s 0000160 : \n # P u b l i c 0000200 H T T P P o r t : \n 0000220 - ' 8 0 : 8 0 ' \n 0000240 # P u b l i c H T T P S 0000260 P o r t : \n - ' 0000300 4 4 3 : 4 4 3 ' \n # 0000320 A d m i n W e b P o r t : 0000340 \n - ' 8 1 : 8 1 ' 0000360 \n # A d d a n y 0000400 o t h e r S t r e a m p o 0000420 r t y o u w a n t t o e 0000440 x p o s e \n # - 0000460 ' 2 1 : 2 1 ' # F T P \n 0000500 e n v i r o n m e n t : \n 0000520 # T h e s e a r e 0000540 t h e s e t t i n g s t o 0000560 a c c e s s y o u r d b \n 0000600 D B _ M Y S Q L _ H 0000620 O S T : " d b " \n 0000640 D B _ M Y S Q L _ P O R T : 3 0000660 3 0 6 \n D B _ M Y S 0000700 Q L _ U S E R : " n p m " \n 0000720 D B _ M Y S Q L _ P A 0000740 S S W O R D : " n p m " \n 0000760 D B _ M Y S Q L _ N A M 0001000 E : " n p m " \n # 0001020 I f y o u w o u l d r a 0001040 t h e r u s e S q l i t e 0001060 u n c o m m e n t t h i s \n 0001100 # a n d r e m o v 0001120 e a l l D B _ M Y S Q L _ * 0001140 l i n e s a b o v e \n 0001160 # D B _ S Q L I T E _ F 0001200 I L E : " / d a t a / d a t a 0001220 b a s e . s q l i t e " \n 0001240 # U n c o m m e n t t 0001260 h i s i f I P v 6 i s n 0001300 o t e n a b l e d o n y o 0001320 u r h o s t \n # 0001340 D I S A B L E _ I P V 6 : ' t 0001360 r u e ' \n v o l u m e s 0001400 : \n - . / d a t a 0001420 : / d a t a \n - . 0001440 / l e t s e n c r y p t : / e t 0001460 c / l e t s e n c r y p t \n 0001500 d e p e n d s _ o n : \n 0001520 - d b \n d b : \n 0001540 i m a g e : ' j c 2 1 / 0001560 m a r i a d b - a r i a : l a t 0001600 e s t ' \n r e s t a r t 0001620 : u n l e s s - s t o p p e d 0001640 \n e n v i r o n m e n t 0001660 : \n M Y S Q L _ R O 0001700 O T _ P A S S W O R D : ' n p 0001720 m ' \n M Y S Q L _ D 0001740 A T A B A S E : ' n p m ' \n 0001760 M Y S Q L _ U S E R : 0002000 ' n p m ' \n M Y S 0002020 Q L _ P A S S W O R D : ' n p 0002040 m ' \n v o l u m e s : \n 0002060 - . / d a t a / m 0002100 y s q l : / v a r / l i b / m y 0002120 s q l \n 0002124 Versions: - Synology DSM
6.2.4-25556 GNU nano, version 3.1 I've tried different combinations of shells and clients - the same problem occurs: - GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
zsh 5.2 (x86_64-buildroot-linux-gnu) - ohmyzsh - latest master
- OS X Terminal
- Windows Terminal
1.9.1942.0 , with profile Powershell 7.1.3 I've tried reinstalling sudo /opt/bin/ipkg install nano --force-reinstall nano correctly reads the nanorc file > more $XDG_CONFIG_HOME/nano/nanorc set linenumbers Once I even got a crash: > nano docker-compose.yml.save Sorry! Nano crashed! Code: 11. Please report a bug. The line number changes when I edit the content of a line. Here I add a # and the line number changes: 211 - 225 - 239 - When line numbers are disabled, nano works correctly. Here I've commented out the setting, and re-opened nanorc: Updated to DSM 7 I updated my Synology to DSM 7 and tried using nano again. Again, without set linenumbers , the output is garbled. Also, I get some nice error messages: Badness: tried to display a line on row -1851878901 -- please report a bug The row number changes a few times as the file is loaded, before I get this error: Further warnings were suppressed |
Write firmware over /dev/ttyUSB0 to embedded device Posted: 25 Aug 2021 10:20 AM PDT I'm using the last example in: this post I keep getting wctx:file length=0 after the sz command. I'm actually opening the serial connection with minicom Minicom is botching the transfer. So, after I get to press enter to begin update in the minicom window, at which point the normal course is to go into the menu, select S for send, choose Xmodem, locate the firmware file and select it, at which point the transfer begins and fails almost immediately; I move to a different virtual terminal window, and run sz -X -k -b -vvv - /tmp/sz_fifo > /dev/ttyUSB0 < /dev/ttyUSB0 after which I receive sz 0.12.21rc mode:1 sending s20806.lsz 0 blocks: give your Xmodem receive command now and I move into the minicom window where it still says to begin update press enter I hit enter, and get this in the sz window Xmodem sectors/kbytes sent 0/ 0kretry Timeout on sector ACK the last part repeated several times, then retry count exceeded followed by mode:0 I don't know if the fifo is empty, if I need to select Xmodem protocol in minicom, or what! I'm about to try using Windows for this job. I am far from from expert on modem protocols and fifos. Although I started somewhere around Debian Woody. In response to the comment, "hit enter before you hit s", Using minicom, update works by accessing the serial interface of the embedded card. Two options provided by the embedded card, CRCXmodem and 1K-Xmodem. I select 1K-Xmodem, and the response, "detatch terminal, change speed to 115,600, and reconnect". The card changes its own speed. Minicom reconnects after the speed change in port settings, and the embedded card says, "press enter to begin firmware update". At this point the written instructions in the manual for the embedded card read, "send firmware update file". I hit CTRLA + z for the minicom menu, select 'S' for send, at which point I can choose a protocol. I choose Xmodem, and a file browser appears, which I use to select the firmware file. Upon hitting enter, the update begins, shortly to fail. If I hit enter before I select 'S' in the minicom menu, nothing is sent, and the update fails. If I hit enter before accessing the minicom menu, the timer on the embedded card expires and the update fails. I was trying sz, because it worked in the link I provided above, using a named pipe. Without minicom, I don't know how to prepare the embedded system to receive the firmware, but minicom fails after that point. I was attempting to remedy that specific problem, especially since minicom has no option specifically for 1K-Xmodem, only Xmodem. Whereas, sz has the -k switch for 1K-Xmodem, as is specified in the options the card offers. |
Any way of recovering ubuntu after purging Python 3? Posted: 25 Aug 2021 09:11 AM PDT I used purging for dealing with errors before but had no idea how integral python is for ubuntu's functioning. I tried chrooting and using the commands for fixing broken installs, autoremoving and update/upgrade with no success. It all started because of a crash during an upgrade from 18.04 to 20.04, the python errors appeared after i tried fixing through chroot |
Bluetooth not able to make work. MPOW BH519A Posted: 25 Aug 2021 08:11 AM PDT I am trying to get my MPOW BH519A Bluetooth adapter to work. There are similar posts, including one on this adapter. Unfortunately, I tried them all and nothing helped. I have already tested some commands like: - sudo apt install blueman
- sudo make install INTERFACE=all (MPOW Linux Driver download, inside of the folder ran this command)
- sudo mv -v ~/Downloads/rtl8761b_config /usr/lib/firmware/rtl_bt/rtl8761b_config.bin
- snap install bluez4
- snap install bluez
- sudo apt install bluez bluez-obexd
- sudo apt-get install bluez-utils libopemnobex1
- sudo apt reinstall bluez
- sudo blueman-manager
Im not even able to make the led run. I managed to set the control to on, but it says "no bluetooth adapter found". After several attempts with different commands, I was not even able to set the control to on. I have the feeling that I may have duplications or simply overlook something essential since I am a complete Ubuntu beginner. Here are a number of ouputs. Unfortunately I don't know in detail which information is helpful for you.
lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal
~$ dmesg | grep -i bluetooth [ 2.308927] usb 3-2: Product: Bluetooth Radio [ 18.340266] Bluetooth: Core ver 2.22 [ 18.340297] Bluetooth: HCI device and connection manager initialized [ 18.340301] Bluetooth: HCI socket layer initialized [ 18.340303] Bluetooth: L2CAP socket layer initialized [ 18.340306] Bluetooth: SCO socket layer initialized [ 55.439177] audit: type=1400 audit(1627551927.132:64): apparmor="DENIED" operation="create" profile="snap.bluetooth-autostart.autostart-bluetooth" pid=883 comm="hciconfig" family="bluetooth" sock_type="raw" protocol=1 requested_mask="create" denied_mask="create" [ 65.993297] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 65.993300] Bluetooth: BNEP filters: protocol multicast [ 65.993305] Bluetooth: BNEP socket layer initialized
~$ echo "options btusb enable_autosuspend=0" | sudo tee -a /etc/modprobe.d/btusb.conf options btusb enable_autosuspend=0
~$ systemctl | grep -i blue run-snapd-ns-bluetooth\x2dautostart.mnt.mount loaded active mounted /run/snapd/ns/bluetooth-autostart.mnt snap-bluetooth\x2dautostart-10.mount loaded active mounted Mount unit for bluetooth-autostart, revision 10 bluetooth.service loaded active running Bluetooth service ● snap.bluetooth-autostart.autostart-bluetooth.service loaded failed failed Service for snap application bluetooth-autostart.autostart-bluetooth ~$ lsusb Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 004: ID 2357:0109 TP-Link TL WN823N RTL8192EU Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 004: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse Bus 003 Device 003: ID 0bda:2550 Realtek Semiconductor Corp. Bluetooth Radio Bus 003 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub rfkill list all 0: phy0: Wireless LAN Soft blocked: no Hard blocked: no I appreciate every answer. [EDIT] 20200610_LINUX_BT_DRIVER/20200610_LINUX_BT_DRIVER/uart/bluetooth_uart_driver/hci_ldisc.c:1086:22: error: assignment to 'ssize_t (*)(struct tty_struct *, struct file *, unsigned char , size_t, void **, long unsigned int)' {aka 'long int ()(struct tty_struct *, struct file *, unsigned char , long unsigned int, void **, long unsigned int)'} from incompatible pointer type 'ssize_t ()(struct tty_struct *, struct file *, unsigned char , size_t)' {aka 'long int ()(struct tty_struct *, struct file *, unsigned char *, long unsigned int)'} [-Werror=incompatible-pointer-types] 1086 | hci_uart_ldisc.read = hci_uart_tty_read; | ^ cc1: some warnings being treated as errors Here the code of the hci_ldisc.c file: /* * We don't provide read/write/poll interface for user space. */ static ssize_t hci_uart_tty_read(struct tty_struct *tty, struct file *file, unsigned char __user * buf, size_t nr) { return 0; } static ssize_t hci_uart_tty_write(struct tty_struct *tty, struct file *file, const unsigned char *data, size_t count) { return 0; } static unsigned int hci_uart_tty_poll(struct tty_struct *tty, struct file *filp, poll_table * wait) { return 0; } static int __init hci_uart_init(void) { static struct tty_ldisc_ops hci_uart_ldisc; int err; BT_INFO("HCI UART driver ver %s", VERSION); /* Register the tty discipline */ memset(&hci_uart_ldisc, 0, sizeof(hci_uart_ldisc)); hci_uart_ldisc.magic = TTY_LDISC_MAGIC; hci_uart_ldisc.name = "n_hci"; hci_uart_ldisc.open = hci_uart_tty_open; hci_uart_ldisc.close = hci_uart_tty_close; hci_uart_ldisc.read = hci_uart_tty_read; hci_uart_ldisc.write = hci_uart_tty_write; hci_uart_ldisc.ioctl = hci_uart_tty_ioctl; hci_uart_ldisc.poll = hci_uart_tty_poll; hci_uart_ldisc.receive_buf = hci_uart_tty_receive; hci_uart_ldisc.write_wakeup = hci_uart_tty_wakeup; hci_uart_ldisc.owner = THIS_MODULE; [EDIT] When running "sudo make install INTERFACE=usb" mkdir -p /lib/modules/5.11.0-27-generic/kernel/drivers/bluetooth Start Realtek Bluetooth USB driver installation mkdir -p /lib/firmware Copy rtkbt-firmware/lib/firmware/rtl*_fw to /lib/firmware cp -a rtkbt-firmware/lib/firmware/rtl*_fw /lib/firmware Copy rtkbt-firmware/lib/firmware/rtl*_config /lib/firmware cp -a rtkbt-firmware/lib/firmware/rtl*_config /lib/firmware make -C usb install make[1]: Verzeichnis „/home/ubuntu/Schreibtisch/20200610_LINUX_BT_DRIVER/20200610_LINUX_BT_DRIVER/usb" wird betreten rmmod btusb rmmod: ERROR: Module btusb is not currently loaded make[1]: [Makefile:7: install] Fehler 1 (ignoriert) mv /lib/modules/5.11.0-27-generic/kernel/drivers/bluetooth/btusb.ko /lib/modules/5.11.0-27-generic/kernel/drivers/bluetooth/btusb_bak mv: Aufruf von stat für '/lib/modules/5.11.0-27-generic/kernel/drivers/bluetooth/btusb.ko' nicht möglich: Datei oder Verzeichnis nicht gefunden make[1]: [Makefile:8: install] Fehler 1 (ignoriert) rmmod rtk_btusb rmmod: ERROR: Module rtk_btusb is not currently loaded make[1]: [Makefile:9: install] Fehler 1 (ignoriert) make -C ./bluetooth_usb_driver make[2]: Verzeichnis „/home/ubuntu/Schreibtisch/20200610_LINUX_BT_DRIVER/20200610_LINUX_BT_DRIVER/usb/bluetooth_usb_driver" wird betreten make -C /lib/modules/5.11.0-27-generic/build M=/home/ubuntu/Schreibtisch/20200610_LINUX_BT_DRIVER/20200610_LINUX_BT_DRIVER/usb/bluetooth_usb_driver modules make[3]: Verzeichnis „/usr/src/linux-headers-5.11.0-27-generic" wird betreten make[3]: Verzeichnis „/usr/src/linux-headers-5.11.0-27-generic" wird verlassen make[2]: Verzeichnis „/home/ubuntu/Schreibtisch/20200610_LINUX_BT_DRIVER/20200610_LINUX_BT_DRIVER/usb/bluetooth_usb_driver" wird verlassen cp -f ./bluetooth_usb_driver/rtk_btusb.ko /lib/modules/5.11.0-27-generic/kernel/drivers/bluetooth/rtk_btusb.ko depmod -a 5.11.0-27-generic make -C ./bluetooth_usb_driver clean make[2]: Verzeichnis „/home/ubuntu/Schreibtisch/20200610_LINUX_BT_DRIVER/20200610_LINUX_BT_DRIVER/usb/bluetooth_usb_driver" wird betreten rm -rf *.o *.mod.c *.mod.o *.ko *.symvers *.order *.a make[2]: Verzeichnis „/home/ubuntu/Schreibtisch/20200610_LINUX_BT_DRIVER/20200610_LINUX_BT_DRIVER/usb/bluetooth_usb_driver" wird verlassen echo "install rtk_btusb success!" install rtk_btusb success! make[1]: Verzeichnis „/home/ubuntu/Schreibtisch/20200610_LINUX_BT_DRIVER/20200610_LINUX_BT_DRIVER/usb" wird verlassen |
Prevent a disabled account to run processes Posted: 25 Aug 2021 06:56 AM PDT Daily I look at processes on my Debian (Stretch) server using something like top or ps -aux and I see an account which is inactive $ sudo passwd --status myuser myuser L 12/12/2016 ... yet, ps and top return an activity by the user, running node (which is not even installed), it last a couple of seconds each 2 min approximately and can get intensive in resources (50-90%) on one CPU. Here is what is shown with $ top -U myuser : PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2172 myuser+ 20 0 382868 144940 34668 R 64.5 2.4 0:01.94 node and with $ ps -e -H -O pid,ppid,stime,etime,user,args> file PID PID PPID STIME ELAPSED USER COMMAND S TTY TIME COMMAND 2172 2172 2155 11:22 00:05 myuser+ node server S ? 00:00:02 node server How would I investigate deeper to find how this locked user can launch this process - with the goal of preventing it? EDIT: as suggested by @Paul_Pedant I checked this user's crontab and there is no tasks scheduled. Also I checked mail for this user, they have daily email forwarded from root (they installed the machine in the first place so they had root access before). Email topic are cron jobs reports, as suggested in comments. But the user have no cron jobs proper. Presently investigating the daily.cron but I don't think I will find something related to the user there. |
Bluetooth Pairing on Dual Boot of Windows & Linux Mint/Ubuntu - Stop having to Pair Devices - Not working Posted: 25 Aug 2021 09:49 AM PDT I've tried everything mentioned on the answers mentioned in the following post: Bluetooth Pairing on Dual Boot of Windows & Linux Mint/Ubuntu - Stop having to Pair Devices But I've made no progress. A few details about my system: Keyboard: Logitech K380 (Bluetooth) Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal Windows 10 (Latest edition as of writing this post) After changing my keys in linux to the ones from windows, the keyboard connects for a fraction of a second, before disconnecting, and I'm unable to understand why. My keyboard has 3 profiles that I can switch from and I tried all combinations of profile choice in windows and linux. I've spent quite a few hours on this and any help would be appreciated. Please let me know if I am missing any details that might help. |
Using Palatino font with groff mom macros Posted: 25 Aug 2021 10:06 AM PDT I am trying to use the Palatino font with my groff mom document. The documentation says FAMILY takes one argument: the name of the family you want. Groff comes with a small set of basic families, each identified by a 1-, 2-or 3-letter mnemonic. The standard families are: A = Avant Garde BM = Bookman H = Helvetica HN = Helvetica Narrow N = New Century Schoolbook P = Palatino T = Times Roman ZCM = Zapf Chancery The argument you pass to FAMILY is the identifier at left, above. For example, if you want Helvetica, enter .FAMILY H I assume then that I can use the Palatino font with .FAMILY P . However, when I do this I get these warnings, and the compiled PDF uses a fallback monospace font: report.mom:28: warning: can't find font `PR' report.mom:31: warning: can't find font `PB' report.mom:31: warning: can't find font `PI' report.mom:31: warning: can't find font `PBI' [mom]: Either font style "B" at line 31 does not exist in family "P", or family "P" has not been installed. Aborting 'report.mom' at FT, line 31. I am compiling like this: pdfmom -t report.mom > report.pdf I have groff version 1.22.3 installed. My interpretation of "Groff comes with a small set of basic families" is that all of the standard families are available in the default installation of groff. Am I mistaken? Is there a manual step I need to take to install or configure Palatino for use by groff? Edit Looking more closely on my system: $ ls /usr/share/groff/1.22.3/font/devpdf CB CI DESC enc Foundry HBI HR S TBI TR ZD CBI CR download EURO HB HI map TB TI util $ ls /usr/share/groff/1.22.3/font/devps AB BMB CB DESC freeeuro.pfa HI HNR NI PI SS text.enc ZCMI ABI BMBI CBI download generate HNB HR NR PR symbolsl.pfa TI ZD AI BMI CI EURO HB HNBI NB PB prologue TB TR ZDR AR BMR CR freeeuro.afm HBI HNI NBI PBI S TBI zapfdr.pfa So it appears I have Palantino available for the ps device (because of the P* files in font/devps ) but not for the pdf device. I tried to just copy the P* files from font/devps to font/devpdf and recompile, but then the text had weird spacing issues after. There are no spacing issues if I compile with -Tps . How can I correctly configure my system to allow me to use the Palantino font with the pdf device? |
Why does `ssh-agent -k` not kill ssh-agent (macOS), or why is `SSH_AGENT_PID` not set? Posted: 25 Aug 2021 10:00 AM PDT I'm trying to troubleshoot a sudden outbreak of short-lived SSH connections. These connections are initiated from my Mac (MBP, Catalina 10.15.6, zsh ) to some of the Linux "appliances" that live on my network here - in particular the Raspberry Pies. After the connections terminate, they leave the message client_loop: send disconnect: Broken pipe in the terminal. However: That's offered only as background in case it's related to my immediate question: Why does the command ssh-agent -k not kill ssh-agent ? It appears to fail because the environment variable SSH_AGENT_PID is not set. I have guessed that based on what I see in my Mac terminal app: 1. list ssh-related processes: % pgrep -f ssh 2138 75076 75942 75943 75944 % ps 2138 PID TT STAT TIME COMMAND 2138 ?? S 0:00.26 /usr/bin/ssh-agent -l PID 2138 is ssh-agent , the other PIDs are active ssh connections to Raspberries or Ubuntu box - all Linux. 2. kill ssh-agent IAW man ssh-agent : From man ssh-agent : ssh-agent [-c | -s] -k -k Kill the current agent (given by the SSH_AGENT_PID environment variable). % ssh-agent -k SSH_AGENT_PID not set, cannot kill agent % sudo ssh-agent -k SSH_AGENT_PID not set, cannot kill agent % echo $SSH_AGENT_PID % I can kill ssh-agent using kill 2138 , or with pkill ssh-agent , and so it seems that perhaps the answer is Apple's version of ssh-agent doesn't provision the environment variable SSH_AGENT_PID . But if that's the answer, it raises another question: Is there a valid reason for not assigning the environment variable SSH_AGENT_PID ? Also note that a related question. However, the OP for that question didn't identify his SSH client host was macOS. He also indicated SSH_AGENT_PID was not set, but seemed concerned only with how ssh-agent was started. In my case (macOS), ssh-agent is started when an ssh connection is initiated. I found other Q&A in the "Similar Questions" suggestion box; I read a few of them, but none seem the same as mine. |
Restricting NFS share access to particular IPs or hosts and restricting others on suse Posted: 25 Aug 2021 09:14 AM PDT I have created a shared folder /data01/share on one Suse Gnu/Linux and also made entry for host(client) machine in /etc/exports /data01/share 10.241.200.53(rw,sync,no_root_squash,no_subtree_check) . But i am getting this after exportfs -a exportfs: No options for /data01/share 10.241.200.53(rw,sync,no_root_squash,no_subtree_check) : suggest (sync) to avoid warning exportfs: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export ":/data01/share 10.241.200.53(rw,sync,no_root_squash,no_subtree_check)". Assuming default behaviour ('no_subtree_check'). NOTE: this default has changed since nfs-utils version 1.0.x exportfs: Failed to stat /data01/share 10.241.200.53(rw,sync,no_root_squash,no_subtree_check): No such file or directory cat /etc/os-release NAME="SLES" VERSION="12-SP3" VERSION_ID="12.3" PRETTY_NAME="SUSE Linux Enterprise Server 12 SP3" ID="sles" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:suse:sles:12:sp3" systemctl status nfs-server.service nfs-server.service - NFS server and services Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled) Drop-In: /usr/lib/systemd/system/nfs-server.service.d └─nfsserver.conf /run/systemd/generator/nfs-server.service.d └─order-with-mounts.conf Active: active (exited) since Wed 2019-07-24 02:32:03 EDT; 2h 34min ago Main PID: 2562 (code=exited, status=0/SUCCESS) Tasks: 0 (limit: 512) CGroup: /system.slice/nfs-server.service Jul 24 02:32:03 OPT001CORE0002 systemd[1]: Starting NFS server and services... Jul 24 02:32:03 OPT001CORE0002 systemd[1]: Started NFS server and services. cat /etc/exports # See the exports(5) manpage for a description of the syntax of this file. # This file contains a list of all directories that are to be exported to # other computers via NFS (Network File System). # This file used by rpc.nfsd and rpc.mountd. See their manpages for details # on how make changes in this file effective. /data01/share 10.241.200.53(rw,sync,no_root_squash,no_subtree_check) ls -la /data01/share total 0 drwxrwxrwx 4 acmuser acmgrp 36 Jul 24 04:18 . drwxr-xr-x 6 acmuser acmgrp 65 Jul 24 04:16 .. drwxrwxrwx 3 acmuser acmgrp 18 Jul 24 04:18 support drwxrwxrwx 5 acmuser acmgrp 45 Jul 24 04:17 upgrade |
PDF reader with option to search multiple words at the time/match any of the words Posted: 25 Aug 2021 07:31 AM PDT Are there any PDF readers with advanced search options - searching several words at a time to be exact? Adobe has it by the name match any of the words as explained here. Regular (standard) search would acquire searching dog, viewing result, then cat, view result, then monkey... - which would mean I would go through entire file 3 times. I wish to input a list of words (strings) cat, dog, monkey, baby lion, and as I go through results, one by one, have all of the matching strings displayed, requiring going trough entire file only once. Another great option would be to search (in a described way) in multiple files. I've read grep can do that but, I wish my results were displayed in (pdf reader) GUI. Linux Mint 18.1 Serena |
Debian fresh install booting to grub prompt Posted: 25 Aug 2021 10:02 AM PDT What would cause a fresh install of Debian 9.5 to boot directly to the grub2 command line instead of the grub menu? Typing 'exit' at the prompt will take me into the menu where I can boot the system without issue. But for some reason, the default behavior is to boot to the grub command line. I don't see any option that I can set in /etc/default/grub to override this behavior. |
how to send a mail with attachment using sendmail command in unix Posted: 25 Aug 2021 07:05 AM PDT This is how I try to send, email with sendmail command. echo "Dear user, please find the attached file. Thanks, Support team " | mailx -s "x12 extract for 837 transaction" -a $LogFilePath/file.csv $email_id but i am getting the error as "-a illegal operation" checked with man mailx command there is no flag like -a and there flag for attachment. so I have tried with sendmail command ( echo $email_id #From: $email_from_recipients echo "MIME-Version: 1.0" echo "Content-Type: text/html; charset=us-ascii" echo Subject: Report $LogFilePath/file.csv ) | /usr/lib/sendmail -t it was not sending the file as attachment. the contents of the csv file is displayed in the body of the mail with comma separated one. how to send the attachment with sendmail command in unix? |
Automatically install unmet build dependencies as detected by dpkg-checkbuilddeps Posted: 25 Aug 2021 08:17 AM PDT Is there a command that installs all the unmet build dependencies that dpkg-checkbuilddeps would list? I tried to sed the output and give it to apt-get install , but it seems very hacky and for some reason didn't work in some environments. sudo apt-get install --yes $(dpkg-checkbuilddeps | sed 's/([^)]*)//g' | sed 's/dpkg-checkbuilddeps:\serror:\sUnmet build dependencies://g') Is there a better way? |
Why am I losing audio on VLC when playing HQ videos? Posted: 25 Aug 2021 09:02 AM PDT I am having a problem with VLC when I play HQ videos (720p and higher): when I try to look for a particular scene (say I am playing a movie and want to get to go to 30 minute mark) the sound goes off. It doesn't happen always but it does happen frequently, and when I loose the sound is only on the video I am playing. I never have this problem on Parole Media Player, so I think something must be misconfiguled on VLC. Does anybody have any idea what could be wrong and how can I fix it? Update: Following the advice from Skuminder , I ran vlc -vvv my_video.mp4 and here I present the lines concerning audio of the output I got: [0xae7705b0] faad decoder warning: decoded zero sample [0x8803d40] main playlist debug: reusing audio output [0x87f9030] pulse audio output debug: using stereo channel map [0xaad017c8] main spu text debug: looking for text renderer module matching "any": 3 candidates [0x87f9030] pulse audio output debug: changed buffer metrics: maxlength=4194304, tlength=46080, prebuf=0, minreq=15360 [0x87f9030] pulse audio output debug: connected to sink alsa_output.pci-0000_00_1b.0.analog-stereo [0x87f9030] main audio output debug: output 'f32l' 48000 Hz Stereo frame=1 samples/8 bytes [0xaaf06568] main volume debug: looking for audio volume module matching "any": 2 candidates [0x87f9030] pulse audio output debug: base volume: 65536 [0x87f9030] pulse audio output debug: changing sink 0: alsa_output.pci-0000_00_1b.0.analog-stereo (Built-in Audio Analog Stereo) [0xaaf06568] main volume debug: using audio volume module "float_mixer" [0x87f9030] main audio output debug: input 'f32l' 48000 Hz Stereo frame=1 samples/8 bytes [0xaaf07a58] main audio filter debug: looking for audio filter module matching "scaletempo": 14 candidates [0xaaf07a58] scaletempo audio filter debug: format: 48000 rate, 2 nch, 4 bps, fl32 [0xaaf07a58] scaletempo audio filter debug: params: 30 stride, 0.200 overlap, 14 search [0xaaf07a58] scaletempo audio filter debug: 1.000 scale, 1440.000 stride_in, 1440 stride_out, 1152 standing, 288 overlap, 672 search, 2400 queue, fl32 mode [0xaaf07a58] main audio filter debug: using audio filter module "scaletempo" [0x87f9030] main audio output debug: conversion: 'f32l'->'f32l' 48000 Hz->48000 Hz Stereo->Stereo [0x87f9030] main audio output debug: conversion pipeline complete [0x87f9030] main audio output debug: conversion: 'f32l'->'f32l' 48000 Hz->48000 Hz Stereo->Stereo [0x87f9030] main audio output debug: conversion pipeline complete [0xaaf0f228] main audio resampler debug: looking for audio resampler module matching "any": 3 candidates [0xaaf0f228] main audio resampler debug: using audio resampler module "samplerate" [0xae7705b0] main decoder debug: End of audio preroll [0x87f9030] pulse audio output debug: cannot synchronize start [0x87f9030] pulse audio output debug: deferring start (30851 us) [0x87f9030] pulse audio output debug: deferring start (9397 us) [0x87f9030] pulse audio output warning: starting late (-12465 us) [0x87f9030] pulse audio output debug: started [0x87f9030] pulse audio output debug: changing sink 0: alsa_output.pci-0000_00_1b.0.analog-stereo (Built-in Audio Analog Stereo) [0x87f9030] pulse audio output debug: underflow [0xb24024a0] main input debug: Buffering 0% [0xb24024a0] main input debug: Buffering 0% [0xb24024a0] main input debug: Buffering 32% [0xae7705b0] main decoder debug: End of audio preroll [0x87f9030] pulse audio output debug: underflow [0xb24024a0] main input debug: Buffering 66% [0xb24024a0] main input debug: Buffering 99% [0xb24024a0] main input debug: Stream buffering done (398 ms in 76 ms) [0x87f9030] pulse audio output debug: underflow [0xb24024a0] main input debug: Buffering 0% [0xb24024a0] main input debug: Buffering 0% [0xb24024a0] main input debug: Buffering 33% [0xb24024a0] main input debug: Buffering 66% [0xb24024a0] main input debug: Buffering 99% [0xb24024a0] main input debug: Stream buffering done (399 ms in 94 ms) [0xae7705b0] main decoder debug: End of audio preroll [0x87f9030] pulse audio output debug: underflow [0x87f9030] pulse audio output debug: underflow [0xb24024a0] main input debug: Buffering 0% [0xb24024a0] main input debug: Buffering 0% [0xb24024a0] main input debug: Buffering 33% [0xb24024a0] main input debug: Buffering 66% [0xb24024a0] main input debug: Buffering 99% [0xb24024a0] main input debug: Stream buffering done (399 ms in 3 ms) [0xae7705b0] main decoder debug: End of audio preroll [0x87f9030] pulse audio output debug: underflow [0x87f9030] pulse audio output debug: underflow [0xb24024a0] main input debug: Buffering 0% [0xb24024a0] main input debug: Buffering 0% [0xb24024a0] main input debug: Buffering 32% [0xae7705b0] main decoder debug: End of audio preroll [0x87f9030] pulse audio output debug: underflow [0xb24024a0] main input debug: Buffering 66% [0xb24024a0] main input debug: Buffering 99% [0xb24024a0] main input debug: Stream buffering done (398 ms in 49 ms) [0xae71ee18] main decoder debug: End of video preroll [0xae71ee18] main decoder debug: Received first picture [0xb24024a0] main input debug: Decoder buffering done in 599 ms [0x87f9030] pulse audio output debug: underflow[0x87f9030] main audio output debug: inserting 27606 zeroes [0x87f9030] main audio output warning: playback way too early (-575136): playing silence [0x87f9030] pulse audio output debug: underflow [0xb24024a0] main input debug: Buffering 0% [0xb24024a0] main input debug: Buffering 0% [0xb24024a0] main input debug: Buffering 32% [0xae7705b0] main decoder debug: End of audio preroll [0x87f9030] pulse audio output debug: underflow [0xb24024a0] main input debug: Buffering 66% [0xb24024a0] main input debug: Buffering 99% [0xb24024a0] main input debug: Stream buffering done (398 ms in 78 ms) Hope there's something interesting. |
Using autoreconf without root rights on a prefix path results in a corrupted configure-script Posted: 25 Aug 2021 08:06 AM PDT I am trying to compile a package (libdrm-2.4.59) and to use sed and autoreconf to remove a dependency: sed -e "/pthread-stubs/d" -i configure.ac && autoreconf -fiv It produces the following output: autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal -I /u/f0/students/estermad/tmp/share/aclocal --force -I m4 ${ACLOCAL_FLAGS} autoreconf: configure.ac: tracing autoreconf: running: libtoolize --install --copy --force libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. libtoolize: copying file 'build-aux/config.guess' libtoolize: copying file 'build-aux/config.sub' libtoolize: copying file 'build-aux/install-sh' libtoolize: copying file 'build-aux/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: You should add the contents of 'm4/libtool.m4' to 'aclocal.m4'. libtoolize: copying file 'm4/ltoptions.m4' libtoolize: You should add the contents of 'm4/ltoptions.m4' to 'aclocal.m4'. libtoolize: copying file 'm4/ltsugar.m4' libtoolize: You should add the contents of 'm4/ltsugar.m4' to 'aclocal.m4'. libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' libtoolize: You should add the contents of 'm4/lt~obsolete.m4' to 'aclocal.m4'. autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:32: installing `build-aux/missing' exynos/Makefile.am: installing `build-aux/depcomp' autoreconf: Leaving directory `.' This looks fine so far but as I call configure the build stops with a strange error: ... checking for pkg-config... /u/f0/students/estermad/tmp/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for PCIACCESS... configure: error: in `/u/f0/students/estermad/xc/libdrm-2.4.59': configure: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. ... Here are some parts of the config.log which show the error, the corresponding compiler and linker flags which were set correctly and the values related to pkg-config which are not set: configure:12927: checking for PCIACCESS configure:12932: $PKG_CONFIG --exists --print-errors "pciaccess >= 0.10" configure:12935: $? = 0 configure:12945: $PKG_CONFIG --exists --print-errors "pciaccess >= 0.10" configure:12948: $? = 0 configure:12970: error: in `/u/f0/students/estermad/xc/libdrm-2.4.59': ... ac_cv_env_PCIACCESS_CFLAGS_set=set ac_cv_env_PCIACCESS_CFLAGS_value=-I/u/f0/students/estermad/tmp/include ac_cv_env_PCIACCESS_LIBS_set=set ac_cv_env_PCIACCESS_LIBS_value='-L/u/f0/students/estermad/tmp/lib -lpciaccess' ac_cv_env_PKG_CONFIG_set= ac_cv_env_PKG_CONFIG_value= The autoreconf uses libtoolize which was missing on my system so I had to build libtool myself. All builds I do on this system have a prefix. The prefix used to build dependencies of libdrm among other things. For libtool I ran following: $ cd libtool-2.4.5 $ ./configure --prefix=/u/f0/students/estermad/tmp && make && make install $ libtool --finish /u/f0/students/estermad/tmp/lib However the build and install of the libtool runs without any errors. I have no idea if the resulting configure -script is corrupted due to autoreconf (located in /usr/bin/autoreconf), libtoolize (located in /u/f0/students/estermad/tmp/bin), aclocal or something different. I tried to build libdrm without using autoreconf , commenting out pthread-stubs manually. The build ran fine. Hence the above stated issue reveals only after running autoreconf . I would really appreciate some useful hints. |
No comments:
Post a Comment