Thursday, June 24, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


EFI logs for logging

Posted: 24 Jun 2021 12:06 PM PDT

Is it possible to get some logs about (U)EFI boot?

Because I have a Linux entry, who used to work, but since a crash I can't boot anymore on the OS. And the OS is totally fine in chroot. So I need to know what blocks the computer from booting that entry

Nohup output is scrambled

Posted: 24 Jun 2021 12:03 PM PDT

I ran/made a pooled/multithreaded python script that outputs a bunch of stuff in an order in which it operates. When I run the regular python command in my terminal I then see as expected some markers corresponding to places in the program execution (e.g. loaded, written parameters, progress, written output, etc.). I am experimenting with nohup for a remote server and when I run it both on the local computer and remote server, the output it writes to the nohup.out file is scrambled in a random order. It looks like the lines I expect are there. I am not sure if this has to do with the way it is handling the threaded process or something else. In my remote server it seems to throw an error where it does not recognize that I am in a conda environment, and throws an error when importing a package in that environment. Does anyone has any thoughts on either of these issues?

Why does this KDE keyboard shortcut command not work?

Posted: 24 Jun 2021 11:55 AM PDT

After some digging, I managed to find that to get the name of the user's preferred terminal emulator, as set in the 'Default Applications' section of KDE5's settings, one can run this command:

kreadconfig5 --file kdeglobals --group General --key TerminalApplication  

In my case (running Manjaro with KDE Plasma 5), this returns the string 'alacritty'. Thus, wrapping this in $(...) and typing the resulting command inside a terminal launches the user's preferred terminal emulator (I have tested that this work).

Yet, when I create a custom keyboard shortcut for KDE to run this command with Meta+Return, nothing happens. I also tried putting exec in front of it in case it was necessary, but it changed nothing. If i just set up the shortcut to run the command alacritty (which is what is returned by the first command I mentioned), then it works, but of course I want to be able to run whatever is the user's preferred terminal, not a specific one.

Can anyone explain to me why it is not working? Am I doing something wrong?

Is Debian 11 testing less stable than Debian 10 testing?

Posted: 24 Jun 2021 12:15 PM PDT

I downloaded a Debian install live cd off the main website and found out I got Debian 11, which is not officially released yet... Since I want to go for testing either way, what are some drawbacks of sticking with 11 vs 10? Is 10 significantly more stable?

Unable to install gmake command on FreeBSD

Posted: 24 Jun 2021 11:45 AM PDT

I am trying to install gmake on FreeBSD-9.3 machine but I am getting only errors.

The things I tried:

Installing it via make command (make config-recursive, make install clean) with no success.

"/usr/ports/Mk/bsd.port.mk", line 1014: Unknown directive    Unknown modifier 't    Variable .CURDIR is recursive.  

Next attempt was with pkg (pkg install gmake, pkg install devel/gmake)

Both of those commands provide the same error:

pkg: http://pkg.FreeBSD.org/freebsd:9:x86:32/latest/digests.txz: Not Found  pkg: Unable to find catalogs  

Everything so far returns those Errors and I am pretty new to the world of Unix so anything will be pretty much appriciated.

Thanks in advance.

How to find the URI and repository name from which the package was installed?

Posted: 24 Jun 2021 11:51 AM PDT

I have a package installed locally and I want to find the zypper URI and the repository name from which the package was installed from. I could search for the package and find it:

zypper info $PKG_NAME  

but it does give me the URI or the repository name:

> zypper info tcsh  Information for package tcsh:    Repository: @System  Name: tcsh  Version: 6.18.01-9.7.1  Arch: x86_64  Vendor: SUSE LINUX Products GmbH, Nuernberg, Germany  Support Level: unknown  Installed: Yes  Status: up-to-date  Installed Size: 1.0 MiB  Summary: The C SHell  Description:  Tcsh is an enhanced, but completely compatible, version of the Berkeley  UNIX C shell, csh(1). It is a command language interpreter usable as an  interactive login shell and a shell script command processor. It  includes a command-line editor, programmable word completion, spelling  correction, a history mechanism, job control, and a C-like syntax.  

How can I get the URI and repository name from which the package was installed? I'm also familiar with the zypper repos -u command to list all the repositories and URIs. But it does not help here.

I want to make it automatic at some point. So if there is a way, could it be a way so it will be easy to parse the output? Like with the rpm -qf --queryformat "[%{NAME}]" command which returns the just the package name.

Only half RAM memory available to linux

Posted: 24 Jun 2021 11:51 AM PDT

I have a problem with OS. All tools including kernel shows only half of my actual RAM memory. I have one 16G memory chip installed in my laptop and all is shown good in BIOS.

Some info about configuration:

System info

# dmidecode 3.2  Getting SMBIOS data from sysfs.  SMBIOS 2.8 present.  90 structures occupying 5605 bytes.  Table at 0x000E8C20.    Handle 0x0000, DMI type 0, 24 bytes  BIOS Information          Vendor: Dell Inc.          Version: 1.14.0          Release Date: 02/13/2020          Address: 0xF0000          Runtime Size: 64 kB          ROM Size: 16 MB          Characteristics:                  PCI is supported                  PNP is supported                  BIOS is upgradeable                  BIOS shadowing is allowed                  Boot from CD is supported                  Selectable boot is supported                  EDD is supported                  5.25"/1.2 MB floppy services are supported (int 13h)                  3.5"/720 kB floppy services are supported (int 13h)                  3.5"/2.88 MB floppy services are supported (int 13h)                  Print screen service is supported (int 5h)                  8042 keyboard services are supported (int 9h)                  Serial services are supported (int 14h)                  Printer services are supported (int 17h)                  ACPI is supported                  USB legacy is supported                  Smart battery is supported                  BIOS boot specification is supported                  Function key-initiated network boot is supported                  Targeted content distribution is supported                  UEFI is supported          BIOS Revision: 1.14    Handle 0x0001, DMI type 1, 27 bytes  System Information          Manufacturer: Dell Inc.          Product Name: XPS 15 9550          Version: Not Specified          Serial Number: GR1RD72          UUID: 4c4c4544-0052-3110-8052-c7c04f443732          Wake-up Type: Power Switch          SKU Number: 06E4          Family: XPS  

Kernel

$ uname -a  Linux piotr-XPS-15-9550 5.11.0-22-generic #23~20.04.1-Ubuntu SMP Thu Jun 17 12:51:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux  

Memory shown by free

$ free -h                total        used        free      shared  buff/cache   available  Mem:          7,0Gi       2,6Gi       1,1Gi       887Mi       3,4Gi       3,3Gi  Swap:         979Mi          0B       979Mi  

Memory show by /proc/meminfo:

$ cat /proc/meminfo   MemTotal:        7382044 kB  MemFree:         1142512 kB  MemAvailable:    3467104 kB  Buffers:          201548 kB  Cached:          3183760 kB  SwapCached:            0 kB  Active:           823272 kB  Inactive:        4182420 kB  Active(anon):       1924 kB  Inactive(anon):  2520488 kB  Active(file):     821348 kB  Inactive(file):  1661932 kB  Unevictable:      831044 kB  Mlocked:              32 kB  SwapTotal:       1003516 kB  SwapFree:        1003516 kB  Dirty:               104 kB  Writeback:             0 kB  AnonPages:       2451456 kB  Mapped:           842608 kB  Shmem:            908320 kB  KReclaimable:     137292 kB  Slab:             238076 kB  SReclaimable:     137292 kB  SUnreclaim:       100784 kB  KernelStack:       19088 kB  PageTables:        36676 kB  NFS_Unstable:          0 kB  Bounce:                0 kB  WritebackTmp:          0 kB  CommitLimit:     4694536 kB  Committed_AS:    9487844 kB  VmallocTotal:   34359738367 kB  VmallocUsed:       76280 kB  VmallocChunk:          0 kB  Percpu:             6176 kB  HardwareCorrupted:     0 kB  AnonHugePages:         0 kB  ShmemHugePages:        0 kB  ShmemPmdMapped:        0 kB  FileHugePages:         0 kB  FilePmdMapped:         0 kB  HugePages_Total:       0  HugePages_Free:        0  HugePages_Rsvd:        0  HugePages_Surp:        0  Hugepagesize:       2048 kB  Hugetlb:               0 kB  DirectMap4k:      328276 kB  DirectMap2M:     6234112 kB  DirectMap1G:     2097152 kB  

Memory shown by dmidecode

$ sudo dmidecode -t memory  # dmidecode 3.2  Getting SMBIOS data from sysfs.  SMBIOS 2.8 present.    Handle 0x0038, DMI type 16, 23 bytes  Physical Memory Array          Location: System Board Or Motherboard          Use: System Memory          Error Correction Type: None          Maximum Capacity: 32 GB          Error Information Handle: Not Provided          Number Of Devices: 2    Handle 0x0039, DMI type 17, 40 bytes  Memory Device          Array Handle: 0x0038          Error Information Handle: Not Provided          Total Width: 64 bits          Data Width: 64 bits          Size: 16384 MB          Form Factor: SODIMM          Set: None          Locator: DIMM A          Bank Locator: DIMM A          Type: DDR4          Type Detail: Synchronous          Speed: 2133 MT/s          Manufacturer: 0793          Serial Number: 12161215          Asset Tag: 16360000          Part Number: GR2133S464L15/16G             Rank: 2          Configured Memory Speed: 2133 MT/s          Minimum Voltage: Unknown          Maximum Voltage: Unknown          Configured Voltage: 1.2 V    Handle 0x003A, DMI type 17, 40 bytes  Memory Device          Array Handle: 0x0038          Error Information Handle: Not Provided          Total Width: Unknown          Data Width: Unknown          Size: No Module Installed          Form Factor: DIMM          Set: None          Locator: DIMM B          Bank Locator: DIMM B          Type: Unknown          Type Detail: None          Speed: Unknown          Manufacturer: Not Specified          Serial Number: Not Specified          Asset Tag: Not Specified          Part Number: Not Specified          Rank: Unknown          Configured Memory Speed: Unknown          Minimum Voltage: Unknown          Maximum Voltage: Unknown          Configured Voltage: Unknown  

Output of dmesg:

$ dmesg | grep -i e820  [    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009dbff] usable  [    0.000000] BIOS-e820: [mem 0x000000000009dc00-0x000000000009ffff] reserved  [    0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved  [    0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000032667fff] usable  [    0.000000] BIOS-e820: [mem 0x0000000032668000-0x0000000032668fff] ACPI NVS  [    0.000000] BIOS-e820: [mem 0x0000000032669000-0x0000000036fcefff] reserved  [    0.000000] BIOS-e820: [mem 0x0000000036fcf000-0x000000003700cfff] ACPI data  [    0.000000] BIOS-e820: [mem 0x000000003700d000-0x0000000037674fff] ACPI NVS  [    0.000000] BIOS-e820: [mem 0x0000000037675000-0x000000003fffffff] reserved  [    0.000000] BIOS-e820: [mem 0x00000000e0000000-0x00000000efffffff] reserved  [    0.000000] BIOS-e820: [mem 0x00000000fe000000-0x00000000fe010fff] reserved  [    0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved  [    0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved  [    0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved  [    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000029e22cfff] usable  [    0.000000] BIOS-e820: [mem 0x000000029e22d000-0x00000004bdffffff] reserved  [    0.000767] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved  [    0.000771] e820: remove [mem 0x000a0000-0x000fffff] usable  [    0.123701] PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in E820  [    0.333546] e820: reserve RAM buffer [mem 0x0009dc00-0x0009ffff]  [    0.333548] e820: reserve RAM buffer [mem 0x32668000-0x33ffffff]  [    0.333549] e820: reserve RAM buffer [mem 0x29e22d000-0x29fffffff]  

Full output of dmesg: https://pastebin.com/B7qLzVvK

OS: Linux Mint 20 Ulyana

What I've done before posting here:

  1. Updated bios to newest version
  2. Used memtest86 and dell diagnostics tool - everything fine, bios shows 16G
  3. Upgraded kernel to 5.11
  4. I've tried Ubuntu 20.04 from USB drive and it shows 16G RAM in system monitor app (somehow I could not type any characters in console form build in keyboard or from usb one :/)

Could it be because I don't use UEFI to boot?

What can I do to debug and fix this? Thank you.

Utilizing unique passwords for scp based on user and program

Posted: 24 Jun 2021 11:00 AM PDT

I am running a python Flask endpoint on an Ubuntu 20.04 remote server. The script is launched by a user on the machine. The script exposes an endpoint which another end user would visit and interact with. After interacting with the endpoint, a file will be created in a shared drive on the Ubuntu 20.04 remote server. I wish to scp that file over to another server. In particular, the problem I am trying to solve is that based on the user who spins the python process, that their credentials would need to be entered for the scp call. I am not sure about best methods to store these passwords for different users.

For example, consider two users: user1 and user2: /home/user1 /home/user2

user1 decides to spin the process up end user interacts with process in the code for the script there is a line somewhere which initiates the scp scp /path/to/file.txt user1@other.remote.server:/path/to/write/file.txt

this would prompt for the user password credentials ...

I thought that perhaps the password could be stored in /home/user1/secret_folder and /home/user2/secret_folder and then those folder's could be queried accordingly.

Apologies for the ignorance on these various issues, I am still a novice Linux user and spend most of my time doing ML work.

Thank you.

How to set spacing[tab] in bash correctly automatically? [duplicate]

Posted: 24 Jun 2021 10:05 AM PDT

I have a loop that checks if rpm is installed or not and displays output in tabular format, but for the rpm package with long names, the tabular format will not show as expected.

Code:

for package in ssh yum firewalld policycoreutils-python  do          rpm -qa | grep ^$package; exit_stat="$?"          if [[ ${exit_stat} -eq 0 ]]          then                  pkg_output="${pkg_output}\n ${package} \t \t \t | \t INSTALLED"          else                  pkg_output="${pkg_output}\n ${package} \t \t \t | \t NOT INSTALLED"          fi  done  echo -e $pkg_output  

The output will come like:

 yum             |   INSTALLED   ssh             |   NOT INSTALLED   firewalld           |   INSTALLED   policycoreutils-python              |   INSTALLED  

What I am expecting is:

 yum                         |   INSTALLED   ssh                         |   NOT INSTALLED   firewalld                   |   INSTALLED   policycoreutils-python      |   INSTALLED  

Is there any way to show the terminal output in the expected format?

Passing options to lintian in pdebuild

Posted: 24 Jun 2021 10:14 AM PDT

debuild has an option --lintian-opts that allows to pass options to lintian. How can I pass options to lintian from pdebuild?

sudo: apt get: command not found in ubuntu

Posted: 24 Jun 2021 09:52 AM PDT

I've installed ubuntu in Window 10 from microsoft store.

After launching Ubuntu, I'm trying to install softwares in Ubuntu by using "sudo apt-get" command, but got the error as "sudo: apt get: command not found". But when I checked it under /usr/bin/ I'm able to see lot of apt* files. My home directory is /home/myusername. Is there a way to call the apt-get utility from anywhere within the system just by using its name rather than entering the full path. I remember there is one file by the name bash or profile where they use to map the directories so that we can call the filenames to get the job done.

iptables string rules translation to nftables

Posted: 24 Jun 2021 09:25 AM PDT

I am migrating rules from iptable's to nftable's by following Moving from iptable to nftable

I now have few IPs and ports block rule in place along with a string based iptable rules but by using the built-in iptable translation rule I am able to covert the rules from iptable to nftable but the string based rules which were in place in iptable are commented in nftables after translation. Below is the nftable rule after translation

    add rule ip filter INPUT tcp dport 1024-65535 counter accept      add rule ip filter INPUT udp dport 1024-65535 counter accept     65535 -j DROP      # -t filter -A INPUT -p udp -m udp --dport 234 -m string --string abc.exe --algo bm --to 65535 -j DROP      # -t filter -A INPUT -p udp -m udp --dport 234 -m string --string def.exe --algo bm --to 65535 -j DROP      # -t filter -A INPUT -p udp -m udp --dport 234 -m string --string hij.exe --algo bm --to 65535 -j DROP      add rule ip filter INPUT icmp type echo-reply ct state new,related,established  counter accept      add rule ip filter INPUT icmp type echo-request ct state new,related,established  counter accept      add rule ip filter INPUT icmp type destination-unreachable ct state new,related,established  counter accept      add rule ip filter INPUT icmp type time-exceeded ct state new,related,established  counter accept  

Need help on how to convert string based iptable rules to nftable rules, and if it fails like above which log do I refer to.

How can I su to a user with no login shell?

Posted: 24 Jun 2021 10:59 AM PDT

Problem

In Debian 10 I want to create a user who cannot log in directly. One should only be able to access the user by using the su binary. In my Ubuntu 18.04 setup, I did exactly this and it worked like charm, but in Debian 10 I am not able to do so.

Hint

The user that is able to login will not have the permission to use sudo.

What I've done

I've setup a user with the default shell /usr/sbin/nologin. But when trying to access this user by su --shell=/bin/bash user I am not able to do so.

Minimal example

# useradd --shell /usr/sbin/nologin locked    # passwd locked  Enter new UNIX password: *secret*  Retype new UNIX password: *secret*  passwd: password updated successfully    $ su --shell /bin/bash locked  Password: *secret*  This account is currently not available.  

Why does this no longer work in Debian?

Output of this command Linux

Posted: 24 Jun 2021 10:25 AM PDT

Please do anyone has an idea about the output of this command , I have googled a lot about it but I can't find anything useful

find . -type f -exec grep -H PATH {} \;  

Thanks in advance

Set an environment variable per user shell independent

Posted: 24 Jun 2021 09:24 AM PDT

How can I set an permanent environment variable per user independent from the used shell (bash, zsh and fish)?

How do i get the 6 digits from the middle of a file path

Posted: 24 Jun 2021 10:04 AM PDT

I have a file pathname like

/dbfs/mnt/dlg2stage/foldername/backupname/201906_load_1_20210623-151602.tar.tgz  

I am trying to get only the six digits 201906 digits and print them. I tried sed and awk but failed.

Does XON/XOFF flow control transmit through multiple terminal session hops?

Posted: 24 Jun 2021 10:42 AM PDT

The puzzle I am trying to solve for is where larger outputs of text eventually fall apart into scrambled text.

For context I am working on an older machine (EPSON PX-8) connected to Pi3 over RS232 using terminal emulation software on the PX-8 called TEL

TEL Settings - Baud: 9600, Char Bits: 8, Parity: NONE, Stop Bits: 2, RTS: ON, Flow Control: ON

Initially I had observed this issue between the PX-8 and Pi3. I was able to resolve it by enabling flow control for XON/XOFF signaling. However, when I attempt to telnet or ssh to another Linux host from the Pi3 is where I get scrambled text again when attempting to output larger blocks of text.

The text output below is an example of what happens when I attempt to print my command history.

    1  sudo rasp-config      2  sudo raspi-config      3  sudo nano /boot/cmdline.txt      4  tail /boot/cmdline.txt      5  sudo shutdown -r now      6  sudo vim ~/boot/cmdline.txt      7  cd /./boot      8  dir      9  sudo vim cmdline.txt     10  sudo vim config.txt     11  sudo shutdown -r now     12  dfgdf     13  vim     14  sudo vim cmdline.txt     15  cd /./boot     16  sudo vim cmdline.txt     17  sudo shutdown -r now     18  cd /./boot     19  sudo vim cmdline.txt     20  sudo shutdown -r now     21  ping 8.8.8.8     2 xprt TEM=Vvj9s9ds9j3oin so nat1 machine    x Rom =vos cngas-2goses9g3  -xtiet n n5  -s oiy  y  

Replace the nth-from-end occurrence of string in each line

Posted: 24 Jun 2021 11:59 AM PDT

Using sed, how can I replace the Nth to last occurrence of a character on each line of a given file?

In this case I want to replace the 3rd to last ; with ,

input

1;2;3;4;5;6;7;8;9  10;20;30;40;50;60;70;80;90  100;200;300;400;500;600;700;800;900  

expected output

1;2;3;4;5;6,7;8;9  10;20;30;40;50;60,70;80;90  100;200;300;400;500;600,700;800;900  

I know I could replace the 6th occurrence like this

sed 's/;/,/6' input_file.csv > output_file.csv  

Or the last one

sed -r 's/(.*);/\1,/' input_file.csv > output_file.csv  

But in my particular case and because of some nuances, I need to start from the end.

I've tried something like

sed -r 's/(.*);/\1,/3' input_file.csv > output_file.csv  

AWS libcrypto resolve messages seen when using a boto3 library, apparently after an update

Posted: 24 Jun 2021 11:44 AM PDT

I'm using the s4cmd package in Python which in turn uses boto3 to communicate with a (non Amazon) S3 service.

I've started seeing these warning messages on stderr. I believe this happened after an auto update to OpenSSL, but that's just my best guess.

AWS libcrypto resolve: searching process and loaded modules  AWS libcrypto resolve: found static aws-lc HMAC symbols  AWS libcrypto resolve: found static aws-lc libcrypto 1.1.1 EVP_MD symbols  
openssl version  OpenSSL 1.1.1g  21 Apr 2020    cat /etc/os-release | head -n6  NAME="Pop!_OS"  VERSION="20.10"  ID=pop  ID_LIKE="ubuntu debian"  PRETTY_NAME="Pop!_OS 20.10"  VERSION_ID="20.10"  

Does anyone know what these messages are, if they're ignorable, and if they are how to suppress them?

The onset of these messages correlates with a lot of random SSL failures. Both in Firefox and when using boto3. I commonly see errors like [Exception] Connection was closed before we received a valid response from endpoint URL now, but when I ssh into another server I have no problem. An hour later the problems will be gone, only to reappear some apparently random time later.

Additional info:

I recently noticed that inside a docker container on my laptop my boto3 & s4cmd commands work while they fail on my base OS. I checked openssl version on both:

# Base OS, failing  openssl version  OpenSSL 1.1.1g  21 Apr 2020    # Inside docker container, working  openssl version  OpenSSL 1.1.1  11 Sep 2018  

Changing ip addresses of multiple servers

Posted: 24 Jun 2021 09:51 AM PDT

I have set of servers which are moving to another network. I have a file which has hostnames and corresponding new IP addresses . I looked across how to achieve this using Ansible but that requires unique playbook for each server. Tried to script it but same issue.

Can someone suggest eg. how to change the IP address of 2+ servers from an external server assuming you can login as root.

Ansible playbook is preferred.

Evaluate multi-line output (with comments) of another command. (pip-completion)

Posted: 24 Jun 2021 11:02 AM PDT

In trying to make my .zshrc neater, I stumbled over the following problem/question: "How can I run the output of another command?". While I'm sure this is a simple problem, I just don't understand what I'm doing wrong.

I want to add pip-completion to my config. For this, I need to add the output of $ pip completion --zsh to .zshrc:

$ pip completion --zsh    # pip zsh completion start  function _pip_completion {    local words cword    read -Ac words    read -cn cword    reply=( $( COMP_WORDS="$words[*]" \               COMP_CWORD=$(( cword-1 )) \               PIP_AUTO_COMPLETE=1 $words[1] 2>/dev/null ))  }  compctl -K _pip_completion pip  # pip zsh completion end  

Now, the lines above simply don't look nice. Instead I tried adding the following line to .zshrc:

eval $(pip completion --zshrc)  

However, pip completion is not being "installed" (as opposed to when I add the lines themselves in .zshrc), but I also don't get any errors.

I have a feeling zsh doesn't evaluate the # lines properly, but I'm not sure how to test it. when I run $ eval $(pip completion --zshrc) no errors pop out.

Where am I going wrong? Is there a similar alternative to evaluating the output of $ pip completion --zsh in my .zshrc?

What ZSH theme does Kali use?

Posted: 24 Jun 2021 12:05 PM PDT

Could someone please give me the name of the default ZSH theme that Kali uses? Also, if you could please provide a link to it.

How to switch between headphones and speakers without disconnecting

Posted: 24 Jun 2021 09:35 AM PDT

When I connect my headphones into the front jack, my speakers (line-out) get muted. I would like to switch to speakers without disconnecting my headphones. I see two possible options in gnome-control-center and pavucontrol: Headphones and Line-out. But when I switch to line-out, I hear nothing. How can I set correct behaviour?

I have Realtek ALC1150 with Alsa and PulseAudio installed.

GTK FileChooser causes crashes in several programs

Posted: 24 Jun 2021 11:53 AM PDT

I have repeatedly encountered a problem with several programs that use open/save file dialogues.

Upon initiating these by trying to open or to save a file, the program freezes for about 10 seconds and then crashes. With libreoffice for example, I get the following error message when started from terminal:

Error creating proxy: Error calling StartServiceByName for org.gtk.vfs.UDisks2VolumeMonitor: Timeout was reached (g-io-error-quark, 24)    (soffice:1466): GLib-GIO-ERROR **: 19:11:38.289: Settings schema 'org.gtk.Settings.FileChooser' does not contain a key named 'show-type-column'      Fatal exception: Signal 5  Stack:  

A stack trace follows.

I have read about a similar problem on AskUbuntu.SE, but the solution (multiple versions of /usr/share/glib-2.0/schemas/org.gtk.Settings.FileChooser.gschema.xml) does not apply to me.

The file seems to have the appropriate contents (to me). Excerpt about the key mentioned in the error:

<key name='show-type-column' type='b'>    <default>true</default>    <summary>Show file types</summary>    <description>  Controls whether the file chooser shows a column with file types.    </description>  </key>  

How do I fix this problem?

Are interrupts used to signify that output is ready or input has completed?

Posted: 24 Jun 2021 10:36 AM PDT

Operating System Concepts says:

During I/O, the various device controllers raise interrupts when they are ready for service. These interrupts signify

  • that output has completed, or
  • that input data are available, or
  • that a failure has been detected.

Are interrupts used to signify that output is ready or input has completed?

If not, do they need to be signified by some other way?

How do I get rid of underline when typing commands in zsh?

Posted: 24 Jun 2021 11:01 AM PDT

I use zsh with oh-my-zsh and it almost suits my needs. However, there is one thing I cannot figure out, namely how do I get rid of an underline of some parts of commands I type? Please have a look at the following screenshot to get an idea of what I'm talking about.

enter image description here

How can a systemd service flag that it is ready, so that other services can wait for it to be ready before they start?

Posted: 24 Jun 2021 09:55 AM PDT

I have a bunch of services (say C0, C1, … C9) that should only start after a service S has completed its initialization and is fully running and ready for the other services. How do I arrange that with systemd?

In Ordering services with path activation and target in systemd it is assumed that service S has a mechanism for writing out some sort of flag file. Assume here, in contrast, that I have full control over the program that service S runs, and can add systemd mechanisms into it if needs be.

Check whether text contains non-ASCII characters in a shell script

Posted: 24 Jun 2021 09:35 AM PDT

I have a file, I want to determine if it contains only English ASCII characters.

I thought this is a very common question, but when I googled it, there is no direct answer or related.

According to some other questions, this is what I got so far, but this doesn't work. No matter ASCII or Non-ASCII chars, it will always determine as non-ascii.

if (LC_ALL=C; [[ $TEXT = *[[:ascii:]]* ]]) then    echo "Contain Non-ASCII"  fi  

BTW, This is a shell script.

Problem running vmPlayer on Fedora 21

Posted: 24 Jun 2021 12:00 PM PDT

After install the program and execute vmPlayer request the kernel headers to recompile it (I guess), after that vmP install the virtual network device, at this point show an error.

this one

and the vmware-15092.log file is:

  2015-03-27T22:51:28.154-06:00| vthread-4| I120: Preprocessed UTS_RELEASE, got value "3.19.1-201.fc21.x86_64".  2015-03-27T22:51:28.154-06:00| vthread-4| I120: The header path "/lib/modules/3.19.1-201.fc21.x86_64/build/include" for the kernel "3.19.1-201.fc21.x86_64" is valid.  Whoohoo!  2015-03-27T22:51:28.158-06:00| vthread-4| I120: The GCC version matches the kernel GCC minor version like a glove.  2015-03-27T22:51:28.158-06:00| vthread-4| I120: Validating path "/lib/modules/3.19.1-201.fc21.x86_64/build/include" for kernel release "3.19.1-201.fc21.x86_64".  2015-03-27T22:51:28.158-06:00| vthread-4| I120: Failed to find /lib/modules/3.19.1-201.fc21.x86_64/build/include/linux/version.h  2015-03-27T22:51:28.158-06:00| vthread-4| I120: /lib/modules/3.19.1-201.fc21.x86_64/build/include/linux/version.h not found, looking for generated/uapi/linux/version.h instead.  2015-03-27T22:51:28.158-06:00| vthread-4| I120: using /usr/bin/gcc for preprocess check  2015-03-27T22:51:28.164-06:00| vthread-4| I120: Preprocessed UTS_RELEASE, got value "3.19.1-201.fc21.x86_64".  2015-03-27T22:51:28.164-06:00| vthread-4| I120: The header path "/lib/modules/3.19.1-201.fc21.x86_64/build/include" for the kernel "3.19.1-201.fc21.x86_64" is valid.  Whoohoo!  2015-03-27T22:51:28.164-06:00| vthread-4| I120: Using temp dir "/tmp".  2015-03-27T22:51:28.165-06:00| vthread-4| I120: Obtaining info using the running kernel.  2015-03-27T22:51:28.165-06:00| vthread-4| I120: Setting header path for 3.19.1-201.fc21.x86_64 to "/lib/modules/3.19.1-201.fc21.x86_64/build/include".  2015-03-27T22:51:28.165-06:00| vthread-4| I120: Validating path "/lib/modules/3.19.1-201.fc21.x86_64/build/include" for kernel release "3.19.1-201.fc21.x86_64".  2015-03-27T22:51:28.165-06:00| vthread-4| I120: Failed to find /lib/modules/3.19.1-201.fc21.x86_64/build/include/linux/version.h  2015-03-27T22:51:28.165-06:00| vthread-4| I120: /lib/modules/3.19.1-201.fc21.x86_64/build/include/linux/version.h not found, looking for generated/uapi/linux/version.h instead.  2015-03-27T22:51:28.165-06:00| vthread-4| I120: using /usr/bin/gcc for preprocess check  2015-03-27T22:51:28.171-06:00| vthread-4| I120: Preprocessed UTS_RELEASE, got value "3.19.1-201.fc21.x86_64".  2015-03-27T22:51:28.171-06:00| vthread-4| I120: The header path "/lib/modules/3.19.1-201.fc21.x86_64/build/include" for the kernel "3.19.1-201.fc21.x86_64" is valid.  Whoohoo!  2015-03-27T22:51:28.288-06:00| vthread-4| I120: found symbol version file /lib/modules/3.19.1-201.fc21.x86_64/build/Module.symvers  2015-03-27T22:51:28.288-06:00| vthread-4| I120: Reading symbol versions from /lib/modules/3.19.1-201.fc21.x86_64/build/Module.symvers.  2015-03-27T22:51:28.302-06:00| vthread-4| I120: Read 15286 symbol versions  2015-03-27T22:51:28.302-06:00| vthread-4| I120: Invoking modinfo on "vmnet".  2015-03-27T22:51:28.304-06:00| vthread-4| I120: "/sbin/modinfo" exited with status 256.  2015-03-27T22:51:28.381-06:00| vthread-4| I120: Setting destination path for vmnet to "/lib/modules/3.19.1-201.fc21.x86_64/misc/vmnet.ko".  2015-03-27T22:51:28.381-06:00| vthread-4| I120: Extracting the vmnet source from "/usr/lib/vmware/modules/source/vmnet.tar".      2015-03-27T22:51:28.385-06:00| vthread-4| I120: Successfully extracted the vmnet source.  2015-03-27T22:51:28.385-06:00| vthread-4| I120: Building module with command "/usr/bin/make -j4 -C /tmp/modconfig-3fL25O/vmnet-only auto-build HEADER_DIR=/lib/modules/3.19.1-201.fc21.x86_64/build/include CC=/usr/bin/gcc IS_GCC_3=no"  2015-03-27T22:51:29.709-06:00| vthread-4| W110: Failed to build vmnet.  Failed to execute the build command.  

Now I don't know what to do, any idea?

No comments:

Post a Comment