Wednesday, April 13, 2022

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Using rsync to backup system data gives "No such file"

Posted: 13 Apr 2022 07:30 AM PDT

I'm trying to backup my entire system directory using the following script:

#!/bin/bash    cd /    BACKUP_LOCATION=/media/data/backup/system-backup/    echo Backing up system data to $BACKUP_LOCATION, excluding home directories  sudo rsync -aAXv --exclude={"/home/*", "/swap.img", "/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / $BACKUP_LOCATION  

When running this, I'm getting the following error:

sending incremental file list  rsync: [sender] link_stat "/swap.img," failed: No such file or directory (2)  rsync: [sender] change_dir "/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*," failed: No such file or directory (2)  

As far as I understand, the exclude paths are relative to the source directory, being /, therefore e.g. /home/* should resolve to /home/* on the real file system. Can anybody tell me what I am doing wrong here?

Which shell command returns Java's home path?

Posted: 13 Apr 2022 07:35 AM PDT

I'm aware of the which command but when I run it on Java, I get the following path:

$ which java  /bin/java  

What I'm looking for, I think, is the Java path I get when I run the following Maven command:

$ mvn -version  Apache Maven 3.6.3  Java version: 11.0.14.1, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64  Default locale: en, platform encoding: UTF-8  OS name: "linux", version: "5.13.0-1021-aws", arch: "amd64", family: "unix"  

Isn't the latter (/usr/lib/jvm/java-11-openjdk-amd64) the correct Java home path? If so, which command would directly return it?

Running the java version command doesn't return any paths.

Same Ip Address Problem in Connecting two Cell phone by bluetooth tethering

Posted: 13 Apr 2022 07:08 AM PDT

first of all : sorry aboue my english.
second of all : i've connected two Android cell phone by bluetooth tethering to a linux PC (i need tcp/ip connection on Bluetooth). as you know (or maybe don't know) bluetooth tethering have a built_in dhcp server that specify ip address automatically in 192.168.44.xxx range and there is no easy way to change dhcp settings of android cell phones(it needs root cellphone and change some configuration files that is not practical for me) so when i connect both cellphones just one of them can communicate with linux PC ( i can ping Linux PC just in one of cellphones).
i have an android app that is installed on both cellphones and it can connet to OpenFire server on linux; when just connect one of cellphones the app can works without problem but when connect the other cellphone by BT tethering just one of them can be connected. what should i do? i would apreciate if someone can help me.

enter image description here

Bash time converter

Posted: 13 Apr 2022 07:24 AM PDT

I have a question, How can I convert time from 12h AM/PM format to 24h? For example, I have input from stdin, some text like this:

The event starts at 03:25PM and is expected to end at 06:17PM.  Registration will be opened from 09:00AM until 06:00 PM.  The event starts at 15:25 and is expected to end at 18:17.  Registration will be opened from 09:00 until 06:00 PM.  

How can I read all hh:mmPM and hh:mmAM and convert it? But I don't want to use awk or smth like it. How can I do it with only bash loops, if/else, echo, sed etc? Thanks!

ubuntu terminal is stuck at -bash-5.5$

Posted: 13 Apr 2022 06:36 AM PDT

I was trying to switch to wsl2. so based on some websites instruction I used ctrl+alt+T and my terminal changed to '-bash-5.5$'. I guess I'm in the root directory and I can't get out for some reason. I have tried "exit"command, 'ctrl+c','ctrl+s','ctrl+d'

Automatically lock my Linux computer when I walk away from it

Posted: 13 Apr 2022 06:32 AM PDT

I would like to lock my Linux (GNOME) machine after I walk away from it. Ideally, it should be a small Bluetooth tag / card that I carry in my pocket with a proximity sensor.

Is there some software and hardware that I can use for Linux for this purpose?

Basically, I'm looking for something like GateKeeper (but I don't know if this works for Linux) https://technabob.com/blog/2014/03/19/gatekeeper-locks-pc-automatically/

The proximity feature will automatically lock and unlock your PC or Mac when you walk away from it. That will keep your machine from sitting unprotected.

Only file owners should be allowed to see the files they uploaded

Posted: 13 Apr 2022 06:32 AM PDT

I've got an SFTP Server setup, and all users are jailed (chroot) to a specific directory (users are only allowed to upload to this single directory).

The requirement is to ensure that only the file owners can see their files; others don't get to see the files, even if they are in the same group.

In summary, users should only see the files they uploaded. User A should not see what user B uploaded.

Any recommendation on how to get this done on Linux or a code to write to get this done will be helpful. I was thinking there may be a configuration on Linux to get this done.

OS: Linux Fedora 5.14.10

Unable to kill node process on RedHat Linux

Posted: 13 Apr 2022 06:04 AM PDT

This is my OS:

[root@efendibey_live nginx]$ uname -a  Linux efendibey_live 3.10.0-1160.6.1.el7.x86_64 #1 SMP Tue Nov 17 13:59:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux      [root@efendibey_live nginx]$ cat /etc/redhat-release  CentOS Linux release 7.9.2009 (Core)    

Below is the node process I wish to kill

[root@efendibey_live nginx]$ ps -aef | grep node | grep -v grep  root     22047  1083  0 12:43 ?        00:00:00 node /var/www/streetFoodT/t_api/api_server/api_  

Every time I do kill -9 22047 The process dies and respawns with a new PID.

There is no crontab -l setup.

I did fuser * under this directory /var/www/streetFoodT/t_api/ and it did not return anything.

Can you please suggest how to find out what is restarting the node process and how to permanently kill the process?

I also tried the command pkill node but that too did not help.

FIFO and simple bash parallelization on CentOS

Posted: 13 Apr 2022 05:09 AM PDT

I am having problems adapting a bash script to handle a simple parallel execution from Ubuntu 20.04 to CentOS Linux 8. In the script I spawn multiple "readers" that read a string from a FIFO and output it on a common file. The strings are passed to the FIFO directly from the main script. I use file descriptors and locks to make the process clean. I'm also waiting that all the readers start before writing on the FIFO. I'm including the whole script at the end.

The script work flawlessly on Ubuntu, and the output is this (first column is the reader ID, the second is what the reader got from the FIFO)

2 1  4 2  1 3  ...  3 4998  2 4999  4 5000  

The reading is complete and the messages were transmitted one by one.

Using the same script on CentOS I get this.

4 1  1 7  2 8  ...  3 153  4 154  1 155  

There is an evident jump, and the messages from 2 to 6 are lost completely. Moreover, the process stops very prematurely at 155.

I really don't know what's going on. Any idea?

The script:

#!/bin/bash    readers=4  objs=5000    echo "" > output.txt    # Temporary files and fifo  FIFO=$(mktemp -t fifo-XXXX)  START=$(mktemp -t start-XXXX)  START_LOCK=$(mktemp -t lock-XXXX)  FIFO_LOCK=$(mktemp -t lock-XXXX)  OUTPUT_LOCK=$(mktemp -t lock-XXXX)  rm $FIFO  mkfifo $FIFO    # Cleanup trap  cleanall() {  rm -f $FIFO  rm -f $START  rm -f $START_LOCK  rm -f $FIFO_LOCK  rm -f $OUTPUT_LOCK  }  trap cleanall exit    # Reader process  reader() {      ID=$1          exec 3<$FIFO      exec 4<$FIFO_LOCK      exec 5<$START_LOCK      exec 6<$OUTPUT_LOCK            # Signal the reader has started      flock 5                      echo $ID >> $START      flock -u 5      exec 5<&-         # Reading loop      while true; do          flock 4            read -su 3 item          read_status=$?          flock -u 4            if [[ $read_status -eq 0 ]]; then              flock 6              echo "$ID $item" >> output.txt              flock -u 6            else              break # EOF reached          fi      done        exec 3<&-      exec 4<&-      exec 6<&-  }    # Spawn readers  for ((i=1;i<=$readers;i++)); do      reader $i &  done    exec 3>$FIFO    # Wait for all the readers  exec 5<$START_LOCK  while true; do          flock 5          started=$(wc -l $START | cut -d \  -f 1)          flock -u 5          if [[ $started -eq $readers ]]; then              break          else              sleep 0.5s          fi  done  exec 5<&-    # Writing loop  for ((i=1;i<=$objs;i++)); do      echo $i 1>&3  done    exec 3<&-   wait    echo "Script done"    exit 0  

Passwordless SSH not working with Roumenpetrov PKIX-SSH

Posted: 13 Apr 2022 04:31 AM PDT

I have followed http://tech.ciges.net/blog/openssh-with-x509-certificates-how-to/ to use X509 certs for SSH and used Roumenpetrov's PKIX-SSH builds. Still passwordless SSH is not working. From /var/log/secure log on server, i see below log:

pkix-ssh-tgt sshd[89593]: userauth_pubkey: unsupported public key algorithm: x509v3-rsa2048-sha256 [preauth]  

But when i run below command (ssh -Q key)on both client and server, it says its(x509v3-rsa2048-sha256) supported:

ssh -Q key  x509v3-ecdsa-sha2-nistp256  x509v3-ecdsa-sha2-nistp384  x509v3-ecdsa-sha2-nistp521  x509v3-rsa2048-sha256  x509v3-ssh-rsa  x509v3-sign-rsa  x509v3-ssh-dss  x509v3-sign-dss  ssh-ed25519  ssh-ed25519-cert-v01@openssh.com  ssh-rsa  ssh-dss  ecdsa-sha2-nistp256  ecdsa-sha2-nistp384  ecdsa-sha2-nistp521  ssh-rsa-cert-v01@openssh.com  ssh-dss-cert-v01@openssh.com  ecdsa-sha2-nistp256-cert-v01@openssh.com  ecdsa-sha2-nistp384-cert-v01@openssh.com  ecdsa-sha2-nistp521-cert-v01@openssh.com  

Not sure where I am going wrong. Can someone help ?

VPN server cannot access the internet

Posted: 13 Apr 2022 07:34 AM PDT

VPN server doesn't have access to the internet, but the server is accessible from outside. I can ping it from my home PC or connect via ssh. When I connect to the VPN tunnel, the client doesn't have internet access either.

Trying to ping localhost:

PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.  ping: sendmsg: Operation not permitted  ping: sendmsg: Operation not permitted  

Same thing, when i try to ping 8.8.8.8 or any other.

Ping localhost via ipv6 is working:

$ ping localhost -6  PING localhost(localhost (::1)) 56 data bytes  64 bytes from localhost (::1): icmp_seq=1 ttl=64 time=0.202 ms  64 bytes from localhost (::1): icmp_seq=2 ttl=64 time=0.056 ms  64 bytes from localhost (::1): icmp_seq=3 ttl=64 time=0.079 ms  64 bytes from localhost (::1): icmp_seq=4 ttl=64 time=0.066 ms  ^C  --- localhost ping statistics ---  4 packets transmitted, 4 received, 0% packet loss, time 3062ms  

Trying to apt update:

W: Failed to fetch http://lv.archive.ubuntu.com/ubuntu/dists/focal/InRelease  Temporary failure resolving 'lv.archive.ubuntu.com'  W: Failed to fetch http://lv.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Temporary failure resolving 'lv.archive.ubuntu.com'  W: Failed to fetch http://lv.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Temporary failure resolving 'lv.archive.ubuntu.com'  W: Failed to fetch http://lv.archive.ubuntu.com/ubuntu/dists/focal-security/InRelease  Temporary failure resolving 'lv.archive.ubuntu.com'  W: Failed to fetch https://deb.nodesource.com/node_16.x/dists/focal/InRelease  Temporary failure resolving 'deb.nodesource.com'  W: Some index files failed to download. They have been ignored, or old ones used instead.  

ufw is disabled and I've tried iptables -F, but that doesn't help.

Strongswan ipsec.conf on the server:

config setup      charondebug="ike 1, knl 1, cfg 0"      uniqueids=no    conn ikev2-vpn      auto=add      compress=no      type=tunnel      keyexchange=ikev2      fragmentation=yes      forceencaps=yes      dpdaction=clear      dpddelay=300s      rekey=no      left=%any      leftid=<Public IP>      leftcert=server-cert.pem      leftsendcert=always      leftsubnet=0.0.0.0/0      right=%any      rightid=%any      rightauth=eap-mschapv2      rightsourceip=10.8.0.0/24      rightdns=8.8.8.8,8.8.4.4      rightsendcert=never      eap_identity=%identity      ike=chacha20poly1305-sha512-curve25519-prfsha512,aes256gcm16-sha384-prfsha384-ecp384,aes256-sha1-modp1024,aes128-sha1-modp1024,3des-sha1-modp1024!      esp=chacha20poly1305-sha512,aes256gcm16-ecp384,aes256-sha256,aes256-sha1,3des-sha1!  

The client is on Windows and there is no config: I just created an interface with public IP and login/password

netstat -rn output:

Kernel IP routing table  Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface  0.0.0.0         94.158.218.1    0.0.0.0         UG        0 0          0 eth0  94.158.218.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0  

Is there a way to prevent automatic appendings to .bashrc to be effective?

Posted: 13 Apr 2022 03:54 AM PDT

I'm looking for a way to nullify the undesirable behaviour of some installers that append code to .bashrc to force-load their environment automatically. The problem cropped-up a few times, mostly with Conda, and in some cases the user ended-up with a broken account that prevented them from logging in anymore.

I tried to add an unclosed here-document at the end of .bashrc, like this:

# .bashrc    #...    : <<'__END__'  

Which works, but obviously generates parsing errors.

What would be a clean way to do that without making the .bashrc readonly?

How to to suppress error in bash script

Posted: 13 Apr 2022 04:26 AM PDT

I am trying to suppress error generated by date command but still error is coming post executing script.

#!/usr/bin/bash    input="30 FEB 2022"  reg="^[0-9]{1,2}\s[a-zA-Z]{1,3}\s[0-9]{1,4}$"    if [[ $input =~ $reg ]]  then          echo "VALID Date Format : $input"          #output=$(`date -d "$input" +"%d-%b-%Y, %A"` 2>&1 > /dev/null)          output=`date -d "$input" +"%d-%b-%Y, %A"` 2>&1 > /dev/null  else          echo "INVALID Date Format : $input"          output="-1"  fi    echo $output  

After execution Output -

root@ip-xx-x-xx-xxx:~# ./exDate.sh   VALID Date Format : 30 FEB 2022  date: invalid date '30 FEB 2022'  

Please advise how can i suppress error?

EFI partition empty after grub-install

Posted: 13 Apr 2022 05:06 AM PDT

After running into a weird issue with my Linux Mint install, I decided that the easiest fix was to re-install it. After a re-install I had nothing but a BusyBox shell, and decided that it was probably a Grub issue. After which I proceeded to try and use boot-repair to fix it. it didn't work, and now I have a system that on startup gives a BIOS-styled "No bootable drive or boot failed".
I have in the process of 2 days of trying to fix it formatted my EFI partition enough times to leave it empty.
Gparted shows the following:

fat32 100Mib flags=boot,esp    unknown 16Mib flags=msftres (random Win10 partition)    ntfs 53.98GiB flags=msftdata (Win10 install partition)    linux-swap 3.81GiB flags=swap (Swap for Mint)    ext4 57.57GiB no flags (Linux Mint install)    ntfs 1.00GiB flags=msftdata (Recovery partition for Win10)  unallocated 1.00MiB  

How do I make at least Win10 bootable (I think I know what to do from there, as when I first installed Mint, I had to do this).
If any additional info is needed, I can only get what is obtainable through Mint Live.
Edit: BootInfo Summary: http://sprunge.us/JquNnB

I've cloned my VPS content incl. domain into a new VPS with new IP but "Refused to connect to the site webscraping.pro"

Posted: 13 Apr 2022 05:52 AM PDT

I've cloned my VPS content into a new VPS with new IP ( OS: Centos 7) but
"Refused to connect to the site webscraping.pro"
or
"Refused to connect to the site 178.208.88.6"

  1. The tech support cloned site from old VPS (IP 185.221.154.249) to the new VPS (IP 178.208.88.6).
  2. I've changed the IP in interfaces, at the file /etc/sysconfig/network-scripts/ifcfg-ens18. Result: http://joxi.ru/8An01XytN7ZWxm
  3. Added new IP thru Vesta CP and set the domain name to that IP: http://joxi.ru/823jGOQCzDZZLm
  4. Added new IP into the primary DNS NS: http://joxi.ru/bmoOyo7IO9RZkm

What's wrong? How to solve the problem?

Update

Today (12.04.2022) the webscraping.pro is working from the old VPS, IP 185.221.154.249. The domain name has (of subreg.cz registrar) been tied to the old VPS: [![enter image description here][1]][1]

Yet all old VPS content is cloned to the new VPS.
Might there be some competition between VPS (new and old ) of where does the domain name refer to ?
Should I change something at the registrar DNS (subreg.cz) ?

Update 2

I was told to check A record of the domain.
Where is it ?
How can I change it ?
[1]: https://i.stack.imgur.com/MNqhN.jpg

RHEL7 not Booting Suspected issue in /DEV

Posted: 13 Apr 2022 05:53 AM PDT

My machine is a blade server on which the base OS is RHEL 7 which runs on a locally attached SSD.

On this host machine I have three VMs on which one SAN LUN is mounted (it's not mounted on the host machine)

While creating a new VM through KVM, I accidentally selected the /dev partition which was through "devtmpfs" after which KVM crashed and machine is not coming up.

  1. It's booting in rescue mode but not through any previous kernel

  2. In normal boot, it's going to RHEL logo and then showing the errors below:

    scsi 2.0.0 alua not attached  scsi 2.0.1 alua not attached  scsi 1.0.0 alua not attached  scsi 1.0.1 alua not attached  watchdog0 watchdog didnt run  

    After pressing enter it goes to command prompt login but hangs.

After selecting rescue mode and going into single user mode I am able to see everything, even /dev and no change is visible there.

Rescue booting through USB ISO is also working and I am able to enable network and transfer.

Please suggest what to do.

Make tar on multiple predefined tapes

Posted: 13 Apr 2022 07:33 AM PDT

How do I tar some files to multiple tapes, with each tape being listed in advance? This way I can have a fully-unattended archival, with no need to physically change media once a tape is full.

In my specific case,

  • Each tape is actually a /dev/sd? block device, with the archive being written to the raw disk and not having partitions or filesystems to save on space.
  • All target disks are connected to the host machine simultaneously.
  • tar is GNU version 1.34.
  • Largest single file size is smaller than the size of the smallest target.

So far, to perform this task, I've got this command: tar -c -M -f /dev/tape1 -f /dev/tape2 ... /files/to/be/archived.

Step-by-step walkthrough:

  1. tar -c is the command to create a tar archive.
  2. -M tells tar that I want to make a multi-volume archive.
  3. -f is listed multiple times with each target tape to be written to.
  4. /files/to/be/archived is what is to be archived.

Due to --tape-length not being present in the command, tar should write as much as it can on each tape, regardless of how big the tape is in relation to others. This allows for tapes of unequal sizes.

Will this work as I have explained above, or will the behavior of tar be different?

Dual boot keeps booting to windows

Posted: 13 Apr 2022 07:36 AM PDT

My setup:

  • 1 hdd with Windows 10 installed
  • 1 ssd with Archlinux using systemd-boot installed
  • Motherboard: MSI X470 Gaming Pro

I first installed Arch, then Windows 10 and the dual boot worked like a charm, but after a BIOS-update, my Motherboard keeps automatically booting to Windows without going though systemd-boot first.

When checking the boot order in the bios, my ssd is still first but it now says Windows Boot Manager instead of UEFI OS (for Linux).

I can verify that the Linux drive still has all of my stuff on it and seems to be untouched.

contents of /boot/loader/

Can someone please explain to me why this happened?


In case someone is wondering how I solved it:

I booted from a USB-stick and mounted my ssd directories and moved the Microsoft directory from /boot/EFI/ to somewhere else.

Afterwards the bios label for my ssd correctly said UEFI OS again and booted to systemd-boot again (which obviously didn't show the Windows option anymore).

Finally I moved the Microsoft directory back to /boot/EFI/ and everything works again.

My question still is why it happened in the first place and how it can be avoided during future bios upgrades.

Any way to disable word splitting in bash?

Posted: 13 Apr 2022 07:28 AM PDT

I'm not a bash expert but I've been working on quite a long a bash script lately and it's been getting really bothersome quoting my parameters every single time. Is there any way to change this shell behavior? I would like my strings to not be split even when I don't quote them

P.S - setting IFS to null doesn't do the job because then all arguments gets mangled. what I want is that when writing:

func1() {      echo $1 $2 $3  }    func2() {      echo "number of arguments func2 got: $#"  }     func2 $(func1 firstarg "second arg is a multi word string" "third arg is also a multi word string")  

would print:

number of arguments func2 got: 3  

Edit, thanks for comments for pointing out: since my example is using echo the code would anyway print it got either 1 or 14 arguments depending if you quote the argument to func2 or not. However what I was looking for is a way to return multiple values from a function, without them being mangled, as in the expected result I mentioned

Thanks!

Bluetooth not working, cannot turn on

Posted: 13 Apr 2022 05:56 AM PDT

I have a bluetooth adapter that worked fine on win 10. But I cannot enable it on fresh installed PopOS. It's just always off.

Model https://ks-is.com/adaptery-i-perehodniki/usb-bluetooth-5-0-adapter-ks-is-ks-457

systemctl status bluetooth shows active status

lsusb results

Bus 003 Device 005: ID 0bda:8771 Realtek Semiconductor Corp. Bluetooth Radio

❯ rfkill  ID TYPE DEVICE SOFT HARD  4 bluetooth hci0 unblocked unblocked    ❯ hcitool dev  Devices:    ❯ hciconfig -a  hci0: Type: Primary Bus: USB  BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0  DOWN  RX bytes:21 acl:0 sco:0 events:2 errors:0  TX bytes:6 acl:0 sco:0 commands:2 errors:0  Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00  Packet type: DM1 DH1 HV1  Link policy:  Link mode: SLAVE ACCEPT  

What's written in official docs about linux

KS-is KS-457 Bluetooth 5.0 USB Adapter

Requirements to install and use this model under Linux

It is identified by lsusb as 0bda: 8771 Realtek Semiconductor Corp.

Linux support

a. The adapter is supported by bt_trl (CONFIG_BT_RTL, starting with Linux 5.8. Firmware is required for the driver. Firmware is available in the linux-formware package starting April 2020.

b. You will need to upgrade your kernel to version 5.8+ if you have an older kernel and want to use this adapter.

c. The recommended version is Linux 5.8.1

AUR package: https://aur.archlinux.org/packages/rtl8761b-fw/

How do I log all commands executed by all users

Posted: 13 Apr 2022 06:01 AM PDT

I'd like to get the logs in the following format in one log line:

user_x executed command_y  

I have found the following solutions:

but here it is saving only the commands executed by the root user.

I have tried using audit rules as well, but the above solutions are more accurate regarding my use case.

Audit Rules save the logs in different lines with different types: SYSCALL (user info), EXECVE (executed command args), etc. Instead, I need this information in one log line.

I have followed these steps:

  1. Edit /etc/rsyslog.d/bash.conf:

    vim /etc/rsyslog.d/bash.conf  

    and add the following:

    local6.*    /var/log/commands.log  
  2. Open /root/.bashrc:

    vim /root/.bashrc  

    and enter the following:

    # Enable CLI Logging  whoami="$(whoami)@$(echo $SSH_CONNECTION | awk '{print $1}')"export PROMPT_COMMAND='RETRN_VAL=$?;logger -p local6.debug "$whoami [$$] $(history 1 | sed "s/^[ ]*[0-9]\+[ ]*//" )"'  
  3. Restart rsyslog service:

    sudo service rsyslog restart  

With the above, the logs are saved in /var/log/commands.log in the following format:

Aug 13 10:10:31 ip-172-31-3-192 ec2-user: root [19399] cat /var/log/commands.log  

and the commands are saved only if I use sudo su (root). If I exit from sudo su and execute any command, then the commands don't get saved in /var/log/commands.log.

Hope this is clear.

Gnome + i3wm on a 4K display - ruined my DPI scaling in Gnome

Posted: 13 Apr 2022 04:15 AM PDT

I have an issue with the user interface scaling under Gnome 3.38. I am using it only on the internal display of a Dell XPS 15 inch laptop with a 2160p 4K display. Nvidia dGPU with proprietary driver. Wayland is disabled, I'm on a standard xorg session. Before installing the i3 window manager, the UI Scaling setting in gnome-settings worked as expected and applied to all the UI elements. Today I installed i3. Since the standard configuration of i3 left all the fonts unscaled and tiny, I created a new file ".Xresources-i3wm" in my home directory with the following content:

Xft.dpi: 192  Xft.autohint: 0  Xft.lcdfilter: lcddefault  Xft.hintstyle: hintfull  Xft.hinting: 1  Xft.antialias: 1  Xft.rgba: rgb  Xcursor.size: 80  

For i3wm to load this configuration on login, I modified the i3-config under ~/.config/i3/config, adding the following line: exec_always --no-startup-id "xrdb -merge ~/.Xresources-i3wm"

That works and the window manager now launches with the correct *2 scaling on login.

After logging into a Gnome session again, SOME elements of the UI did not scale correctly anymore. Affected Shell elements are: The Gnome Top Bar font size, button font sizes, window title bar font sizes and app-icon font sizes in the Gnome App Launcher. Also I've noticed that Java Swing GUI Applications with Gtk+ Look and Feel do not recognize that "Scale" under gnome-settings->Displays is already set to 200%. They now scale to double the size (400%) since "GDK_SCALE=2" is set as an environment variable.

I was able to workaround the issue by doubling the Fontsizes in the Gnome Shell Theme *.CSS file. That fixed the Top Bar and App Launcher fonts, but not the ones on windows's title bars. If I export $GDK_SCALE=1 and launch a Java App with Gtk+, I get the correct scaling but afterwards the $GDK_SCALE is automatically set to 2 again, for whatever reason.

Since this occured, I reset my dconf, switched Themes back and forth using gnome-tweaks, switched resolution back and forth, rebooted the system several times and played with "xrandr --dpi" setting. All of this didn't help, it looks like i3wm and me screwed up the DPI scaling within Gnome. This is the output of "xrdb -query -all" for me, under Gnome right now:

Xft.dpi: 192  Xft.antialias: 1  Xft.hinting: 1  Xft.hintstyle: hintslight  Xft.rgba: rgb  Xcursor.size: 96  Xcursor.theme: Adwaita  

I hope somebody can help me out with this. Thanks in advance,

Euda

Service file exists but is not found by systemd

Posted: 13 Apr 2022 06:42 AM PDT

I have created a systemd service file and placed it in /etc/systemd/system/anfragen-3dkonfig-mapper.service. I ran systemctl daemon-reload, systemctl daemon-reexec and rebooted the system.

  • systemctl enable anfragen-3dkonfig-mapper results in

    Failed to enable unit: Unit file anfragen-3dkonfig-mapper.service does not exist.  
  • systemctl start anfragen-3dkonfig-mapper results in

    Failed to start anfragen-3dkonfig-mapper.service: Unit anfragen-3dkonfig-mapper.service not found.  
  • ls -lh /etc/systemd/system/anfragen-3dkonfig-mapper.service outputs

    -rw-r--r--. 1 root root 440 Mar 19 12:08 /etc/systemd/system/anfragen-3dkonfig-mapper.service  
  • cd /root && systemd-analyze verify anfragen-3dkonfig-mapper.service has an exit code of 0 and prints no output.

  • mount shows

    /dev/sda2 on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)  
  • There are no other mounts touching /usr or /etc.

  • The contents of the service file are:

    [Unit]  Description=Anfragen 3D Konfigurations Mapper Service  After=network.target    [Service]  Restart=always  ExecStartPre=-/usr/bin/podman stop anfragen-3dkonfig-mapper  ExecStartPre=-/usr/bin/podman rm anfragen-3dkonfig-mapper  ExecStart=/usr/bin/podman run --rm --name anfragen-3dkonfig-mapper-app -p 10010:10000 anfragen-3dkonfig-mapper-app:0.0.1  ExecStop=/usr/bin/podman stop anfragen-3dkonfig-mapper    [Install]  WantedBy=multi-user.target  
  • All above commands were run as the root user.

  • Operating System: CentOS Linux release 8.0.1905 (Core)
  • Systemd version: 239
  • Linux kernel: Linux version 4.18.0-80.11.2.el8_0.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 8.2.1 20180905 (Red Hat 8.2.1-3) (GCC))
  • I vaguely remember having a similar problem with another service file some months ago which just magically started working after a few hours of poking around and renaming the service file back and forth.

I'm interested in two things:

  • How does one debug such a problem?
  • What is wrong?

Problem with gpg when using apt

Posted: 13 Apr 2022 07:03 AM PDT

I'm scratching my head to find a way to correct broken gpg stuff in apt.

When i try to install Nodejs :

curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -  sudo apt-get install -y nodejs  

I get this error :

## You seem to be using Debian version stretch.  ## This maps to Debian "jessie"... Adjusting for you...    ## Confirming "jessie" is supported...    + curl -sLf -o /dev/null 'https://deb.nodesource.com/node_7.x/dists/jessie/Release'    ## Adding the NodeSource signing key to your keyring...    + curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -  gpg: [don't know]: invalid packet (ctb=00)  gpg: keydb_get_keyblock failed: Valeur non trouvée  gpg: [don't know]: invalid packet (ctb=00)  gpg: /tmp/apt-key-gpghome.ix2LFsfXOw/pubring.gpg: copy to '/tmp/apt-key-gpghome.ix2LFsfXOw/pubring.gpg.tmp' failed: Paquet incorrect  gpg: error writing keyring '/tmp/apt-key-gpghome.ix2LFsfXOw/pubring.gpg': Paquet incorrect  gpg: [don't know]: invalid packet (ctb=00)  gpg: error reading '-': Paquet incorrect  gpg: import from '-' failed: Paquet incorrect  Error executing command, exiting  

I use a Debian stretch rc2 with kernel 10.5. Don't know if it's the problem or not. I can't use stable version of debian because i'm running on a Ryzen processor.

When i try to install VSCode, i got another error too:

W: Erreur de GPG : http://packages.microsoft.com/repos/vscode stable InRelease : Les signatures suivantes n'ont pas pu être vérifiées car la clé publique n'est pas disponible : NO_PUBKEY EB3E94ADBE1229CF  W: The repository 'http://packages.microsoft.com/repos/vscode stable InRelease' is not signed.  N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.  N: See apt-secure(8) manpage for repository creation and user configuration details.  

Any idea?

[EDIT] This is my source.list

deb http://ftp.univ-pau.fr/linux/mirrors/debian/ stretch main non-free contrib   deb-src http://ftp.univ-pau.fr/linux/mirrors/debian/ stretch main non-free contrib     deb http://security.debian.org/debian-security/ stretch/updates main contrib non-free   deb-src http://security.debian.org/debian-security/ stretch/updates main contrib non-free     # stretch-updates, previously known as 'volatile'  deb http://ftp.univ-pau.fr/linux/mirrors/debian/ stretch-updates main contrib non-free   deb-src http://ftp.univ-pau.fr/linux/mirrors/debian/ stretch-updates main contrib non-free     # stretch-backports, previously on backports.debian.org  deb http://ftp.univ-pau.fr/linux/mirrors/debian/ stretch-backports main contrib non-free   deb-src http://ftp.univ-pau.fr/linux/mirrors/debian/ stretch-backports main contrib non-free     # deb [arch=amd64] https://download.docker.com/linux/debian/ stretch stable   # deb-src [arch=amd64] https://download.docker.com/linux/debian/ stretch stable   deb http://www.deb-multimedia.org/ stretch main non-free   deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main  

ubuntu 16.04 "Package exfat-utils is not available, but is referred to by another package."

Posted: 13 Apr 2022 04:09 AM PDT

This is my first time trying Linux so I don't know really anything and could use some help with using exFAT sd cards on ubuntu 16.04.

A little information first, I'm running ubuntu from my flash drive and I'm using UNetbootin to set up the iso. When setting up the iso I reserve about 3 gb.

What I'm trying to do is be able to use my SD card but it says it's unable to read exFAT files when I plug it in.

I've tried :

sudo apt-get install exfat-fuse exfat-utils   

but it doesn't work, here is the output:

ubuntu@ubuntu:~$ sudo apt-get install exfat-fuse exfat-utils  Reading package lists... Done  Building dependency tree         Reading state information... Done  Package exfat-utils is not available, but is referred to by another package.  This may mean that the package is missing, has been obsoleted, or  is only available from another source    E: Unable to locate package exfat-fuse  E: Package 'exfat-utils' has no installation candidate  

Anyone know what I'm doing wrong? Also let me know if you need more information to solve this issue.

Thanks for any help

system rescue cd failure reading sector from cd0

Posted: 13 Apr 2022 04:09 AM PDT

Im trying to run system rescue cd on my HP4250 laptop and im getting a read error on the disk. Its saying the kernel needs to be loaded first, oddly enough, even though this is the place where i choose the kernel (before it loads).

The disk boots fine on another system, looks perfect condition, and is fairly new.

I saw another instance of a similar problem where a guy was running mint disk or somethign and this happened, and the one suggestion was to turn off secure boot. What is that?

Drag-and-drop without the drag

Posted: 13 Apr 2022 06:51 AM PDT

I sometimes need to drag-and-drop files onto an application. (Example — but my question here is not installing Chrome userscripts.) One solution is to use Dragbox, which opens a window from which I can drag a file specified on the command line.

It's nice but I'd like to reduce the necessary mouse interaction. With Dragbox, I have to: arrange for both Dragbox and the drop zone to be visible; move the mouse cursor to the location where Dragbox displays the file; press the left mouse button; move the mouse cursor to the drop zone; release the cursor.

I'd like an interface that works more like copy-paste: run a command like dragbox --more-magic foo, then click on the drop zone. Or run the command then focus the drop zone and press a key. Is there a program to do that? Can it even be done with Freedesktop drag-and-drop?

Send specific signal number with specific key

Posted: 13 Apr 2022 04:13 AM PDT

I want to set a specific key like F12 to send me a specific signal number that out of linux signals range that I can handle this signal with trap command. How can I do that?

NOTE: I'm working with console and X server not installed.

Getting conflict errors when runnin yum update

Posted: 13 Apr 2022 05:06 AM PDT

I'm truing to run yum update, and keep getting errors about conflicts. I must have accidentally interrupted an update at some point, but I don't know when and how.

I've tried —skip-broken, but it doesn't really help me, because I want to update the parts that now refuse to update.

Also, I've tried "yum remove util-linux", but then when I tried to re-install it, it didn't let me. Due to conflict errors much like what I'm getting now. (So I reverted to a backup volume, hence back on square 1).

Any ideas of how I can solve this?

yum update  Loaded plugins: priorities, update-motd, upgrade-helper  amzn-main/latest                                                                                                                                                                   | 2.1 kB     00:00       amzn-updates/latest                                                                                                                                                                | 2.3 kB     00:00       Resolving Dependencies  --> Running transaction check  ---> Package aws-amitools-ec2.noarch 0:1.5.2-0.0.amzn1 will be updated  ---> Package aws-amitools-ec2.noarch 0:1.5.3-0.0.amzn1 will be an update  ---> Package aws-apitools-as.noarch 0:1.0.61.4-1.0.amzn1 will be updated  ---> Package aws-apitools-as.noarch 0:1.0.61.5-1.0.amzn1 will be an update  ---> Package aws-apitools-ec2.noarch 0:1.6.13.0-1.1.amzn1 will be updated  ---> Package aws-apitools-ec2.noarch 0:1.7.1.0-1.2.amzn1 will be an update  ---> Package aws-apitools-elb.noarch 0:1.0.34.0-1.0.amzn1 will be updated  ---> Package aws-apitools-elb.noarch 0:1.0.35.0-1.0.amzn1 will be an update  ---> Package aws-cli.noarch 0:1.3.6-1.0.amzn1 will be updated  ---> Package aws-cli.noarch 0:1.3.24-1.0.amzn1 will be an update  ---> Package cloud-init.noarch 0:0.5.15-77.amzn1 will be updated  ---> Package cloud-init.noarch 0:0.7.2-7.20.amzn1 will be updated  ---> Package cloud-init.noarch 0:0.7.2-7.27.amzn1 will be an update  ---> Package curl.x86_64 0:7.35.0-2.42.amzn1 will be updated  ---> Package curl.x86_64 0:7.36.0-2.44.amzn1 will be updated  ---> Package curl.x86_64 0:7.36.0-2.45.amzn1 will be an update  ---> Package cyrus-sasl.x86_64 0:2.1.23-13.13.amzn1 will be updated  ---> Package cyrus-sasl.x86_64 0:2.1.23-13.15.amzn1 will be an update  ---> Package cyrus-sasl-lib.x86_64 0:2.1.23-13.10.amzn1 will be updated  ---> Package cyrus-sasl-lib.x86_64 0:2.1.23-13.13.amzn1 will be updated  ---> Package cyrus-sasl-lib.x86_64 0:2.1.23-13.15.amzn1 will be an update  ---> Package cyrus-sasl-plain.x86_64 0:2.1.23-13.10.amzn1 will be updated  ---> Package cyrus-sasl-plain.x86_64 0:2.1.23-13.13.amzn1 will be updated  ---> Package cyrus-sasl-plain.x86_64 0:2.1.23-13.15.amzn1 will be an update  ---> Package ec2-net-utils.noarch 0:0.4-1.20.amzn1 will be updated  ---> Package ec2-net-utils.noarch 0:0.4-1.22.amzn1 will be an update  ---> Package ec2-utils.noarch 0:0.4-1.20.amzn1 will be updated  ---> Package ec2-utils.noarch 0:0.4-1.22.amzn1 will be an update  ---> Package elfutils-libelf.x86_64 0:0.152-1.12.amzn1 will be updated  ---> Package elfutils-libelf.x86_64 0:0.157-2.14.amzn1 will be updated  ---> Package elfutils-libelf.x86_64 0:0.158-3.16.amzn1 will be an update  ---> Package file.x86_64 0:5.11-13.14.amzn1 will be updated  ---> Package file.x86_64 0:5.11-13.16.amzn1 will be updated  ---> Package file.x86_64 0:5.19-1.18.amzn1 will be an update  ---> Package file-libs.x86_64 0:5.11-13.14.amzn1 will be updated  ---> Package file-libs.x86_64 0:5.11-13.16.amzn1 will be updated  ---> Package file-libs.x86_64 0:5.19-1.18.amzn1 will be an update  ---> Package glibc.x86_64 0:2.12-1.132.45.amzn1 will be updated  ---> Package glibc.x86_64 0:2.17-36.81.amzn1 will be updated  ---> Package glibc.x86_64 0:2.17-55.84.amzn1 will be an update  ---> Package glibc-common.x86_64 0:2.12-1.132.45.amzn1 will be updated  ---> Package glibc-common.x86_64 0:2.17-36.81.amzn1 will be updated  ---> Package glibc-common.x86_64 0:2.17-55.84.amzn1 will be an update  ---> Package glibc-devel.x86_64 0:2.17-36.81.amzn1 will be updated  ---> Package glibc-devel.x86_64 0:2.17-55.84.amzn1 will be an update  ---> Package glibc-headers.x86_64 0:2.17-36.81.amzn1 will be updated  ---> Package glibc-headers.x86_64 0:2.17-55.84.amzn1 will be an update  ---> Package gnupg2.x86_64 0:2.0.22-1.24.amzn1 will be updated  ---> Package gnupg2.x86_64 0:2.0.24-1.25.amzn1 will be an update  ---> Package httpd.x86_64 0:2.2.27-1.2.amzn1 will be updated  ---> Package httpd.x86_64 0:2.2.27-1.3.amzn1 will be an update  ---> Package httpd-tools.x86_64 0:2.2.27-1.2.amzn1 will be updated  ---> Package httpd-tools.x86_64 0:2.2.27-1.3.amzn1 will be an update  ---> Package java-1.6.0-openjdk.x86_64 1:1.6.0.0-66.1.13.1.62.amzn1 will be updated  ---> Package java-1.6.0-openjdk.x86_64 1:1.6.0.0-66.1.13.1.63.amzn1 will be updated  ---> Package java-1.6.0-openjdk.x86_64 1:1.6.0.0-67.1.13.4.65.amzn1 will be an update  ---> Package kernel.x86_64 0:3.10.48-55.140.amzn1 will be installed  ---> Package kernel-headers.x86_64 0:3.10.35-43.137.amzn1 will be updated  ---> Package kernel-headers.x86_64 0:3.10.48-55.140.amzn1 will be an update  ---> Package libblkid.x86_64 0:2.17.2-13.17.amzn1 will be updated  ---> Package libblkid.x86_64 0:2.23.2-6.21.amzn1 will be updated  ---> Package libblkid.x86_64 0:2.23.2-16.22.amzn1 will be an update  ---> Package libcurl.x86_64 0:7.35.0-2.42.amzn1 will be updated  ---> Package libcurl.x86_64 0:7.36.0-2.44.amzn1 will be updated  ---> Package libcurl.x86_64 0:7.36.0-2.45.amzn1 will be an update  ---> Package libmount.x86_64 0:2.23.2-6.21.amzn1 will be updated  ---> Package libmount.x86_64 0:2.23.2-16.22.amzn1 will be an update  ---> Package libpwquality.x86_64 0:1.2.3-1.2.amzn1 will be updated  ---> Package libpwquality.x86_64 0:1.2.3-1.5.amzn1 will be an update  ---> Package libtasn1.x86_64 0:2.3-3.4.amzn1 will be updated  ---> Package libtasn1.x86_64 0:2.3-6.6.amzn1 will be an update  ---> Package libuuid.x86_64 0:2.17.2-13.17.amzn1 will be updated  ---> Package libuuid.x86_64 0:2.23.2-6.21.amzn1 will be updated  ---> Package libuuid.x86_64 0:2.23.2-16.22.amzn1 will be an update  ---> Package libxml2.x86_64 0:2.9.1-1.1.28.amzn1 will be updated  ---> Package libxml2.x86_64 0:2.9.1-1.1.29.amzn1 will be updated  ---> Package libxml2.x86_64 0:2.9.1-1.1.31.amzn1 will be an update  ---> Package mod_ssl.x86_64 1:2.2.27-1.2.amzn1 will be updated  ---> Package mod_ssl.x86_64 1:2.2.27-1.3.amzn1 will be an update  ---> Package mysql55.x86_64 0:5.5.34-1.40.amzn1 will be updated  ---> Package mysql55.x86_64 0:5.5.36-1.44.amzn1 will be updated  ---> Package mysql55.x86_64 0:5.5.38-1.0.amzn1 will be an update  ---> Package mysql55-common.x86_64 0:5.5.34-1.40.amzn1 will be updated  ---> Package mysql55-common.x86_64 0:5.5.36-1.44.amzn1 will be updated  ---> Package mysql55-common.x86_64 0:5.5.38-1.0.amzn1 will be an update  ---> Package mysql55-libs.x86_64 0:5.5.34-1.40.amzn1 will be updated  ---> Package mysql55-libs.x86_64 0:5.5.36-1.44.amzn1 will be updated  ---> Package mysql55-libs.x86_64 0:5.5.38-1.0.amzn1 will be an update  ---> Package mysql55-server.x86_64 0:5.5.34-1.40.amzn1 will be updated  ---> Package mysql55-server.x86_64 0:5.5.36-1.44.amzn1 will be updated  ---> Package mysql55-server.x86_64 0:5.5.38-1.0.amzn1 will be an update  ---> Package nspr.x86_64 0:4.10.2-1.19.amzn1 will be updated  ---> Package nspr.x86_64 0:4.10.4-1.22.amzn1 will be an update  ---> Package nss.x86_64 0:3.15.3-3.32.amzn1 will be updated  ---> Package nss.x86_64 0:3.16.0-1.36.amzn1 will be an update  ---> Package nss-softokn.x86_64 0:3.14.3-9.15.amzn1 will be updated  ---> Package nss-softokn.x86_64 0:3.16.0-1.19.amzn1 will be an update  ---> Package nss-softokn-freebl.x86_64 0:3.14.3-9.15.amzn1 will be updated  ---> Package nss-softokn-freebl.x86_64 0:3.16.0-1.19.amzn1 will be an update  ---> Package nss-sysinit.x86_64 0:3.15.3-3.32.amzn1 will be updated  ---> Package nss-sysinit.x86_64 0:3.16.0-1.36.amzn1 will be an update  ---> Package nss-tools.x86_64 0:3.15.3-3.32.amzn1 will be updated  ---> Package nss-tools.x86_64 0:3.16.0-1.36.amzn1 will be an update  ---> Package nss-util.x86_64 0:3.15.3-1.18.amzn1 will be updated  ---> Package nss-util.x86_64 0:3.15.3-1.19.amzn1 will be updated  ---> Package nss-util.x86_64 0:3.16.0-1.22.amzn1 will be an update  ---> Package openssh.x86_64 0:6.2p2-7.40.amzn1 will be updated  ---> Package openssh.x86_64 0:6.2p2-8.41.amzn1 will be an update  ---> Package openssh-clients.x86_64 0:6.2p2-7.40.amzn1 will be updated  ---> Package openssh-clients.x86_64 0:6.2p2-8.41.amzn1 will be an update  ---> Package openssh-server.x86_64 0:6.2p2-7.40.amzn1 will be updated  ---> Package openssh-server.x86_64 0:6.2p2-8.41.amzn1 will be an update  ---> Package openssl.x86_64 1:1.0.1e-4.55.amzn1 will be updated  ---> Package openssl.x86_64 1:1.0.1g-1.69.amzn1 will be updated  ---> Package openssl.x86_64 1:1.0.1i-1.78.amzn1 will be an update  ---> Package pam.x86_64 0:1.1.1-13.20.amzn1 will be updated  ---> Package pam.x86_64 0:1.1.8-1.25.amzn1 will be updated  ---> Package pam.x86_64 0:1.1.8-9.29.amzn1 will be an update  ---> Package python-boto.noarch 0:2.27.0-1.0.amzn1 will be updated  ---> Package python-boto.noarch 0:2.32.0-1.0.amzn1 will be an update  ---> Package python-botocore.noarch 0:0.40.0-1.0.amzn1 will be updated  ---> Package python-botocore.noarch 0:0.58.0-1.0.amzn1 will be an update  ---> Package python-jmespath.noarch 0:0.3.1-1.0.amzn1 will be updated  ---> Package python-jmespath.noarch 0:0.4.1-1.0.amzn1 will be an update  ---> Package python-simplejson.x86_64 0:3.3.0-1.5.amzn1 will be updated  ---> Package python-simplejson.x86_64 0:3.5.3-1.7.amzn1 will be an update  ---> Package readline.x86_64 0:6.0-4.12.amzn1 will be updated  ---> Package readline.x86_64 0:6.2-6.13.amzn1 will be updated  ---> Package readline.x86_64 0:6.2-9.14.amzn1 will be an update  ---> Package util-linux.x86_64 0:2.23.2-6.21.amzn1 will be updated  ---> Package util-linux.x86_64 0:2.23.2-16.22.amzn1 will be obsoleting  ---> Package util-linux-ng.x86_64 0:2.17.2-13.17.amzn1 will be obsoleted  --> Processing Conflict: glibc-2.17-55.84.amzn1.x86_64 conflicts audit < 2.3.0  --> Processing Conflict: util-linux-2.23.2-16.22.amzn1.x86_64 conflicts coreutils < 8.20  --> Processing Conflict: util-linux-2.23.2-16.22.amzn1.x86_64 conflicts sysvinit < 2.87-5  --> Processing Conflict: util-linux-2.23.2-16.22.amzn1.x86_64 conflicts sysvinit < 2.87-5  --> Finished Dependency Resolution  --> Running transaction check  ---> Package glibc.x86_64 0:2.17-36.81.amzn1 will be updated  ---> Package glibc.x86_64 0:2.17-36.81.amzn1 will be updated  ---> Package kernel.x86_64 0:3.4.76-65.111.amzn1 will be erased  --> Processing Conflict: glibc-2.17-55.84.amzn1.x86_64 conflicts audit < 2.3.0  --> Processing Conflict: util-linux-2.23.2-16.22.amzn1.x86_64 conflicts coreutils < 8.20  --> Processing Conflict: util-linux-2.23.2-16.22.amzn1.x86_64 conflicts sysvinit < 2.87-5  --> Processing Conflict: util-linux-2.23.2-16.22.amzn1.x86_64 conflicts sysvinit < 2.87-5  --> Finished Dependency Resolution  Error: util-linux conflicts with coreutils-8.4-31.20.amzn1.x86_64  Error: util-linux conflicts with sysvinit-2.87-4.dsf.10.amzn1.x86_64  Error: util-linux conflicts with upstart-0.6.5-12.10.amzn1.x86_64  Error: glibc conflicts with audit-2.2-2.17.amzn1.x86_64   You could try using --skip-broken to work around the problem  ** Found 113 pre-existing rpmdb problem(s), 'yum check' output follows:  apr-1.5.0-2.11.amzn1.x86_64 is a duplicate with apr-1.4.6-1.10.amzn1.x86_64  audit-2.3.2-3.19.amzn1.x86_64 is a duplicate with audit-2.2-2.17.amzn1.x86_64  audit-libs-2.3.2-3.19.amzn1.x86_64 is a duplicate with audit-libs-2.2-2.17.amzn1.x86_64  ca-certificates-2013.1.94-65.0.9.amzn1.noarch is a duplicate with ca-certificates-2012.1.95-3.12.amzn1.noarch  cloud-init-0.7.2-7.20.amzn1.noarch is a duplicate with cloud-init-0.5.15-77.amzn1.noarch  coreutils-8.21-13.31.amzn1.x86_64 is a duplicate with coreutils-8.4-31.20.amzn1.x86_64  cronie-anacron-1.4.4-7.5.amzn1.x86_64 has missing requires of cronie = ('0', '1.4.4', '7.5.amzn1')  cronie-anacron-1.4.4-12.6.amzn1.x86_64 is a duplicate with cronie-anacron-1.4.4-7.5.amzn1.x86_64  cryptsetup-1.6.2-2.11.amzn1.x86_64 is a duplicate with cryptsetup-1.5.1-1.3.amzn1.x86_64  cryptsetup-libs-1.6.2-2.11.amzn1.x86_64 is a duplicate with cryptsetup-libs-1.5.1-1.3.amzn1.x86_64  curl-7.36.0-2.44.amzn1.x86_64 is a duplicate with curl-7.35.0-2.42.amzn1.x86_64  cyrus-sasl-lib-2.1.23-13.13.amzn1.x86_64 is a duplicate with cyrus-sasl-lib-2.1.23-13.10.amzn1.x86_64  cyrus-sasl-plain-2.1.23-13.13.amzn1.x86_64 is a duplicate with cyrus-sasl-plain-2.1.23-13.10.amzn1.x86_64  db4-4.7.25-18.11.amzn1.x86_64 is a duplicate with db4-4.7.25-17.10.amzn1.x86_64  db4-utils-4.7.25-18.11.amzn1.x86_64 is a duplicate with db4-utils-4.7.25-17.10.amzn1.x86_64  1:dbus-1.6.12-5.25.amzn1.x86_64 is a duplicate with 1:dbus-1.2.24-7.16.amzn1.x86_64  1:dbus-libs-1.6.12-5.25.amzn1.x86_64 is a duplicate with 1:dbus-libs-1.2.24-7.16.amzn1.x86_64  dejavu-fonts-common-2.33-5.8.amzn1.noarch is a duplicate with dejavu-fonts-common-2.30-2.4.amzn1.noarch  dejavu-sans-fonts-2.33-5.8.amzn1.noarch is a duplicate with dejavu-sans-fonts-2.30-2.4.amzn1.noarch  dejavu-serif-fonts-2.33-5.8.amzn1.noarch is a duplicate with dejavu-serif-fonts-2.30-2.4.amzn1.noarch  12:dhclient-4.1.1-38.P1.19.amzn1.x86_64 is a duplicate with 12:dhclient-4.1.1-34.P1.18.amzn1.x86_64  12:dhcp-common-4.1.1-38.P1.19.amzn1.x86_64 is a duplicate with 12:dhcp-common-4.1.1-34.P1.18.amzn1.x86_64  e2fsprogs-libs-1.42.8-2.29.amzn1.x86_64 is a duplicate with e2fsprogs-libs-1.42.3-3.17.amzn1.x86_64  elfutils-libelf-0.157-2.14.amzn1.x86_64 is a duplicate with elfutils-libelf-0.152-1.12.amzn1.x86_64  file-5.11-13.16.amzn1.x86_64 is a duplicate with file-5.11-13.14.amzn1.x86_64  file-libs-5.11-13.16.amzn1.x86_64 is a duplicate with file-libs-5.11-13.14.amzn1.x86_64  glib2-2.36.3-2.14.amzn1.x86_64 is a duplicate with glib2-2.22.5-7.11.amzn1.x86_64  glibc-2.17-36.81.amzn1.x86_64 has installed conflicts audit < ('0', '2.3.0', None): audit-2.2-2.17.amzn1.x86_64  glibc-2.17-36.81.amzn1.x86_64 is a duplicate with glibc-2.12-1.132.45.amzn1.x86_64  glibc-common-2.17-36.81.amzn1.x86_64 is a duplicate with glibc-common-2.12-1.132.45.amzn1.x86_64  groff-1.22.2-6.10.amzn1.x86_64 is a duplicate with groff-1.18.1.4-21.7.amzn1.x86_64  groff-base-1.22.2-6.10.amzn1.x86_64 has installed conflicts groff < ('0', '1.22.2', None): groff-1.18.1.4-21.7.amzn1.x86_64  grubby-7.0.15-5.7.amzn1.x86_64 is a duplicate with grubby-7.0.15-3.6.amzn1.x86_64  gzip-1.5-4.16.amzn1.x86_64 is a duplicate with gzip-1.3.12-19.9.amzn1.x86_64  hwdata-0.233-9.1.16.amzn1.noarch is a duplicate with hwdata-0.233-7.9.14.amzn1.noarch  info-5.1-1.9.amzn1.x86_64 is a duplicate with info-4.13a-8.8.amzn1.x86_64  initscripts-9.03.40-2.29.amzn1.x86_64 has installed conflicts util-linux-ng < ('0', '2.23', None): util-linux-ng-2.17.2-13.17.amzn1.x86_64  initscripts-9.03.40-2.29.amzn1.x86_64 has installed conflicts util-linux < ('0', '2.23', None): util-linux-ng-2.17.2-13.17.amzn1.x86_64  initscripts-9.03.40-2.29.amzn1.x86_64 is a duplicate with initscripts-9.03.38-1.22.amzn1.x86_64  1:java-1.6.0-openjdk-1.6.0.0-66.1.13.1.63.amzn1.x86_64 is a duplicate with 1:java-1.6.0-openjdk-1.6.0.0-66.1.13.1.62.amzn1.x86_64  kpartx-0.4.9-72.7.amzn1.x86_64 is a duplicate with kpartx-0.4.9-64.6.amzn1.x86_64  ksh-20120801-10.12.amzn1.x86_64 is a duplicate with ksh-20100621-19.11.amzn1.x86_64  libblkid-2.23.2-6.21.amzn1.x86_64 is a duplicate with libblkid-2.17.2-13.17.amzn1.x86_64  libcom_err-1.42.8-2.29.amzn1.x86_64 is a duplicate with libcom_err-1.42.3-3.17.amzn1.x86_64  libcurl-7.36.0-2.44.amzn1.x86_64 is a duplicate with libcurl-7.35.0-2.42.amzn1.x86_64  libgcrypt-1.5.3-1.14.amzn1.x86_64 is a duplicate with libgcrypt-1.4.5-9.12.amzn1.x86_64  14:libpcap-1.4.0-1.20130826git2dbcaa1.10.amzn1.x86_64 is a duplicate with 14:libpcap-1.0.0-6.20091201git117cb5.9.amzn1.x86_64  libss-1.42.8-2.29.amzn1.x86_64 is a duplicate with libss-1.42.3-3.17.amzn1.x86_64  libtool-ltdl-2.4.2-18.4.8.2.21.amzn1.x86_64 is a duplicate with libtool-ltdl-2.2.10-4.6.3.14.amzn1.x86_64  libudev-173-4.13.amzn1.x86_64 is a duplicate with libudev-173-4.12.amzn1.x86_64  libuuid-2.23.2-6.21.amzn1.x86_64 is a duplicate with libuuid-2.17.2-13.17.amzn1.x86_64  libxml2-2.9.1-1.1.29.amzn1.x86_64 is a duplicate with libxml2-2.9.1-1.1.28.amzn1.x86_64  libxslt-1.1.28-3.8.amzn1.x86_64 is a duplicate with libxslt-1.1.26-2.7.amzn1.x86_64  libyaml-0.1.6-1.6.amzn1.x86_64 is a duplicate with libyaml-0.1.4-6.5.amzn1.x86_64  mdadm-3.2.6-7.29.amzn1.x86_64 is a duplicate with mdadm-3.2.5-4.23.amzn1.x86_64  mysql-5.5-1.6.amzn1.noarch is a duplicate with mysql-5.5-1.3.amzn1.noarch  mysql-server-5.5-1.6.amzn1.noarch is a duplicate with mysql-server-5.5-1.3.amzn1.noarch  mysql55-5.5.36-1.44.amzn1.x86_64 is a duplicate with mysql55-5.5.34-1.40.amzn1.x86_64  mysql55-common-5.5.36-1.44.amzn1.x86_64 is a duplicate with mysql55-common-5.5.34-1.40.amzn1.x86_64  mysql55-libs-5.5.36-1.44.amzn1.x86_64 is a duplicate with mysql55-libs-5.5.34-1.40.amzn1.x86_64  mysql55-server-5.5.36-1.44.amzn1.x86_64 is a duplicate with mysql55-server-5.5.34-1.40.amzn1.x86_64  nss-util-3.15.3-1.19.amzn1.x86_64 is a duplicate with nss-util-3.15.3-1.18.amzn1.x86_64  numactl-2.0.7-8.11.amzn1.x86_64 is a duplicate with numactl-2.0.7-6.10.amzn1.x86_64  1:openssl-1.0.1g-1.69.amzn1.x86_64 is a duplicate with 1:openssl-1.0.1e-4.55.amzn1.x86_64  pam-1.1.8-1.25.amzn1.x86_64 is a duplicate with pam-1.1.1-13.20.amzn1.x86_64  4:perl-5.16.3-280.36.amzn1.x86_64 is a duplicate with 4:perl-5.10.1-136.21.amzn1.x86_64  perl-DBD-MySQL-4.023-2.16.amzn1.x86_64 is a duplicate with perl-DBD-MySQL-4.020-2.8.amzn1.x86_64  perl-DBI-1.627-1.7.amzn1.x86_64 is a duplicate with perl-DBI-1.609-4.4.amzn1.x86_64  1:perl-Digest-SHA-5.85-1.4.amzn1.x86_64 is a duplicate with 1:perl-Digest-SHA-5.47-136.21.amzn1.x86_64  perl-Digest-SHA1-2.13-7.6.amzn1.x86_64 is a duplicate with perl-Digest-SHA1-2.12-2.4.amzn1.x86_64  perl-Encode-Locale-1.03-4.7.amzn1.noarch is a duplicate with perl-Encode-Locale-1.02-3.1.amzn1.noarch  perl-HTML-Tagset-3.20-14.6.amzn1.noarch is a duplicate with perl-HTML-Tagset-3.20-4.4.amzn1.noarch  perl-LWP-MediaTypes-6.02-1.8.amzn1.noarch is a duplicate with perl-LWP-MediaTypes-6.01-3.3.amzn1.noarch  1:perl-Module-Pluggable-4.8-1.2.amzn1.noarch is a duplicate with 1:perl-Module-Pluggable-3.90-136.21.amzn1.x86_64  perl-Net-LibIDN-0.12-13.5.amzn1.x86_64 is a duplicate with perl-Net-LibIDN-0.12-3.2.amzn1.x86_64  1:perl-Pod-Escapes-1.04-280.36.amzn1.noarch is a duplicate with 1:perl-Pod-Escapes-1.04-136.21.amzn1.x86_64  1:perl-Pod-Simple-3.28-3.5.amzn1.noarch is a duplicate with 1:perl-Pod-Simple-3.13-136.21.amzn1.x86_64  1:perl-TimeDate-2.30-1.6.amzn1.noarch is a duplicate with 1:perl-TimeDate-1.16-11.1.4.amzn1.noarch  perl-URI-1.60-8.7.amzn1.noarch is a duplicate with perl-URI-1.40-2.5.amzn1.noarch  perl-XML-NamespaceSupport-1.11-9.7.amzn1.noarch is a duplicate with perl-XML-NamespaceSupport-1.10-3.5.amzn1.noarch  4:perl-libs-5.16.3-280.36.amzn1.x86_64 is a duplicate with 4:perl-libs-5.10.1-136.21.amzn1.x86_64  perl-podlators-2.5.1-2.7.amzn1.noarch has installed conflicts perl < ('4', '5.16.1', '234'): 4:perl-5.10.1-136.21.amzn1.x86_64  3:perl-version-0.99.02-2.5.amzn1.x86_64 is a duplicate with 3:perl-version-0.77-136.21.amzn1.x86_64  psmisc-22.20-6.11.amzn1.x86_64 is a duplicate with psmisc-22.6-15.8.amzn1.x86_64  pyliblzma-0.5.3-3.6.amzn1.x86_64 is a duplicate with pyliblzma-0.5.3-3.4.amzn1.x86_64  python26-2.6.9-1.46.amzn1.x86_64 is a duplicate with python26-2.6.9-1.43.amzn1.x86_64  python26-libs-2.6.9-1.46.amzn1.x86_64 is a duplicate with python26-libs-2.6.9-1.43.amzn1.x86_64  readline-6.2-6.13.amzn1.x86_64 is a duplicate with readline-6.0-4.12.amzn1.x86_64  rpm-4.11.2-2.54.amzn1.x86_64 is a duplicate with rpm-4.11.1-3.49.amzn1.x86_64  rpm-build-libs-4.11.2-2.54.amzn1.x86_64 is a duplicate with rpm-build-libs-4.11.1-3.49.amzn1.x86_64  rpm-libs-4.11.2-2.54.amzn1.x86_64 is a duplicate with rpm-libs-4.11.1-3.49.amzn1.x86_64  rpm-python-4.11.2-2.54.amzn1.x86_64 is a duplicate with rpm-python-4.11.1-3.49.amzn1.x86_64  rsyslog-5.8.10-8.25.amzn1.x86_64 is a duplicate with rsyslog-5.8.10-7.24.amzn1.x86_64  sqlite-3.7.17-1.9.amzn1.x86_64 is a duplicate with sqlite-3.6.20-1.8.amzn1.x86_64  system-release-2014.03-2.0.noarch is a duplicate with system-release-2013.09-1.0.noarch  sysvinit-2.87-5.dsf.14.amzn1.x86_64 has installed conflicts util-linux < ('0', '2.23.2', None): util-linux-ng-2.17.2-13.17.amzn1.x86_64  sysvinit-2.87-5.dsf.14.amzn1.x86_64 is a duplicate with sysvinit-2.87-4.dsf.10.amzn1.x86_64  tcp_wrappers-7.6-75.11.amzn1.x86_64 is a duplicate with tcp_wrappers-7.6-57.9.amzn1.x86_64  tcp_wrappers-libs-7.6-75.11.amzn1.x86_64 is a duplicate with tcp_wrappers-libs-7.6-57.9.amzn1.x86_64  tzdata-2013i-2.23.amzn1.noarch is a duplicate with tzdata-2013c-2.18.amzn1.noarch  tzdata-java-2013i-2.23.amzn1.noarch is a duplicate with tzdata-java-2013c-2.18.amzn1.noarch  udev-173-4.13.amzn1.x86_64 is a duplicate with udev-173-4.12.amzn1.x86_64  upstart-0.6.5-13.3.13.amzn1.x86_64 is a duplicate with upstart-0.6.5-12.10.amzn1.x86_64  util-linux-2.23.2-6.21.amzn1.x86_64 has installed conflicts coreutils < ('0', '8.20', None): coreutils-8.4-31.20.amzn1.x86_64  util-linux-2.23.2-6.21.amzn1.x86_64 has installed conflicts sysvinit < ('0', '2.87', '5'): upstart-0.6.5-12.10.amzn1.x86_64, sysvinit-2.87-4.dsf.10.amzn1.x86_64  2:vim-common-7.4.027-2.28.amzn1.x86_64 is a duplicate with 2:vim-common-7.2.411-1.8.17.amzn1.x86_64  2:vim-minimal-7.4.027-2.28.amzn1.x86_64 is a duplicate with 2:vim-minimal-7.2.411-1.8.17.amzn1.x86_64  xz-5.1.2-5alpha.10.amzn1.x86_64 is a duplicate with xz-4.999.9-0.3.beta.20091007git.8.amzn1.x86_64  xz-libs-5.1.2-5alpha.10.amzn1.x86_64 is a duplicate with xz-libs-4.999.9-0.3.beta.20091007git.8.amzn1.x86_64  xz-lzma-compat-5.1.2-5alpha.10.amzn1.x86_64 is a duplicate with xz-lzma-compat-4.999.9-0.3.beta.20091007git.8.amzn1.x86_64  yum-3.4.3-137.51.amzn1.noarch is a duplicate with yum-3.4.3-111.46.amzn1.noarch  yum-plugin-priorities-1.1.31-18.17.amzn1.noarch is a duplicate with yum-plugin-priorities-1.1.31-17.16.amzn1.noarch  yum-plugin-upgrade-helper-1.1.31-18.17.amzn1.noarch is a duplicate with yum-plugin-upgrade-helper-1.1.31-17.16.amzn1.noarch  

Unix equivalent of PowerShell?

Posted: 13 Apr 2022 07:02 AM PDT

I've always found it awkward when complex shell commands involve parsing text output with AWK. Basically we're converting structured data into text, then parsing the text again to get back at the structured data.

PowerShell is a Windows shell which avoids that problem by allowing you to pipe typed objects between shell commands instead of just text.

Are there any Unix shells which are object-based instead of text-based, like PowerShell?

No comments:

Post a Comment