Friday, April 2, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Execute local Python script on demand via ssh tunnel

Posted: 02 Apr 2021 10:11 AM PDT

I have a local (local network, behind NAT router and firewall) Ubuntu machine and a publicly reachable (Ubuntu) server. I want to initiate a connection from the local machine to the server, then, on the server execute a Python script on the local machine. But here is the problem: I want to execute that Python script anytime in the future, sometimes multiple times after each execution. My first thought was a SSH tunnel like (executed on the local machine):

ssh user@remoteserver -R 21000:127.0.0.1:8081

But this obviously doesn't get me anything. The next try I had was this answer here. But that executes the script at connection time, and then drops the connection after execution.

So finally, my question is: How can I establish a secure connection, initiated by the local machine to the server, on which I can execute Python scripts on the local machine on demand, not just on connection time of the SSH command?
(Please let me know if anything was just too confusing, and I will re-phrase parts of the question).

cd does not take variable as argument in bash script [duplicate]

Posted: 02 Apr 2021 10:23 AM PDT

I'm trying to make a bash script that will give me a command that will take a number n as argument and change the directory to the nth directory listed by running ls in the working directory. Here's what I have:

#! /bin/bash -          arg=$(ls --group-directories-first | awk -v first=$1 'NR == first' | tr -d '[[:space:]]')  cd $arg  

It does not work. Nothing happens at all when I run it.

The first line does seem to be capturing the directory name in the way that I want. If I change the script to

#! /bin/bash -          arg=$(ls --group-directories-first | awk -v first=$1 'NR == first' | tr -d '[[:space:]]')  echo $arg  

and run it in a directory in which the first directory is bin, the script outputs 'bin' when I give it the argument 1:

[user@manjaro ~]$ ls  bin/          Desktop/      Documents/    Downloads/    [user@manjaro ~]$ cdn 1  bin  

So why does cd not take 'bin' and change to bin when I use the original version? And how should I change it?

One final note. When I try to do something similar outside a script it works fine:

[user@manjaro ~]$ foo=bin  [user@manjaro ~]$ cd $foo  [user@manjaro bin]$ pwd  /home/user/bin  

Again, why?

GPG not prompting for passphrase

Posted: 02 Apr 2021 10:00 AM PDT

So up until yesterday gpg was working all fine. But today, it doesn't prompt for passphrase, I just get an empty blinking command line.

I'm using gpg for signing git commits. I thought the problem was with git. But no, if I do echo "test" | gpg --clearsign I get the same than when doing git commit(empty command line not prompting for passphrase).

At first, the error I was getting when doing git commit was

error: gpg failed to sign the data  fatal: failed to write commit object  

But in this thread they said to export GPG_TTY=$(tty) in your bashrc/zshrc if you get that error. That stopped gpg from showing the error error: gpg failed to sign the data but it still doesn't prompt for passphrase.

I can't do anything related to prompting for passphrase, not listing my keys with gpg --list-secret-keys --keyid-format LONG` or anything. I can see my public with no problem. I tried importing my private key again and I get:

gpg: key <KEYID>: "<NAME EMAIL" not changed  

And then just a empty command line again.

I have pinentry installed just in case anyone asks.

I don't understand. It was all working fine yesterday! Does anyone knows how to solve this ?

Unable to redirect stderr to /dev/null from inittab

Posted: 02 Apr 2021 09:14 AM PDT

I am running a monitoring script which should be restarted on termination. So I am running it from /etc/inittab. Everything works fine. But while redirecting the stderr & stdout to /dev/null I could see error logs in console. Error logs are not getting redirected to /dev/null.

Below thing is the command added to inittab. ::respawn:sh monitor.sh &>/dev/null

FreeBSD move folders from a list

Posted: 02 Apr 2021 09:04 AM PDT

I have a .txt file that has a list of folders I would like to move from one directory to another. I have seen many posts on this, but none have worked. Mostly because those are using GNU versions of mv and xargs. I found this post that is doing what I want but only in Linux. Currently, we are using the latest version of TrueNAS Core which is running FreeBSD version 12.2-RELEASE-p3

I tried using the code below, the folder names in the file have letters, numbers, spaces, (, and ):

while IFS= read -r file; do       mv Projects/"$file" Archives/PROJECT\ ARCHIVE\ 2020;   done < Projects/Archive_List_test.txt  

It gives me this output:

 to Archives/PROJECT ARCHIVE 2020/folder1: No such file or directory  : No such file or directoryE 2020/folder2  

folder1 and folder2 are the folder names that are in the list. For my test, I only have 2 folders, but I actually need to move over about 360 folders

Thank you for your time.

Configure speed of touchpad using X11 configuration file

Posted: 02 Apr 2021 08:51 AM PDT

I would like to configure the speed of my touchpad using X11 configuration files - so the configuration persists between boots. I created the following configuration 50-touchpad-acceleration.conf file:

Section "InputClass"     Identifier "SynPS/2 Synaptics TouchPad"     MatchIsPointer "yes"     Option "libinput Accel Speed" 1.0  EndSection  

But this is breaking X11. Not sure what I'm missing.

How to customize keyboard shortcuts (accelerations) in evince?

Posted: 02 Apr 2021 08:30 AM PDT

Apparently users can customize shortcuts by editing ~/.config/evince/accels. I am having a hard time to figure out how it works and which possible actions we can customize. The contents of ~/.config/evince/accels are:

; evince GtkAccelMap rc-file         -*- scheme -*-  ; this file is an automated accelerator map dump  ;  ; (gtk_accel_path "<Actions>/BookmarsPopupActions/RemoveBookmark" "")  ; (gtk_accel_path "<Actions>/BookmarsPopupActions/RenameBookmark" "")  ; (gtk_accel_path "<Actions>/BookmarsPopupActions/OpenBookmark" "")  

Is there any documentation on the possible actions and how the structure of the accelerations should look like?

I appreciate your time and attention to this question

Note that similar question has been asked such as this and this, but I don't believe this is a duplicate of them.

Hostname in prompt string is "localhost"

Posted: 02 Apr 2021 08:46 AM PDT

I am trying to change my prompt to my hostname (Aidan) I used PS1="\h \d \u]"

when I used it, it only changed to "localhost" does anyone know what I am doing wrong? I have the user created in the GECOS field with the full name.

Server Rescue - Resizing root partition with non adjacent free space

Posted: 02 Apr 2021 07:41 AM PDT

I'm on rescue mode of my VPS server.

I need to resize my / partition as it is only 20 GB I managed to resize my /home partition (2) But now the free space is below it. As you can see

Model: ATA TOSHIBA DT01ACA0 (scsi)  Disk /dev/sda: 500GB  Sector size (logical/physical): 512B/4096B  Partition Table: msdos  Disk Flags:     Number  Start   End     Size    Type     File system     Flags          32.3kB  2097kB  2065kB           Free Space   1      2097kB  21.0GB  21.0GB  primary  ext4            boot   2      21.0GB  472GB   451GB   primary  ext4          472GB   500GB   27.6GB           Free Space   3      500GB   500GB   536MB   primary  linux-swap(v1)          500GB   500GB   4219kB           Free Space    (parted)     

So I need to extend / (1) with the free space after (2)

And to do that I need to move (2) to the end of the free space below it, and just before the swap

But it seems that parted (3.2) has no move command support anymore

And this is OVH rescue mode, and I don't know if I can get GPARTED

Help please !

debian - wifi option not available in connections

Posted: 02 Apr 2021 09:53 AM PDT

It's only some hours since I have installed Debian 10 with KDE on my hp bs-145tu laptop. I have installed firmware-realtek from apt and I still can't see any wifi option at all. I have been able to use ethernet though. How do I enable and use wifi?

I am using Debian 10.9 with KDE on intel cpu with realtek drivers. see here: enter image description here enter image description here

EDIT 1:

neevan@nebian:~$ lspci -knn |grep Net -A2  02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723DE 802.11b/g/n PCIe Adapter [10ec:d723]          Subsystem: Hewlett-Packard Company RTL8723DE 802.11b/g/n PCIe Adapter [103c:8319]  

How to generate a comma separated list of random ints

Posted: 02 Apr 2021 09:40 AM PDT

I am trying to generate a comma separated unordered list of ints between 1 and 10, I have tried the following but it results in an ordered list:

seq -s "," 10 | shuf  

Audio crackling and xruns in firefox only

Posted: 02 Apr 2021 08:10 AM PDT

I have an issue when using firefox (only seems to happen in firefox, chromium is not affected). When playing any audio in firefox, whether music or video, if in full screen (or theater mode on youtube, happens then too), audio crackles and pops.

I'm using JACK as I have a USB sound card with direct inputs for instruments, and I do record/practice using it and need the lower latency, however this occurs whether JACK is running and pulseaudio is bridged, or whether JACK is off and pulseaudio has control, and was happening before I installed JACK. I suspect it is an issue with pulseaudio, but I'm not sure how to check and what else to try.

I also noticed, while this bug is occuring, the system stutters a little bit (video playback slightly hangs) and a lot of xruns are occuring.

USB card used is a Scarlett Solo, other audio inputs on the system are not used (video card and onboard I mean). Using linux mint 20.1, with a low latency kernel. So far I've tried changing the sample rate and buffer size/period to try and find a working combination, no success. I've also added tsched=0 to /etc/pulseaudio/default.pa, no effect.

How to escape numbers between group identifiers

Posted: 02 Apr 2021 07:57 AM PDT

I'm using the utility rename to rename multiple files and I can't figure out how should I escape numbers between group identifiers. It must be elementary, but I've never faced the situation and my intuition doesn't help me to find the right escaping characters.

I want to replace any number in file name with 23. I've tried the following:

rename -n 's/(.*)([0-9]{2})(.*)/$1"23"$3/' *    $ rename -n 's/(.*)([0-9]{2})(.*)/$1"23"$3/' *  rename(Request22Message.json, Request"23"Message.json)  rename(Response22ExpectedMessage.json, Response"23"ExpectedMessage.json)  rename(Response22Message.json, Response"23"Message.json)  

Maybe dots are considered as concatenation characters in this case:

$ rename -n 's/(.*)([0-9]{2})(.*)/$1.23.$3/' *  rename(Request22Message.json, Request.23.Message.json)  rename(Response22ExpectedMessage.json, Response.23.ExpectedMessage.json)  rename(Response22Message.json, Response.23.Message.json)  

No.

Why does Wireshark Wi-Fi capture contain only Packets to STA. Packets from STA are missing (Chipset ralink 5370 under RaspOS)

Posted: 02 Apr 2021 10:21 AM PDT

I want to prepare a capture system for analyzing roaming technologies and capabilities of APs and clients in my own network.

The 5370 (wlx0013ef6009a6) is successfully in monitor mode, I see all 4 EAPOLS and decryption is working as well.

Overview:

# iwconfig  lo        no wireless extensions.    wlan0     IEEE 802.11  ESSID:off/any            Mode:Managed  Access Point: Not-Associated   Tx-Power=30 dBm            Retry short limit:7   RTS thr:off   Fragment thr:off            Encryption key:off            Power Management:on    wlx0013ef6009a6  IEEE 802.11  Mode:Monitor  Frequency:2.437 GHz  Tx-Power=20 dBm            Retry short  long limit:2   RTS thr:off   Fragment thr:off            Power Management:off  

The basic injection test was successfull as well

# aireplay-ng -9 -a xx:xx:xx:xx:xx:xx wlx0013ef6009a6  18:26:47  Waiting for beacon frame (BSSID: xx:xx:xx:xx:xx:xx) on channel 6  18:26:47  Trying broadcast probe requests...  18:26:47  Injection is working!  18:26:49  Found 1 AP    18:26:49  Trying directed probe requests...  18:26:49  xx:xx:xx:xx:xx:xx - channel: 6 - 'WLAN-xxxxxxxxxxx'  18:26:49  Ping (min/avg/max): 5.328ms/17.511ms/22.580ms Power: -31.20  18:26:49  30/30: 100%  

The 5370 supports only the 2.4GHz band.

I tried all from the driver supported channel modes:

iw dev wlx0013ef6009a6 set channel 6 HT20  iw dev wlx0013ef6009a6 set channel 6 HT40-  iw dev wlx0013ef6009a6 set channel 6 HT40+  

But the capture contains only payload packets to the wifi client. Packets to the AP cannot be recorded.

For example I see only ICMP replies (wireshark 3.4.4), not the requests. Sample Capture

Other examples are: Only the answers of a http request can be seen. Or DHCP Reqest and Ack, but no Discover and Offer.

What reason could be responsible, for that effect?

For comparision I used a Mikrotik hapac light. Here I can see both directions without problems.

Onurbi

file send to 000webhost by filezilla

Posted: 02 Apr 2021 08:24 AM PDT

Status: Connection established, waiting for welcome message...  Status: Initializing TLS...  Status: Verifying certificate...  Status: TLS connection established.  Status: Server does not support non-ASCII characters.  Status: Logged in  Status: Retrieving directory listing...  Command:    PWD  Response:   257 "/" is your current location  Command:    TYPE I  Response:   200 TYPE is now 8-bit binary  Command:    PASV  Response:   227 Entering Passive Mode (145,14,144,27,202,206).  Command:    MLSD  Response:   150 Connecting to port 31039  Error:  Connection timed out after 20 seconds of inactivity  Error:  Failed to retrieve directory listing  

I was able to login to my web server(000webhost.com) that's what I got first. But, when everything was loading then, connection timed out. My internet is working well. But, Why I am having the issue? I searched on Internet for a while. There was lot more questions like this but, none of them was helpful. Even, I watched some tutorial in YT also. enter image description here

I can't connect to xRDP by enter 127.0.0.1, but I can connect to it by enter "localhost"

Posted: 02 Apr 2021 08:25 AM PDT

I was installed GUI of Kali Linux on WSL. Now when I tried connect it through Remote Desktop Connection, I can't connect to it by type 127.0.0.1:3390, but I can connect by type localhost:3390. 127.0.0.1 is localhost IP, but why not it work here?

Also I can't connect to it by using default listening port of xRDP which is 3389, I have to change the port number. In internet I found that I have to change the port 3389 to 3390. But I check that I can change the default port to any port (for example 1323). So, why I have to change the default port and why it should be 3390?

Even graphical view of the Kali Linux desktop environment is not like other graphical view, it seems like older.

Network layer 1 failure

Posted: 02 Apr 2021 10:09 AM PDT

I updated 3 machines, one debian 9 and two ubuntu and all have completely lost network access. The Debian upgrade failed halfway, but the ubuntu ones seem to have gone properly.

The failure seems to be at layer 1: the switch sees the connection ('up'), but fails to receive a mac address from the machines. The machines themselves show the links as 'no-carrier'. The lights on the RJ45 are lit. The machines have 2 different network cards and the results are the same.

I'm completely stumped as to why 3 different systems with 3 different network cards with 2 different OSes would fail in the same way on the same day.

lshw shows *-network:0 DISABLED on all. dmesg doesn't show anything wrong with the drivers (which I see loaded with lsmod).

Doing a systemctl restart NetworkManager.service drops me in emergency mode.

Is there a very low level service I should check ? I'm lost.

I should add that when booting with a LiveCD, the network is FINE.

EDIT: To expand on my comment, while going through the logs of the ubuntu systems, I saw a message "A start job is running for dev-sdb1.device" and I noticed that this disk wasn't being mounted. Looking in /etc/fstab and lsblk and blkid I saw that this disk had moved from another name (say /dev/sdc1) during the upgrade (why?!?). So I updated the fstab to use the UUID instead of the device name. I rebooted and the network came back!

I'm totally nonplussed as to why the network would utterly fail if a minor data disk won't mount.

EDIT:

# ethtool -i eth0  driver: tg3  version: 3.137  firmware-version: FFV20.2.17 bc 5720-v1.39  expansion-rom-version:  bus-info: 0000:01:00.0  supports-statistics: yes  supports-tests: yes  supports-eeprom-access: yes  supports-register-dump: yes  supports-priv-flags: no  

Rename TMUX window based on custom function in ZSH

Posted: 02 Apr 2021 08:31 AM PDT

I have a custom function in my ~/.zshrc file:

function getCustomWindowName {    # runs 'sed' on 'pwd' to get special dir name    # and set it to $workspace    if $workspace is valid; then      echo $workspace      return 0    else      echo ""      return 1    fi  }  

In my ~/.tmux.conf file, I want to do something like this:

set-option -g status-interval 5  set-option -g automatic-rename on  set-option -g automatic-rename-format '#{getCustomWindowName}'  

Is there anyway to do this?

Bonus problem: if getCustomWindowName echos nothing (or return 1s), I want it to be the default window name. Is there anyway to do that as well?

Can't update anything on Linux Mint 20.1

Posted: 02 Apr 2021 08:52 AM PDT

Every time I try to install updates using the update manager on Linux Mint 20.1 I get the following message :

E: grub-pc: installed grub-pc package post-installation script subprocess returned error exit status 1  E: friendly-recovery: installed friendly-recovery package post-installation script subprocess returned error exit status 1  E: grub-efi-amd64-signed: dependency problems - leaving unconfigured  E: linux-image-5.4.0-67-generic: installed linux-image-5.4.0-67-generic package post-installation script subprocess returned error exit status 1  E: linux-image-5.4.0-70-generic: installed linux-image-5.4.0-70-generic package post-installation script subprocess returned error exit status 1  

I am new to Linux, what can I do ?

Any help will be appreciated

PS : output of cat /etc/apt/sources.list.d/official-package-repositories.list:

deb http://packages.linuxmint.com ulyssa main upstream import backport #id:linuxmint_main    deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse  deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse  deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse    deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse  deb http://archive.canonical.com/ubuntu/ focal partner  

output of uname -a :

Linux amandanotebook 5.4.0-65-generic #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux  

output of 'fdisk -l':

Disk /dev/sda: 931,53 GiB, 1000204886016 bytes, 1953525168 sectors  Disk model: WDC WD10SPZX-80Z  Units: sectors of 1 * 512 = 512 bytes  Sector size (logical/physical): 512 bytes / 4096 bytes  I/O size (minimum/optimal): 4096 bytes / 4096 bytes  Disklabel type: gpt  Disk identifier: 408BDF6F-6F00-4AA7-84D8-E1983D1E8F08    Device       Start        End    Sectors  Size Type  /dev/sda1     2048    1050623    1048576  512M EFI System  /dev/sda2  1050624 1953523711 1952473088  931G Linux filesystem  

output of 'efibootmgr-v':

BootCurrent: 0002  Timeout: 1 seconds  BootOrder: 0002,0000,0001,0003,0004  Boot0000* Windows Boot Manager  VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................  Boot0001* UEFI:CD/DVD Drive BBS(129,,0x0)  Boot0002* ubuntu    HD(1,GPT,b0b1778e-9099-4055-95c0-8b7b3318b306,0x800,0x100000)/File(\EFI\UBUNTU\SHIMX64.EFI)  Boot0003* UEFI:Removable Device BBS(130,,0x0)  Boot0004* UEFI:Network Device   BBS(131,,0x0)  

Editor's note: So I boot in UEFI mode, in spite having grub-pc package partially installed, could be the cause, or related.

output of 'history | grep grub-pc' :

53  sudo apt install grub-pc     63  /var/lib/dpkg/info/grub-pc.postinst      64  /var/lib/dpkg/info/grub-pc.postinst     65  sudo /var/lib/dpkg/info/grub-pc.postinst     66  /var/lib/dpkg/info/grub-pc.postinst     78  sudo apt reinstall grub-pc    105  sudo apt-get remove grub-pc-bin    110  sudo apt-get remove grub-pc-bin    112  history | grep grub-pc  

output of 'dpkg --list | grep "grub*" '

ii  grub-common                                   2.04-1ubuntu26.9                      amd64        GRand Unified Bootloader (common files)  iF  grub-efi-amd64                                2.04-1ubuntu26.9                      amd64        GRand Unified Bootloader, version 2 (EFI-AMD64 version)  ii  grub-efi-amd64-bin                            2.04-1ubuntu26.9                      amd64        GRand Unified Bootloader, version 2 (EFI-AMD64 modules)  iU  grub-efi-amd64-signed                         1.142.11+2.04-1ubuntu26.9             amd64        GRand Unified Bootloader, version 2 (EFI-AMD64 version, signed)  ii  grub2-common                                  2.04-1ubuntu26.9                      amd64        GRand Unified Bootloader (common files for version 2)      

Error installing mysql-server on Debian 9 Stretch (dependency problems)

Posted: 02 Apr 2021 09:27 AM PDT

Using Debian 9.5, fresh install. I want to install mysql-server, but I run into dependency problems.

sudo apt-get install mysql-server  Reading package lists... Done  Building dependency tree  Reading state information... Done  Some packages could not be installed. This may mean that you have  requested an impossible situation or if you are using the unstable  distribution that some required packages have not yet been created  or been moved out of Incoming.  The following information may help to resolve the situation:    The following packages have unmet dependencies:   mysql-server : Depends: default-mysql-server but it is not going to be installed  E: Unable to correct problems, you have held broken packages.    apt-get install mysql-server default-mysql-server  Reading package lists... Done  Building dependency tree  Reading state information... Done  Some packages could not be installed. This may mean that you have  requested an impossible situation or if you are using the unstable  distribution that some required packages have not yet been created  or been moved out of Incoming.  The following information may help to resolve the situation:    The following packages have unmet dependencies:   default-mysql-server : Depends: mariadb-server-10.1 but it is not going to be installed  E: Unable to correct problems, you have held broken packages.    sudo apt-get install mysql-server default-mysql-server mariadb-server-10.1  Reading package lists... Done  Building dependency tree  Reading state information... Done  Some packages could not be installed. This may mean that you have  requested an impossible situation or if you are using the unstable  distribution that some required packages have not yet been created  or been moved out of Incoming.  The following information may help to resolve the situation:    The following packages have unmet dependencies:   mariadb-server-10.1 : Depends: libdbi-perl but it is not going to be installed                         Recommends: libhtml-template-perl but it is not going to be installed  E: Unable to correct problems, you have held broken packages.    sudo apt-get install mysql-server default-mysql-server mariadb-server-10.1 libhtml-template-perl  Reading package lists... Done  Building dependency tree  Reading state information... Done  Some packages could not be installed. This may mean that you have  requested an impossible situation or if you are using the unstable  distribution that some required packages have not yet been created  or been moved out of Incoming.  The following information may help to resolve the situation:    The following packages have unmet dependencies:   libhtml-template-perl : Depends: libcgi-pm-perl but it is not going to be installed or                                    perl (< 5.19) but 5.26.2-7 is to be installed   mariadb-server-10.1 : Depends: libdbi-perl but it is not going to be installed  E: Unable to correct problems, you have held broken packages.    sudo apt-get install mysql-server default-mysql-server mariadb-server-10.1 libdbi-perl  Reading package lists... Done  Building dependency tree  Reading state information... Done  Some packages could not be installed. This may mean that you have  requested an impossible situation or if you are using the unstable  distribution that some required packages have not yet been created  or been moved out of Incoming.  The following information may help to resolve the situation:    The following packages have unmet dependencies:   libdbi-perl : Depends: perlapi-5.24.1  E: Unable to correct problems, you have held broken packages.  

EDIT1: apt-cache policy:

apt-cache policy  Package files:   100 /var/lib/dpkg/status       release a=now   500 http://security.debian.org/debian-security stretch/updates/contrib amd64 Packages       release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=contrib,b=amd64       origin security.debian.org   500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages       release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=main,b=amd64       origin security.debian.org   500 http://deb.debian.org/debian stretch-updates/main amd64 Packages       release o=Debian,a=stable-updates,n=stretch-updates,l=Debian,c=main,b=amd64       origin deb.debian.org   500 http://deb.debian.org/debian stretch/main amd64 Packages       release v=9.5,o=Debian,a=stable,n=stretch,l=Debian,c=main,b=amd64       origin deb.debian.org  Pinned packages:  

EDIT2: apt policy perl perl-base:

apt policy perl perl-base  perl:    Installed: 5.26.2-7    Candidate: 5.26.2-7    Version table:   *** 5.26.2-7 100          100 /var/lib/dpkg/status       5.24.1-3+deb9u4 500          500 http://deb.debian.org/debian stretch/main amd64 Packages          500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages  perl-base:    Installed: 5.26.2-7    Candidate: 5.26.2-7    Version table:   *** 5.26.2-7 100          100 /var/lib/dpkg/status       5.24.1-3+deb9u4 500          500 http://deb.debian.org/debian stretch/main amd64 Packages          500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages  

How can I fix these dependency problems?

Suddenly no sound on Debian Stretch?

Posted: 02 Apr 2021 10:07 AM PDT

After a fresh Win10 installation on a 2nd SSD my speakers on Debian 9 aren't working anymore. Before I attached the 2nd SSD with Win10 the sound was working properly. Interestingly, with attached headphones I get a proper sound. When I switch to Windows the speakers are working as expected so it's not a hardware issue.

Linux notebook 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux  

alsactl init gives

 Found hardware: "HDA-Intel" "Realtek ALC233"   "HDA:10ec0235,1d721501,00100002 HDA:80862809,80860101,00100000"   "0x1d72" "0x1501"  Hardware is initialized using a generic method  

I tried the ./alsa-info_alsa-info.sh script whose output can be fetched under http://www.alsa-project.org/db/?f=41ca8f63e14ed055a8a45b4dde60a4d0606bfdb1

My user is added to the audio group and and all volume controls in plasma are at the highest level.

Unfortunately I didn't find a proper solution for my problem so any help or ideas would be highly appreciated.

How to remap an existing keybinding in Zathura

Posted: 02 Apr 2021 08:06 AM PDT

After reading the man zathurarc for the map command, I still don't know how to remap an existing keybinding. By "remapping", I mean replacing a current keymapping for a given action.

Problem:

<C-Button1> (Control + click) is currently mapped to the synctex backward search, with the following settings in my zathurarc config file:

set dbus-service true # Already the default  set synctex true      # Already the default  set synctex-editor-command "gvim --servername GVIMTEX --remote +%{line} %{input}"  

However, I don't like using the mouse, so I want to map the synctex action to, say <C-s>.

Trials

I tried the following line in my zathurarc:

map <C-s> feedkeys "<C-Button1>"  

It doesn't work and shows "open n1>" in the inputbar.

Alternative ideas

I could also map <C-s> to the shortcut_function for synctex, if only I knew what it was...

Complains

I find that there is too few information in the zathura documentation. For example I would like to know:

  1. how to list all current key bindings (that would help not to override current mappings...)
  2. how to use the feedkeys function, because it is nowhere in my documentation, and I don't know from which version it was available (I have Ubuntu 16.04 and zathura 0.3.5).
  3. what is the shortcut_function used for synctex. Is there one?

Could anyone show me how to use <C-s> instead of <C-Button1>?

OpenAFS suddenly fails: a pioctl failed while obtaining tokens

Posted: 02 Apr 2021 09:01 AM PDT

My afs client stopped working. I'm not sure why - maybe I ran apt-get ? Anyways:

user@box ~ $ kinit  user@IES.AUC.DK's Password:   user@box ~ $ aklog  aklog: a pioctl failed while obtaining tokens for cell ies.auc.dk  

Checking status of service:

user@box ~ $ sudo service openafs-client status  [sudo] password for user:   ● openafs-client.service - OpenAFS client     Loaded: loaded (/lib/systemd/system/openafs-client.service; enabled; vendor p     Active: active (exited) since Mon 2017-11-13 08:17:40 CET; 3h 8min ago    Process: 1942 ExecStartPost=/usr/bin/fs sysname $AFS_SYSNAME (code=exited, sta    Process: 1934 ExecStartPost=/usr/bin/fs setcrypt $AFS_SETCRYPT (code=exited, s    Process: 1930 ExecStart=/sbin/afsd $AFSD_ARGS (code=exited, status=0/SUCCESS)    Process: 1918 ExecStartPre=/usr/share/openafs/openafs-client-precheck (code=ex      Tasks: 0 (limit: 512)     Memory: 0B        CPU: 0    Nov 13 08:17:40 box systemd[1]: Starting OpenAFS client...  Nov 13 08:17:40 box openafs-client-precheck[1918]: modprobe: FATAL: Modul  Nov 13 08:17:40 box openafs-client-precheck[1918]: Failed to load openafs  Nov 13 08:17:40 box fs[1934]: Usage: /usr/bin/fs setcrypt -crypt <on or o  Nov 13 08:17:40 box fs[1942]: Usage: /usr/bin/fs sysname [-newsys <new sy  Nov 13 08:17:40 box systemd[1]: Started OpenAFS client.  

Modprobe fails. Gut feeling that this is something with dkms, which is supposed to build kernel module. Trying to trigger build of kernel module (Should happen as part of installation):

user@box ~ $ sudo dpkg-reconfigure openafs-modules-dkms     -------- Uninstall Beginning --------  Module:  openafs  Version: 1.6.21  Kernel:  4.4.0-21-generic (x86_64)  -------------------------------------    Status: Before uninstall, this module version was ACTIVE on this kernel.    openafs.ko:   - Uninstallation     - Deleting from: /lib/modules/4.4.0-21-generic/updates/dkms//   - Original module     - No original module was found for this module on this kernel.     - Use the dkms install command to reinstall any previous module version.    depmod.....    DKMS: uninstall completed.    ------------------------------  Deleting module version: 1.6.21  completely from the DKMS tree.  ------------------------------  Done.  Loading new openafs-1.6.21 DKMS files...  Building only for 4.4.0-97-generic  Module build for the currently running kernel was skipped since the  kernel source for this kernel does not seem to be installed.  

Mismatch between in kernel versions; 4.4.0-21 was installed. 4.4.0-97 is current. Unable to build for current, as source is unavailable.

Remove secondary IP with NetworkManager / nmcli

Posted: 02 Apr 2021 09:02 AM PDT

I tried to assign a static IP to my Ubuntu 16.04 server using nmcli, which worked but it still has the original IP reserved as a "secondary" IP. I'm not sure how to get rid of it. 10.163.148.36 is the original IP of the server and 10.163.148.194 is the new IP I want it to switch to. I used the following nmcli command to set the IP address:

nmcli connection modify 'Wired connection 1' ipv4.addresses '10.163.148.194/24' ipv4.gateway '10.163.148.2' ipv4.method 'manual' ipv4.ignore-auto-dns 'yes' connection.autoconnect 'yes' ipv4.dns '10.10.10.10 10.20.10.10'  

Note the two IP addresses for the ens160 interface.

aruba@ubuntu:~$ ip a  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00      inet 127.0.0.1/8 scope host lo         valid_lft forever preferred_lft forever      inet6 ::1/128 scope host         valid_lft forever preferred_lft forever  2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000      link/ether 00:50:56:8a:10:64 brd ff:ff:ff:ff:ff:ff      inet 10.163.148.194/24 brd 10.163.148.255 scope global ens160         valid_lft forever preferred_lft forever      inet 10.163.148.36/24 brd 10.163.148.255 scope global secondary ens160         valid_lft forever preferred_lft forever      inet6 2006::b0a3:b9ab:2f96:a461/64 scope global temporary dynamic         valid_lft 604254sec preferred_lft 85254sec      inet6 2006::dc94:ead6:e8ef:8095/64 scope global mngtmpaddr noprefixroute dynamic         valid_lft 2591987sec preferred_lft 604787sec      inet6 fe80::941e:5fa3:3571:df76/64 scope link         valid_lft forever preferred_lft forever  

My nmcli connection details:

aruba@ubuntu:~$ nmcli connection show "Wired connection 1"  connection.id:                          Wired connection 1  connection.uuid:                        d724141e-4c7f-3fc9-97b1-c37e014aebe4  connection.interface-name:              --  connection.type:                        802-3-ethernet  connection.autoconnect:                 yes  connection.autoconnect-priority:        -999  connection.timestamp:                   1481582261  connection.read-only:                   no  connection.permissions:  connection.zone:                        --  connection.master:                      --  connection.slave-type:                  --  connection.autoconnect-slaves:          -1 (default)  connection.secondaries:  connection.gateway-ping-timeout:        0  connection.metered:                     unknown  connection.lldp:                        -1 (default)  802-3-ethernet.port:                    --  802-3-ethernet.speed:                   0  802-3-ethernet.duplex:                  --  802-3-ethernet.auto-negotiate:          yes  802-3-ethernet.mac-address:             00:50:56:8A:10:64  802-3-ethernet.cloned-mac-address:      --  802-3-ethernet.mac-address-blacklist:  802-3-ethernet.mtu:                     auto  802-3-ethernet.s390-subchannels:  802-3-ethernet.s390-nettype:            --  802-3-ethernet.s390-options:  802-3-ethernet.wake-on-lan:             1 (default)  802-3-ethernet.wake-on-lan-password:    --  ipv4.method:                            manual  ipv4.dns:                               10.1.10.10,10.2.10.10  ipv4.dns-search:  ipv4.dns-options:                       (default)  ipv4.addresses:                         10.163.148.194/24  ipv4.gateway:                           10.163.148.1  ipv4.routes:  ipv4.route-metric:                      -1  ipv4.ignore-auto-routes:                no  ipv4.ignore-auto-dns:                   no  ipv4.dhcp-client-id:                    --  ipv4.dhcp-timeout:                      0  ipv4.dhcp-send-hostname:                yes  ipv4.dhcp-hostname:                     --  ipv4.dhcp-fqdn:                         --  ipv4.never-default:                     no  ipv4.may-fail:                          yes  ipv4.dad-timeout:                       -1 (default)  ipv6.method:                            auto  ipv6.dns:  ipv6.dns-search:  ipv6.dns-options:                       (default)  ipv6.addresses:  ipv6.gateway:                           --  ipv6.routes:  ipv6.route-metric:                      -1  ipv6.ignore-auto-routes:                no  ipv6.ignore-auto-dns:                   no  ipv6.never-default:                     no  ipv6.may-fail:                          yes  ipv6.ip6-privacy:                       -1 (unknown)  ipv6.addr-gen-mode:                     stable-privacy  ipv6.dhcp-send-hostname:                yes  ipv6.dhcp-hostname:                     --  GENERAL.NAME:                           Wired connection 1  GENERAL.UUID:                           d724141e-4c7f-3fc9-97b1-c37e014aebe4  GENERAL.DEVICES:                        ens160  GENERAL.STATE:                          activated  GENERAL.DEFAULT:                        yes  GENERAL.DEFAULT6:                       yes  GENERAL.VPN:                            no  GENERAL.ZONE:                           --  GENERAL.DBUS-PATH:                      /org/freedesktop/NetworkManager/ActiveConnection/0  GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/Settings/0  GENERAL.SPEC-OBJECT:                    /  GENERAL.MASTER-PATH:                    --  IP4.ADDRESS[1]:                         10.163.148.194/24  IP4.ADDRESS[2]:                         10.163.148.36/24  IP4.GATEWAY:                            10.163.148.2  IP4.DNS[1]:                             10.10.10.10  IP4.DNS[2]:                             10.20.10.10  IP6.ADDRESS[1]:                         2006::b0a3:b9ab:2f96:a461/64  IP6.ADDRESS[2]:                         2006::dc94:ead6:e8ef:8095/64  IP6.ADDRESS[3]:                         fe80::941e:5fa3:3571:df76/64  IP6.GATEWAY:                            fe80::213:1aff:fec7:f857  

Lastly, my NetworkManager config:

aruba@ubuntu:~$ cat /etc/NetworkManager/NetworkManager.conf  [main]  plugins=keyfile,ofono  dns=dnsmasq    [ifupdown]  managed=true  

Is there a KDE tool for mounting disk images, like GNOME Disks?

Posted: 02 Apr 2021 09:27 AM PDT

I am not aware of a KDE-native tool to mount iso images in Plasma 5 and I keep using the Gnome tool gnome-disk-utility, as indicated here.

Is there a KDE version of this tool? It is able to do more than just add a context menu entry to mount iso files, like setting mounting options and backing up partitions, but I am mostly interested in the 'mount iso' option.

What is the correct way to view your CPU speed on Linux?

Posted: 02 Apr 2021 10:24 AM PDT

I found two commands to output information about my CPU: cat /proc/cpuinfo and lscpu. /proc/cpuinfo shows that my CPU speed is 2.1 Ghz, whereas lspcu says it is 3167 Mhz. Which one is correct?

This is my exact output from cat /proc/cpuinfo about my processor speed:

model name  : Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz  

And this is from lscpu:

CPU MHz:               3225.234  

(For some reason, lscpu outputs differently every time, varying between 3100 and 3300 MHz)

Cleaning up coredumpctl list

Posted: 02 Apr 2021 09:07 AM PDT

I'm looking for a way to remove any trace of old coredumps in coredumpctl list. At the moment it lists coredumps beginning at 2014-12-14 - I've updated software so often between then and now that I doubt those old coredumps are going to help me debug any problems now. Unfortunately removing the files from /var/lib/systemd/coredump only made the asterisk in the "PRESENT" column of coredumpctls output disappear.

I couldn't find any way to remove all information about coredumps in the manpages or in the help output of coredumpctl.

SSH console login working but SFTP does not, why?

Posted: 02 Apr 2021 08:02 AM PDT

I am trying to SFTP with Filezilla but it is not able to connect to the server and I think this is due to my firewall rules?

I can SSH absolutely fine. The port for SSH is 6128. Can anyone tell me what changes I would have to make to allow an FTP connection over SSH given that SSH is already working?

(Here are my IPtables rules)

Chain INPUT (policy ACCEPT)  target     prot opt source               destination  fail2ban-ssh  tcp  --  anywhere             anywhere             multiport dports ssh  ACCEPT     all  --  anywhere             anywhere  REJECT     all  --  anywhere             loopback/8           reject-with icmp-port-unreachable  ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED  ACCEPT     udp  --  anywhere             anywhere             udp dpt:9987  ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:10011  ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:30033  ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http  ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:https  ACCEPT     tcp  --  anywhere             anywhere             state NEW tcp dpt:6128  ACCEPT     icmp --  anywhere             anywhere             icmp echo-request  LOG        all  --  anywhere             anywhere             limit: avg 5/min burst 5 LOG level debug prefix "iptables denied: "  DROP       all  --  anywhere             anywhere    Chain FORWARD (policy ACCEPT)  target     prot opt source               destination  DROP       all  --  anywhere             anywhere    Chain OUTPUT (policy ACCEPT)  target     prot opt source               destination  ACCEPT     all  --  anywhere             anywhere    Chain fail2ban-ssh (1 references)  target     prot opt source               destination  RETURN     all  --  anywhere             anywhere  

What does the underscore motion do in vim?

Posted: 02 Apr 2021 08:30 AM PDT

I do not understand the underscore motion in vim, at least not in the context of yank (y). My cheat sheet reads:

"soft" bol down  

which I do not comprehend. If I use the motion alone, it seems to be the same as ^ which means: go to the first non-whitespace on the line.

However, if I use the motion with y then it yanks the whole line (like yy or Y). On the other hand, y^ does not yank the whole line, but only up to the first non-whitespace character, exclusive — as you might expect.

So, what exactly is the underscore _ motion supposed to do?

How to quickly create a local apt repository for random packages using a Debian based linux distribution?

Posted: 02 Apr 2021 09:38 AM PDT

Some situations call for manually installing a local package using dpkg -i <packagename>. Sometimes it may be further useful to leverage the functionality of apt with that package so the question is:

How do you quickly create a local repository for random packages using a Debian based linux distribution - like Xubuntu 13.04/Ubuntu?

No comments:

Post a Comment