Ant - build requires Java 8+, fails despite having Java 11 installed Posted: 21 Apr 2021 10:48 AM PDT I'm trying to build NetBeans 9 from sources on Raspbian using instructions from NetBeans site: https://netbeans.apache.org/download/nb90/nb90.html I navigate to directory with unzipped sources and run ant , which produces error: BUILD FAILED /home/pi/Downloads/netbeans_sources/incubating-netbeans-java-9.0-source/nbbuild/build.xml:41 You need to run on JDK 8+ to build NetBeans; java.home=/usr/lib/jvm/java-11-openjdk-armhf Raspbian Buster has Java 11 installed by default. I make sure to set JAVA_HOME using instructions from this answer: https://stackoverflow.com/questions/24641536/how-to-set-java-home-in-linux-for-all-users I verify this by running which java which produces /usr/lib/jvm/java-11-openjdk-armhf/bin/java What is the cause of Ant build failing? |
Using sed command to print the first column of /etc/group file Posted: 21 Apr 2021 10:49 AM PDT I'm trying to use sed command in order to print the first column of the /etc/group file. If someone have an idea, please share. |
Problem with double Fedora installation. mount: /boot/efi: unknown filesystem type 'vfat'. Possible overwritten installation Posted: 21 Apr 2021 10:26 AM PDT Some days ago, I decided to install Fedora 33 Jam on an empty partition (sda6) I had created when I installed Fedora 32 Workstation (on sdb1) a couple of years ago. With the intention to finish with both systems in a dual-boot, I selected the sda6 partition to mount '/', and an existing small partition in sda1 labeled as '/boot', to mount /boot/EFI for the new Fedora 33 Jam. The thing is that this '/boot' partition in sda1 already had the /boot/EFI of the 1st OS, Fedora 32 WS. Now, when Grub appears, it shows both systems, but Fedora 32 fails to boot and enters in emergency mode. Fedora 33 Jam boots and works perfectly fine. Booting from Fedora 33 Jam, I've checked the partitions of the Fedora 32 system: if I mount Fedora 32's root '/', located in sdb1, I can 'cd' to /boot, and see that the Fedora 32 kernel initramfs images, vmlinuz files, grub2, etc., are still there, but the folders /boot/efi/EFI and /boot/efi/loader are empty. Another thing I could mention is that the entry in the Grub for Fedora 32 WS system loads the rescue image (I'm able to see that by pressing 'e' to edit that entry). Regarding the errors that appear in the log when Fedora 32's boot finishes in emergency mode, the errors that I can see from the /var/log/boot.log file (in sdb1) are the following: - Failed to start Load Kernel Modules
- Failed to mount FUSE Control File System
- Failed to mount /boot/efi
- Failed to mount Mount unit for core, revision 10185
- Failed to mount Mount unit for hello-world, revision 29
- Failed to mount Mount unit for openboard, revision 14
Also, I could see the following problem from the emergency mode terminal, in the output of 'systemctl status boot-efi.mount': mount: /boot/efi: unknown filesystem type 'vfat' Any suggestion or hint on how to fix this problem will be highly appreciated. |
How can I use one input file into several separate operations Posted: 21 Apr 2021 10:34 AM PDT I would like to read one file, do an operation with several different parameters on it and finally save each output as a separate file. Currently I do it as shown in the code snipped below. This reads the image each iteration, while in fact I do not change it. For larger images (these here are 400 MB) it becomes quit a slow process. Memory is large enough and it would be fine to load it into memory once and process it from there. But I am unsure how to do this. Not in a shell nor with ImageMagick. - Is there a
ImageMagick -native way to do this? - Would it be the easiest to just copy the file once on a Memory Mapped file system and use the script below?
#!/bin/sh FILE=foo.tif i=65;END=80;STEP=1 while [ $i -le $END ]; do convert $FILE -threshold ${i}\% ${i}.png & i=$((i+$STEP)) done It would be great if the shell part would stay POSIX compliant. EDIT: I launch sub-processes in the background to utilize the cores I got. |
Wrong keyboard layout in even though everything in the OS seem to report correct/wanted layout - e.g. åäö becomes ['; Posted: 21 Apr 2021 09:18 AM PDT I installed Manjaro 21.x (don't remember exact version) a few months back and I chose the Gnome flavor. As per usual I set up my OS to have two keyboard layouts (US and SE) and life was great. Then life became less great as I realised Gnome is not for me. So, I switched back to good old XFCE by simply installing XFCE using the package manager. Now, whenever I boot Linux (or log out and in again) my keyboard layout seem to be, in practice, US since everytime I write åäö it becomes ['; . This happens anywhere in the OS. I've tried to troubleshoot it but I have found nothing really. It seems the OS really believe I use the SE layout. For example the layout switcher in XFCE show SE: Some output from interesting commands (they are the same regardless if I have the issue or worked around it): ➜ cat /etc/vconsole.conf KEYMAP=sv-latin1 FONT= FONT_MAP= ➜ localectl status System Locale: LANG=en_US.utf8 LC_TIME=sv_SE.utf8 LC_COLLATE=C VC Keymap: sv-latin1 X11 Layout: se,us X11 Variant: , ➜ setxkbmap -print -verbose 10 Setting verbose level to 10 locale is C Trying to load rules file ./rules/evdev... Trying to load rules file /usr/share/X11/xkb/rules/evdev... Success. Applied rules from evdev: rules: evdev model: pc105 layout: se,us variant: , options: grp:win_space_toggle,terminate:ctrl_alt_bksp Trying to build keymap using the following components: keycodes: evdev+aliases(qwerty) types: complete compat: complete symbols: pc+se+us:2+inet(evdev)+group(win_space_toggle)+terminate(ctrl_alt_bksp) geometry: pc(pc105) xkb_keymap { xkb_keycodes { include "evdev+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc+se+us:2+inet(evdev)+group(win_space_toggle)+terminate(ctrl_alt_bksp)" }; xkb_geometry { include "pc(pc105)" }; }; ➜ cat /etc/X11/xorg.conf.d/00-keyboard.conf # Written by systemd-localed(8), read by systemd-localed and Xorg. It's # probably wise not to edit this file manually. Use localectl(1) to # instruct systemd-localed to update it. Section "InputClass" Identifier "system-keyboard" MatchIsKeyboard "on" Option "XkbLayout" "se,us" Option "XkbVariant" "," EndSection System info: ➜ cat /etc/os-release NAME="Manjaro Linux" ID=manjaro ID_LIKE=arch BUILD_ID=rolling PRETTY_NAME="Manjaro Linux" ANSI_COLOR="32;1;24;144;200" HOME_URL="https://manjaro.org/" DOCUMENTATION_URL="https://wiki.manjaro.org/" SUPPORT_URL="https://manjaro.org/" BUG_REPORT_URL="https://bugs.manjaro.org/" LOGO=manjarolinux ➜ gnome-shell --version GNOME Shell 3.38.4 ➜ xfce4-about --version xfce4-about 4.16.0 (Xfce 4.16) To work around this issue all I have to do is to change the layout by clicking SE in the above screenshot or by using the keyboard shortcut I've assigned. After I've done this the layout switcher still say SE, which is sort of expected I guess. Also, åäö now becomes the expected åäö . |
Apache doesen't run PHP anymore Posted: 21 Apr 2021 08:59 AM PDT I installed Apache a few months ago and everything was working perfectly, PHP included. Today I tried to start the server (I haven't done so in a while) and it would refuse to start due to error "AH00072 make_sock". I checked if other processes were using port 80, but the only one that did was 1/init (systemd). I changed the port to 8080 and it worked. I have no idea what that was about. Then when I opened up localhost I found out that the PHP code is being displayed as-is and it's not being run. Most of the answers I found online tell me to check httpd.conf, which from what I understand is obsolete and I don't even have it. The other configuration files also aren't helpful. I tried messing with php7.4.conf but to no avail. I also tried enabling it with a2enmod but it tells me that the module doesn't exist even though I have all the required packages installed. Does anybody know what's going on? Could it be that a system update messed up the configuration? Linux Mint 20.1 Apache 2.4.41 PHP 7.4.3 |
telnet from another server to destination Posted: 21 Apr 2021 08:47 AM PDT I've 3 server Server 1 - to host the script Server 2 - Telnet from server 3 - telnet to
Below work from the Server 2 to Server 3 (my.host.com) - But I'm looking forward to know if we can run above requirement from Server 1. The Server 1 should be the one wherein the code would reside. DATE=`date +%Y-%m-%d` TIME=`date +%H%M%S` LOG_OK=/tmp/telnet_ok.txt LOG_FAIL=/tmp/telnet_fail.txt for port in 1666 2666 6666 9666 3666 do if timeout 2 telnet -c $host $port </dev/null 2>&1 | grep -q Escape; then echo "$DATE $TIME $host $port: Connected" >> $LOG_OK else echo "$DATE $TIME $host $port : no connection" >> $LOG_FAIL fi done |
How to do repeated rsync to pull only new or modified files Posted: 21 Apr 2021 08:47 AM PDT I'm trying to maintain a replica copy of the File system on another machine for a cold standby. To to the first copy of the entire system I ran an rsync job with the below command. rsync -avlP root@master:/data/App1/* /data/app2_testing This completed successfully without any errors or issue. I was able to start the application as well and was able to use it efficiently. Ran a second run and that also completed as expected but the only difference being the file system size now in the master was 10 GB but on the Slave machine is 11 GB. As per rsync it should only copy the modified files but strangely the filesystem size has increased. Went through a few documentation and links still seeing the same behavior: How to rsync only new files rsync -hvrPt root@master:/data/App1/* /data/app2_testing What should be the right procedure to do the rsync so it only copies changed files and not increase the space on the slave machine?? |
Trying to understand .bashrc, .profile, etc.. files Posted: 21 Apr 2021 09:13 AM PDT I am trying to understand the relation among the files .bashrc, .profile, .bash_profile, etc... as well as the meaning of login/non login shells, interactive/non interactive shells, etc... Every information I found is too abstract while what I want is a concrete practical explanation. So my questions are (related to a linux system like Ubuntu) What files are executed when the system is started up and I login to it (graphical desktop shows up)? What files are executed when I open a terminal emulator? What files are executed when I login in a text console (after pressing Ctrl-Alt-Fn) In what other events any of those files are executed? How can an interactive login shell may be started? How can a non interactive login shell may be started? How can a interactive non login shell may be started? How can a non interactive non login shell may be started? Feel free to answer just some of the questions... Thanks... |
how to get the words after colon symbol (:) using awk from the file Posted: 21 Apr 2021 10:33 AM PDT For a shell script i need to get the password of the user from the file, the file is having a single line with the value for 4 parameters as below. *:*:*:test:test I want to get the 3rd and the 4th column alone excluding colon symbol (: ) and pass it to an another variable. |
My server unmounted multiple drives and i don't know why? Posted: 21 Apr 2021 08:31 AM PDT so one of my servers was having issues this morning and when I went to investigate I found that the problem was that 4 of my drives seem to not be mounted anymore. I am wondering if there may be a reason how this could have happened without someone going in and running umount 4 times. (I checked and I don't see any umount commands that have been run from my team) I'm still a bit new to Linux but if there are logs I can look at please let me know. Also, the server is running Debian 7.9 |
Starting and closing an application based on an other application Posted: 21 Apr 2021 10:23 AM PDT I'm using Ubuntu 20.04 and I'm looking for a bash script to start Quodlibet (a music application) and conky simultaneously. Edit: The idea is to use the sh script in a .desktop launcher - Start Quodlibet
- Start conky 2 seconds later
- Close conky if Quodlibet is closed
I made some tests but I believe the following script won't work because I doesn't catch the closing of Quodlibet. Conky is still running when I close Quodlibet. #!/bin/bash trap "exit" INT TERM ERR trap "kill 0" EXIT quodlibet & sleep 2 && conky & wait EDIT: Standalone .sh solution Working script, thanks to @berndbausch. #!/bin/bash quodlibet & QUODPID=$! sleep 3 && conky & CONKYPID=$! wait $QUODPID kill $CONKYPID EDIT: Using a custom launcher As explained by @xhienne in his answer, using exec=setsid /path/to/script.sh in the .desktop file as well as his script works well. |
Merge files line by line Posted: 21 Apr 2021 08:53 AM PDT I have 10 files and I want to copy the first line of every file, the the second of every file and so into one big file. file1.txt is A B C D file2.txt is E F G H file3.txt is I J K L I want to have A E I B F J C G K .... Thanks |
How read from one file and write to another file shell script Posted: 21 Apr 2021 08:59 AM PDT I have this txt file of information: at com.lhs.ccb.sfw.application.ServiceObjectImpl.validate(Unknown Source) at com.lhs.cil.core.AggregatedServiceObjectImpl.localValidate(Unknown Source) at com.lhs.cil.core.AggregatedServiceObjectImplProxy.validate(Unknown Source) at com.lhs.cil.core.AggregatedServiceObjectImpl.validate(Unknown Source) at com.lhs.ccb.sfw.application.ServiceObjectImpl.validateI(Unknown Source) at com.lhs.ccb.soi.ServiceObjectIPOA._invoke(Unknown Source) at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:653) at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:205) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1700) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1558) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:940) at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:198) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:712) at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:469) at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1230) at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:490) at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:519) РЯа. 19, 2021 4:14:16 PM com.lhs.ccb.sfw.application.ServiceObjectImpl executeLocaleI SEVERE: ServiceObjectI.executeLocaleI CONTRACT.WRITE Error code: CommonDomain.InvalidStateTransition at com.lhs.CommonDomain.bscs_core.ae.a(Unknown Source) at com.lhs.Contract.bscs_core.services.ContractWrite.a(Unknown Source) at com.lhs.Contract.bscs_core.services.ContractWrite.execute(Unknown Source) at com.lhs.cil.core.LocalCommandAdapter.localExecute(Unknown Source) at com.lhs.cil.core.AggregatedServiceObjectImplProxy.execute(Unknown Source) at com.lhs.cil.services.ContractWrite.execute(Unknown Source) at com.lhs.ccb.sfw.application.ServiceObjectImpl.execute(Unknown Source) at com.lhs.cil.core.AggregatedServiceObjectImpl.execute(Unknown Source) at com.lhs.ccb.sfw.application.ServiceObjectImpl.executeLocaleI(Unknown Source) at com.lhs.cil.core.AggregatedServiceObjectImpl.executeLocaleI(Unknown Source) at com.lhs.ccb.soi.ServiceObjectIPOA._invoke(Unknown Source) at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:653) at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:205) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1700) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1558) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:940) at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:198) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:712) at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:469) at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1230) at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:490) at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:519) РЯа. 19, 2021 4:14:16 PM com.lhs.FrameworkExtension.bscs_core.d getErrorMessage WARNING: no localized text available for: ErrorCode : InvalidStateTransition BundleName: CommonDomain_ErrorDictionary Locale : en_US Reason : XMlResourceException: ResourceBundleManager: Can not find resource bundle 'CommonDomain_ErrorDictionary' РЯа. 19, 2021 4:14:16 PM com.lhs.FrameworkExtension.bscs_core.d getErrorMessage WARNING: no localized text available for: ErrorCode : InvalidStateTransition BundleName: CommonDomain_ErrorDictionary Locale : en_US Reason : XMlResourceException: ResourceBundleManager: Can not find resource bundle 'CommonDomain_ErrorDictionary' РЯа. 19, 2021 4:15:42 PM com.lhs.ccb.sfw.application.ServiceObjectImpl executeLocaleI SEVERE: ServiceObjectI.executeLocaleI CONTRACT.WRITE Error code: CommonDomain.InvalidStateTransition at com.lhs.CommonDomain.bscs_core.ae.a(Unknown Source) at com.lhs.Contract.bscs_core.services.ContractWrite.a(Unknown Source) at com.lhs.Contract.bscs_core.services.ContractWrite.execute(Unknown Source) at com.lhs.cil.core.LocalCommandAdapter.localExecute(Unknown Source) at com.lhs.cil.core.AggregatedServiceObjectImplProxy.execute(Unknown Source) at com.lhs.cil.services.ContractWrite.execute(Unknown Source) at com.lhs.ccb.sfw.application.ServiceObjectImpl.execute(Unknown Source) at com.lhs.cil.core.AggregatedServiceObjectImpl.execute(Unknown Source) at com.lhs.ccb.sfw.application.ServiceObjectImpl.executeLocaleI(Unknown Source) at com.lhs.cil.core.AggregatedServiceObjectImpl.executeLocaleI(Unknown Source) at com.lhs.ccb.soi.ServiceObjectIPOA._invoke(Unknown Source) at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:653) at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:205) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1700) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1558) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:940) at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:198) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:712) at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:469) at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1230) at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:490) at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:519) РЯа. 19, 2021 4:15:42 PM com.lhs.FrameworkExtension.bscs_core.d getErrorMessage WARNING: no localized text available for: ErrorCode : InvalidStateTransition BundleName: CommonDomain_ErrorDictionary Locale : en_US Reason : XMlResourceException: ResourceBundleManager: Can not find resource bundle 'CommonDomain_ErrorDictionary' РЯа. 19, 2021 4:15:42 PM com.lhs.FrameworkExtension.bscs_core.d getErrorMessage WARNING: no localized text available for: ErrorCode : InvalidStateTransition BundleName: CommonDomain_ErrorDictionary Locale : en_US Reason : XMlResourceException: ResourceBundleManager: Can not find resource bundle 'CommonDomain_ErrorDictionary' РЯа. 19, 2021 4:17:19 PM com.lhs.ccb.sfw.application.ServiceObjectImpl executeLocaleI SEVERE: ServiceObjectI.executeLocaleI CONTRACT.WRITE Error code: CommonDomain.InvalidStateTransition at com.lhs.CommonDomain.bscs_core.ae.a(Unknown Source) at com.lhs.Contract.bscs_core.services.ContractWrite.a(Unknown Source) at com.lhs.Contract.bscs_core.services.ContractWrite.execute(Unknown Source) at com.lhs.cil.core.LocalCommandAdapter.localExecute(Unknown Source) at com.lhs.cil.core.AggregatedServiceObjectImplProxy.execute(Unknown Source) at com.lhs.cil.services.ContractWrite.execute(Unknown Source) at com.lhs.ccb.sfw.application.ServiceObjectImpl.execute(Unknown Source) at com.lhs.cil.core.AggregatedServiceObjectImpl.execute(Unknown Source) at com.lhs.ccb.sfw.application.ServiceObjectImpl.executeLocaleI(Unknown Source) at com.lhs.cil.core.AggregatedServiceObjectImpl.executeLocaleI(Unknown Source) at com.lhs.ccb.soi.ServiceObjectIPOA._invoke(Unknown Source) at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:653) at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:205) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1700) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1558) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:940) at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:198) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:712) at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:469) at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1230) at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:490) at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:519) РЯа. 19, 2021 4:17:19 PM com.lhs.FrameworkExtension.bscs_core.d getErrorMessage WARNING: no localized text available for: ErrorCode : InvalidStateTransition BundleName: CommonDomain_ErrorDictionary Locale : en_US Reason : XMlResourceException: ResourceBundleManager: Can not find resource bundle 'CommonDomain_ErrorDictionary' РЯа. 19, 2021 4:17:19 PM com.lhs.FrameworkExtension.bscs_core.d getErrorMessage WARNING: no localized text available for: ErrorCode : InvalidStateTransition BundleName: CommonDomain_ErrorDictionary Locale : en_US Reason : XMlResourceException: ResourceBundleManager: Can not find resource bundle 'CommonDomain_ErrorDictionary' РЯа. 19, 2021 4:20:21 PM com.lhs.ccb.sfw.application.ServiceObjectImpl executeLocaleI SEVERE: ServiceObjectI.executeLocaleI CONTRACT.WRITE I need to create a script in which I will read this file, then wherever severe and warning is mentioned to take those lines and write them in two separate files which are file1 and file2. Appropriately and in a variable to return the path in which these files are located. How can it be done? **cat system.log filename='system.log' while read line: do grep "WARNING" report > Warning_system.log grep "SEVERE" report > Severe_system.log done < $filename echo $Warning_system.log echo $Severe_system.log** |
SMART LOG Guide Posted: 21 Apr 2021 10:31 AM PDT I have a dual boot linux(KDE 20 lts) and Windows 10 system. I have started getting frequent boot errors(A Quick message containing some I/O error, Unable to boot windows,linux and grub) in my startup that re-corrects itself after reboot. I did a short SMART test on my system disk (/dev/sda ). Kindly guide me on identifying and resolving it Here is the link to paste-bin (bootinfo by grub) **SMART REPORT(SHORT TEST)** ... smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.8.0-50-generic] (local build) Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: Hitachi/HGST Travelstar Z5K500 Device Model: HGST HTS545050A7E380 Serial Number: TM85014C0KBUSM LU WWN Device Id: 5 000cca 72fc7e6b8 Firmware Version: GG2OAC90 User Capacity: 500,107,862,016 bytes [500 GB] Sector Sizes: 512 bytes logical, 4096 bytes physical Rotation Rate: 5400 rpm Form Factor: 2.5 inches Device is: In smartctl database [for details use: -P show] ATA Version is: ATA8-ACS T13/1699-D revision 6 SATA Version is: SATA 2.6, 3.0 Gb/s Local Time is: Wed Apr 21 13:58:37 2021 PKT SMART support is: Available - device has SMART capability. SMART support is: Enabled === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED General SMART Values: Offline data collection status: (0x00) Offline data collection activity was never started. Auto Offline Data Collection: Disabled. Self-test execution status: ( 0) The previous self-test routine completed without error or no self-test has ever been run. Total time to complete Offline data collection: ( 45) seconds. Offline data collection capabilities: (0x5b) SMART execute Offline immediate. Auto Offline data collection on/off support. Suspend Offline collection upon new command. Offline surface scan supported. Self-test supported. No Conveyance Self-test supported. Selective Self-test supported. SMART capabilities: (0x0003) Saves SMART data before entering power-saving mode. Supports SMART auto save timer. Error logging capability: (0x01) Error logging supported. General Purpose Logging supported. Short self-test routine recommended polling time: ( 2) minutes. Extended self-test routine recommended polling time: ( 113) minutes. SCT capabilities: (0x003d) SCT Status supported. SCT Error Recovery Control supported. SCT Feature Control supported. SCT Data Table supported. SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000b 100 100 062 Pre-fail Always - 0 2 Throughput_Performance 0x0005 100 100 040 Pre-fail Offline - 0 3 Spin_Up_Time 0x0007 204 204 033 Pre-fail Always - 1 4 Start_Stop_Count 0x0012 096 096 000 Old_age Always - 6704 5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0 7 Seek_Error_Rate 0x000b 100 100 067 Pre-fail Always - 0 8 Seek_Time_Performance 0x0005 100 100 040 Pre-fail Offline - 0 9 Power_On_Hours 0x0012 084 084 000 Old_age Always - 7267 10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail Always - 0 12 Power_Cycle_Count 0x0032 097 097 000 Old_age Always - 5151 191 G-Sense_Error_Rate 0x000a 100 100 000 Old_age Always - 0 192 Power-Off_Retract_Count 0x0032 099 099 000 Old_age Always - 348 193 Load_Cycle_Count 0x0012 083 083 000 Old_age Always - 171547 194 Temperature_Celsius 0x0002 166 166 000 Old_age Always - 36 (Min/Max 9/49) 196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0 197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x000a 200 200 000 Old_age Always - 32 223 Load_Retry_Count 0x000a 100 100 000 Old_age Always - 0 SMART Error Log Version: 1 ATA Error Count: 32 (device log contains only the most recent five errors) CR = Command Register [HEX] FR = Features Register [HEX] SC = Sector Count Register [HEX] SN = Sector Number Register [HEX] CL = Cylinder Low Register [HEX] CH = Cylinder High Register [HEX] DH = Device/Head Register [HEX] DC = Device Command Register [HEX] ER = Error register [HEX] ST = Status register [HEX] Powered_Up_Time is measured from power on, and printed as DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes, SS=sec, and sss=millisec. It "wraps" after 49.710 days. Error 32 occurred at disk power-on lifetime: 7265 hours (302 days + 17 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 84 51 81 37 b4 60 00 Error: ICRC, ABRT at LBA = 0x0060b437 = 6337591 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- 60 c0 58 f8 b3 60 40 00 00:01:15.846 READ FPDMA QUEUED 60 c0 50 b8 a1 60 40 00 00:01:15.831 READ FPDMA QUEUED 60 48 48 b0 cd 60 40 00 00:01:15.831 READ FPDMA QUEUED 60 08 40 e0 0c 14 40 00 00:01:15.816 READ FPDMA QUEUED 60 48 38 40 8d 60 40 00 00:01:15.816 READ FPDMA QUEUED Error 31 occurred at disk power-on lifetime: 7265 hours (302 days + 17 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 84 51 01 61 33 89 07 Error: ICRC, ABRT at LBA = 0x07893361 = 126432097 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- 60 02 90 60 33 89 40 00 01:06:25.973 READ FPDMA QUEUED 60 0b 88 d0 ff d6 40 00 01:06:25.959 READ FPDMA QUEUED 60 00 80 d0 fe d6 40 00 01:06:25.959 READ FPDMA QUEUED 60 9f 78 a8 53 e4 40 00 01:06:25.936 READ FPDMA QUEUED 60 c2 70 b0 fb d6 40 00 01:06:25.929 READ FPDMA QUEUED Error 30 occurred at disk power-on lifetime: 7264 hours (302 days + 16 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 84 51 11 7f da df 02 Error: ICRC, ABRT at LBA = 0x02dfda7f = 48224895 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- 60 50 98 40 da df 40 00 00:01:48.485 READ FPDMA QUEUED 60 40 90 ca 4c 20 40 00 00:01:48.459 READ FPDMA QUEUED 60 58 88 e8 d9 df 40 00 00:01:48.449 READ FPDMA QUEUED 60 40 80 ea 0d 27 40 00 00:01:48.448 READ FPDMA QUEUED 60 58 78 90 d9 df 40 00 00:01:48.441 READ FPDMA QUEUED Error 29 occurred at disk power-on lifetime: 7264 hours (302 days + 16 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 84 51 d9 27 25 10 06 Error: ICRC, ABRT at LBA = 0x06102527 = 101721383 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- 60 08 d0 38 0b 11 40 00 00:06:28.814 READ FPDMA QUEUED 61 08 28 70 19 10 40 00 00:06:28.808 WRITE FPDMA QUEUED 61 08 20 60 19 10 40 00 00:06:28.808 WRITE FPDMA QUEUED 61 08 18 78 0a 10 40 00 00:06:28.808 WRITE FPDMA QUEUED 61 08 10 20 0a 10 40 00 00:06:28.808 WRITE FPDMA QUEUED Error 28 occurred at disk power-on lifetime: 7262 hours (302 days + 14 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 84 51 04 84 ec 96 06 Error: ICRC, ABRT at LBA = 0x0696ec84 = 110554244 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- 61 20 38 68 ec 96 40 00 00:17:45.395 WRITE FPDMA QUEUED 60 08 30 50 5e a8 40 00 00:17:39.523 READ FPDMA QUEUED ea 00 00 00 00 00 a0 00 00:17:34.424 FLUSH CACHE EXT 61 08 a8 60 ec 96 40 00 00:17:34.424 WRITE FPDMA QUEUED ea 00 00 00 00 00 a0 00 00:17:34.389 FLUSH CACHE EXT SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Short offline Completed without error 00% 7267 - SMART Selective self-test log data structure revision number 1 SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS 1 0 0 Not_testing 2 0 0 Not_testing 3 0 0 Not_testing 4 0 0 Not_testing 5 0 0 Not_testing Selective self-test flags (0x0): After scanning selected spans, do NOT read-scan remainder of disk. If Selective self-test is pending on power-up, resume after 0 minute delay. ... UPDATE I did not find any bad sectors on any of my drive. Discovered some file corruption in Windows 10 that was corrected but still the boot fails sometime. |
For loop - Bash isn't reading my variables Posted: 21 Apr 2021 09:53 AM PDT I am trying to make a little bash script, that calls a command on each of my files in have in a file, found with the find command. I want to be able to keep track of where the script stopped (it tends to crash) so i can take back from there. I managed to read my file, get the lines,... But currently i'm stuck at the for loop. I want to do a C style for loop, starting at the the last line i stopped at, increment by one, and do it as long as i'm smaller than the number of lines. I got this : #!/bin/bash LINES=$(wc -l < file.txt) LASTLINE=$(grep -P '### Stop marker ###' file.txt | wc -l) STARTFROM=$(($LINES - $LASTLINE)) for ((i = STARTFROM; i < LINES; i++)); do echo "we are processing file number $i" file=sed -n $i'p' file.txt ocrmypdf [some stuff] -input $file done Here is an excerpt of what my file.txt looks like inside ./input_folder/hard_blurry.pdf ./input_folder/l_ordre_malte.pdf ### Stop marker ### ./input_folder/single_page.pdf ./input_folder/very_hard.pdf When i run this i get... nothing. Bash doesn't enter the loop at all. I tried setting ints directly, and it worked, which tells me that the vars are bein read as string. I tried all these ways to write my var : for ((i = STARTFROM; i < LINES; i++)); for ((i = $((STARTFROM)); i < $((LINES)); i++)); for ((i = $(echo STARTFROM); i < $(echo LINES); i++)); and nothing works. I'm suprised that no erros are thrown as well. My Os is ubuntu 20.0.4 Its content is the path to the files i want to work with. Any ideas ? Thanks |
Sorting "human readable" file sizes Posted: 21 Apr 2021 09:15 AM PDT How do we sort by using any Linux core utility (scripts) numerical value of output of du such as: 136K foo.bar/feed 140K foo.bar/buy-electronic-components 32K foo.bar/cdn-cgi 88K foo.bar/what-is-ground 344K foo.bar/ldr-circuit-diagram 64K foo.bar/what-is-an-led 100K foo.bar/types-of-resistors 516K foo.bar/wp-includes 60K foo.bar/author 56K foo.bar/diy-pcb 112K foo.bar/how-to-learn-electronics 376K foo.bar/category 76K foo.bar/electronic-schematics 84K foo.bar/how-to-bar 88K foo.bar/bar-tools 20K foo.bar/comments 88K foo.bar/right-bar-temperature 48K foo.bar/contact 44K foo.bar/products 80K foo.bar/types-of-bar 3M foo.bar/ 3M total if in descending way to be: 3M foo.bar/ 3M total 516K foo.bar/wp-includes 376K foo.bar/category 344K foo.bar/ldr-circuit-diagram 140K foo.bar/buy-electronic-components ... Thank you much |
Unix/Linux running complex commands over ssh Posted: 21 Apr 2021 09:19 AM PDT I'm attempting to ssh onto a server then find todays files then grep within those files. But I'm getting an error, find: missing argument to `-exec' . What am I missing here? ssh server.name find /dir1/subdir/filelist* -maxdepth 1 type f -mtime 0 -exec grep 'pattern' {} \; |
Share WiFi Connection From Kali Linux To Huawei Router Posted: 21 Apr 2021 09:58 AM PDT I have a Kali Linux machine that is connected to a WiFi connection (pocket WiFi). I would like to feed that WiFi Connection to a new Huawei router I have that I would like to also set up with a static IP address later. Kindly help with how I can share the connection. I found a process here (Share Internet Connection from computer to new router) but it was for a Fedora distribution and not Kali Linux. I would like to get the Kali Linux process of doing this. |
How to allow non-roots to connect to WiFi? Posted: 21 Apr 2021 08:45 AM PDT /etc/os-release says Debian GNU/Linux 9 (stretch) /proc/version says Linux version 4.4.132+ (jenkins@fdc-06) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) ) #1 SMP sudo /sbin/wpa_supplicant -v prints wpa_supplicant v2.4 I'm setting thses permissions in /etc/wpa_supplicant/wpa_supplicant.conf config file. Tried both ways, the documented one: ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=linaro and another one I've found after reading source code of that supplicant: ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=linaro Neither of them works: $ ls -la /var/run/wpa_supplicant ls: cannot open directory '/var/run/wpa_supplicant': Permission denied $ sudo ls -la /var/run/wpa_supplicant srwxrwx--- 1 root root 0 Mar 22 19:24 wlan0 Both owner and group is root despite what's written in the config. Worked OK just a few months ago, with Linux 4.4.71+. How to set the permissions on that UNIX socket? P.S. Some context: this is embedded system running on ARM SoC. I'm consuming that control interface programmatically, i.e. I need my software, running under normal user account, control Wi-Fi: connect, disconnect, set passwords, etc. There's no Linux desktop nor X-windows running. Update: as advised in the comments, adding more context. This is custom made embedded device based on RK3288, running Linux kernel, minimal set of systemd services (wpa_supplicant is among them), and a single application I've developed. Users interact with my app using a touchscreen, and through the network (but first they need to connect somehow). There's no X window or Wayland, no desktop, no mouse or keyboard. |
Redirect web server from port 5000 to port 80 on localhost (Fedora, firewall-cmd) Posted: 21 Apr 2021 10:06 AM PDT On Fedora 24, a web server (Node.js) is running (standalone, no apache/nginx) on port 5000. http://localhost:5000 works How to make it accessible on port 80? Tried this systemctl restart firewalld firewall-cmd --add-service=http --permanent firewall-cmd --add-masquerade --permanent firewall-cmd --add-forward-port=port=80:proto=tcp:toport=5000 firewall-cmd --list-all FedoraWorkstation (active) target: default icmp-block-inversion: no interfaces: wlp3s0 sources: services: mdns ssh dhcpv6-client samba-client https http ports: 1025-65535/tcp 1025-65535/udp protocols: masquerade: yes forward-ports: port=80:proto=tcp:toport=5000:toaddr= source-ports: icmp-blocks: rich rules: Additional info Tried all the above with --zone=external too Running node as root on port 80 works. Note, there's no IPv4: netstat -tpln Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd tcp 0 0 0.0.0.0:4433 0.0.0.0:* LISTEN 3977/deluge-gtk tcp 0 0 0.0.0.0:51157 0.0.0.0:* LISTEN 3977/deluge-gtk tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 900/postgres tcp 0 0 0.0.0.0:17500 0.0.0.0:* LISTEN 3203/dropbox tcp 0 0 127.0.0.1:17600 0.0.0.0:* LISTEN 3203/dropbox tcp 0 0 127.0.0.1:17603 0.0.0.0:* LISTEN 3203/dropbox tcp6 0 0 :::111 :::* LISTEN 1/systemd tcp6 0 0 :::4433 :::* LISTEN 3977/deluge-gtk tcp6 0 0 :::51157 :::* LISTEN 3977/deluge-gtk tcp6 0 0 :::5432 :::* LISTEN 900/postgres tcp6 0 0 :::17500 :::* LISTEN 3203/dropbox tcp6 0 0 :::34017 :::* LISTEN 10532/code tcp6 0 0 :::5858 :::* LISTEN 30394/node tcp6 0 0 :::5000 :::* LISTEN 30394/node |
What is the difference between "dnf history rollback" and "dnf history undo"? Posted: 21 Apr 2021 09:47 AM PDT Let's read the official documentation: dnf history rollback <transaction-spec> Undo all transactions performed after the specified transaction. If it is not possible to undo any transaction due to the current state of RPMDB, do not undo any transaction. Emphasis is mine. So this command refers to the undo command. Okay, let's read the documentation concerning undo: dnf history undo <transaction-spec> Perform the opposite operation to all operations performed in the specified transaction. If it is not possible to undo any operation due to the current state of RPMDB, do not undo any operation. It sounds that those two commands do the same things with the exception that the former can undo several transactions, and the later just one. Is this understanding correct? (I would appreciate answers from first-hand experience, not from the point of view how you interpret the manual, I'm interested in facts, not guesses.) Context: I need to write a script that runs dnf upgrade -y and then runs some tests and then reverse the dnf changes if the tests fail. I'm looking for the best way of achieving this. |
Cannot connect to xrdp on Fedora 25 from windows Posted: 21 Apr 2021 09:03 AM PDT With a basic install, per: dnf install -y xrdp openssl req -x509 -newkey rsa:2048 -nodes -keyout key.pem -out cert.pem -days 365 mv cert.pem /etc/xrdp/ mv key.pem /etc/xrdp/ systemctl start xrdp systemctl status xrdp systemctl enable xrdp firewall-cmd --add-port=3389/tcp --permanent firewall-cmd --reload I get the following when trying to connect: ... VNC error - problem connecting some problem The content of /var/log/xrdp.log is: [20170216-18:44:37] [INFO ] A connection received from: 192.168.76.11 port 63615 [20170216-18:44:37] [INFO ] A connection received from: 192.168.76.11 port 63615 [20170216-18:44:37] [INFO ] An established connection closed to endpoint: 192.168.76.11:63615 - socket: 8 [20170216-18:44:37] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7 [20170216-18:44:37] [CORE ] WARNING: Invalid x.509 certificate path defined, default path will be used: /etc/xrdp/cert.pem [20170216-18:44:37] [WARN ] Invalid X.509 certificate path defined, default path will be used: /etc/xrdp/key.pem [20170216-18:44:37] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 8 [20170216-18:44:37] [INFO ] A connection received from: 192.168.76.11 port 63616 [20170216-18:44:37] [ERROR] Listening socket is in wrong state we terminate listener [20170216-18:44:37] [INFO ] An established connection closed to endpoint: 192.168.76.11:63616 - socket: 8 [20170216-18:44:37] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7 [20170216-18:44:37] [CORE ] WARNING: Invalid x.509 certificate path defined, default path will be used: /etc/xrdp/cert.pem [20170216-18:44:37] [WARN ] Invalid X.509 certificate path defined, default path will be used: /etc/xrdp/key.pem [20170216-18:44:37] [DEBUG] xrdp_0000105d_wm_login_mode_event_00000001 [20170216-18:44:37] [WARN ] local keymap file for 0x0409 found and dosen't match built in keymap, using local keymap file [20170216-18:44:37] [DEBUG] returnvalue from xrdp_mm_connect 0 [20170216-18:44:41] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12 [20170216-18:44:42] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12 [20170216-18:44:43] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12 [20170216-18:44:44] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12 [20170216-18:44:45] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12 [20170216-18:44:46] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12 [20170216-18:44:47] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12 [20170216-18:44:48] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12 [20170216-18:44:49] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12 [20170216-18:44:50] [DEBUG] VNC Error after security negotiation [20170216-18:44:50] [DEBUG] VNC error before sending share flag [20170216-18:44:50] [DEBUG] VNC error before receiving server init [20170216-18:44:50] [DEBUG] VNC error before receiving pixel format [20170216-18:44:50] [DEBUG] VNC error before receiving name length [20170216-18:44:50] [DEBUG] VNC error before receiving name [20170216-18:44:50] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12 [20170216-18:44:50] [DEBUG] xrdp_mm_module_cleanup [20170216-18:44:50] [DEBUG] VNC mod_exit [20170216-18:44:50] [INFO ] An established connection closed to endpoint: 127.0.0.1:3350 - socket: 11 [20170216-18:46:09] [INFO ] An established connection closed to endpoint: 192.168.76.11:63616 - socket: 8 [20170216-18:46:09] [DEBUG] xrdp_mm_module_cleanup [20170216-18:46:09] [ERROR] Listening socket is in wrong state we terminate listener [20170216-18:46:09] [INFO ] A connection received from: 192.168.76.11 port 63630 [20170216-18:46:09] [INFO ] An established connection closed to endpoint: 192.168.76.11:63630 - socket: 8 [20170216-18:46:09] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7 [20170216-18:46:09] [CORE ] WARNING: Invalid x.509 certificate path defined, default path will be used: /etc/xrdp/cert.pem [20170216-18:46:09] [WARN ] Invalid X.509 certificate path defined, default path will be used: /etc/xrdp/key.pem [20170216-18:46:11] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 8 [20170216-18:46:11] [ERROR] Listening socket is in wrong state we terminate listener The content of /var/log/xrdp-sesman.log is: [20170216-18:44:28] [WARN ] [init:46] libscp initialized [20170216-18:44:28] [CORE ] starting sesman with pid 4144 [20170216-18:44:28] [INFO ] listening... [20170216-18:44:37] [INFO ] A connection received from: 127.0.0.1 port 44184 [20170216-18:44:38] [INFO ] scp thread on sck 8 started successfully [20170216-18:44:38] [INFO ] ++ created session (access granted): username root, ip 192.168.76.11:63616 - socket: 8 [20170216-18:44:38] [INFO ] starting Xvnc session... [20170216-18:44:38] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 9 [20170216-18:44:38] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 9 [20170216-18:44:38] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 9 [20170216-18:44:38] [INFO ] An established connection closed to endpoint: 127.0.0.1:44184 - socket: 8 [20170216-18:44:38] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 7 [20170216-18:44:38] [INFO ] An established connection closed to endpoint: 127.0.0.1:44184 - socket: 8 [20170216-18:44:38] [INFO ] Xvnc :10 -geometry 1904x1003 -depth 24 -rfbauth /root/.vnc/sesman_root_passwd -bs -nolisten tcp -localhost -dpi 96 [20170216-18:44:38] [INFO ] starting xrdp-sessvc - xpid=4196 - wmpid=4195 [20170216-18:44:38] [INFO ] ++ terminated session: username root, display :10.0, session_pid 4194, ip 192.168.76.11:63616 - socket: 8 |
How does awk '!a[$0]++' work? Posted: 21 Apr 2021 08:30 AM PDT This one-liner removes duplicate lines from text input without pre-sorting. For example: $ cat >f q w e w r $ awk '!a[$0]++' <f q w e r $ The original code I have found on the internets read: awk '!_[$0]++' This was even more perplexing to me as I took _ to have a special meaning in awk, like in Perl, but it turned out to be just a name of an array. Now, I understand the logic behind the one-liner: each input line is used as a key in a hash array, thus, upon completion, the hash contains unique lines in the order of arrival. What I would like to learn is how exactly this notation is interpreted by awk. E.g. what the bang sign (! ) means and the other elements of this code snippet. How does it work? |
64-bit kernel, but all 32-bit ELF executable running processes, how is this? Posted: 21 Apr 2021 09:07 AM PDT The output from uname : root@debian:~ # uname -a Linux 5asnb 2.6.32-5-amd64 #1 SMP Mon Jun 13 05:49:32 UTC 2011 x86_64 GNU/Linux However the /sbin/init executable shows up as 32-bit: root@debian:~ # file /sbin/init /sbin/init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped Other aspects of the system seem to contradict things as well: root@debian:~ # echo $HOSTTYPE i486 root@debian:~ # getconf LONG_BIT 32 |
Recursively delete all files with a given extension [duplicate] Posted: 21 Apr 2021 08:32 AM PDT I want to delete all *.o files in a directory and its sub-directories. However, I get an error: sashoalm@aspire:~/.Workspace.OLD$ rm -r *.o rm: cannot remove `*.o': No such file or directory On the other hand, rm *.o works, but it's not recursive. |
How can I recall a numbered history command for edit? Posted: 21 Apr 2021 09:13 AM PDT I frequently search for changes with history | grep 'string' I get a list of commands in my history, along with the history line number), e.g. history | grep 'git' 755 git status 1535 git push origin master 1570 git merge origin/one-146 1667 git reset --hard origin/master I can now recall and execute a command in one go with !nnn , for example: !755 git status # On branch master nothing to commit, working directory clean My question is: How can I recall a numbered history command and stay on the command line for editing and not execute it right away 'as is', the way that ! does, so that I can change a couple of things before pressing the return key? |
Countdown timer in panel Posted: 21 Apr 2021 10:18 AM PDT Is there some widget that I can put in the panel of my Xubuntu system that will show me a countdown of time? I've tried pystopwatch , but although it minimizes, it doesn't show me how long I have left. I've also tried xfce timer-plugin , but it doesn't really minimize. I just need something that will show how much time left I have for a certain task, as inconspicuously as possible. I'm running Xubuntu 12.04. |
Is there a robust command line tool for processing csv files? Posted: 21 Apr 2021 10:37 AM PDT I work with CSV files and sometimes need to quickly check the contents of a row or column from the command line. In many cases cut , head , tail , and friends will do the job; however, cut cannot easily deal with situations such as "this, is the first entry", this is the second, 34.5 Here, the first comma is part of the first field, but cut -d, -f1 disagrees. Before I write a solution myself, I was wondering if anyone knew of a good tool that already exists for this job. It would have to, at the very least, be able to handle the example above and return a column from a CSV formatted file. Other desirable features include the ability to select columns based on the column names given in the first row, support for other quoting styles and support for tab-separated files. If you don't know of such a tool but have suggestions regarding implementing such a program in Bash, Perl, or Python, or other common scripting languages, I wouldn't mind such suggestions. |
No comments:
Post a Comment