How to know the V4L2 camera's exposure time in ms? Posted: 25 Nov 2021 06:38 PM PST with v4l2-ctl , one can know camera-parameters with following: $ v4l2-ctl -d2 --list-ctrls brightness 0x00980900 (int) : min=0 max=255 step=1 default=128 value=128 contrast 0x00980901 (int) : min=0 max=31 step=1 default=16 value=16 gamma 0x00980910 (int) : min=0 max=127 step=1 default=64 value=64 gain 0x00980913 (int) : min=1 max=33 step=1 default=0 value=33 power_line_frequency 0x00980918 (menu) : min=0 max=2 default=2 value=2 (60 Hz) sharpness 0x0098091b (int) : min=0 max=15 step=1 default=1 value=1 exposure_auto 0x009a0901 (menu) : min=0 max=3 default=3 value=1 (Manual Mode) exposure_absolute 0x009a0902 (int) : min=1 max=1856 step=1 default=2500 value=2500 I understand last one exposure_absolute is the exposure, but I'm not sure whether this is always in ms. Or some other unit (perhaps specific for each cam) that has to be converted to ms? |
Systemctl - python script sometimes works/sometimes doesnt - script runs perfectly outside of systemctl Posted: 25 Nov 2021 06:29 PM PST As title said, It's sometimes running, for like a heartbeat, then exits again, I can run the code python3 p-update.py and it runs good. So unsure where I'm going wrong. root@VAULTWARDEN-01:/scripts/docker-scripts/portainer# systemctl status port_update.service ● port_update.service - port_update service Loaded: loaded (/scripts/docker-scripts/portainer/port_update.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Fri 2021-11-26 13:25:56 AEDT; 4s ago Process: 2190 ExecStart=/usr/bin/python3 /scripts/docker-scripts/portainer/p-update.py (code=exited, status=2) Main PID: 2190 (code=exited, status=2) CPU: 12ms root@VAULTWARDEN-01:/scripts/docker-scripts/portainer# systemctl status port_update.service ● port_update.service - port_update service Loaded: loaded (/scripts/docker-scripts/portainer/port_update.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2021-11-26 13:26:01 AEDT; 1ms ago Main PID: 2218 (python3) Tasks: 1 (limit: 4679) Memory: 152.0K CPU: 266us CGroup: /system.slice/port_update.service └─2218 /usr/bin/python3 /scripts/docker-scripts/portainer/p-update.py Nov 26 13:26:01 VAULTWARDEN-01 systemd[1]: Started port_update service. root@VAULTWARDEN-01:/scripts/docker-scripts/portainer# systemctl status port_update.service ● port_update.service - port_update service Loaded: loaded (/scripts/docker-scripts/portainer/port_update.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Fri 2021-11-26 13:26:01 AEDT; 1s ago Process: 2218 ExecStart=/usr/bin/python3 /scripts/docker-scripts/portainer/p-update.py (code=exited, status=2) Main PID: 2218 (code=exited, status=2) CPU: 12ms [Unit] Description=port_update service After=network.target [Service] Type=simple ExecStart=/usr/bin/python3 /scripts/docker-scripts/portainer/p-update.py Restart=always RestartSec=5 TimeoutSec=60 RuntimeMaxSec=infinity PIDFile=/tmp/nome_script.pid [Install] WantedBy=multi-user.target Let me know your thoughts, I know my way around linux, but haven't had much with custom systemctl. Any other methods are appreciated too. |
SSH X11Forwarding: apps display on the server instead of the client Posted: 25 Nov 2021 06:12 PM PST After I login to the server with ssh -X user@192.168.1.100 and launch e.g. brave , Brave is displayed on the server, not the client. Same is for Thunar. However, if I do xfce4-settings-manager , the xfce4 settings manager is displayed on the client. Then again, if I try to edit the Panel settings, the editing (the interface) shows on the server's screen, not the client's. Relevant sshd_config settings on the server: AllowAgentForwarding yes X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost no On the client, ssh_config has: ForwardAgent yes ForwardX11 yes ForwardX11Trusted yes Both client and server are Arch machines. Server runs with Xfce4 WM, client i3-gaps and Openbox. |
Where can i configure the following focus policy: Posted: 25 Nov 2021 06:18 PM PST While i have a menu open, i prefer: - No timeout
- No tethering of the mouse
- No closing of the menu due to wandering far away from it
- No limitation on interacting with any other elements (that don't happen to be entirely hidden by the menu)
- Focus follow mouse policy remain in force
- All parts of the menu should be interpreted as area currently belonging to the window showing the menu
- Wandering off and on the menu might change focus but shouldn't close the menu
- Hovering or typing at other windows should:
- Not affect and not close the menu
- Have the usual effect whether a menu is open or not
- A Click or drag elsewhere should:
- Close the menu
- Have the same effect whether a menu was open or not
What window managers, compositors, or desktop environs allow such behavior to be configured? |
Why Apache 2.4.41 installed on my system Posted: 25 Nov 2021 05:42 PM PST Three days ago I noticed that my localhost on port 80 was occupied by an Apache server. I uninstalled it and started to find out if it was a sign of some kind of malware. I found out from the logs: I definitely didn't install it myself, because there was no apt-get install apache2 command or anything similar in bash As I found out from the system logs, this server was installed along with the packages that are included in the git dependencies. That said, git was already previously installed on the system. That said, apache2 (I checked via apt-cache rdepends) was not a dependency of any other package. In the interval that apache2 with dependencies was installed, I was installing docker using the tutorial from the official site. After installing apache2 directly, I started the docker installation. sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release sudo apt-get install docker-ce=5:20.10.9~3-0~ubuntu-focal docker-ce-cli=5:20.10.9~3-0~ubuntu-focal containerd.io apache2 dependencies in "secret" installing end of "secret" installation and beginning of docker installing |
RHEL8 - cannot set the default session for root; config file resets after reboot Posted: 25 Nov 2021 05:24 PM PST On my RHEL8.5 server I am trying to set the default session for root from gnome-classic to gnome . Following Redhat's documentation (this guide is for RHEL7 but I haven't found an equivalent for RHEL8), I've edited /var/lib/AccountsService/users/root , from: [User] Session=gnome-classic to: [User] Session=gnome However this seems to have no effect on the session I'm getting. After a reboot, not only is the gnome-classic session still used, /var/lib/AccountsService/users/root has also been automatically reset to Session=gnome-classic which is weird and unexpected. What to do? Things I've tried and did nothing: Setting the default session for all users, following the guide here. Things I've tried and did something: I disabled GDM autologin by editing /etc/gdm/custom.conf and rebooted, then logged in using SSH without logging in graphically. Curiously this time /var/lib/AccountsService/users/root has not been reset automatically. Therefore I suspected GDM has something to do with it, but I haven't yet found anything relevant in my research. Environment # uname -msr Linux 4.18.0-348.2.1.el8_5.x86_64 x86_64 # gdm --version GDM 40.0 # gnome-shell --version GNOME Shell 3.32.2 |
Laptop shutsdown after wakeup from sleep Posted: 25 Nov 2021 04:52 PM PST I'm using Acer Aspire V5-131 running Debian 11 with KDE. Sometimes after waking up from sleep it shows blank screen and shutsdown immediately. How I can get logs and find out the source of problem? - I used this laptop before on Ubuntu and had same problem, but on KDE neon all was alright.
|
How to run all command line arguments via another shell? Posted: 25 Nov 2021 04:28 PM PST I have a script tempenv which I'd like to use as follows: $ tempenv ls -l tempenv looks like this: #!/bin/bash setarch ... /bin/bash -c $@ However, it doesn't work as I intend. Instead, it only runs the first arg, ignoring anything else. That is tempenv ls -l runs as if tempenv ls . |
gnuplot doesn't show plotting window on Ubuntu Posted: 25 Nov 2021 03:12 PM PST I was using gnuplot in Ubuntu with wxt terminal, and when I type in plot sin(x) , I get an error message: Unable to init server: Could not connect: Connection refused 23:00:40: Error: Unable to initialize GTK+, is DISPLAY set properly? Failed to initialize wxWidgets. |
How to make mksquashfs with parameters Posted: 25 Nov 2021 01:49 PM PST I have read Squashfs filesystem , when I look on this file with binwalk or with file I saw: Squashfs filesystem, little endian, version 4.0, compression:xz, size: 1233455 bytes, 112 inodes, blocksize: 333445 bytes, created: 2019-01-11 09:09:09 I opened this file system with unsquashfs and modify it, and want to repack again with the same arguments (blocksize+ date-created+compression + little endian + version + inodes) The problem is, that I saw the tool that create Squashfs is: mksquashfs and I can't use those arguments with this tool. How can I create Squashfs with those arguments? Or maybe is there another easy way to edit files and add file to Squashfs and save on those arguments? |
How to grep full words between spaces Posted: 25 Nov 2021 02:15 PM PST For example, I have a string like this: 1341 5415 fdad . Command grep -E "(^|\s)[1-9]{1,5}($|\s)" -o will give only 1341 , but I want to get 1341 and 5415 . How can I do this? |
rsync files between two remotes, with only access from the "intermediate" Posted: 25 Nov 2021 05:26 PM PST I have 3 machines, M1 (remote), M2 (at home), M3 (at home, behind the same router). The possible ssh connections (Client->Server) are: M3->M1 (only via VPN), M3->M2. I use ssh key pairs in both cases. - M3 has no SSH server, so M1->M3 and M2->M3 are not possible.
- I cannot use the VPN in M2, so M2->M1 is not possible.
- I don't know if M1->M2 is possible.
I mean to rsync user1@M1 ->user1@M2 (i.e., user1@M1 as the source and user1@M2 as the target) and viceversa. Are they possible? Only one of them? How? For that to be possible, is it mandatory to have M1->M2 access? If so, how can I achieve this? I seem to be close to it. Trying to rsync M1->M2, I executed in user2@M3 (there is no user1@M3 ): $ ssh -R localhost:50000:<M2 ip>:22 <M1 ip> 'rsync -e "ssh -p 50000" --perms -vur --dry-run <M1 dir> localhost:<M2 dir>' Enter passphrase for key '<user2 $HOME>/.ssh/id_rsa': Connection closed by <M1 ip> port 22 Note that it is the agent in M3 that is asking for the key pair password (since user2 only exists in M3 ) and I have entered it correctly. Trying to rsync M2->M1, I executed in user2@M3 : $ ssh -R localhost:50000:<M1 ip>:22 <M2 ip> 'rsync -e "ssh -p 50000" --perms -vur --dry-run <M2 dir> localhost:<M1 dir>' Enter passphrase for key '<user2 $HOME>/.ssh/id_rsa': <user2>@<M2 ip>'s password: Permission denied, please try again. ... Note that user2 does not exist in M2, so that would never succeed. I have to find the correct way of passing user1. For this... Trying to rsync M2->M1, I executed in user2@M3 adding user1 : $ ssh -R localhost:50000:<M1 ip>:22 <user1>@<M2 ip> 'rsync -e "ssh -p 50000" --perms -vur --dry-run <M2 dir> localhost:<M1 dir>' Host key verification failed. rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3] Related: - How to rsync files between two remotes?
- How to rsync files between two remote servers?
- Trying to run rsync between two remote servers via reverse port forwarding with ssh key
- How to rsync files between two remotes with an explicit port and different usernames?
- Aws ec2 - How to rsync files between two remotes?
- https://serverfault.com/questions/411552/rsync-remote-to-remote
- https://serverfault.com/questions/249421/rsync-from-one-remote-to-another
|
iptables forward traffic between three interfaces Posted: 25 Nov 2021 01:35 PM PST I'm trying to understand what is doing wrong (i'm newbie on iptables) with my iptables configuration. I'm having 3 interfaces running in the same machine and the connections was established in this secuence: Server: tun0: OpenVPN Server established. tun1: Openconnect established. ppp0: Openfortivpn established. Client: OpenVPN established to Openvpn on server (tun0). I want to: All packages on my client to destiny 10.176.86.54 goes from tun0 to tun1. All my packages to destiny 100.126.20.133 goes from tun0 to ppp0. So i did this configuration: sudo iptables -A FORWARD -i tun0 -o ppp0 -d 100.126.20.133 -j ACCEPT sudo iptables -A FORWARD -i ppp0 -o tun0 -m state --state ESTABLISHED,RELATED -j ACCEPT sudo iptables -A FORWARD -i tun0 -o tun1 -d 10.176.86.54 -j ACCEPT sudo iptables -A FORWARD -i tun1 -o tun0 -m state --state ESTABLISHED,RELATED -j ACCEPT sudo iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE After all VPNs stablished this is my netstat -rn Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 tun1 10.0.0.0 10.111.242.83 255.0.0.0 UG 0 0 0 ppp0 10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0 10.8.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0 10.206.145.0 10.111.242.83 255.255.255.128 UG 0 0 0 ppp0 13.80.125.22 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0 13.91.91.243 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0 40.81.156.154 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0 40.90.218.198 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0 52.174.56.180 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0 52.183.75.62 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0 52.184.165.82 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0 52.238.78.88 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0 52.238.119.141 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0 52.244.160.207 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0 100.70.132.228 10.111.242.83 255.255.255.255 UGH 0 0 0 ppp0 100.70.133.194 10.111.242.83 255.255.255.255 UGH 0 0 0 ppp0 100.123.0.0 10.111.242.83 255.255.0.0 UG 0 0 0 ppp0 100.125.16.0 10.111.242.83 255.255.255.0 UG 0 0 0 ppp0 100.126.0.0 10.111.242.83 255.255.0.0 UG 0 0 0 ppp0 100.127.4.0 10.111.242.83 255.255.255.0 UG 0 0 0 ppp0 104.42.230.91 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0 128.10.0.0 10.111.242.83 255.255.0.0 UG 0 0 0 ppp0 128.14.1.0 10.111.242.83 255.255.255.0 UG 0 0 0 ppp0 131.253.33.215 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0 132.147.0.0 10.111.242.83 255.255.0.0 UG 0 0 0 ppp0 135.244.0.0 0.0.0.0 255.255.240.0 U 0 0 0 tun1 135.245.52.100 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0 172.16.0.0 10.111.242.83 255.240.0.0 UG 0 0 0 ppp0 190.144.144.252 10.111.242.83 255.255.255.255 UGH 0 0 0 ppp0 190.144.240.101 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0 192.0.2.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 192.168.0.0 10.111.242.83 255.255.0.0 UG 0 0 0 ppp0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 200.118.0.0 10.111.242.83 255.255.255.128 UG 0 0 0 ppp0 204.79.197.215 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0 On my openvpn server conf i pushed the routes to my client: push "route 10.176.86.0 255.255.255.0" push "route 100.126.0.0 255.255.0.0" But if is not working, thanks for your support. |
Xrdp connection denied to Debian guest on hyperV Posted: 25 Nov 2021 05:05 PM PST Days ago I installed a debian 11 vm on hyperV. And I installed xrdp as well. I was able to connect via hyperV-manager and mstsc /multimon . After a restart of the vm I can't connect via mstsc anymore only via hyperV manager. My network adapter settings in hyperV are still the same (option "External network"). sudo tail /var/log/xrdp.log [20211125-17:42:02] [INFO ] xrdp_wm_log_msg: login successful for display 10 [20211125-17:42:02] [DEBUG] xrdp_wm_log_msg: started connecting [20211125-17:42:02] [INFO ] lib_mod_log_peer: xrdp_pid=3412 connected to X11rdp_pid=3441 X11rdp_uid=1000 X11rdp_gid=1000 client_ip=::ffff:192.168.2.124 client_port=64865 [20211125-17:42:03] [DEBUG] xrdp_wm_log_msg: connected ok [20211125-17:42:03] [DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful [20211125-17:42:03] [DEBUG] Closed socket 18 (AF_INET6 ::1 port 42118) [20211125-17:42:18] [DEBUG] Closed socket 20 (AF_UNIX) [20211125-17:42:18] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.2.125 port 3389) [20211125-17:42:18] [DEBUG] xrdp_mm_module_cleanup [20211125-17:42:18] [DEBUG] Closed socket 19 (AF_UNIX) sudo tail /var/log/xrdp-sesman.log [20211125-17:42:02] [DEBUG] Closed socket 8 (AF_INET6 ::1 port 3350) [20211125-17:42:02] [INFO ] /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log [20211125-17:42:03] [CORE ] waiting for window manager (pid 3440) to exit [20211125-17:42:18] [CORE ] window manager (pid 3440) did exit, cleaning up session [20211125-17:42:18] [INFO ] calling auth_stop_session and auth_end from pid 3413 [20211125-17:42:18] [DEBUG] cleanup_sockets: [20211125-17:42:18] [DEBUG] cleanup_sockets: deleting /run/xrdp/sockdir/xrdp_chansrv_audio_out_socket_10 [20211125-17:42:18] [DEBUG] cleanup_sockets: deleting /run/xrdp/sockdir/xrdp_chansrv_audio_in_socket_10 [20211125-17:42:18] [DEBUG] cleanup_sockets: deleting /run/xrdp/sockdir/xrdpapi_10 [20211125-17:42:18] [INFO ] ++ terminated session: username debian, display :10.0, session_pid 3413, ip ::ffff:192.168.2.124:64865 - socket: 12 |
LD_PRELOAD for setuid binary Posted: 25 Nov 2021 02:28 PM PST I'm trying to override malloc/free functions for the program, that requires setuid/setgid permissions. I use the LD_PRELOAD variable for this purpose. According to the ld documentation, I need to put my library into one of the standard search directories (I chose /usr/lib) and give it setuid/setgid permissions. I've done that. However, I still can't link to my .so file, getting the error: object 'liballoc.so' from LD_PRELOAD cannot be preloaded: ignored What can be the possible reasons for that? Tested this .so file on programs that don't have setuid/setgid permissions and all works fine. OS: RedHat 7.0 |
Which actions a non-root process can't do? Posted: 25 Nov 2021 02:26 PM PST Obviously, it can not rwx files that it doesn't have permission to. But I am talking about other "actions", I know of them is binding to ports with lower number than 1024. What else ? |
Why can't autoconf find `libtcmalloc`? Posted: 25 Nov 2021 04:17 PM PST I'm trying to compile a complex numerical simulation software. After running autoconf and then ./configure ... (with some other flags), I see the following in the output: checking for malloc in -ltcmalloc... no configure: WARNING: No tcmalloc support available. After looking in configure.in I found: %zsh> grep 'tcmalloc' configure.in AC_CHECK_LIB(tcmalloc,malloc,,AC_MSG_WARN([No tcmalloc support available.])) I have gperftools installed which should provide tcmalloc I think. I do have a few libraries that are called something like that: %zsh> ldconfig -p|grep 'tcmalloc' libtcmalloc_minimal_debug.so.4 (libc6,x86-64) => /usr/lib/libtcmalloc_minimal_debug.so.4 libtcmalloc_minimal_debug.so (libc6,x86-64) => /usr/lib/libtcmalloc_minimal_debug.so libtcmalloc_minimal.so.4 (libc6,x86-64) => /usr/lib/libtcmalloc_minimal.so.4 libtcmalloc_minimal.so (libc6,x86-64) => /usr/lib/libtcmalloc_minimal.so libtcmalloc_debug.so.4 (libc6,x86-64) => /usr/lib/libtcmalloc_debug.so.4 libtcmalloc_debug.so (libc6,x86-64) => /usr/lib/libtcmalloc_debug.so libtcmalloc_and_profiler.so.4 (libc6,x86-64) => /usr/lib/libtcmalloc_and_profiler.so.4 libtcmalloc_and_profiler.so (libc6,x86-64) => /usr/lib/libtcmalloc_and_profiler.so libtcmalloc.so.4 (libc6,x86-64) => /usr/lib/libtcmalloc.so.4 libtcmalloc.so (libc6,x86-64) => /usr/lib/libtcmalloc.so I tried adding libtcmalloc to the list in configure.in but I just get: checking for tcmalloc in -llibtcmalloc... ./configure: line 11516: WARNING:: command not found no Is there a way to get autoconf's AC_CHECK_LIB to detect my tcmalloc library? |
Bash background execution not returning Posted: 25 Nov 2021 03:58 PM PST I am trying to write a script that has the purpose to parallelize an execution (a program that creates some files) running the processes in background and, when all commands in the for loop are done, will perform an extra command (namely move all produced files in another folder). This is what I came out with for the moment: #!/bin/bash for f in ./lqns/*.lqn do java -jar DiffLQN.jar $f & done mv ./lqns/*.csv csvs The parallelism works, but they never reach the mv line and the terminal waits and doesn't return. Why is it not returning? How do I fix this? Maybe the problem is the & of the final for instance? Because it waits for another command but there's nothing more? Even if adding the mv line I thought would have solved it... |
Change directory to where a slurm script is running Posted: 25 Nov 2021 05:56 PM PST I am trying to directly change directory (cd ) to the folder where a job is running with SLURM workload manager. I can check where a SLURM script is running with squeue --format %Z% -j 123 Now I can also extract, the directory name as echo $(squeue --format "%Z" -j <jobid>) | awk '{print $2}' (Edit on 26 November 2021.) It does show the folder name in the terminal, say /HDD_Drive/myfiles/myfolder But when I use cd in conjunction with this, I am still in the current folder. Interestingly, if I check a process PID the same way: cd "$(pwdx <PID> | awk '{print $2}')" It does change my directory but when checking the SLURM job id, I have this strange behavior. In summary: echo $(squeue --format "%Z" -j jobid ) | awk '{print $2}' shows the current directory as /HDD_Drive/myfiles/myfolder but cd $(squeue --format "%Z" -j 212 ) | awk '{print $2}' shows -bash: cd: too many arguments and with cd $(squeue --format "%Z" -j 212 | awk '{print $2}') I am still in the current directory. Thank you! |
How can I use a prefix in the <glob> element of a mime info file? Posted: 25 Nov 2021 02:23 PM PST I have a bunch of files in the form of xyz-timestamp.log , which I want to associate with a different application, than normal log files. I read up on mime types and found out, that I can add a mime-info file to .local/share/mime/packages describing my new mime type. The file I came up with looks like this: <?xml version="1.0" encoding="utf-8"?> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> <mime-type type="text/x-xyz-log"> <comment>XYZ Log</comment> <glob pattern="xyz*.log" weight="100" /> </mime-type> </mime-info> But it doesn't catch. It seems like only *.log patterns or specific files like sources.list for apt work and not one, where the asterisk is in the middle. The free desktop standard mentions nothing about not supporting certain glob features or what have you, so I'm completely in the dark on this. UPDATE: I finally got it working by using the <magic> element. It alone was not enough seemingly, because I was still beaten out by the glob of normal log files, even after declaring, that this is a subtype of it. Only the combination of a glob of my own AND the magic made it work. <?xml version="1.0"?> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> <mime-type type="application/x-xyz-log"> <comment>XYZ Log</comment> <sub-class-of type="text/x-log" /> <glob pattern="*.log" /> <magic priority="100"> <match type="string" offset="0:256" value="XYZ-Service started. LOLJK" /> </magic> </mime-type> </mime-info> |
Pop OS 20.04 LTS | initramfs-tools error on apt Posted: 25 Nov 2021 04:01 PM PST I was upgrading my python3 from 3.8.5 to 3.9, so I (probably shouldn't have) ended up apt removing python-apt . After that, I tried reinstalling it but this error came up: $ sudo apt-get install python3-apt Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: apg app-install-data apport-symptoms appstream-data-pop appstream-data-pop-icons apt-config-icons-hidpi apt-config-icons-large apt-config-icons-large-hidpi aptdaemon-data avahi-utils cabextract cups-pk-helper firmware-manager-notify firmware-manager-shared gir1.2-flatpak-1.0 gir1.2-goa-1.0 gir1.2-ostree-1.0 gir1.2-packagekitglib-1.0 gir1.2-snapd-1 gnome-control-center-faces gnome-shell-extension-alt-tab-raise-first-window gnome-shell-extension-always-show-workspaces gnome-shell-extension-appindicator gnome-shell-extension-desktop-icons gnome-shell-extension-pop-battery-icon-fix gnome-shell-extension-pop-shop-details gtk2-engines-murrine icu-devtools ippusbxd libcolord-gtk1 libfirmware-manager libflatpak-dev libflatpak0 libgsound0 libhandy-1-0 libicu-dev libmspack0 libostree-dev libpop-upgrade-gtk libqt5designer5 libqt5help5 librygel-core-2.6-2 librygel-db-2.6-2 librygel-renderer-2.6-2 librygel-server-2.6-2 libs76-hidpi-widget libsbc1 libwhoopsie-preferences0 libwhoopsie0 libxatracker2 libxml2-dev mobile-broadband-provider-info network-manager-gnome pop-gnome-shell-theme pop-gtk-theme pop-icon-theme pop-shell pop-shell-shortcuts pop-sound-theme pop-theme pop-upgrade pulseaudio-module-bluetooth python3-blinker python3-click python3-colorama python3-cups python3-cupshelpers python3-dateutil python3-debconf python3-defer python3-distro-info python3-entrypoints python3-gdbm python3-httplib2 python3-jwt python3-keyring python3-launchpadlib python3-lazr.restfulclient python3-lazr.uri python3-oauthlib python3-problem-report python3-pyflatpak python3-pyqt5 python3-requests-unixsocket python3-secretstorage python3-simplejson python3-sip python3-wadllib rygel system-config-printer system-config-printer-common system-config-printer-udev whoopsie-preferences x11-apps x11-session-utils xbitmaps xinit xinput xserver-xorg-input-all xserver-xorg-input-libinput xserver-xorg-video-all xserver-xorg-video-amdgpu xserver-xorg-video-ati xserver-xorg-video-fbdev xserver-xorg-video-nouveau xserver-xorg-video-radeon xserver-xorg-video-vesa xserver-xorg-video-vmware xwayland Use 'sudo apt autoremove' to remove them. Suggested packages: python3-apt-dbg python-apt-doc The following NEW packages will be installed python3-apt 0 to upgrade, 1 to newly install, 0 to remove and 21 not to upgrade. 1 not fully installed or removed. Need to get 152 kB of archives. After this operation, 694 kB of additional disk space will be used. Get:1 http://ppa.launchpad.net/system76/pop/ubuntu focal/main amd64 python3-apt amd64 2.1.2pop0~1587756471~20.04~cd2988e [152 kB] Fetched 152 kB in 1s (132 kB/s) Selecting previously unselected package python3-apt. (Reading database ... 295195 files and directories currently installed.) Preparing to unpack .../python3-apt_2.1.2pop0~1587756471~20.04~cd2988e_amd64.deb ... Unpacking python3-apt (2.1.2pop0~1587756471~20.04~cd2988e) ... Setting up initramfs-tools (0.136ubuntu6.3) ... update-initramfs: deferring update (trigger activated) Setting up python3-apt (2.1.2pop0~1587756471~20.04~cd2988e) ... Processing triggers for initramfs-tools (0.136ubuntu6.3) ... update-initramfs: Generating /boot/initrd.img-5.8.16-xanmod1 cryptsetup: WARNING: Resume target cryptswap uses a key file kernelstub.Config : INFO Looking for configuration... kernelstub : INFO System information: OS:..................Ubuntu 20.04 Root partition:....../dev/dm-1 Root FS UUID:........4270b8f1-42f2-41af-b42c-e6963dcf34be ESP Path:............/boot/efi ESP Partition:......./dev/sda1 ESP Partition #:.....1 NVRAM entry #:.......-1 Boot Variable #:.....0000 Kernel Boot Options:.quiet loglevel=0 systemd.show_status=false splash Kernel Image Path:.../boot/vmlinuz-5.8.16-xanmod1 Initrd Image Path:.../boot/initrd.img-5.8.16-xanmod1 Force-overwrite:.....False kernelstub.Installer : INFO Copying Kernel into ESP kernelstub.Installer : INFO Copying initrd.img into ESP kernelstub.Installer : INFO Setting up loader.conf configuration kernelstub.Installer : INFO Making entry file for Ubuntu kernelstub.Installer : INFO Backing up old kernel Traceback (most recent call last): File "/usr/lib/python3/dist-packages/kernelstub/installer.py", line 247, in copy_files shutil.copy(src, dest) File "/usr/lib/python3.9/shutil.py", line 415, in copy copyfile(src, dst, follow_symlinks=follow_symlinks) File "/usr/lib/python3.9/shutil.py", line 272, in copyfile _fastcopy_sendfile(fsrc, fdst) File "/usr/lib/python3.9/shutil.py", line 163, in _fastcopy_sendfile raise err from None File "/usr/lib/python3.9/shutil.py", line 149, in _fastcopy_sendfile sent = os.sendfile(outfd, infd, offset, blocksize) OSError: [Errno 28] No space left on device: '/proc/cmdline' -> '/boot/efi/EFI/Ubuntu-4270b8f1-42f2-41af-b42c-e6963dcf34be/cmdline' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/kernelstub", line 244, in <module> main() File "/usr/bin/kernelstub", line 241, in main kernelstub.main(args) File "/usr/lib/python3/dist-packages/kernelstub/application.py", line 346, in main installer.copy_cmdline(simulate=no_run) File "/usr/lib/python3/dist-packages/kernelstub/installer.py", line 214, in copy_cmdline self.copy_files( File "/usr/lib/python3/dist-packages/kernelstub/installer.py", line 251, in copy_files raise FileOpsError("Could not copy one or more files.") kernelstub.installer.FileOpsError: Could not copy one or more files. run-parts: /etc/initramfs/post-update.d//zz-kernelstub exited with return code 1 dpkg: error processing package initramfs-tools (--configure): installed initramfs-tools package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1) So I tried a variety of stuff, including -but not limited to-: dpkg --configure -a (same error). sudo killall dpkg , which returned dpkg: no process found update-initramfs -u . Returned: $ update-initramfs -u update-initramfs: Generating /boot/initrd.img-5.8.16-xanmod1 I: The initramfs will attempt to resume from /dev/sda4 I: (UUID=cac83f23-4172-4dac-93f5-9cda57338121) I: Set the RESUME variable to override this. kernelstub.Config : INFO Looking for configuration... kernelstub : INFO System information: OS:..................Ubuntu 20.04 Root partition:....../dev/dm-1 Root FS UUID:........4270b8f1-42f2-41af-b42c-e6963dcf34be ESP Path:............/boot/efi ESP Partition:......./dev/sda1 ESP Partition #:.....1 NVRAM entry #:.......-1 Boot Variable #:.....0000 Kernel Boot Options:.quiet loglevel=0 systemd.show_status=false splash Kernel Image Path:.../boot/vmlinuz-5.8.16-xanmod1 Initrd Image Path:.../boot/initrd.img-5.8.16-xanmod1 Force-overwrite:.....False kernelstub.Installer : INFO Copying Kernel into ESP kernelstub.Installer : ERROR Couldn't copy the kernel onto the ESP! This is a critical error and we cannot continue. Check your settings to see if there is a typo. Otherwise, check permissions and try again. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/kernelstub/installer.py", line 247, in copy_files shutil.copy(src, dest) File "/usr/lib/python3.9/shutil.py", line 415, in copy copyfile(src, dst, follow_symlinks=follow_symlinks) File "/usr/lib/python3.9/shutil.py", line 272, in copyfile _fastcopy_sendfile(fsrc, fdst) File "/usr/lib/python3.9/shutil.py", line 163, in _fastcopy_sendfile raise err from None File "/usr/lib/python3.9/shutil.py", line 149, in _fastcopy_sendfile sent = os.sendfile(outfd, infd, offset, blocksize) OSError: [Errno 28] No space left on device: '/boot/vmlinuz-5.8.16-xanmod1' -> '/boot/efi/EFI/Ubuntu-4270b8f1-42f2-41af-b42c-e6963dcf34be/vmlinuz.efi' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/kernelstub/installer.py", line 121, in setup_kernel self.copy_files( File "/usr/lib/python3/dist-packages/kernelstub/installer.py", line 251, in copy_files raise FileOpsError("Could not copy one or more files.") kernelstub.installer.FileOpsError: Could not copy one or more files. run-parts: /etc/initramfs/post-update.d//zz-kernelstub exited with return code 170 - Purge older kernels. Currently I'm at:
root@jeffs-workstation:/boot# ls -l total 324360 -rw-r--r-- 1 root root 249178 Oct 18 07:31 config-5.8.16-xanmod1 drwx------ 5 root root 4096 Dec 31 1969 efi -rw-r--r-- 1 root root 96567350 Oct 29 17:18 initrd.img-5.8.16-xanmod1 -rw-r--r-- 1 root root 96567347 Oct 29 17:17 initrd.img-5.8.16-xanmod1.dpkg-bak -rw-r--r-- 1 root root 118900024 Oct 29 17:13 initrd.img-5.8.17-xanmod1 lrwxrwxrwx 1 root root 25 Oct 29 15:14 initrd.img.old -> initrd.img-5.8.16-xanmod1 -rw-r--r-- 1 root root 5334591 Oct 18 07:31 System.map-5.8.16-xanmod1 -rw-r--r-- 1 root root 14497152 Oct 18 07:31 vmlinuz-5.8.16-xanmod1 lrwxrwxrwx 1 root root 22 Oct 29 15:14 vmlinuz.old -> vmlinuz-5.8.16-xanmod1 - Reconfigure cryptswap, as it was another error (
update-initramfs: Generating /boot/initrd.img-5.8.16-xanmod1 cryptsetup: WARNING: Resume target cryptswap uses a key file ). After that cryptswap hasn't complained ever since: root@jeffs-workstation:/boot# sudo swapoff -a root@jeffs-workstation:/boot# sudo cryptsetup remove /dev/mapper/cryptswap root@jeffs-workstation:/boot# sudo vim /etc/crypttab root@jeffs-workstation:/boot# /sbin/mkswap /dev/sda4 mkswap: /dev/sda4: warning: wiping old swap signature. Setting up swapspace version 1, size = 4 GiB (4294959104 bytes) no label, UUID=cac83f23-4172-4dac-93f5-9cda57338121 root@jeffs-workstation:/boot# swapon /dev/sda4 root@jeffs-workstation:/boot# vim /etc/fstab apt install -f also returns the same error. apt-get autoclean , clean , autoremove , remove , etc. Encounter the same error. fdisk -l returns this: root@jeffs-workstation:/boot# fdisk -l Disk /dev/loop0: 97.76 MiB, 102486016 bytes, 200168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop1: 55.37 MiB, 58052608 bytes, 113384 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop2: 162.89 MiB, 170778624 bytes, 333552 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop3: 62.9 MiB, 65105920 bytes, 127160 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/loop4: 66.72 MiB, 69947392 bytes, 136616 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/sda: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors Disk model: ST2000DM001-1ER1 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: D0A60BA4-4AC7-4CB0-AC4C-0BDC43CAAE4E Device Start End Sectors Size Type /dev/sda1 4096 1023998 1019903 498M EFI System /dev/sda2 1024000 9412606 8388607 4G Microsoft basic data /dev/sda3 9412608 3898636462 3889223855 1.8T Linux filesystem /dev/sda4 3898636464 3907025070 8388607 4G Linux swap Disk /dev/sdb: 29.84 GiB, 32017047552 bytes, 62533296 sectors Disk model: LITEONIT LMS-32S Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/mapper/cryptdata: 1.83 TiB, 1991265836544 bytes, 3889191087 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/mapper/data-root: 1.83 TiB, 1991262601216 bytes, 3889184768 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Also, /boot/efi is empty, according to a desktop notification. What can I do? |
shell script to monitor current errors in logfile Posted: 25 Nov 2021 02:06 PM PST This script monitors logfile for pattern "ora",pull error details and send email.In this case i want to pull only the last error which come in logfile. I set crontab for every 5 minutes,so grep pull out the same old errors which cause false alerts.The script should get errors with current time and should avoid looking for the old error. mailto=xyz.email.com logdirectory=/location/to/logfile cd $logdirectory grep "ORA" logfile if [ $? = 0 ]; then mailx -s "errors" $mailto fi My Logfile: Fri Jun 07 05:09:32 2019 Archived Log entry 93 added for thread 1 sequence 59 ID 0xf10d426f dest 1: Fri Jun 07 11:08:20 2019 07-JUN-19 ORA-1100: Testing, Please Ignore |
I can't use the letter "d" on commandline Posted: 25 Nov 2021 06:38 PM PST When I'm logged as user or root I cannot type the letter d on a terminal, and if I paste a word containing it the d is erased. I can type it in the graphical interface (i3wm) and in non-graphical terminals, the last only before I log as user or root. I'm on Manjaro 17.06 i3 Community Edition. My ~/.basrhc [[ $- != *i* ]] && return colors() { local fgc bgc vals seq0 printf "Color escapes are %s\n" '\e[${value};...;${value}m' printf "Values 30..37 are \e[33mforeground colors\e[m\n" printf "Values 40..47 are \e[43mbackground colors\e[m\n" printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n" # foreground colors for fgc in {30..37}; do # background colors for bgc in {40..47}; do fgc=${fgc#37} # white bgc=${bgc#40} # black vals="${fgc:+$fgc;}${bgc}" vals=${vals%%;} seq0="${vals:+\e[${vals}m}" printf " %-9s" "${seq0:-(default)}" printf " ${seq0}TEXT\e[m" printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m" done echo; echo done } [[ -f ~/.extend.bashrc ]] && . ~/.extend.bashrc [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion alias t='python /home/gato/tasks/t/t.py --task-dir ~/tasks --list task' alias pacu='sudo rm /var/lib/pacman/db.lck' alias tt='clear' export PS1="[$(t | wc -l | sed -e's/ *//')] $PS1" My i3wm configuration file # Please see http://i3wm.org/docs/userguide.html for a complete reference! # Set mod key (Mod1=<Alt>, Mod4=<Super>) set $mod Mod4 # set default desktop layout (default is tiling) # workspace_layout tabbed <stacking|tabbed> # Configure border style <normal|1pixel|pixel xx|none|pixel> new_window pixel 1 new_float normal # Hide borders hide_edge_borders none # change borders bindsym $mod+u border none bindsym $mod+y border pixel 1 bindsym $mod+n border normal # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. font xft:Noto Sans 10 # Use Mouse+$mod to drag floating windows floating_modifier $mod # start a terminalM bindsym $mod+Return exec terminal # kill focused window bindsym $mod+Shift+q kill # start program launcher bindsym $mod+d exec --no-startup-id dmenu_recency # launch categorized menu bindsym $mod+z exec --no-startup-id morc_menu ################################################################################################ ## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ## ################################################################################################ #exec --no-startup-id volumeicon #bindsym $mod+Ctrl+m exec terminal -e 'alsamixer' exec --no-startup-id pulseaudio exec --no-startup-id pa-applet #bindsym $mod+Ctrl+m exec pavucontrol ################################################################################################ # Screen brightness controls # bindsym XF86MonBrightnessUp exec "xbacklight -inc 10; notify-send 'brightness up'" # bindsym XF86MonBrightnessDown exec "xbacklight -dec 10; notify-send 'brightness down'" # Start Applications bindsym $mod+Ctrl+b exec terminal -e 'bmenu' #bindsym $mod+F2 exec palemoon bindsym $mod+F5 exec pcmanfm # bindsym $mod+F3 exec ranger bindsym $mod+Shift+F3 exec gksu pcmanfm bindsym $mod+F6 exec terminal -e 'mocp' bindsym $mod+t exec --no-startup-id pkill compton bindsym $mod+Ctrl+t exec --no-startup-id compton -b bindsym $mod+Shift+d --release exec "killall dunst; exec notify-send 'restart dunst'" bindsym Print exec --no-startup-id i3-scrot bindsym $mod+Print --release exec --no-startup-id i3-scrot -w bindsym $mod+Shift+Print --release exec --no-startup-id i3-scrot -s bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf bindsym $mod+Ctrl+x --release exec --no-startup-id xkill # focus_follows_mouse no # change focus bindsym $mod+j focus left bindsym $mod+k focus down bindsym $mod+l focus up bindsym $mod+semicolon focus right # alternatively, you can use the cursor keys: bindsym $mod+Left focus left bindsym $mod+Down focus down bindsym $mod+Up focus up bindsym $mod+Right focus right # move focused window bindsym $mod+Shift+j move left bindsym $mod+Shift+k move down bindsym $mod+Shift+l move up bindsym $mod+Shift+semicolon move right # alternatively, you can use the cursor keys: bindsym $mod+Shift+Left move left bindsym $mod+Shift+Down move down bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right # workspace back and forth (with/without active container) workspace_auto_back_and_forth yes bindsym $mod+b workspace back_and_forth bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth # split orientation bindsym $mod+h split h;exec notify-send 'tile horizontally' bindsym $mod+v split v;exec notify-send 'tile vertically' bindsym $mod+q split toggle # toggle fullscreen mode for the focused container bindsym $mod+f fullscreen toggle # change container layout (stacked, tabbed, toggle split) bindsym $mod+s layout stacking bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split # toggle tiling / floating bindsym $mod+Shift+space floating toggle # change focus between tiling / floating windows bindsym $mod+space focus mode_toggle # toggle sticky bindsym $mod+Shift+s sticky toggle # focus the parent container bindsym $mod+a focus parent # move the currently focused window to the scratchpad bindsym $mod+Shift+minus move scratchpad # Show the next scratchpad window or hide the focused scratchpad window. # If there are multiple scratchpad windows, this command cycles through them. bindsym $mod+minus scratchpad show #navigate workspaces next / previous bindsym $mod+Ctrl+Right workspace next bindsym $mod+Ctrl+Left workspace prev # Workspace names # to display names or symbols instead of plain workspace numbers you can use # something like: set $ws1 1:mail # set $ws2 2: set $ws1 1: 1 Browsing set $ws2 2: 2 Creation set $ws3 3: 3 Sistema set $ws4 4: 4 Spotify set $ws5 5: 5 Video set $ws6 6: 6 set $ws7 7: 7 set $ws8 7: 8 # switch to workspace bindsym $mod+1 workspace $ws1 bindsym $mod+2 workspace $ws2 bindsym $mod+3 workspace $ws3 bindsym $mod+4 workspace $ws4 bindsym $mod+5 workspace $ws5 bindsym $mod+6 workspace $ws6 bindsym $mod+7 workspace $ws7 bindsym $mod+8 workspace $ws8 # Move focused container to workspace bindsym $mod+Ctrl+1 move container to workspace $ws1 bindsym $mod+Ctrl+2 move container to workspace $ws2 bindsym $mod+Ctrl+3 move container to workspace $ws3 bindsym $mod+Ctrl+4 move container to workspace $ws4 bindsym $mod+Ctrl+5 move container to workspace $ws5 bindsym $mod+Ctrl+6 move container to workspace $ws6 bindsym $mod+Ctrl+7 move container to workspace $ws7 bindsym $mod+Ctrl+8 move container to workspace $ws8 # Move to workspace with focused container bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1 bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2 bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3 bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4 bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5 bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6 bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7 bindsym $mod+Shift+8 move container to workspace $ws7; workspace $ws8 # Open applications on specific workspaces # assign [class="Thunderbird"] $ws1 # assign [class="Pale moon"] $ws2 # assign [class="Pcmanfm"] $ws3 # assign [class="Skype"] $ws5 assign [class="Google-chrome"] $ws1 assign [class="Subl3"] $ws2 #assign [class="Catfish"] $ws3 assign [class="Pcmanfm"] $ws3 assign [class="keepassxc"] $ws3 #assign [class="Pamac-manager"] $ws3 #assign [class="octopi"] $ws3 #assign [class="vcl"] $ws5 #assign [class="Kodi"] $ws5 #assign [id="window id # 0x4800002"] $ws4 # Open specific applications in floating mode for_window [title="alsamixer"] floating enable border pixel 1 for_window [class="Calamares"] floating enable border normal for_window [class="Clipgrab"] floating enable for_window [title="File Transfer*"] floating enable for_window [class="Galculator"] floating enable border pixel 1 for_window [class="GParted"] floating enable border normal for_window [title="i3_help"] floating enable sticky enable border normal for_window [class="Lightdm-gtk-greeter-settings"] floating enable for_window [class="Lxappearance"] floating enable sticky enable border normal for_window [class="Manjaro-hello"] floating enable for_window [class="Manjaro Settings Manager"] floating enable border normal for_window [title="MuseScore: Play Panel"] floating enable for_window [class="Nitrogen"] floating enable sticky enable border normal for_window [class="Oblogout"] fullscreen enable #for_window [class="octopi"] floating enable for_window [title="About Pale Moon"] floating enable #for_window [class="Pamac-manager"] floating enable for_window [class="Pavucontrol"] floating enable for_window [class="qt5ct"] floating enable sticky enable border normal for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal for_window [class="Simple-scan"] floating enable border normal for_window [class="(?i)System-config-printer.py"] floating enable border normal for_window [class="Skype"] floating enable border normal for_window [class="Thus"] floating enable border normal for_window [class="Timeset-gui"] floating enable border normal for_window [class="(?i)virtualbox"] floating enable border normal for_window [class="Xfburn"] floating enable # switch to workspace with urgent window automatically for_window [urgent=latest] focus # reload the configuration file bindsym $mod+Shift+c reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) bindsym $mod+Shift+r restart # exit i3 (logs you out of your X session) bindsym $mod+Control+Shift+e exec exit #"i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" # Set shut down, restart and locking features bindsym $mod+0 mode "$mode_system" set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown mode "$mode_system" { bindsym l exec --no-startup-id i3exit lock, mode "default" bindsym s exec --no-startup-id i3exit suspend, mode "default" bindsym u exec --no-startup-id i3exit switch_user, mode "default" bindsym e exec --no-startup-id i3exit logout, mode "default" bindsym h exec --no-startup-id i3exit hibernate, mode "default" bindsym r exec --no-startup-id i3exit reboot, mode "default" bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default" # exit system mode: "Enter" or "Escape" bindsym Return mode "default" bindsym Escape mode "default" } # Resize window (you can also use the mouse for that) bindsym $mod+r mode "resize" mode "resize" { # These bindings trigger as soon as you enter the resize mode # Pressing left will shrink the window's width. # Pressing right will grow the window's width. # Pressing up will shrink the window's height. # Pressing down will grow the window's height. bindsym j resize shrink width 5 px or 5 ppt bindsym k resize grow height 5 px or 5 ppt bindsym l resize shrink height 5 px or 5 ppt bindsym semicolon resize grow width 5 px or 5 ppt # same bindings, but for the arrow keys bindsym Left resize shrink width 10 px or 10 ppt bindsym Down resize grow height 10 px or 10 ppt bindsym Up resize shrink height 10 px or 10 ppt bindsym Right resize grow width 10 px or 10 ppt # exit resize mode: Enter or Escape bindsym Return mode "default" bindsym Escape mode "default" } # Lock screen bindsym $mod+ctrl+9 exec --no-startup-id blurlock # Autostart applications exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec --no-startup-id nitrogen --restore; sleep 1; compton -b #exec --no-startup-id manjaro-hello exec --no-startup-id nm-applet exec --no-startup-id xfce4-power-manager exec --no-startup-id pamac-tray exec --no-startup-id clipit # exec --no-startup-id blueman-applet # exec_always --no-startup-id sbxkb exec --no-startup-id start_conky_maia # exec --no-startup-id start_conky_green exec --no-startup-id xautolock -time 10 -locker blurlock exec_always --no-startup-id ff-theme-util exec_always --no-startup-id fix_xcursor # Color palette used for the terminal ( ~/.extend.Xresources file ) # Colors are gathered based on the documentation: # https://i3wm.org/docs/userguide.html#xresources # Change the variable name at the place you want to match the color # of your terminal like this: # [example] # If you want your bar to have the same background color as your # terminal background change the line 362 from: # background $i3_background # to: # background $term_background # Same logic applied to everything else. set_from_resource $term_background background set_from_resource $term_foreground foreground set_from_resource $term_color0 color0 set_from_resource $term_color1 color1 set_from_resource $term_color2 color2 set_from_resource $term_color3 color3 set_from_resource $term_color4 color4 set_from_resource $term_color5 color5 set_from_resource $term_color6 color6 set_from_resource $term_color7 color7 set_from_resource $term_color8 color8 set_from_resource $term_color9 color9 set_from_resource $term_color10 color10 set_from_resource $term_color11 color11 set_from_resource $term_color12 color12 set_from_resource $term_color13 color13 set_from_resource $term_color14 color14 set_from_resource $term_color15 color15 # Color palette used for i3 # Variables are set based on the documentation: # https://i3wm.org/dovs/userguide.html#variables # Changing the value of one of the variables will # effect all the areas with the same color. set $i3_background #2b2c2b set $i3_text #f9faf9 set $i3_separator #454947 set $i3_color1 #f9faf9 set $i3_color2 #595b5b set $i3_color3 #353836 set $i3_color4 #16a085 set $i3_color5 #fdf6e3 set $i3_color6 #eee8d5 set $i3_color7 #e5201d set $i3_color8 #808380 set $i3_color9 #434745 set $i3_color10 #454948 set $i3_color11 #80fff9 set $i3_color12 #fdf6e3 set $i3_color13 #cb4b16 set $i3_color14 #268bd2 set $i3_color15 #000000 set $i3_color16 #ffffff set $i3_color17 #0c0c0c # Start i3bar to display a workspace bar (plus the system information i3status if available) bar { i3bar_command i3bar status_command i3status position bottom ## please set your primary output first. Example: 'xrandr --output eDP1 --primary' # tray_output primary # tray_output eDP1 bindsym button4 nop bindsym button5 nop font xft:Noto Sans 10.5 strip_workspace_numbers yes colors { background $i3_background statusline $i3_text separator $i3_separator # border backgr. text focused_workspace $i3_color1 $i3_color4 $i3_text active_workspace $i3_color2 $i3_color3 $i3_color5 inactive_workspace $i3_color2 $i3_color3 $i3_color6 binding_mode $i3_color8 $i3_background $i3_text urgent_workspace $i3_color4 $i3_color5 $i3_color7 } } # hide/unhide i3status bar bindsym $mod+m bar mode toggle # Theme colors # class border backgr. text indic. child_border client.focused $i3_color8 $i3_color8 $i3_color11 $i3_color12 client.focused_inactive $i3_color9 $i3_color9 $i3_color4 $i3_color10 client.unfocused $i3_color9 $i3_color9 $i3_color4 $i3_color10 client.urgent $i3_color13 $i3_color12 $i3_color4 $i3_color14 client.placeholder $i3_color15 $i3_color17 $i3_color16 $i3_color15 $i3_color17 client.background $i3_background ############################# ### settings for i3-gaps: ### ############################# # Set inner/outer gaps gaps inner 10 gaps outer -4 # Additionally, you can issue commands with the following syntax. This is useful to bind keys to changing the gap size. # gaps inner|outer current|all set|plus|minus <px> # gaps inner all set 10 # gaps outer all plus 5 # Smart gaps (gaps used if only more than one container on the workspace) smart_gaps on # Smart borders (draw borders around container only if it is not the only container on this workspace) # on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0) smart_borders on # Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces. set $mode_gaps Gaps: (o) outer, (i) inner set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global) set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global) bindsym $mod+Shift+g mode "$mode_gaps" mode "$mode_gaps" { bindsym o mode "$mode_gaps_outer" bindsym i mode "$mode_gaps_inner" bindsym Return mode "default" bindsym Escape mode "default" } mode "$mode_gaps_inner" { bindsym plus gaps inner current plus 5 bindsym minus gaps inner current minus 5 bindsym 0 gaps inner current set 0 bindsym Shift+plus gaps inner all plus 5 bindsym Shift+minus gaps inner all minus 5 bindsym Shift+0 gaps inner all set 0 bindsym Return mode "default" bindsym Escape mode "default" } mode "$mode_gaps_outer" { bindsym plus gaps outer current plus 5 bindsym minus gaps outer current minus 5 bindsym 0 gaps outer current set 0 bindsym Shift+plus gaps outer all plus 5 bindsym Shift+minus gaps outer all minus 5 bindsym Shift+0 gaps outer all set 0 bindsym Return mode "default" bindsym Escape mode "default" } # Meus atalhos bindsym $mod+shift+w exec leafpad bindsym $mod+F2 exec google-chrome-stable bindsym $mod+F3 exec google-chrome-stable file:///home/gato/Documents/i3%20Documentation/i3_%20i3%20User%E2%80%99s%20Guide.html bindsym $mod+F9 exec subl3 bindsym $mod+F10 exec geany /home/gato/.i3/config # Atalhos do Ponymix bindsym $mod+F11 exec ponymix decrease 15 bindsym $mod+F12 exec ponymix increase 15 #bindsym $mod+F4 exec opt/sublime_text_3/sublime_text # Startup Applications exec google-chrome-stable exec synapse -s exec guake exec keepassxc exec pcmanfm exec autokey-gtk exec megasync exec ponymix # Pulse Audio controls #bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume ##bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume #bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound # Sreen brightness controls #bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness #bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness # Touchpad controls #bindsym XF86TouchpadToggle exec /some/path/toggletouchpad.sh # toggle touchpad # Media player controls #bindsym $Ctrl+Alt+ePlay exec playerctl play #bindsym XF86AudioPause exec playerctl pause #bindsym XF86AudioNext exec playerctl next #bindsym XF86AudioPrev exec playerctl previous # Video Config - Single #!/bin/sh exec_always xrandr --output HDMI2 --off --output HDMI1 --mode 1366x768 --pos 0x0 --rotate normal --output DP1 --off --output eDP1 --off --output VIRTUAL1 --off My ~/.extend.bashrc # ~/.extend.bashrc # # Change the window title of X terminals case ${TERM} in xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*) PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"' ;; screen*) PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"' ;; esac use_color=true # Set colorful PS1 only on colorful terminals. # dircolors --print-database uses its own built-in database # instead of using /etc/DIR_COLORS. Try to use the external file # first to take advantage of user additions. Use internal bash # globbing instead of external grep binary. safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM match_lhs="" [[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)" [[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)" [[ -z ${match_lhs} ]] \ && type -P dircolors >/dev/null \ && match_lhs=$(dircolors --print-database) [[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true if ${use_color} ; then # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 if type -P dircolors >/dev/null ; then if [[ -f ~/.dir_colors ]] ; then eval $(dircolors -b ~/.dir_colors) elif [[ -f /etc/DIR_COLORS ]] ; then eval $(dircolors -b /etc/DIR_COLORS) fi fi if [[ ${EUID} == 0 ]] ; then PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] ' else PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] ' fi alias ls='ls --color=auto' alias grep='grep --colour=auto' alias egrep='egrep --colour=auto' alias fgrep='fgrep --colour=auto' else if [[ ${EUID} == 0 ]] ; then # show root@ when we don't have colors PS1='\u@\h \W \$ ' else PS1='\u@\h \w \$ ' fi fi unset use_color safe_term match_lhs sh alias cp="cp -i" # confirm before overwriting something alias df='df -h' # human-readable sizes alias free='free -m' # show sizes in MB alias np='nano -w PKGBUILD' alias more=less xhost +local:root > /dev/null 2>&1 complete -cf sudo # Bash won't get SIGWINCH if another process is in the foreground. # Enable checkwinsize so that bash will check the terminal size when # it regains control. #65623 # http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11) shopt -s checkwinsize shopt -s expand_aliases # export QT_SELECT=4 # Enable history appending instead of overwriting. #139609 shopt -s histappend # # # ex - archive extractor # # usage: ex <file> ex () { if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xjf $1 ;; *.tar.gz) tar xzf $1 ;; *.bz2) bunzip2 $1 ;; *.rar) unrar x $1 ;; *.gz) gunzip $1 ;; *.tar) tar xf $1 ;; *.tbz2) tar xjf $1 ;; *.tgz) tar xzf $1 ;; *.zip) unzip $1 ;; *.Z) uncompress $1;; *.7z) 7z x $1 ;; *) echo "'$1' cannot be extracted via ex()" ;; esac else echo "'$1' is not a valid file" fi } # better yaourt colors export YAOURT_COLORS="nb=1:pkg=1:ver=1;32:lver=1;45:installed=1;42:grp=1;34:od=1;41;5:votes=1;44:dsc=0:other=1;35" # fix "xdg-open fork-bomb" export your preferred browser from here export BROWSER=/usr/bin/palemoon alias con='nano $HOME/.i3/config' alias comp='nano $HOME/.config/compton.conf' alias fixit='sudo rm -f /var/lib/pacman/db.lck' alias inst='sudo pacman -S' alias la='ls -la --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F' alias ll='ls -l --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F' alias mirrors='sudo pacman-mirrors -g' alias printer='system-config-printer' alias update='yaourt -Syua' Update: d works fine on zsh. |
xbindkeys (xvkbd): stuck CTRL with Debian Stretch Posted: 25 Nov 2021 05:48 PM PST I am using xbindkeys with xvkbd to add some magic to additional buttons on my mouse which I can press with my thumb. For this, I have xbindkeys in my ~/.xsessionrc and the following lines in ~/.xbindkeysrc : "xvkbd -text "\[Control]\[Prior]"" m:0x0 + b:15 "xvkbd -text "\[Control]\[Next]"" m:0x0 + b:13 "xvkbd -text "\[Control]t"" m:0x0 + b:17 This setup was working perfectly for the past two years. After the upgrade from Debian Jessie to Debian Stretch I noticed that the control key sometimes appears to be still pressed after using the mouse button once. As a result, every key action x behaves as Ctrl+x . This also causes the mouse buttons to not work as expected. - Debian 9 Stretch, amd64
- xbindkeys 1.8.6-1+b1
- xvkbd 3.3-1+b1
- Mate + xmonad
|
How to configure dnsmasq on Mint-18 with NetworkManager? Posted: 25 Nov 2021 06:05 PM PST I am learning linux networking. I am very confused by the config file locations. What I read on the web doesn't match how my machine is set up. I am using Mint 18. I am using network-manager & dnsmasq. On the dnsmasq setup page, they mention that dnsmasq can be configured in /etc/dnsmasq.conf . I do not have this file... However there is a /etc/dnsmasq.d/network-manager and there is also /etc/NetworkManager/dnsmasq.d/ I think (alhtough I do not know), that /etc/NetworkManager/dnsmasq.d is where I should place my config file. Is this to do with NetworkManager's plugins ? If so what is /etc/dnsmasq.d ? Should I put my config file here? |
Resolving hostname takes 5 seconds Posted: 25 Nov 2021 04:04 PM PST I've a master bind9 DNS server and 2 slave servers running on IPv4 (Debian Jessie), using /etc/bind/named.conf : listen-on-v6 { none; }; When I try to connect from different server(s) each connection takes at least 5 seconds (I'm using Joseph's timing info for debugging): $ curl -w "@curl-format.txt" -o /dev/null -s https://example.com time_namelookup: 5.512 time_connect: 5.512 time_appconnect: 5.529 time_pretransfer: 5.529 time_redirect: 0.000 time_starttransfer: 5.531 ---------- time_total: 5.531 According to curl , lookup takes most of the time, however standard nslookup is very fast: $ time nslookup example.com > /dev/null 2>&1 real 0m0.018s user 0m0.016s sys 0m0.000s After forcing curl to use IPv4, it gets much better: $ curl -4 -w "@curl-format.txt" -o /dev/null -s https://example.com time_namelookup: 0.004 time_connect: 0.005 time_appconnect: 0.020 time_pretransfer: 0.020 time_redirect: 0.000 time_starttransfer: 0.022 ---------- time_total: 0.022 I've disabled IPv6 on the host: echo 1 > /proc/sys/net/ipv6/conf/eth0/disable_ipv6 though the problem persists. I've tried running strace to see what's the reason of timeouts: write(2, "*", 1*) = 1 write(2, " ", 1 ) = 1 write(2, "Hostname was NOT found in DNS ca"..., 36Hostname was NOT found in DNS cache ) = 36 socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 4 close(4) = 0 mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f220bcf8000 mprotect(0x7f220bcf8000, 4096, PROT_NONE) = 0 clone(child_stack=0x7f220c4f7fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f220c4f89d0, tls=0x7f220c4f8700, child_tidptr=0x7f220c4f89d0) = 2004 rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f22102e08d0}, NULL, 8) = 0 rt_sigaction(SIGPIPE, NULL, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f22102e08d0}, 8) = 0 rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f22102e08d0}, NULL, 8) = 0 rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f22102e08d0}, NULL, 8) = 0 poll(0, 0, 4) = 0 (Timeout) rt_sigaction(SIGPIPE, NULL, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f22102e08d0}, 8) = 0 rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f22102e08d0}, NULL, 8) = 0 rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f22102e08d0}, NULL, 8) = 0 poll(0, 0, 8) = 0 (Timeout) rt_sigaction(SIGPIPE, NULL, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f22102e08d0}, 8) = 0 rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f22102e08d0}, NULL, 8) = 0 rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f22102e08d0}, NULL, 8) = 0 poll(0, 0, 16) = 0 (Timeout) rt_sigaction(SIGPIPE, NULL, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f22102e08d0}, 8) = 0 rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f22102e08d0}, NULL, 8) = 0 rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f22102e08d0}, NULL, 8) = 0 poll(0, 0, 32) = 0 (Timeout) rt_sigaction(SIGPIPE, NULL, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f22102e08d0}, 8) = 0 rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f22102e08d0}, NULL, 8) = 0 rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7f22102e08d0}, NULL, 8) = 0 poll(0, 0, 64) = 0 (Timeout) It doesn't seem to be a firewall issues as nslookup (or curl -4 ) is using the same DNS servers. Any idea what could be wrong? Here's tcpdump from the host tcpdump -vvv -s 0 -l -n port 53 : tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes 20:14:52.542526 IP (tos 0x0, ttl 64, id 35839, offset 0, flags [DF], proto UDP (17), length 63) 192.168.1.1.59163 > 192.168.1.2.53: [bad udp cksum 0xf9f3 -> 0x96c7!] 39535+ A? example.com. (35) 20:14:52.542540 IP (tos 0x0, ttl 64, id 35840, offset 0, flags [DF], proto UDP (17), length 63) 192.168.1.1.59163 > 192.168.1.2.53: [bad udp cksum 0xf9f3 -> 0x6289!] 45997+ AAAA? example.com. (35) 20:14:52.543281 IP (tos 0x0, ttl 61, id 63674, offset 0, flags [none], proto UDP (17), length 158) 192.168.1.2.53 > 192.168.1.1.59163: [udp sum ok] 45997* q: AAAA? example.com. 1/1/0 example.com. [1h] CNAME s01.example.com. ns: example.com. [10m] SOA ns01.example.com. ns51.domaincontrol.com. 2016062008 28800 7200 1209600 600 (130) 20:14:57.547439 IP (tos 0x0, ttl 64, id 36868, offset 0, flags [DF], proto UDP (17), length 63) 192.168.1.1.59163 > 192.168.1.2.53: [bad udp cksum 0xf9f3 -> 0x96c7!] 39535+ A? example.com. (35) 20:14:57.548188 IP (tos 0x0, ttl 61, id 64567, offset 0, flags [none], proto UDP (17), length 184) 192.168.1.2.53 > 192.168.1.1.59163: [udp sum ok] 39535* q: A? example.com. 2/2/2 example.com. [1h] CNAME s01.example.com., s01.example.com. [1h] A 136.243.154.168 ns: example.com. [30m] NS ns01.example.com., example.com. [30m] NS ns02.example.com. ar: ns01.example.com. [1h] A 136.243.154.168, ns02.example.com. [1h] A 192.168.1.2 (156) 20:14:57.548250 IP (tos 0x0, ttl 64, id 36869, offset 0, flags [DF], proto UDP (17), length 63) 192.168.1.1.59163 > 192.168.1.2.53: [bad udp cksum 0xf9f3 -> 0x6289!] 45997+ AAAA? example.com. (35) 20:14:57.548934 IP (tos 0x0, ttl 61, id 64568, offset 0, flags [none], proto UDP (17), length 158) 192.168.1.2.53 > 192.168.1.1.59163: [udp sum ok] 45997* q: AAAA? example.com. 1/1/0 example.com. [1h] CNAME s01.example.com. ns: example.com. [10m] SOA ns01.example.com. ns51.domaincontrol.com. 2016062008 28800 7200 1209600 600 (130) EDIT: In bind logs frequently appears this message: error sending response: host unreachable Though, each query is eventually answered (it just takes 5s). All machines are physical servers (it's not fault of NAT), it's more likely that packets are being blocked by a router. Here's quite likely related question: DNS lookups sometimes take 5 seconds. |
Command to merge all terminal windows? Posted: 25 Nov 2021 03:04 PM PST Is there a terminal command that merges all open terminal windows into one window with tabs? Been searching all over the place, but have yet to find any solutions. |
Which are the (Bash) shell special parameters/variables? Posted: 25 Nov 2021 03:52 PM PST I've found some special parameter with Bash starting with $ sign. Example: When I was wandering for exit status I knew about $? , process ID by $$ etc. So, I am sharing this post to know which are special bash (shell) parameters and their usage. |
delete multiple users Posted: 25 Nov 2021 05:04 PM PST I am the root user and I am setting up a menu for another user to use. This other user will only get this menu. There are two options that are interlinked: the first option is to search users. The code I got is: last | awk '{print $1,$4,$5,$6,$7} ' I have checked this code and it works, it shows me the usernames and the day they last logged on. For the second option: I want to be able to set a date, and them delete users who haven't been active since that date, using the output of the above command. I am using Linux Mint and Vim text editor. |
I can't delete a file that I have write permissions for as a group member Posted: 25 Nov 2021 03:10 PM PST $ touch testfile $ chmod g+w testfile $ sudo adduser user2 user1 $ stat -c'%a %A' testfile 664 -rw-rw-r-- $ su user2 Password: $ groups user2 user1 $ rm testfile rm: cannot remove `testfile': Permission denied What is missing? |
No comments:
Post a Comment