Saturday, October 2, 2021

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Best Distro for centralized documentation [closed]

Posted: 02 Oct 2021 07:31 AM PDT

I'm setting up a distro install on a VPS. I need lamp, webdav, ssh, and ssl apache installed.

I tried this myself with ubuntu 20 with no luck. Have decided to outsource this project. But first, I am wiping my server and re-installing.

I thought I'd ask around for a distro that has more centralized documentation. Perhaps moderated or managed by the creators, not the user base. Ubuntu docs are great for home use, but you can easily find too many docs on how-to do something. You decide on a doc, it doesn't work, and end up going through 2 or 3 docs and a kind of half working install sometimes.

The available distros for install by provider are Fedora, CentOS, Scientific Linux, Debian, Mint, MxLinux, Ubuntu, OpenSuse, Zorin.

Kali Linux 2021.3 shows black-screen after 30mins of inactivity

Posted: 02 Oct 2021 07:30 AM PDT

My kali linux 2021.3 shows a black screen after inactivity for more than 30 mins. Whenever I'm doing my work it works fine but as I run some script and leave it for more than 30 minutes it gets stuck here and then I have to restart my VM again. I don't know how to solve this issue. I'm currently using VM Ware.

enter image description here

This is my screenlock settings.

enter image description here

Dynamically generated parameters Not given to tool

Posted: 02 Oct 2021 09:30 AM PDT

I would like to call a tool via command line. I need to generate the parameters to be used for calling dynamically. Furthermore there is a number of parameters which needs to be given to the tool.

COMMAND=""  for i in $VERSIONS; do      COMMAND+=" '../apache-maven-$i/bin/mvn clean'"  done  

So now I want to call the tool with the generated list of parameters (from above) like this:

hyperfine --export-markdown ../results.md -w 5 $COMMAND  

But unfortunately that produces the following result:

Benchmark #1: '../apache-maven-3.0.5/bin/mvn  Error: Command terminated with non-zero exit code. Use the '-i'/'--ignore-failure'       option if you want to ignore this. Alternatively,   use the '--show-output' option to debug what went wrong.  

My assumption is that the created parameters $COMMAND is not identified as multiple parameters. It's taken as a single parameter which is wrong. If I printout the whole command line and copy that into the bash line manually the execution works perfectly.

hyperfine --export-markdown ../results.md -w 5 '~/tools/apache-maven-3.8.2/bin/mvn clean' '~/tools/apache-maven-3.8.1/bin/mvn clean' '~/tools/apache-maven-4.0.0-alpha-1-SNAPSHOT/bin/mvn clean'  

Is there something special to be taken into account while generating multiple parameters for calling other tools in Bash?

Pressed function key while upgrading pop_is to 21.04

Posted: 02 Oct 2021 06:50 AM PDT

I accidentally pressed on (I think) one of the F9-F12 keys while upgrading to pop_os 21.04 at around 50% and then I got to this screen. After a while it kept showing this same message again and again and now its stuck saying "A start job is... 7s/no limit)" where 7 goes from 0 to 9.

What should I do?

I can't really use screenshots

I can’t recompile exo in Fedora 34

Posted: 02 Oct 2021 09:27 AM PDT

I have a problem with my Fedora 34. I was trying to recompile xfce 4.12 on Fedora 34 using rpmbuild —rebuild from version 22 to 34, I recompiled some packages but one gave me an error which I can't repair:

ERROR: ambiguous python shebang in /usr/lib64/xfce4/exo-1/exo-Composteli-mail-1: #!/usr/bin/python -tt. Change it to python3 (or python2) explicitly. mangling shebang in /usr/bin/exo-preffered-applications from /bin/sh to #!/usr/bin/sh

IO Throttling After Reaching dirty_background_ratio

Posted: 02 Oct 2021 07:45 AM PDT

I am trying to understand the Linux IO throttling mechanism. This is what I got so far:

By calling the write (fd, data, size) system call, the data will be written into the OS cache as dirty pages. The OS has two ratios, dirty_background_ratio and dirty_ratio to manage the dirty pages. The OS starts background flushes when the dirty pages reach the dirty_background_ratio. The dirty_ratio is the hard limit that the OS prevents to be exceeded.

If the amount of the dirty pages is less than the dirty_background_ratio, the application (that performs IO) will not be delayed by the OS and the data is simply written on the OS cache as dirty pages (freerun). If the dirty pages exceed dirty_background_ratio, the OS performs background flushes and cleans the dirty pages asynchronously. Though, if I'm correct, still no throttling should occur until reaching the set_point = (dirty_ratio + dirty_background_ratio) / 2. To my understanding, the OS tries to keep the dirty ratio around the set_point. This is what I found in the Wu Fengguang's commit of the Linux kernel:

Users will notice that the applications will get throttled once crossing the global (background + dirty)/2=15% threshold, and then balanced around 17.5%.

To actually confirm these points, I implemented a simple application in C which generates 65 GB IO data in 1 GB write chunks (using the write system call). At the same time, I measure the bandwidth (throughput, throttled time), the number of dirty pages, and compute the dirty ratio by dividing the number of dirty pages to free memory + reclaimable + file cache (according to global_dirtyable_memory).

My system (CPU: Xeon 6138, RAM: 192 GB) runs CentOS Linux 7 (Core) with the kernel version 3.10.0-862.9.1.el7.x86_64. The IO destination is an SSD device with 400 MB/s write bandwidth. Before running the experiment, I call the sync command and wait so that all dirty pages from before are flushed (you see the global dirty ratio is almost zero at the beginning). The experiments are performed on a clean state system (no other dirtier/expensive processes, only OS management related processes running on the system). Here are my measurements:

IO Throughput / Dirty Pages

The x-ax shows the n-th write of 1 GB data. The measurements match quite well with the computed rates (dirty_background_ratio = 10%, set_point = 15%, balanced around 17.5%). But every time I run the experiment (also on other storage devices), I see a reduced bandwidth after reaching the dirty_background_ratio. You can see this on the red area in the picture. According to what I read on different sources (e.g. the point mentioned above by Wu Fengguang), no throttling should occur until reaching set_point. Whereas I see the throttling starts when reaching dirty_background_ratio and stays steady until reaching set_point where the throttling increases very fast and converges to the disk write bandwidth (sync performance, 400 MB/s).

So here is my question: why do I experience throttled IO before reaching the set_point (red area)? And how does the OS determine the amount of throttling before reaching set_point?

KDE's media controls api

Posted: 02 Oct 2021 06:07 AM PDT

KDE has a feature called "media controls", with which I can control media from the lock screen. I would like to add this feature to a music software I'm working on. I tried to find the necessary API (or a hint to it) in VLC (a software that implements this feature) and the web, but on both I didn't find anything.

feh not displaying --info on Raspberry Pi

Posted: 02 Oct 2021 05:29 AM PDT

I am using feh to show a slideshow of my photos on my Raspberry Pi. As the Pi boots in the console only, I need to start X-server explicitly. The command is

startx /usr/bin/feh -rz -D 210 --info "echo %f" *  

It works as expected, except for the --info text. No text is shown, whatever is the --info parameter. When feh exits from the graphical mode, there is no error shown on the screen.
When I run feh with the same parameters on my Linux PC within a graphic DE, the --info text is shown normally.

How to make it working on the raspbian console?

Versions used:
OS: Raspbian 10
feh: 3.1.3, compile-time switches: curl exif verscmp xinerama

I am aware this feh version is obsolete, but it is the latest one offered by official raspbian repositories, and in the feh changelog I don't see any changes regarding the --info parameter in newer versions.

minimum livecd linux desktop with ready mdadm

Posted: 02 Oct 2021 05:06 AM PDT

Is there any minimum livecd iso which is has linux desktop with ready to use mdadm. does not need a ubuntu installer. just a livecd.

Text processing before printing in awk

Posted: 02 Oct 2021 05:52 AM PDT

I am not into scripting but manage to create few with the help in this forum. Coming across a problem but not able to get it work (not sure if it is possible)

I have a fileY with content

lrwxrwxrwx  1  user1 gp  35  2021-09-07  2000  /folder/subfolder1/subfolder2/subfolder3/main/summary.txt  lrwxrwxrwx  1  user1 gp  35  2021-09-08  1400  /folder/subfolder1/subfolder2/main/summary.txt  lrwxrwxrwx  1  user1 gp  35  2021-09-09  1800  /folder/subfolder1/subfolder2/subfolder3/subfolder4/main/summary.txt  

I wanted to output the column 3,6,7,8 and concatenate with the folder name before "main" like below

user1 2021-09-07  2000  /folder/subfolder1/subfolder2/subfolder3/main/summary.txt subfolder3  user1 2021-09-08  1400  /folder/subfolder1/subfolder2/main/summary.txt subfolder2  user1 2021-09-09  1800  /folder/subfolder1/subfolder2/subfolder3/subfolder4/main/summary.txt subfolder4  

How can i have below sed command as one of the {print} variable for awk command?

awk '{print $3,$6,$7,$8}' fileY  sed 's/\// /g; s/\./ /g' fileY | awk '{for(i=8;i<=NF;i++){if($i~/^main/){a=i}} print $(a-1)}'  

curl command with special characters renames the file in the destination unix server

Posted: 02 Oct 2021 04:07 AM PDT

i am trying to execute below command , which is trying to download one specific file from website and put the file in LINUX server through below CURL command.

curl -D ~/header.txt --ntlm --request GET --netrc "http://Testwebsite.net/files/1633070958_myfile_test_%E6%8C%87%E4%BA%8B%E5%AD%97%20zh%C7%90sh%C3%ACz%C3%AC.pdf" -o /attachment/3390773_mytest_test_指事字zhǐshìzì.pdf

The destination file in server is named as differently .

actual result : 3390773_mytest_test_指事字zhÇshìzì.pdf

expected result : 3390773_mytest_test__指事字zhǐshìzì.pdf

please post your tips to fix this.

Secure RDP from windows to linux on port 3389

Posted: 02 Oct 2021 04:44 AM PDT

I'm looking for ways to access my linux machine (I've got two options, a machine running CentOS7 and a machine running Raspbian (rpi)) from a windows machine at school.

I've installed xrdp and forwarded port 3389 to the machine at home and all is working fine, however, I am concerned that anyone with my IP would have access to just guess at the username and password or launch some attack on it and gain access to my home network

Ideally I would like to secure RDP with a security key or security code some method of 2FA.... or only allow certain IP addresses to access.

Does anyone have any ideas on the safest way to secure port 3389 and remote access via windows rdp to a home computer configuring xrdp.

Many thanks

All questions welcome

Cannot generate SSL Certificates

Posted: 02 Oct 2021 07:46 AM PDT

I'm trying to create a nextcloud setup in debian/ubuntu VM and I have trouble generating SSL certificate.

This is the docker-compose.yml :

version: '3'    services:  nginx-proxy:      image: jwilder/nginx-proxy:alpine      labels:          - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"      container_name: nextcloud-proxy      networks:          - nextcloud_network      ports:          - 80:80          - 443:443      volumes:          - /home/dev/Documents/nextcloud-tutorial/nextcloud-data/nginx/vhost.d:/etc/nginx/vhost.d:rw          - /home/dev/Documents/nextcloud-tutorial/nextcloud-data/nginx/html:/usr/share/nginx/html:rw          - /home/dev/Documents/nextcloud-tutorial/nextcloud-data/nginx/certs:/etc/nginx/certs:ro          - /etc/localtime:/etc/localtime:ro          - /var/run/docker.sock:/tmp/docker.sock:ro      restart: unless-stopped    letsencrypt:      image: jrcs/letsencrypt-nginx-proxy-companion      container_name: nextcloud-letsencrypt      depends_on:          - nginx-proxy      networks:          - nextcloud_network      volumes:          - /home/dev/Documents/nextcloud-tutorial/nextcloud-data/nginx/vhost.d:/etc/nginx/vhost.d:rw          - /home/dev/Documents/nextcloud-tutorial/nextcloud-data/nginx/html:/usr/share/nginx/html:rw          - /home/dev/Documents/nextcloud-tutorial/nextcloud-data/nginx/certs:/etc/nginx/certs:rw          - /etc/localtime:/etc/localtime:ro          - /var/run/docker.sock:/var/run/docker.sock:ro      restart: unless-stopped    mysql:      image: mariadb      container_name: nextcloud-mysql      networks:          - nextcloud_network      volumes:          - /home/dev/Documents/nextcloud-tutorial/nextcloud-data/database/mysql:/var/lib/mysql          - /etc/localtime:/etc/localtime:ro      environment:          - MYSQL_ROOT_PASSWORD=mysql_root_testpassword          - MYSQL_PASSOWRD=nexcloud_testp@ssw0rd          - MYSQL_DATABASE=nextcloud          - MYSQL_USER=nextcloud      restart: unless-stopped    nextcloud-app:      image: nextcloud:latest      container_name: nextcloud-app      networks:          - nextcloud_network      depends_on:          - letsencrypt          - nginx-proxy          - mysql      volumes:          - /home/dev/Documents/nextcloud-tutorial/nextcloud-data/data/html:/var/www/html          - /home/dev/Documents/nextcloud-tutorial/nextcloud-data/data/config:/var/www/html/config          - /home/dev/Documents/nextcloud-tutorial/nextcloud-data/data/data:/var/www/html/data          - /home/dev/Documents/nextcloud-tutorial/nextcloud-data/data/themes:/var/www/html/themes          - /etc/localtime:/etc/localtime:ro      environment:          - VIRTUAL_HOST=cloud.c.ro          - LETSENCRYPT_HOST=cloud.c.ro          - LETSENCRYPT_EMAIL=root@c.ro      restart: unless-stopped    networks:      nextcloud_network:  

Content of hosts file :

127.0.0.1   localhost  127.0.1.1   dev-virtual-machine  192.168.1.2 cloud.c.ro www.cloud.c.ro    # The following lines are desirable for IPv6 capable hosts  ::1     ip6-localhost ip6-loopback  fe00::0 ip6-localnet  ff00::0 ip6-mcastprefix  ff02::1 ip6-allnodes  ff02::2 ip6-allrouters  

The output of the command

curl -v https://cloud.c.ro  

Is :

*   Trying 192.168.1.2:443...  * TCP_NODELAY set  * Connected to cloud.c.ro (192.168.1.2) port 443 (#0)  * ALPN, offering h2  * ALPN, offering http/1.1  * successfully set certificate verify locations:  *   CAfile: /etc/ssl/certs/ca-certificates.crt    CApath: /etc/ssl/certs  * TLSv1.3 (OUT), TLS handshake, Client hello (1):  * TLSv1.3 (IN), TLS handshake, Server hello (2):  * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):  * TLSv1.3 (IN), TLS handshake, Certificate (11):  * TLSv1.3 (OUT), TLS alert, unknown CA (560):  * SSL certificate problem: self signed certificate  * Closing connection 0  curl: (60) SSL certificate problem: self signed certificate  More details here: https://curl.haxx.se/docs/sslcerts.html    curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.  

EDIT : I've decided to change the domain name in cloud.c.ro (I edited the files) and I've run the docker-compose.yml with this command (without -d flag) to see what is going on :

sudo docker-compose -f docker-compose.yml up --force-recreate  

The output is something like this :

nextcloud-letsencrypt | [Sat Oct  2 16:56:51 EEST 2021] Getting webroot for domain='cloud.c.ro'  nextcloud-letsencrypt | [Sat Oct  2 16:56:51 EEST 2021] Verifying: cloud.c.ro  nextcloud-letsencrypt | [Sat Oct  2 16:56:55 EEST 2021] cloud.c.ro:Verify error:DNS problem: NXDOMAIN looking up A for cloud.c.ro - check that a DNS record exists for this domain  nextcloud-letsencrypt | [Sat Oct  2 16:56:55 EEST 2021] Please check log file for more details: /dev/null  nextcloud-letsencrypt | Sleep for 3600s  

How to uninstall versions of Java openJDK

Posted: 02 Oct 2021 05:14 AM PDT

I am using Linux Mint XFCE 20.

Recently I installed Java by running sudo apt-get install openjdk and it automatically installed versions 8 and 11 of both JRE and JDK, including JRE headless.

It turns out that I needed only openjdk 16 to run what I wanted to, and having other versions of java are kinda pointless. My main issue is that programs default to version 8 and I can't seem to fix it.

So how can I uninstall both versions 11 and 8 and just keep 16?

Count adjacent lines with different beginnings

Posted: 02 Oct 2021 07:02 AM PDT

I have text files that are transcriptions of conversations, for example:

Speaker1: Hello.   Speaker2: Hi.   Speaker2: How are you?   Speaker1: Well thanks.  

I would like to count how many times the speaker changes from line to line. So for this example, it would be 2 (line 1 to 2, and line 3 to 4, but not line 2 to 3).

if (comparison var1 var2) "var1 not found" error

Posted: 02 Oct 2021 05:06 AM PDT

I've found this simple bash that illustrates my problem:

  #!/bin/sh   str1="Learn Bash"  str2="Learn Bash"    if (( "$str1" == "$str2" )); then     echo "Both Strings are Equal."  else     echo "Both Strings are not Equal."  fi   

And the result is:

    if_equal.sh: 6: if_equal.sh: Learn Bash: not found    Both Strings are not Equal.  

Basically I want the if to compare the result of awk with a float once, and a integer given by user after, so when I can, I use

[ "$c" -gt "$o" ]   

but it not works with floats neither I can loop it with a third variable like this:

[ "$c" -gt "$o" ] && echo fine || [ "$b" -gt "$o" ] && echo better  

I've checked all spaces, tried with and without ", [],(),(())... I can't find why if finds that the first variable is missing. BTW my script created a file '0.9500' since I ran it with

if (( "$c" > "0.9500" ))  

maybe there is the workaround?

Ubuntu 21.04 hangs at "loading initial ramdisk" after kernel update with LUKS

Posted: 02 Oct 2021 07:28 AM PDT

I've reproduced this twice from a fresh install - the setup initially works fine, but when a kernel update is applied, the system hangs on reboot. Selecting the older kernel I have available from GRUB works fine.

System details:

  • XPS 13 9380
  • i5-8265U
  • BIOS version 1.15.0
  • Microcode version reported as "0xea". Output of apt list --installed | grep microcode: intel-microcode/hirsute-updates,hirsute-security,now 3.20210608.0ubuntu0.21.04.1 amd64 [installed,automatic]
  • Secure Boot is, I believe, set to audit mode.
  • Ubuntu hirsute (as mentioned)
  • Installed on a LUKS partition from LiveUSB
  • Currently on 5.11.0-37-generic but I've reproduced with older 5.11 kernels as well. Definitely seems to be the change in kernel version rather than the version itself. 5.11.0-36-generic boots with no unusual GRUB options required.

GRUB settings I've tried that definitely do not work:

  • dis_ucode_ldr and mitigations=off (together or separately);
  • nomodeset
  • removing quiet splash
  • recovery
  • debug (no change in output)
  • any form of echo after the line "initrd /initrd.img-5.11.0-37-generic"

And all permutations thereof.

lsinitramfs of both initrd.img and initrd.img.old (that I can boot off of) files doesn't pop up any obvious candidates.

It seems to likely be either microcode or cryptsetup-related, but since debug gives nothing, and dmesg presumably reports a normal boot once I boot with 36, I'm slightly at a loss.

Any thoughts? There seem to be related bugs but nothing that exactly reproduces.

ZFS on linux - Unexpected behavior after device faults

Posted: 02 Oct 2021 04:40 AM PDT

I maintain a Debian server with a ZFS storage pool (RAID Z3). Recently ZFS reported that two disks had failed simultaneously:

ZFS has detected that a device was removed.     impact: Fault tolerance of the pool may be compromised.      eid: 138    class: statechange    state: REMOVED     host: serres-west-wing     time: 2021-04-30 01:30:15+0300    vpath: /dev/disk/by-vdev/d0-part1    vguid: 0x6622AF6B1929E199     pool: 0x0964CF6A3748D7A9  
ZFS has detected that a device was removed.     impact: Fault tolerance of the pool may be compromised.      eid: 140    class: statechange    state: REMOVED     host: serres-west-wing     time: 2021-04-30 01:30:15+0300    vpath: /dev/disk/by-vdev/d1-part1    vguid: 0xD48BA6B066788199     pool: 0x0964CF6A3748D7A9  

The hot spare was activated and a resilvering started immediately after these messages were generated. The status of the pool after resilvering is the following:

ZFS has finished a resilver:       eid: 167   class: resilver_finish    host: serres-west-wing    time: 2021-04-30 02:15:03+0300    pool: datapool   state: ONLINE    scan: resilvered 132G in 00:44:41 with 0 errors on Fri Apr 30 02:15:03 2021  config:            NAME               STATE     READ WRITE CKSUM          datapool           ONLINE       0     0     0            raidz2-0         ONLINE       0     0     0              spare-0        ONLINE       0     0     0                d0-part1     ONLINE       0     0     0                hs-d0-part1  ONLINE       0     0     0              d1-part1       ONLINE       0     0     0              d2-part1       ONLINE       0     0     0              d3-part1       ONLINE       0     0     0              d4-part1       ONLINE       0     0     0          logs            mirror-1         ONLINE       0     0     0              zil-d0-part1   ONLINE       0     0     0              zil-d1-part1   ONLINE       0     0     0          cache            l2arc-d0-part2   ONLINE       0     0     0            l2arc-d1-part2   ONLINE       0     0     0          spares            hs-d0-part1      INUSE     currently in use    errors: No known data errors  

The disks d0-part1 and d1-part1 seem to be connected and work fine.

Was this an error due to factors unrelated to disk degredation? It seems unlikely that two working disks failed at once. Is it safe to deactivate the hot spare?

This system is currently not set up to build kernel modules

Posted: 02 Oct 2021 05:06 AM PDT

I'm trying to install VirtualBox 6.1.16 on a LinuxMint 19.3 host which is based on Ubuntu 18.04 bionic. I have checked all other answers and tried all possibilities, but to no avail.

Previously I had VirtualBox 6.0 which I uninstalled before installing 6.1 .

I'm getting the following error message:

sudo dpkg -i virtualbox-6.1_6.1.16-140961~Ubuntu~bionic_amd64.deb

(Reading database ... 455695 files and directories currently installed.)  Preparing to unpack virtualbox-6.1_6.1.16-140961~Ubuntu~bionic_amd64.deb ...  Unpacking virtualbox-6.1 (6.1.16-140961~Ubuntu~bionic) ...  Setting up virtualbox-6.1 (6.1.16-140961~Ubuntu~bionic) ...  addgroup: The group `vboxusers' already exists as a system group. Exiting.  This system is currently not set up to build kernel modules.  Please install the gcc make perl packages from your distribution.  This system is currently not set up to build kernel modules.  Please install the gcc make perl packages from your distribution.    There were problems setting up VirtualBox.  To re-start the set-up process, run    /sbin/vboxconfig  as root.  If your system is using EFI Secure Boot you may need to sign the  kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load  them. Please see your Linux system's documentation for more information.  

So far I've tried:

  • install all dependencies with sudo apt-get install build-essential gcc make perl dkms linux-headers-$(uname -r)
Building dependency tree         Reading state information... Done  build-essential is already the newest version (12.4ubuntu1).  make is already the newest version (4.1-9.1ubuntu1).  dkms is already the newest version (2.3-3ubuntu9.7).  gcc is already the newest version (4:7.4.0-1ubuntu2.3).  linux-headers-5.4.0-53-generic is already the newest version (5.4.0-53.59~18.04.1).  perl is already the newest version (5.26.1-6ubuntu0.5).  0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.  
  • checking for previously installed versions sudo dpkg -l *virtualbox* and sudo dkms status
dpkg-query: no packages found matching virtualbox-6.1_6.1.16-140961~Ubuntu~bionic_amd64.deb  
  • Checked SecureBoot was already disabled.

  • Tried booting to a 4.15 kernel

  • Tried installing using the "All distributions" link:

sudo ./VirtualBox-6.1.16-140961-Linux_amd64.run   Verifying archive integrity... All good.  Uncompressing VirtualBox for Linux installation.............  VirtualBox Version 6.1.16 r140961 (2020-10-15T15:03:02Z) installer  Installing VirtualBox to /opt/VirtualBox  Python found: python, installing bindings...  This system is currently not set up to build kernel modules.  Please install the gcc make perl packages from your distribution.  This system is currently not set up to build kernel modules.  Please install the gcc make perl packages from your distribution.    There were problems setting up VirtualBox.  To re-start the set-up process, run    /sbin/vboxconfig  as root.  If your system is using EFI Secure Boot you may need to sign the  kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load  them. Please see your Linux system's documentation for more information.    VirtualBox has been installed successfully.    You will find useful information about using VirtualBox in the user manual    /opt/VirtualBox/UserManual.pdf  and in the user FAQ    http://www.virtualbox.org/wiki/User_FAQ    We hope that you enjoy using VirtualBox.    The installation log file is at /var/log/vbox-install.log.  

This is the log file:

VirtualBox 6.1.16 r140961 installer, built 2020-10-15T15:03:02Z.    Testing system setup...  Removing previous installation of VirtualBox 6.1.16 r140961 from /opt/VirtualBox    vboxdrv.sh: Stopping VirtualBox services.  vboxdrv.sh: Starting VirtualBox services.  vboxdrv.sh: Building VirtualBox kernel modules.  

but nothing is helping. I'm really at a loss here. Many thanks in advance.

How to stop Zoom from randomly muting itself?

Posted: 02 Oct 2021 05:57 AM PDT

I'm on Arch right now, but I had the same problem (although slightly less often) on openSUSE Tumbleweed.

Basically, whenever I enter or leave a breakout room in Zoom, and sometimes randomly while I'm sitting in a room that's not a breakout room, Zoom gets muted and I have to go to my sound settings to bring the volume back up. My job is being done over Zoom right now and I have to switch in and out of breakout rooms a lot, so it's getting really inconvenient.

I've tried looking around online, and from what I can tell, Zoom will periodically swap input sinks, and that's when it gets muted (when I run pacmd list-sink-inputs, the index of Zoom changes, at least), and I've seen fixes for if a particular input sink gets muted, but not if the same application keeps muting (or nearly muting) over changing input sinks.

Any advice or ideas on how to fix greatly appreciated.

Edit: I've dug a little deeper, and it looks like the configuration file for pulse audio that defines the default input sink volumes for different processes is being changed automatically when Zoom runs, I've tried changing back with pa_volume, but it keeps changing it back. I was hoping to try to set up a script to watch for changes in that file and change it back when need be, but I haven't actually been able to detect changes using inotifywait so I'm stumped again.

Can't attach Boinc project on Redhat 8: authentication error

Posted: 02 Oct 2021 04:26 AM PDT

I am unable to attach a Boinc project on Redhat 8 though boinc-client is running properly.

# sudo -u boinc boinccmd --project_attach http://www.worldcommunitygrid.org <token>  Operation failed: authentication error  

This command works on Ubuntu with the same token.

Why do I get this error and how to attach the project?

ssh_selinux_change_context: setcon failed with Invalid argument

Posted: 02 Oct 2021 10:04 AM PDT

I am trying to do ssh communication to an IP but I get the following error messages in logs.

Jun  5 11:36:50 thetemplate my-sshd[26346]: Accepted password for user1 from 172.80.1.2 port 34278 ssh2  Jun  5 11:36:50 thetemplate my-sshd[26346]: User child is on pid 27078  Jun  5 11:36:50 thetemplate my-sshd[27078]: ssh_selinux_change_context: setcon failed with Invalid argument  Jun  5 11:36:50 thetemplate my-sshd[27078]: Changed root directory to "/test//ssh/home/user1"  Jun  5 11:36:50 thetemplate my-sshd[26346]: error: ssh_selinux_setup_pty: security_compute_relabel: Invalid argument  

According to this answer, I tried changing the context for my-sshd by doing

chcon system_u:object_r:sshd_exec_t:s0  /test/bin/my-sshd  service sshd  restart  

The error messages still comes in /var/log/messages while doing ssh.

On doing ps -eZ | grep sshd I see that my-sshd has a different context to /usr/sbin/sshd

unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 24012 ? 00:00:00 sshd  unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 24272 ? 00:00:00 sshd  unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 29923 ? 00:00:00 sshd  unconfined_u:unconfined_r:unconfined_java_t:s0-s0:c0.c1023 32487 ? 00:00:00 my-sshd  

Could this be the reason for these error messages, if yes how to proceed with this?

Edit:

On level 3 debug, the setcon fails on setting context for the following:

debug3: ssh_selinux_change_context: setting context from 'unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023' to 'unconfined_u:unconfined_r:chroot_user_t:s0-s0:c0.c1023'  ssh_selinux_change_context: setcon failed with Invalid argument  

This context change happens before changing the root directory of the server. It does not affect any functionality as root directory is changed and I can ssh into the server. It just clutters my /var/log/messages with these error messages. Is there any way the calling of ssh_selinux_change_context method can be avoided? I can't figure out when exactly is this method triggered. Any other help to identify a solution would also be highly appreciated.

Customizing kdm Ghost Theme in Kali linux

Posted: 02 Oct 2021 06:07 AM PDT

I am using Kali Linux and just switched to kdm plasma desktop from gnome. I installed the futuristic ghost theme. As we get wifi and recording icons at the top right of desktop in gnome, i couldn't find a way to pin these icons in kdm desktop. How can i find these wifi , recording icons and pin them in the task bar in kdm ghost themed desktop in kali linux?

this is my current desktop :

enter image description here

and this is the style i want it, as you can see wifi and recording icons at the top right corner :

enter image description here

vncviewer: VNC server closed connection

Posted: 02 Oct 2021 09:02 AM PDT

So I installed a VNC server (Tight VNC) on my workstation 'orac' which is running Debian Jessie with KDE Plasma. And a VNC client (also Tight VNC) on my workstation 'tact' running Debian Stretch with KDE Plasma.

I ran vncpasswd on orac to configure the password.

I want to use VNC to use 'orac' from 'tact'.

From tact I ssh'ed to orac and started the vncserver:

jj5@orac:~$ vncserver     New 'X' desktop is orac:1    Starting applications specified in /home/jj5/.vnc/xstartup  Log file is /home/jj5/.vnc/orac:1.log  

Then from a console on tact I ran:

jj5@tact:~$ vncviewer orac:1  Connected to RFB server, using protocol version 3.8  Enabling TightVNC protocol extensions  Performing standard VNC authentication  Password:   Authentication successful  Desktop name "jj5's X desktop (orac:1)"  VNC server default format:    32 bits per pixel.    Least significant byte first in each pixel.    True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0  Using default colormap which is TrueColor.  Pixel format:    32 bits per pixel.    Least significant byte first in each pixel.    True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0  vncviewer: VNC server closed connection  

Before vncviewer: VNC server closed connection is reported everything seems to be working smoothly. A window opens, I see KDE Plasma doing it's login/loading thing, then my orac desktop loads, a bunch of default Dolphin windows load, and KDE Plasma starts processing my autostart scripts, so everything seems to be working fine, and then almost as soon as it starts KDE/VNC disappears and shuts down usually with vncviewer: VNC server closed connection but sometimes with vncviewer: read: Connection reset by peer instead.

So why is KDE (or VNC?) bailing just as soon as it starts? Any help greatly appreciated!

p.s. here's some extra info about the environment on the VNC server (orac):

jj5@orac:~/.vnc$ ls -al  total 24K  drwx------  2 jj5 jj5 4.0K May  4 17:35 ./  drwxr-xr-x 74 jj5 jj5 4.0K May  4 17:35 ../  -rw-r--r--  1 jj5 jj5 1.3K May  4 17:36 orac:1.log  -rw-r--r--  1 jj5 jj5    5 May  4 17:35 orac:1.pid  -rw-------  1 jj5 jj5    8 May  4 15:52 passwd  -rwxr-xr-x  1 jj5 jj5  263 May  4 17:32 xstartup*  

And the log file says:

jj5@orac:~/.vnc$ cat orac\:1.log   04/05/17 17:35:57 Xvnc version TightVNC-1.3.9  04/05/17 17:35:57 Copyright (C) 2000-2007 TightVNC Group  04/05/17 17:35:57 Copyright (C) 1999 AT&T Laboratories Cambridge  04/05/17 17:35:57 All Rights Reserved.  04/05/17 17:35:57 See http://www.tightvnc.com/ for information on TightVNC  04/05/17 17:35:57 Desktop name 'X' (orac:1)  04/05/17 17:35:57 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t  04/05/17 17:35:57 Listening for VNC connections on TCP port 5901    04/05/17 17:36:04 Got connection from client 10.1.1.126  04/05/17 17:36:04 Using protocol version 3.8  04/05/17 17:36:04 Enabling TightVNC protocol extensions  04/05/17 17:36:06 Full-control authentication passed by 10.1.1.126  04/05/17 17:36:06 Pixel format for client 10.1.1.126:  04/05/17 17:36:06   32 bpp, depth 24, little endian  04/05/17 17:36:06   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0  04/05/17 17:36:06   no translation needed  04/05/17 17:36:06 Using tight encoding for client 10.1.1.126  04/05/17 17:36:06 Using compression level 1 for client 10.1.1.126  04/05/17 17:36:06 Using image quality level 6 for client 10.1.1.126  04/05/17 17:36:06 Enabling X-style cursor updates for client 10.1.1.126  04/05/17 17:36:06 Enabling cursor position updates for client 10.1.1.126  04/05/17 17:36:06 Enabling LastRect protocol extension for client 10.1.1.126  

Note that 10.1.1.126 is my VNC client 'tact'.

My xstartup script is pretty much just the default one (I don't have an ~/.Xresources file so I removed that from the xrdb command, otherwise it's as-is):

jj5@orac:~/.vnc$ cat xstartup   #!/bin/sh    #xrdb $HOME/.Xresources  xrdb  xsetroot -solid grey  #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &  #x-window-manager &  # Fix to make GNOME work  export XKL_XMODMAP_DISABLE=1  /etc/X11/Xsession  

How to install DisplayLink driver on LinuxMint 17.3

Posted: 02 Oct 2021 08:00 AM PDT

I have a USB 3.0 docking station connected with my laptop having LinuxMint 17.3. I can't manage to install DisplayLink driver on it. I could make it work with Ubuntu 15.04, but with LinuxMint it wan't recognize external monitor, even though there is no error message during the install procedure.

I tried to follow some proposal on DisplayLink forum, and I tried to modify installation file so SYSTEMINITDAEMON had systemd or upstart values, but none of these worked.

Since I already found some posts reported it worked for LinuxMint 17.2, I guess it's possible, but I couldn't find exact instructions if something else should be changed in installation script.

Passing a set of parameters to a program using a Bash variable

Posted: 02 Oct 2021 08:18 AM PDT

I'm trying to clean up my shell script by placing repeating parameters in a bash variable.

The best approach I know is to put it in an array and pass it... but that doesn't seem to work. How can I store all the parameters in a variable?

This doesn't work:

TESTP=( "-path" "\"./var/*\"")  echo ${TESTP[@]}   # Results in: -path "./var/*"  find ${TESTP[@]}   # Returns no results.  

While find -path "./var/*" does return all files under var.

how to create a partition in free space using GNU Parted

Posted: 02 Oct 2021 04:54 AM PDT

Below is my hard disk shown in gnu parted:

(parted) print free                                                         Model: ATA HGST HTS541075A9 (scsi)  Disk /dev/sda: 750GB  Sector size (logical/physical): 512B/4096B  Partition Table: gpt    Number  Start   End     Size    File system     Name                              17.4kB  1049kB  1031kB  Free Space  1      1049kB  538MB   537MB   fat32           EFI System Partition  boot  2      538MB   468GB   467GB   ext4         468GB   520GB   52.4GB  Free Space  6      520GB   527GB   6353MB  linux-swap(v1)  4      527GB   527GB   524MB   ext4  5      527GB   744GB   217GB                                         lvm  3      744GB   750GB   6352MB      750GB   750GB   892kB   Free Space    (parted)   

You can see I have 52.4GB space (fourth entry). I want to create a partition in this. I know mkpart is the command for it.

Its syntax is

 mkpart PART-TYPE [FS-TYPE] START END  

But my problem is I don't know what value is should give for START and END. What value should I use?

No comments:

Post a Comment