Tuesday, July 5, 2022

Recent Questions - Unix & Linux Stack Exchange

Recent Questions - Unix & Linux Stack Exchange


Cannot add accent marks on character, as accent marks immidiately appear before the next key press

Posted: 05 Jul 2022 11:24 PM PDT

In short, I am trying to type the acute e character.

For some reason, on my office computer (Linux Mint Cinnamon), I cannot write the character as I am used to.

The way I would normally do it, is

ALTGR + \, release, e. The problem on this system is that the accute character ´ immidiately appears, and the e character after it.

So instead if é, I get ´e.

It is the same for other characters, for instance if I wanted ñ, I would press ALTGR + ¨, then n. But in reality I get ~n. Then ~ immidiately appears.

My keyboard layout is Norwegian.

SUSE 15 SP3 - After modifying ens33 external interface name to eth0 SSH is not working with sshd service restart

Posted: 05 Jul 2022 11:07 PM PDT

OS - SLES Version - 15-SP3

I am successfully updating the external network interface name from ens33 to eth0. On reboot, the ifconfig is giving output with eth0 as a device and SSH is also turned on.

I need to turn on the SSH without a reboot after performing the same changes(external network interface name change from ens33 to eth0).

Can someone please help me to know how can I do that ?

Printing issues: Can print individually not in bulk

Posted: 05 Jul 2022 10:47 PM PDT

New printer can print individually however not in bulk.

What can I do to try troubleshooting this issues?

Here is the error log:

D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[5]="CUPS_SERVERBIN=/usr/lib/cups"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[6]="CUPS_SERVERROOT=/etc/cups"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[7]="CUPS_STATEDIR=/var/run/cups"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[8]="PATH=/usr/lib/cups/filter:/usr/lib64/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[9]="SOFTWARE=CUPS/1.4.2"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[10]="USER=root"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[11]="CUPS_SERVER=/var/run/cups/cups.sock"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[12]="CUPS_ENCRYPTION=IfRequested"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[13]="IPP_PORT=631"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[14]="CHARSET=utf-8"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[15]="LANG=en_US.UTF-8"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[16]="PPD=/etc/cups/ppd/serv1.ppd"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[17]="RIP_MAX_CACHE=128m"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[18]="CONTENT_TYPE=application/vnd.cups-raw"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[19]="DEVICE_URI=lpd://serv1/raw?timeout=10"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[20]="PRINTER_INFO=serv1"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[21]="PRINTER_LOCATION="  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[22]="PRINTER=serv1"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] envp[23]="CUPS_FILETYPE=document"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] Started backend /usr/lib/cups/backend/lpd (PID 27951)  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] STATE: +connecting-to-device  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] Looking up "serv1"...  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] Connecting to serv1:515 for printer raw  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] Connecting to printer...  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] STATE: -connecting-to-device  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] Connected to printer...  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] Connected to 172.17.154.18:515 (IPv4) (local port 1019)...  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] lpd_command 02 raw  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] Sending command string (5 bytes)...  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] Reading command status...  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] Set job-printer-state-message to "Remote host did not respond with command status byte after 10 seconds!", current level=WARN  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] lpd_command returning 4  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] Backend returned status 1 (failed)  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] Retrying job on same printer.  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] End of messages  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] printer-state=3(idle)  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] printer-state-message="/usr/lib/cups/backend/lpd failed"  D [05/Jul/2022:15:31:16 +1000] [Job 3023444] printer-state-reasons=none  E [06/Jul/2022:12:54:28 +1000] [CGI] Unable to create avahi client: Resource temporarily unavailable  E [06/Jul/2022:12:54:28 +1000] [cups-deviced] PID 1618 (dnssd) stopped with status 1!  E [06/Jul/2022:13:00:43 +1000] [CGI] Unable to create avahi client: Resource temporarily unavailable  E [06/Jul/2022:13:00:43 +1000] [cups-deviced] PID 3666 (dnssd) stopped with status 1!  E [06/Jul/2022:13:50:56 +1000] [CGI] Unable to create avahi client: Resource temporarily unavailable  E [06/Jul/2022:13:50:56 +1000] [cups-deviced] PID 12189 (dnssd) stopped with status 1!  E [06/Jul/2022:13:52:36 +1000] [CGI] Unable to create avahi client: Resource temporarily unavailable  E [06/Jul/2022:13:52:36 +1000] [cups-deviced] PID 12640 (dnssd) stopped with status 1!  

Awk command learning

Posted: 05 Jul 2022 10:37 PM PDT

I have 600 fort files having name as fort.1, fort.2, & so on. I want to extract data from these files and make a single output file. Can anyone suggest me how to do that?

Why is play Minecraft on mx linux so smooth

Posted: 05 Jul 2022 10:00 PM PDT

Lately I've been trying to experiment with some linux distributions, then try to play games there such as minecraft.

I tried:

  1. Manjaro - Lag
  2. Drauger OS (It said for game) - Still lag
  3. MX Linux - Really-really smooth

I could use MX Linux as the main distribution. However, because a lot of information says that some of the most Ubuntu packages can't run on MX Linux, I'm also hesitant to use it.

Can someone explain why minecraft is running so efficiently on MX Linux. Because I want to configure the same settings on Ubuntu to run smoothly like MX Linux. I think that this is a matter of drivers or kernel compatibiliy, but I'm not sure because there are many factors that determine linux performance.

Spec:

$ lsb_release -a    No LSB modules are available.  Distributor ID: Debian  Description:    Debian GNU/Linux 11 (bullseye)  Release:        11  Codename:       bullseye    Laptop   : Acer one Z 1402 (2016)  Processor: Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz  Graphics : Intel HD Graphics 5500  Kernel   : Linux 5.10.0-15-amd64 x86_64  RAM      : single Kingston sodimm 2GB 1600MHZ   OpenGL   : 4.6 (Compatibility Profile) Mesa 20.3.5  Minecraft: Minecraft launcher original. Version: 1.7.10-Forge10.13.4.1614-1.7.10  JVM Arg  : -Xmx512M -XX:+UnlockExperimentalVMOptions -d64 -XX:+AggressiveOpts -XX:+UseParallelGC -XX:ParallelGCThreads=4  

1.7.10-Forge10.13.4.1614-1.7.10

I didn't try to another game than Minecraft, but I will test next.

I deleted /opt/homebrew directory via '''sudo rm -r''' and now my computer is completely wiped. How can this be?

Posted: 05 Jul 2022 08:38 PM PDT

I was working on downloading iTerm2 on my M1 2020 MacBook and ran into a problem while downloading homebrew. In order to reinstall, I deleted /opt/homebrew directory and now all my files are gone. I have tried to recover those files to no avail. How can this be? Some files like my documents are still there but that is about it.

Exclude matched rows based on first column of two files

Posted: 05 Jul 2022 11:23 PM PDT

I have two tab delimited text file. The larger main file 1 with multiple columns and the file 2, smaller file, that only share the first two columns for limited rows with file 2.

I want a file 3 as an output that exclude the rows that match between first column of these two files and print all other columns in file 1 as well.

I tried grep -vf but doesn't seem to work.

file 1:

BP  CHR SNP REF ALT A1  OBS_CT  OR  LOG(OR)_SE  Z_STAT  P  1650048 1   rs112618790 C   T   T   12387   1.00246 0.0877604   0.0279678   0.977688  1856473 1   rs6684487   G   A   A   12387   1.02222 0.0836593   0.262689    0.79279  

file 2:

BP  CHR  1650048 1  1650483 1  

output (file 3):

BP  CHR SNP REF ALT A1  OBS_CT  OR  LOG(OR)_SE  Z_STAT  P  1856473 1   rs6684487   G   A   A   12387   1.02222 0.0836593   0.262689    0.79279  

Pinging Result between A & B KVM guests in same subnet

Posted: 05 Jul 2022 08:26 PM PDT

I have a Ubuntu 20.04 KVM host running with a number of web and application VM guests. Suddenly, there is 1 web proxy server can't be connected. NOTE: there is a network team to manage the network

I try to ping from web proxy server to all other machines at KVM management console. It works. 192.168.11.61 (proxy) -> 192.168.11.60 (Host), 192.168.11.62 (app1), 192.168.11.63 (app2) REMARK: in order to troubleshoot, I disable ufw for all guests and the host.

Then, I try to ping 192.168.11.61 (proxy) from all of the above. None of them is working.

Interesting Findings Then, I try to ping 192.168.11.61 from 192.168.11.62. Meanwhile, I ping to ping 192.168.11.62 from 192.168.11.61. At this time, both of them are pinging each other with reply to each other. Once I stop the ping action from 192.168.11.62, again the 192.168.11.61 cannot be reached.

For the above scenario, I have never seen it. The network team is saying that it is likely a problem of my KVM & firewall settings.

** Additional Notes **

  1. KVM Host - with 2 NIC bonding (CISCO - LACP)
  2. KVM Host - bridged network
  3. all KVM guests are sharing the same structure of the netplan file.
  4. the machines are not changed with any network settings

Packet dropping by raspberry Pi 2 in ethernet

Posted: 05 Jul 2022 07:59 PM PDT

I am sending small UDP packets over ethernet(from a linux machine) to raspberry pi 2, with 100Mbps link, from the program and ethtool can see that I am able to send 0.15M packets per second( 50 bytes in total, including ethernet+IP+UDP+payload) but raspberry pi 2 receives only 0.014 M packets per second. The link is dedicated with no other traffic.

I have 3 related questions,

  1. There should be more packets from my machine(It is a 100 Mbps after all) so why it isnt? and

  2. why rpi2 isnt recieving? Therefore I wanted to do open ended test of ethernet removing rpi NIC and see open ended throughput of linux machine to pump data.

Whenever one does UART, SPI primitive protocols one is able to send data in open ended way to perform open ended test.

  1. Is it possible to perform same for ethernet? Send ethernet frames without anyone to recieve at other end?

In linux machine I am using raw socket and sendmmg to send multiple packets, the process is given highest priority and pinned to a core. In raspberry pi I am doing a packet sniff

What does the ss output's port number for a unix domain socket mean?

Posted: 05 Jul 2022 07:46 PM PDT

For example, the 15240 below,

# ss -xpl | grep stdout  u_str LISTEN 0      4096                      /run/systemd/journal/stdout 15240            * 0    users:(("systemd-journal",pid=254,fd=5),("systemd",pid=1,fd=38))   

Can a single unix domain socket connect to multiple peers simultaneously?

Posted: 05 Jul 2022 07:41 PM PDT

Since this is the socket that syslog's /dev/log is symlinked to, I expect there is at least one listening socket from systemd-journald, and possibly some additional connected ones, with different "port" numbers. /run/systemd/journal/stdout does just that.

Listening socket:

# ss -xpl | grep stdout  u_str LISTEN 0      4096                      /run/systemd/journal/stdout 15240            * 0    users:(("systemd-journal",pid=254,fd=5),("systemd",pid=1,fd=38))   

Connected pair example:

# ss -xp | grep 19637  u_str ESTAB 0      0                                         * 20872             * 19637  users:(("dbus-daemon",pid=701,fd=2),("dbus-daemon",pid=701,fd=1))                                                                                                                                                                                                                                                                                                                                                                                      u_str ESTAB 0      0               /run/systemd/journal/stdout 19637             * 20872  users:(("systemd-journal",pid=254,fd=73),("systemd",pid=1,fd=78))  

However for dev-log, it seems that there is no listening socket. A single socket("port"=15236) from systemd-journald is connected to multiple peers, and then in its own record, the socket is shown as ESTAB, with the peer "port" shown as 0. How is that possible? Does the unix socket operates fundamentally different in that aspect compared to a tcp one?

Maybe I should ask, what does a port number in ss output mean for a unix domain socket?

# ss -xpl | grep dev-log  # ss -xp | grep dev-log  u_dgr ESTAB 0      0              /run/systemd/journal/dev-log 15236             * 0      users:(("systemd-journal",pid=254,fd=3),("systemd",pid=1,fd=36))                                                                                                                                                                                                                                                                                   # ss -xp | grep 15236  u_dgr ESTAB 0      0              /run/systemd/journal/dev-log 15236             * 0      users:(("systemd-journal",pid=254,fd=3),("systemd",pid=1,fd=36))                                                                                                                                                                                                                                                                                   u_dgr ESTAB 0      0                                         * 19250             * 15236  users:(("dbus-daemon",pid=369,fd=14))                                                                                                                                                                                                                                                                                                              u_dgr ESTAB 0      0                                         * 101364            * 15236  users:(("su",pid=4448,fd=3))                                                                                                                                                                                                                                                                                                                       u_dgr ESTAB 0      0                                         * 22068             * 15236  users:(("gdm",pid=373,fd=13))                                                                                                                                                                                                                                                                                                                      u_dgr ESTAB 0      0                                         * 20801             * 15236  users:(("(sd-pam",pid=692,fd=8))                                                                                                                                                                                                                                                                                                                   u_dgr ESTAB 0      0                                         * 21686             * 15236  users:(("dbus-daemon",pid=701,fd=10))                                                                                                                                                                                                                                                                                                              u_dgr ESTAB 0      0                                         * 19589             * 15236  users:(("gdm-session-wor",pid=680,fd=9))                                                                                                                                                                                                                                                                                                           u_dgr ESTAB 0      0                                         * 104580            * 15236  users:(("sudo",pid=4447,fd=8))                                                                                                                                                                                                                                                                                                                     u_dgr ESTAB 0      0                                         * 14305             * 15236  users:(("polkitd",pid=450,fd=10))                                                                                                                                                                                                                                                                                                                  u_dgr ESTAB 0      0                                         * 23001             * 15236  users:(("gnome-session-b",pid=727,fd=17))    

remove the blank lines if there is blank lines in second sow

Posted: 05 Jul 2022 06:47 PM PDT

sed -i
here is my file

1   a  2   b  3     4   d  5  6   e  

i want to get the intermediate file

1  a  2  b  4  d  6  e  

and the final file

>1  a  >2  b  >4  d  >6  e  

Is there ever a reason to query ioctl for hardware info when we have sysfs?

Posted: 05 Jul 2022 08:49 PM PDT

My assumption is that sysfs is built using ioctl queries, meaning all the information you would want (or at least most of it) is already available by simply reading files on sysfs. I notice some programs (e.g., hdparm) still use ioctl calls rather than simply hitting sysfs , and I'm curious if there's a reason for that. Is sysfs unreliable? If you're only interested in hardware info, is there a reason to use ioctl over sysfs?

How to loop through two directories ([A/{a,b,c}] & [n/{1,2,3}] at the same time to form pairs with their contents tuple-style: [A/a-n/1] [A/b-n/2]

Posted: 05 Jul 2022 08:41 PM PDT

I am not sure how to look for this, so please direct me to the answer if it's around somewhere. I also want to apologize in advance if the title of the question is not clear, I couldn't think of a better description.

This is a simplified example of what I am trying to do. Let's say I have these two directories that are on different hard drives:

A/data_dir1/ contains:

  • dir1/
  • dir2/
  • dir3/
  • dir4/

B/info_dir1/ contains:

  • dirA/
  • dirB/
  • dirC/
  • dirD/

Now, what happens is that if they are ordered alphabetically, dir1/ and dirA/ are related, so I want to extract some files from dir1/ and copy them inside dirA/. The same happens with dir2/ and dirB/, dir3/ and dirC/, etc.

I am sure there is an easier/better/more correct/faster way to do this, but right now I am stuck on this idea and can't think of any other way, so what I am thinking of doing is to:

counter1=0  for info_dir in $(ls -d info_dir1/*); do      counter1=counter1+1      counter2=0      for data_dir in $(ls -d data_dir1/*); do          counter2=counter2+1          if [[ counter1 == counter2 ]]; then              cp $data_dir/[file2copy] $info_dir/          fi      done  done  

I would be doing this on the assumption that it will always loop both folders in the right order, but I am afraid that something could go wrong. Is there any other way of doing it that I ignore?

Thank you very much for any help you can provide!

print or miss string based on the result of simple math between fields of current and previous lines with awk

Posted: 05 Jul 2022 09:38 PM PDT

1529.89 1.05    22.36   48.78   33.8  1529.91 2.05    22.36   52.79   36.93  1529.92 3.06    22.36   52.80   36.93  1529.92 4.25    22.36   52.79   36.94  1529.92 5.10    22.36   52.79   36.94  1529.93 5.24    22.36   52.80   36.94  1529.94 6.05    22.36   52.80   36.94  1529.95 6.27    22.36   52.80   36.94  1529.95 7.01    22.36   52.80   36.94  1529.96 7.26    22.36   52.80   36.94  1529.97 8.11    22.36   52.80   36.94  1529.99 9.22    22.35   52.80   36.94  1530.00 10.12   22.36   52.80   36.94  1530.02 11.26   22.36   52.80   36.94  1530.03 12.18   22.36   52.80   36.94  1530.04 13.12   22.36   52.81   36.94  1530.06 14.04   22.36   52.81   36.95  1530.10 16.21   22.36   52.81   36.94  1530.11 17.17   22.35   52.80   36.94  1530.12 18.09   22.35   52.81   36.94  1530.14 19.19   22.35   52.81   36.94  1530.15 20.19   22.35   52.80   36.94  1530.17 21.24   22.35   52.81   36.94  1530.18 22.05   22.35   52.81   36.95  1530.20 23.14   22.35   52.81   36.95  1530.21 24.14   22.35   52.81   36.94  1530.23 25.23   22.35   52.80   36.94  1530.23 26.03   22.35   52.80   36.94  1530.23 26.24   22.34   52.80   36.94  1530.26 27.10   22.35   52.81   36.95  

I've got that type of file. What I need is to print every line of it if whole number in its second field is not equal to the same number in second field of previous line so on below two lines for an example:

1529.94 6.05    22.36   52.80   36.94  1529.95 6.27    22.36   52.80   36.94  

... I would like to print only first line and skip that second line. Second field numbers increasing up to ~1300 and decreasing to 1 after.

I tried awk using substr() function but it does not seem to be working as I just got stuck:

awk -F. '{for (i=NR;i<3814;i++) {i=1 n=(substr($2,4))}{i=i+1 v=(substr($2,4))} {if ((n+v)%2=1) print $0} {i++}}' test.csv  

Ubuntu stuck at boot

Posted: 05 Jul 2022 07:02 PM PDT

My Ubuntu 20.04 is stuck at the boot. The screen becomes black and the only visible thing is a small underscore on top. I cannot enter the command line. I think I might have screwed something with systemd. Any suggestions?

Where should I install the zsh completion file as a package maintainer

Posted: 05 Jul 2022 08:53 PM PDT

I have a project that contains a completion script for zsh, where should I copy the completion file to when the user install the software (such as by running make install, apt install or pacman -Si...)?

I know there's some specific directory for completion script for other shell such as:
fish -> /usr/share/fish/vendor_completions.d
bash -> /etc/bash_completion.d/

what about zsh?
zsh -> /usr/share/???

Does Computrace work on *NIX like systems?

Posted: 05 Jul 2022 08:06 PM PDT

I've done tons of research on Computrace from Absolute Software and I haven't found a solid answer to: Does it work on Linux?

I've read the following research papers and they don't refer to Linux or *NIX like systems once:

Deactivate the Rootkit

Absolute Backdoor Revisited

They're all focused on reverse engineering the agents/binaries that are dropped onto Windows machines. I've looked at the running processes on multiple Linux systems with Computrace enabled and there isn't any sign of it. So I guess I've answered my own question, but for some reason I don't feel assured that it is 100% NOT working on Linux. If anyone here has experience with Computrace or has also tested themselves, please let me know!

Command line to detect graphics card driver on Ubuntu 18.04

Posted: 05 Jul 2022 11:04 PM PDT

Is there anyway to detect which driver is now handling the graphic card on my Ubuntu 18.04? I have NVIDIA Geforce 740M on my laptop.

Running multiple emulators with the same AVD is an experimental feature

Posted: 05 Jul 2022 10:05 PM PDT

I was able to get a remote viewer set up on my mac to remote view a Fedora server desktop. I run ~/android-studio/bin/studio.sh to launch Android Studio. I open AVD manager and try to boot up an emulator, but I get message

AVD is allready runing ...

enter image description here

and when I try to boot emulator device1 from command line

emulator -avd device1  

I get message

emulator: ERROR: Running multiple emulators with the same AVD is an experimental feature. Please use -read-only flag to enable this feature.

so overwhelming evidence is that device1 emulator is already running, and yet when I run command adb devices I get messages

List of devices attached

indicating no running devices ... so whats up?

edit

I delete all *.lock files, and press play; the dialog did not appear, however, the emulator also did not appear, but when I ran adb devices, no devices were shown, and then I pressed play again, I got the same dialog.

edit

I create new device and booted from command line and got    $ emulator -avd device3  Warning: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled ((null):0, (null))  emulator: INFO: QtLogger.cpp:66: Warning: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled ((null):0, (null))      failed to create drawable  failed to create drawable  failed to create drawable  failed to create drawable  failed to create drawable  failed to create drawable  failed to create drawable  failed to create drawable  getGLES2ExtensionString: Could not make GLES 2.x context current!  

Chrome opens a second Transmission window with magnet links. How does it check if there is a transmission open or not?

Posted: 05 Jul 2022 11:34 PM PDT

The magnet link is correctly set with xdg-mime to open in transmission, and also in .local/share/applications/mimeapps.list.

If transmission is NOT running, everything works as expected (click a magnet link or torrent file, and it opens).

If transmission is running, clicking on a magnet link in chrome will open a second transmission window.

This does not occur neither in firefox nor with the command xdg-open "magnet-link". The problems seems to be only in chrome.

Tech specs:

Debian buster with 4.19.0-2-amd64, fully upgraded.  transmission-gtk 2.94 (d8e60ee44f)  google chrome Version 72.0.3626.81 (Official Build) (64-bit)  xdg-open 1.1.3  awesome WM v4.3  

edit: Checking chrome's log, I can see this related line

[21407:21407:0207/152959.142127:VERBOSE1:navigator_impl.cc(111)] Failed Provisional Load: magnet:?xt=urn:btih:<magnet_url_with_trackers-hidden_for_privacy>, error_code: -3, error_description: The webpage at <strong jscontent="failedUrl"></strong> might be temporarily down or it may have moved permanently to a new web address., showing_repost_interstitial: 0, frame_id: 4  

No sha256sum in MacOS

Posted: 05 Jul 2022 10:44 PM PDT

I tried to use sha256sum in High Sierra; I attempted to install it with MacPorts, as:

sudo port install sha256sum  

It did not work.

What to do?

How to get top immediate sub-folders of '/' folder consuming huge disk space in Linux

Posted: 05 Jul 2022 07:08 PM PDT

I face disk space full issue in Linux. When checked with df command I found the '/' directory is occupying 100%. So to check which folders consume much space I ran cd / and du -sh. But it takes forever to run the command. But ultimately I want to get the details on which top immediate sub folders of '/' folder are consuming huge disk space. So can any one tell the command for the same.

Vuze not starting?

Posted: 05 Jul 2022 06:28 PM PDT

root@debian:/home/love# vuze  Starting Azureus...  Suitable java version found [java = java 1.7.0_111]  Configuring environment...  Java exec found in PATH. Verifying...  Error: Could not find or load main class org.gudy.azureus2.platform.unix.ScriptBeforeStartup  Loading Azureus:  java -Xmx256m -cp "./*.jar" -Djava.library.path="/usr/bin" -Dazureus.install.path="/usr/bin" -Dazureus.script="/usr/bin/vuze" -Dazureus.script.version=6 org.gudy.azureus2.ui.swt.Main   Error: Could not find or load main class org.gudy.azureus2.ui.swt.Main  Exit from Azureus complete  Error: Could not find or load main class org.gudy.azureus2.platform.unix.ScriptAfterShutdown  Azureus TERMINATED.  

Following steps were taken to install vuze:

$ wget http://cf1.vuze.com/files/VuzeInstaller.tar.bz2  $ tar -xjvf VuzeInstaller.tar.bz2  $ sudo rm -rf /opt/vuze*  $ sudo mv vuze /opt/vuze  $ sudo ln -sf /opt/vuze/vuze /usr/bin/vuze  

how to run "play start" as a linux service

Posted: 05 Jul 2022 09:09 PM PDT

I want deploy a play framework web application from source, and run "play start" to start the application.

I wrote a startup script in /etc/init.d/ which execute "daemon play start" when service start, but the service start command did not return. I guess it's because play start is waiting for me to give him a Ctrl+D. "nohup" can fix it, but with "nohup", I have to run "kill -9 xxx" to stop the application, which is not what I like.

What's the best way to run a play framework application from source as a linux startup service.

Thanks a lot.

OpenSSL self signed certificate with a common name longer than 64 bytes

Posted: 05 Jul 2022 06:11 PM PDT

I can create a self signed certificate using openSSL as follows:

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days XXX -nodes  

The interface somehow restricts me to 64 bytes for the common name. How can I create a certificate that has a common name longer than 64 bytes?

How can I delete all lines in a file using vi?

Posted: 05 Jul 2022 06:59 PM PDT

How can I delete all lines in a file using vi?

At moment I do that using something like this to remove all lines in a file:

echo > test.txt  

How can I delete all lines using vi?

Note: Using dd is not a good option. There can be many lines.

Looking at logs from bottom upwards

Posted: 05 Jul 2022 11:03 PM PDT

Is there a linux command or some way to look at logs from bottom up rather than from top towards bottom. I know about tail -n <number of lines>, but is there something that I can actually scroll and go from bottom up?

No comments:

Post a Comment