cp command follows symlink at target and obliterates file instead of overwriting symlink Posted: 01 Sep 2021 10:18 AM PDT So I have a symlink sd/common.py -> actual_file I would like to replace the symlink with a generated file, but when I do: cp /tmp/Star_Wrangler/common.py sd/common.py It copies from common.py and obliterates the actual_file instead of just copying over the symlink like I want it to. This keeps happening everytime I forget to delete the symlink before copying. Is there a flag to get the correct behavior? I look at the man pages but they all talk about symlinks at the source not at the target. |
How do I enable an init.d script offline? Posted: 01 Sep 2021 09:56 AM PDT My problem is quite simple but I can't find any solution online: I have a file system containing an init.d script. I want this script to be run at first boot of the system. How do I do this? I'd like to avoid creating init.d symlinks manually if possible. |
How to fix excessively long ntpd sync times? Posted: 01 Sep 2021 10:18 AM PDT I am currently experiencing incredibly long sync delays with ntpd and, after much Googling, have decided to start a fresh thread as all 'remedies' have failed to work. The machine in question is a Raspberry Pi 3B running Raspi OS 'Buster' (the 5/7/21 lite/non-GUI image). As it is to be the head node for a small cluster, it has 2 NICs - eth0 (built-in NIC and inside interface) is set to 192.168.4.100/24 and eth1 (USB dongle and outside interface) is set to 192.168.1.220/24. I am currently using dhcpcd to configure the interfaces and have name servers defined in /etc/resolvconf.conf. ntpd will eventually sync up, but only after hours and when I reboot the Pi, despite the fake-hwclock saving the time in /etc/fake-hwclock.data, ntpd is back at square one and starts the hours-long sync process again. I should note that the time saved in /etc/fake-hwclock is UTC time, not time zone adjusted time, but I wouldn't think that that would affect ntpd's sync time. Below is my /etc/ntp.conf file. Uncommenting the 'tinker panic 0' line does not seem to affect synchronization at all. To summarize, my questions are: How can I reduce the sync time delay? If I reboot the Pi after ntpd has sync'ed, running the 'date' command will give me the proper time, BUT ntpd will have returned to square one and it will take hours for it to sync. How can this be avoided? (Logic says that it shouldn't take very long to reconcile the local and remote times when they are mere seconds apart) systemd-timesyncd is disabled. /etc/ntp.conf # /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help #tinker panic 0 driftfile /var/lib/ntp/ntp.drift # Leap seconds definition provided by tzdata leapfile /usr/share/zoneinfo/leap-seconds.list # Enable this if you want statistics to be logged. #statsdir /var/log/ntpstats/ statistics loopstats peerstats clockstats filegen loopstats file loopstats type day enable filegen peerstats file peerstats type day enable filegen clockstats file clockstats type day enable # You do need to talk to an NTP server or two (or three). server time-a-g.nist.gov iburst server time-a-wwv.nist.gov iburst server 0.debian.pool.ntp.org iburst server 1.debian.pool.ntp.org iburst # Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for # details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions> # might also be helpful. # # By default, exchange time with everybody, but don't allow configuration. restrict -4 default kod notrap nomodify nopeer noquery limited # Local users may interrogate the ntp server more closely. restrict 127.0.0.1 # Needed for adding pool entries restrict source notrap nomodify noquery # If you want to provide time to your local subnet, change the next line. # (Again, the address is an example only.) broadcast 192.168.4.255 Output of 'uptime' and 'ntpq -p' at 11:07 AM CDT (according to my MacBook Pro's clock): charles@Chimera-Head-Node:~ $ uptime 10:12:52 up 34 min, 1 user, load average: 0.00, 0.00, 0.00 charles@Chimera-Head-Node:~ $ ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== 192.168.4.255 .XFAC. 16 B - 64 0 0.000 0.000 0.002 time-a-g.nist.g .INIT. 16 u - 1024 0 0.000 0.000 0.000 time-a-wwv.nist .INIT. 16 u - 1024 0 0.000 0.000 0.000 ec.sedley.net .INIT. 16 u - 1024 0 0.000 0.000 0.000 ntp1.doctor.com .INIT. 16 u - 1024 0 0.000 0.000 0.000 Note: Whenever I boot/reboot the Pi, the broadcast address always shows up as .XFAC. for the refid. If I do a simple 'sudo service ntp restart', the refid changes to .BCST. (what it needs to be). I've yet to fix that problem and while it is an issue for another thread, any suggestions are welcome :-) Output of syslog on boot (non-ntpd/dhcpcd entries removed): Sep 1 09:38:53 Chimera-Head-Node ntpd[546]: ntpd 4.2.8p12@1.3728-o (1): Starting Sep 1 09:38:53 Chimera-Head-Node ntpd[546]: Command line: /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 109:114 Sep 1 09:38:53 Chimera-Head-Node systemd[1]: Started Network Time Service. Sep 1 09:38:53 Chimera-Head-Node ntpd[554]: proto: precision = 1.458 usec (-19) Sep 1 09:38:53 Chimera-Head-Node ntpd[554]: leapsecond file ('/usr/share/zoneinfo/leap-seconds.list'): good hash s ignature Sep 1 09:38:53 Chimera-Head-Node ntpd[554]: leapsecond file ('/usr/share/zoneinfo/leap-seconds.list'): loaded, exp ire=2021-12-28T00:00:00Z last=2017-01-01T00:00:00Z ofs=37 Sep 1 09:38:53 Chimera-Head-Node ntpd[554]: Listen and drop on 0 v6wildcard [::]:123 Sep 1 09:38:53 Chimera-Head-Node ntpd[554]: Listen and drop on 1 v4wildcard 0.0.0.0:123 Sep 1 09:38:53 Chimera-Head-Node ntpd[554]: Listen normally on 2 lo 127.0.0.1:123 Sep 1 09:38:53 Chimera-Head-Node ntpd[554]: Listen normally on 3 eth1 192.168.1.220:123 Sep 1 09:38:53 Chimera-Head-Node ntpd[554]: Listen normally on 4 lo [::1]:123 Sep 1 09:38:53 Chimera-Head-Node ntpd[554]: Listen normally on 5 eth0 [fe80::ba27:ebff:fed5:8e4d%2]:123 Sep 1 09:38:53 Chimera-Head-Node ntpd[554]: Listen normally on 6 eth1 [fe80::1f2d:3bb6:af44:5cbb%3]:123 Sep 1 09:38:53 Chimera-Head-Node ntpd[554]: Listening on routing socket on fd #23 for interface updates Sep 1 09:38:53 Chimera-Head-Node ntpd[554]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized Sep 1 09:38:53 Chimera-Head-Node ntpd[554]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized Sep 1 09:38:54 Chimera-Head-Node dhcpcd[541]: eth0: using static address 192.168.4.100/24 Sep 1 09:38:54 Chimera-Head-Node dhcpcd[541]: eth0: adding route to 192.168.4.0/24 Sep 1 09:38:55 Chimera-Head-Node ntpd[554]: Listen normally on 7 eth0 192.168.4.100:123 Sep 1 09:38:55 Chimera-Head-Node ntpd[554]: 192.168.4.255 local addr 192.168.1.220 -> 192.168.4.100 Sep 1 09:38:55 Chimera-Head-Node ntpd[554]: new interface(s) found: waking up resolver Sep 1 09:39:01 Chimera-Head-Node dhcpcd[541]: eth1: no IPv6 Routers available Sep 1 09:39:03 Chimera-Head-Node dhcpcd[541]: eth0: no IPv6 Routers available |
"joe" on Debian 11 Posted: 01 Sep 2021 08:48 AM PDT I have a fresh cloud server with Debian 11 and am trying to install my favorite litte editor joe , but cannot find it: root@serv:~# apt-cache search joe root@serv:~# apt install joe Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package joe root@serv:~# uname -a Linux serv 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux I remember doing it on some other machine (maybe Debian 10?) and it worked. Can anyone help? |
How to get phpize for a certain PHP version? Posted: 01 Sep 2021 08:34 AM PDT If I run phpize -v then I get Configuring for: PHP Api Version: 20170718 Zend Module Api No: 20170718 Zend Extension Api No: 320170718 If I open phpinfo then it shows a newer date so my phpize is outdated. How can I get phpize for a certain PHP version? |
How to increase the compression level of SSH tunnels Posted: 01 Sep 2021 08:19 AM PDT This is how I establish an SSH tunnel (dynamic port forwarding using SOCKS) from a local computer to a remote computer: ssh -C -N -D 12345 user@192.168.1.2 I use compression (-C ) because my bandwidth is expensive and limited. Is there a way to increase the compression level further? Version 1 of the SSH protocol had the CompressionLevel configuration option, but there is no equivalent option in version 2. I am open to the idea of using additional open source tools to achieve greater compression levels. OS: Ubuntu 20.04. |
portforwarding to virtual host not possible? Posted: 01 Sep 2021 08:26 AM PDT I have a rather unusual network setup. It starts with a vps on the internet. Up for years, never connectivity problems. On it, I installed my ip-networkstack-in-userspace ("MyIP" from now on; it is already running somewhere else on the internet serving sip and http so it works, at least good enough for the basics). Now I would like to redirect any UDP port 161 traffic coming in via eth0 on the vps to the virtual network-interface. For some reason the usual iptables-rules don't work; tcpdump shows no traffic on the virtual interface and also the ip-stack ("MyIP") shows no signs of receiving anything (not even ARP). internet -> vps[eth0, 37.34.63.177] -> vps[myip, 192.168.4.1] -> MyIP[myip, 192.168.4.2] iptables -t nat -A PREROUTING -i eth0 -p udp --dport 161 -j LOG --log-prefix "DNAT: " --log-level 0 iptables -t nat -A PREROUTING -i eth0 -p udp --dport 161 -j DNAT --to 192.168.4.2:161 iptables -A FORWARD -d 192.168.4.2 -p udp --dport 161 -j LOG --log-prefix "FWD: " --log-level 0 iptables -A FORWARD -d 192.168.4.2 -p udp --dport 161 -j ACCEPT iptables -A INPUT -i eth0 -p udp --destination-port 161 -j ACCEPT Now if I tcpdump on eth0, I see the requests coming in. tcpdump on the 'myip'-network interface shows nothing. dmesg also nothing and iptables -t nat -L -n -v shows no increasing counters. So either it is not possible to forward packets to a virtual network interface (this would affect VPNs) or my iptables-rules are wrong. Anyone has an idea? (don't think it is an MTU problem as the packets are less than 200 bytes usually) |
CAT several files in directory with a prepend and append file Posted: 01 Sep 2021 08:04 AM PDT I have a directory of files that need two files merged to each one. For simplicity, let's use intro.txt & outro.txt intro.txt + file1.txt + outro.txt intro.txt + file2.txt + outro.txt intro.txt + file3.txt + outro.txt How can I best accomplish this? |
Using grep in a variable in a loop Posted: 01 Sep 2021 09:01 AM PDT I'm having trouble storing a grep result as a variable in a loop. while read file;do Server=$(echo $file | awk '{ print $1 }') FDate=$(echo $file | awk '{ print $2 }') ST=$(cat foobar | grep $Server | awk '{ print $3 }') #ST=$(grep $Server foobar | awk '{ print $3 }') echo "Server = $Server" echo "FDate = $FDate" echo "ST = $ST" done < inputfile The first ST var gives the output "Usage: grep [Option]... Pattern [File]" for each iteration which means its not reading the command correctly. The second ST var that is commented out actually breaks the entire script cause all the other variables to be empty when it tries to echo. Now when I try doing the same thing on the command line it works: $ testme=$(cat foobar | grep Big | awk '{ print $3}' $ echo "$testme" tada So my question is how do I store that grep command in the variable? The pattern match has only one possible result so I don't have to worry about multiple matches. But each server in the loop might have a different string in column 3 (tada,tada1,tada2) EDIT: The inputfile has a list of servers with multiple columns. I'm taking the server listed in column 1 of that current line and searching the foobar file for a match and getting the string from column 3. I've found that the script actually does work even though it's giving the 'Usage' message. Probably because some of the server entries in the inputfile aren't yet in the foobar file so grep doesn't have a match but still tried to pipe it to awk. I don't know that for certain. I'd still like to eliminate the 'Usage' messages though. I think maybe a 'set -o pipefail' might work but I'd rather not do that. |
How to stop a running bash script after it's current running command finished? Posted: 01 Sep 2021 10:14 AM PDT There is a shell script: #!/bin/bash python3 do_something_1.py python3 do_something_2.py python3 do_something_3.py python3 do_something_4.py python3 do_something_5.py If it's running python3 do_something_3.py now. How can I tell bash process that after python3 do_something_3.py exits by itself(don't kill subprocess, wait it), no longer run subsequent commands python3 do_something_4.py ,python3 do_something_5.py anymore? |
hwclock's output is effected by DST when entering it, but not when leaving it Posted: 01 Sep 2021 09:09 AM PDT I set system time and RTC to the following values. date -s 2021.08.30-09:59:30 >/dev/null 2>/dev/null //set system time hwclock -w //sync RTC to system time Also, /etc/TZ (which is the same file as /etc/localtime in busybox ) is saved as LMT0:00LMT-1:00,M5.5.1/10,M8.5.1/10 where it means that DST will be in effect at 10:00 a.m. on Monday, last week in May; and will be deactivated at 10:00 a.m. on Monday, last week in August. I deliberately set the system time and RTC to 30 seconds earlier than end date of DST, so as to observe system behaviour. When DST is gone, system time (also RTC maybe?) should be substracted by one hour back. The following is the result, and it's obvious that only system time is subtracted by one hour, NOT both system time and RTC. ~ # cat /etc/TZ LMT0:00LMT-1:00,M5.5.1/10,M8.5.1/10 ~ # date -s 2021.08.30-09:59:30 >/dev/null 2>/dev/null ~ # hwclock -w ~ # ~ # date Mon Aug 30 09:59:36 LMT 2021 ~ # hwclock Mon Aug 30 09:59:42 2021 0.000000 seconds ~ # ~ # ~ # date Mon Aug 30 09:59:49 LMT 2021 ~ # hwclock Mon Aug 30 09:59:53 2021 0.000000 seconds ~ # date Mon Aug 30 09:00:00 LMT 2021 ~ # hwclock Mon Aug 30 10:00:03 2021 0.000000 seconds ~ # date Mon Aug 30 09:00:05 LMT 2021 ~ # hwclock Mon Aug 30 10:00:06 2021 0.000000 seconds However, it behaves differently on the other hand! This time I want to observe system behaviour when entering DST. With /etc/TZ being saved as LMT0:00LMT-1:00,M8.5.1/10,M12.5.1/10 where it means that DST will be in effect at 10:00 a.m. on Monday, last week in August; and will be deactivated at 10:00 a.m. on Monday, last week in December. Also, I set system time and RTC to the following values. date -s 2021.08.30-09:59:30 >/dev/null 2>/dev/null //set system time hwclock -w //sync RTC to system time When DST is in effect, system time (also RTC maybe?) should be added by one hour ahead. The following is the result, and it's obvious that BOTH system time and RTC is added by one hour. ~ # cat /etc/TZ LMT0:00LMT-1:00,M8.5.1/10,M12.5.1/10 ~ # date -s 2021.08.30-09:59:30 >/dev/null 2>/dev/null ~ # hwclock -w ~ # ~ # date Mon Aug 30 09:59:35 LMT 2021 ~ # hwclock Mon Aug 30 09:59:37 2021 0.000000 seconds ~ # date Mon Aug 30 09:59:48 LMT 2021 ~ # hwclock Mon Aug 30 09:59:51 2021 0.000000 seconds ~ # date Mon Aug 30 11:00:04 LMT 2021 ~ # hwclock Mon Aug 30 11:00:06 2021 0.000000 seconds I wonder why this contradictory behavior occurs. |
Microphone doesn't work in Arch Posted: 01 Sep 2021 10:09 AM PDT I'm using Alsa. arecord -l gives me **** List of CAPTURE Hardware Devices **** card 0: Intel [HDA Intel], device 0: Generic Analog [Generic Analog] Subdevices: 1/1 Subdevice #0: subdevice # However, when I try to record arecord -vvv -fdat /tmp/mic.wav , nothing is saved (aplay plays nothing back`). When I try out an online microphone test, all that is played back is a beep, indicating that my microphone isn't even recognized. pavucontrol recognizes a microphone, but unmuting it and changing levels don't seem to change anything. alsamixer doesn't even recognize the microphone. |
How do I fix the low speed of Qualcomm Atheros AR9285 Wireless Network Adapter's ap0 in Debian? Posted: 01 Sep 2021 08:06 AM PDT Unlike Windows, I discovered that the speed of my Access Point is too slow about 50-70KB on Debian unlike Windows it is about 1.3MB which is the original full download speed of my connection. Here are the interfaces I have: PHY Interface Driver Chipset phy0 ap0 ath9k Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01) phy0 wlan0 ath9k Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01) phy1 wlan1 rt2800usb Ralink Technology, Corp. RT2870/RT30 Unlike Windows, since I cannot use Ralink Technology, Corp. RT2870/RT3070 as AP and STA in the same time, I used Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01) yet It is slow. How do I tweak the speed? |
Starting ffplay X-window without a window manager Posted: 01 Sep 2021 08:17 AM PDT I want what is essentially a kiosk, to display a video stream using ffplay, without a whole Desktop environment. I started with minimal CentOS7, and installed xterm and X11, per this simple guide: https://linuxconfig.org/how-to-run-x-applications-without-a-desktop-or-a-wm I've created a .xinitrc file: #!/bin/bash exec firefox and when I execute startx , it opens an X11 window containing Firefox. But, when I replace the .xinitrc file with this one: #!/bin/bash exec ffplay udp://192.168.0.237:5444 I just get a blank screen, in spite of knowing that ffplay command is right. Though I can tell from ps -ef | grep ffplay that ffplay is indeed executing. I think it is just piping the output video someplace different from where Firefox did. I don't know how to tell where that is, nor how to force it to go to localhost:0.0 . Note the CentOS7 box is a Hyper-V VM, which I am accessing via a Hyper-V console. |
Is there an advantage to use netplan instead of plain systemd-networkd? [closed] Posted: 01 Sep 2021 08:28 AM PDT Is there an advantage to use netplan instead of plain systemd-networkd ? Why wouldn't I just choose to use systemd-networkd directly? Notes: netplan is a yaml abstraction layer on top of systemd-networkd (or NetworkManager in case of gui) netplan belongs to Canonical (Ubuntu). Canonical also had Upstart which was defeated by systemd (systemd-networkd is a service of systemd ) I don't understand why it was closed. I just wanted to know the pros/cons for each of them. |
Why does a network connection not change from "unmanaged"? Posted: 01 Sep 2021 10:13 AM PDT I'm a month into a disasterous upgrade of my ProtonVPN CLI client from 2.2.6 to 3.7.2 on Ubuntu 18.04, and the VPN still doesn't work (this question is related to my previous question). Here is the current status of my devices: $ nmcli d DEVICE TYPE STATE CONNECTION wlp3s0 wifi connected WifiAP proton0 tun disconnected -- enp2s0 ethernet unavailable -- ipv6leakintrf0 dummy unmanaged -- lo loopback unmanaged -- ProtonVPN support has explained that they don't "support unmanaged connections", still not sure what that means. They supplied me with the following commands to change this: $ sudo nmcli dev set proton0 managed yes This changed the proton0 connection from "unmanaged" to "disconnected", as seen above. Then I ran $ sudo nmcli dev set ipv6leakintrf0 managed yes and this did nothing. It did not affect the status of ipv6leakintrf0 in any way. Why will this device refuse to change from "unmanaged"? Update According to this page, having an entry in an /etc/network/interfaces file can make a device be unmanaged. I can't find any reference to ipv6leakintrf0 in any of these files, however, so I don't think this is the problem: $ grep -IRF "ipv6" /etc/network/* {no results} |
How do I run org.mozilla.firefox from Flathub as a native Wayland client? Posted: 01 Sep 2021 09:54 AM PDT I installed org.mozilla.firefox from Flathub, and upon investigating with xeyes , I found that it seems to be running via XWayland as the eyes are able to trace my cursor when hovering over Firefox. I'm using GNOME via Wayland, and I would like to run Firefox as a native Wayland client instead of running it via XWayland. How might I do this with the org.mozilla.firefox package from Flathub? I am not interested in using my distribution's package instead. |
Xorg won't load/consider a driver that is present in /usr/lib/xorg/modules/drivers/ Posted: 01 Sep 2021 09:04 AM PDT Here are the drivers I have present on the system. ls -l /usr/lib/xorg/modules/drivers/ total 598 -rwxr-xr-x 1 root root 114176 Sep 10 12:43 ast_drv.so -rwxr-xr-x 1 root root 23552 Sep 10 12:43 fbdev_drv.so -rwxr-xr-x 1 root root 359560 Sep 10 12:43 intel_drv.so -rwxr-xr-x 1 root root 86208 Sep 10 11:05 modesetting_drv.so -rwxr-xr-x 1 root root 27624 Sep 10 12:43 vesa_drv.so Here is the Xorg log, which shows that intel_drv.so isn't considered. cat /var/log/Xorg.0.log | grep modules [ 5.258] (==) ModulePath set to "/usr/lib/xorg/modules" [ 5.399] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so [ 5.408] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so [ 5.422] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so [ 5.423] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so [ 5.463] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so [ 5.463] (II) Loading /usr/lib/xorg/modules/libglamoregl.so [ 5.763] (II) Loading /usr/lib/xorg/modules/libfb.so [ 6.079] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so The intel_drv.so lib is built/linked correctly (using version 2.99.917+gitAUTOINC+e4fe79cf0d ). ldd /usr/lib/xorg/modules/drivers/intel_drv.so linux-vdso.so.1 (0x00007fff28e6b000) libpciaccess.so.0 => /usr/lib/libpciaccess.so.0 (0x00007f1de65ce000) libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f1de632b000) libudev.so.1 => /lib/libudev.so.1 (0x00007f1de6108000) libdrm_intel.so.1 => /usr/lib/libdrm_intel.so.1 (0x00007f1de5ee6000) libdrm.so.2 => /usr/lib/libdrm.so.2 (0x00007f1de5cd5000) libc.so.6 => /lib/libc.so.6 (0x00007f1de5922000) libm.so.6 => /lib/libm.so.6 (0x00007f1de5592000) libpthread.so.0 => /lib/libpthread.so.0 (0x00007f1de5374000) /lib/ld-linux-x86-64.so.2 (0x00007f1de6a2f000) librt.so.1 => /lib/librt.so.1 (0x00007f1de516c000) Here is my entire Xorg log, if it interests you. Any ideas why my intel_drv.so isn't showing up and getting loaded? |
Xorg broken xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted) No devices detected Posted: 01 Sep 2021 08:25 AM PDT I am trying to use Xorg instead of Wayland on my Arch Linux. I have two graphics cards in my laptop. An Intel and a Nvidia graphics card. The output of my log file is: [ 53.401] (WW) Failed to open protocol names file lib/xorg/protocol.txt [ 53.403] X.Org X Server 1.20.0 X Protocol Version 11, Revision 0 [ 53.403] Build Operating System: Linux Arch Linux [ 53.403] Current Operating System: Linux thinkpad 4.17.8-1-ARCH #1 SMP PREEMPT Wed Jul 18 09:56:24 UTC 2018 x86_64 [ 53.403] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=4c4cf377-77af-4cd1-bd40-6d94fae4e2f1 rw quiet resume=UUID=4a1be855-ae3e-4add-b3e0-3b3abb817115 nvidia-drm.modeset=1 [ 53.403] Build Date: 18 June 2018 03:12:37PM [ 53.403] [ 53.403] Current version of pixman: 0.34.0 [ 53.404] Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. [ 53.404] Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. [ 53.404] (==) Log file: "/home/henzler/.local/share/xorg/Xorg.1.log", Time: Fri Jul 20 17:30:51 2018 [ 53.412] (==) Using config directory: "/etc/X11/xorg.conf.d" [ 53.412] (==) Using system config directory "/usr/share/X11/xorg.conf.d" [ 53.414] (==) No Layout section. Using the first Screen section. [ 53.414] (==) No screen section available. Using defaults. [ 53.414] (**) |-->Screen "Default Screen Section" (0) [ 53.414] (**) | |-->Monitor "<default monitor>" [ 53.415] (==) No device specified for screen "Default Screen Section". Using the first device section listed. [ 53.415] (**) | |-->Device "Intel Graphics" [ 53.415] (==) No monitor specified for screen "Default Screen Section". Using a default monitor configuration. [ 53.415] (**) Option "DontZap" "false" [ 53.415] (==) Automatically adding devices [ 53.415] (==) Automatically enabling devices [ 53.415] (==) Automatically adding GPU devices [ 53.415] (==) Automatically binding GPU devices [ 53.415] (==) Max clients allowed: 256, resource mask: 0x1fffff [ 53.415] (WW) The directory "/usr/share/fonts/OTF" does not exist. [ 53.415] Entry deleted from font path. [ 53.415] (WW) The directory "/usr/share/fonts/Type1" does not exist. [ 53.415] Entry deleted from font path. [ 53.415] (==) FontPath set to: /usr/share/fonts/misc, /usr/share/fonts/TTF, /usr/share/fonts/100dpi, /usr/share/fonts/75dpi [ 53.415] (**) ModulePath set to "/usr/lib/xorg/modules,/usr/lib/nvidia/xorg" [ 53.415] (II) The server relies on udev to provide the list of input devices. If no devices become available, reconfigure udev or disable AutoAddDevices. [ 53.415] (II) Module ABI versions: [ 53.415] X.Org ANSI C Emulation: 0.4 [ 53.415] X.Org Video Driver: 24.0 [ 53.415] X.Org XInput driver : 24.1 [ 53.415] X.Org Server Extension : 10.0 [ 53.416] (++) using VT number 3 [ 53.420] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c3 [ 53.422] (II) xfree86: Adding drm device (/dev/dri/card0) [ 53.424] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 10 paused 0 [ 53.424] (II) xfree86: Adding drm device (/dev/dri/card1) [ 53.425] (II) systemd-logind: got fd for /dev/dri/card1 226:1 fd 11 paused 0 [ 53.427] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/xorg/modules,/usr/lib/nvidia/xorg" [ 53.427] (**) OutputClass "nvidia" setting /dev/dri/card0 as PrimaryGPU [ 53.429] (--) PCI: (0@0:2:0) 8086:191b:17aa:5050 rev 6, Mem @ 0xf0000000/16777216, 0xe0000000/268435456, I/O @ 0x0000e000/64, BIOS @ 0x????????/131072 [ 53.429] (--) PCI:*(2@0:0:0) 10de:134d:17aa:5050 rev 162, Mem @ 0xf1000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000d000/128 [ 53.429] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory) [ 53.430] (II) LoadModule: "glx" [ 53.430] (II) Loading /usr/lib/nvidia/xorg/libglx.so [ 53.495] (II) Module glx: vendor="NVIDIA Corporation" [ 53.495] compiled for 4.0.2, module version = 1.0.0 [ 53.495] Module class: X.Org Server Extension [ 53.496] (II) NVIDIA GLX Module 396.24 Wed Apr 25 23:17:01 PDT 2018 [ 53.497] (II) LoadModule: "intel" [ 53.498] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so [ 53.502] (II) Module intel: vendor="X.Org Foundation" [ 53.502] compiled for 1.20.0, module version = 2.99.917 [ 53.502] Module class: X.Org Video Driver [ 53.502] ABI class: X.Org Video Driver, version 24.0 [ 53.502] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets: i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G, 915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM, Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33, GM45, 4 Series, G45/G43, Q45/Q43, G41, B43 [ 53.503] (II) intel: Driver for Intel(R) HD Graphics [ 53.503] (II) intel: Driver for Intel(R) Iris(TM) Graphics [ 53.503] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics [ 53.503] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted) [ 53.505] (II) intel(G0): Using Kernel Mode Setting driver: i915, version 1.6.0 20180308 [ 53.505] (II) intel(G0): SNA compiled from 2.99.917-831-ge7bfc906 [ 53.521] (EE) No devices detected. [ 53.521] (EE) Fatal server error: [ 53.521] (EE) no screens found(EE) [ 53.521] (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. [ 53.521] (EE) Please also check the log file at "/home/henzler/.local/share/xorg/Xorg.1.log" for additional information. [ 53.521] (EE) [ 53.539] (EE) Server terminated with error (1). Closing log file. I know there are many similar questions out there but nothing has worked for me so far. I have done following: - installed xf68-video-intel - removed xorg.conf - installed cuda + nvidia drivers |
dd is working with bs argument but gives IO error without Posted: 01 Sep 2021 10:03 AM PDT I have a HDD 4TB WD 40EFRX (red series) and try to check the health of that disc. Actually, I erased all partitions and the table via gparted and build a new table + ex4 partition. Subsequently, I wanted to overwrite all the data with zeroes in order to get rid of old data. However, I figured out that using dd if=/dev/zero of=/dev/sdb status=progress result in an I/O error right at the beginning: sudo dd if=/dev/zero of=/dev/sdb status=progress 474558976 bytes (475 MB, 453 MiB) copied, 38.0445 s, 12.5 MB/s dd: writing to '/dev/sdb': Input/output error 927977+0 records in 927976+0 records out 475123712 bytes (475 MB, 453 MiB) copied, 46.6914 s, 10.2 MB/s while adding the option bs=64MB (cache of that HDD is 64 MB) the command works really fine. However, I guess based on the IO error the HDD is somehow dead or can I do other workarounds too? By the way, I have the HDD via SATA/USB connected to my laptop. |
$HOME/.cache - on a small SSD or on an HDD? Posted: 01 Sep 2021 09:17 AM PDT I have a system with a small SSD (about 90 GB available for my single Linux partition mounted as / ) and a much larger HDD. Now, my home directory has been balooning in space, filling up all of the remaining free space on the SSD. Apparently, it's $HOME/.cache that's the main culprit - over 33 GB. Now, what should I do with it? - Move it to the HDD and symlink
$HOME/.cache to /mnt/my_hdd_partition/some/path/.cache ? - Make sure and cull it occasionally?
If you believe I should do the latter, please explain why this would not be too much of a burden. |
Umask to make default permission 750 Posted: 01 Sep 2021 08:00 AM PDT I'm working through questions from Unix The Textbook. I'm trying to solve the question (chapter 8, #15, page 207): - Give a command line for setting the default access mode so that you have read, write, and execute privileges, your group has read and execute privileges, your group has read and execute permissions, and all others have no permission for a newly created executable file or directory. How would you test it to be sure that it works correctly?
My initial answer was to use umask 027 , but I found that creating a new file with touch or vim never worked as expected for the execute permission as umask was applied to 666 not 777 . Since my end goal is to have a permission value of 750 it seems to me it is impossible with the umask command as any umask applied to 666 will not result in 750 . Given all the questions in this section relate to chmod and umask is the question flawed in that you can't achieve the desired goal using umask ? |
Arch linux: set keyboard layout to PL Posted: 01 Sep 2021 08:21 AM PDT I'm unsuccessfully trying to force my Arch to set pl layout on X start. I've googled for solutions, and I found couple of tutorials/tips but none of them works. My current, keyboard related settings: LANG=pl_PL.UTF-8 in /etc/locale.conf pl_PL.UTF-8 UTF-8 in /etc/locale.gen I did: localectl set-x11-keymap pl to generate conf for X, I have created /etc/rc.conf with: # # /etc/rc.conf - Main Configuration for Arch Linux # # See man 5 rc.conf for more details # # LOCALIZATION # ------------ HARDWARECLOCK="UTC" TIMEZONE="Europe/Warsaw" KEYMAP="pl" CONSOLEFONT="lat2-16" CONSOLEMAP="8859-2" LOCALE="pl_PL.UTF-8" DAEMON_LOCALE="yes" USECOLOR="yes" with no success. EDIT: Context of important files: /etc/vconsole.conf: KEYMAP=pl FONT=lat2-16 FONT_MAP=8859-2 /etc/X11/xorg.conf.d/00-keyboard.conf: # Read and parsed by systemd-localed. It's probably wise not to edit this file # manually too freely. Section "InputClass" Identifier "system-keyboard" MatchIsKeyboard "on" Option "XkbLayout" "pl" EndSection EDIT2: output of localectl (before setxkbmap pl ): System Locale: LANG=pl_PL.UTF-8 VC Keymap: pl X11 Layout: pl after setxkbmap pl is the same |
Can I remove files in /var/log/journal and /var/cache/abrt-di/usr? Posted: 01 Sep 2021 09:17 AM PDT I use Fedora and these directories contains a large amount of files, I wonder whether I can delete them? The system is running low on space. |
How do I access the Lubuntu menu in Openbox? Posted: 01 Sep 2021 09:00 AM PDT Is there a way to include the Lubuntu applications menu in an Openbox menu (~/.config/openbox/menu.xml ) so I can use it within a pure Openbox session? |
Problems with unixODBC and SQLite [closed] Posted: 01 Sep 2021 09:18 AM PDT I installed unixodbc, sqlite3 and libsqliteodbc. odbcinst.ini looks like this: [SQLite] Description=SQLite ODBC Driver Driver=libsqliteodbc.so Setup=libsqliteodbc.so UsageCount=2 [SQLite3] Description=SQLite3 ODBC Driver Driver=libsqlite3odbc.so Setup=libsqlite3odbc.so UsageCount=1 odbc.ini looks like this: [mysqlitedb] Description=My SQLite database Driver=SQLite3 Database=/my_database.db When I test connection like this: isql -v mysqlitedb it says Connected! But when I try a SELECT statement it says: SQL> select * from user [S1000][SQLite]no such table: user (1) [ISQL]ERROR: Could not SQLPrepare What is wrong? I known the table: user is present, because I get results when I do this: sqlite3 /my_database.db SQLite version 3.8.2 2013-12-06 14:53:30 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> select * from user; 1|admin|password |
Drivers for HP ScanJet 2400 on Linux Posted: 01 Sep 2021 08:04 AM PDT I'm trying to install my scanner "HP ScanJet 2400". I followed the recipe from here: http://www.elcot.in/linuxdrivers_download.php, However, it was not possible at all to detect it, when working in CentOS, Fermi & OSuSE OS. Doess anyone have any suggestions on how to get this scanner working? |
Is troff/groff relevant anymore? Posted: 01 Sep 2021 09:13 AM PDT I've heard that troff/groff have largely been replaced by TeX. Is this true? The only thing that I know actually used troff nowadays is manpages. Is this also true? If not, what are some other uses? |
[ vs [[ : which one to use in bash scripts? [duplicate] Posted: 01 Sep 2021 09:01 AM PDT The zsh man page, in its section on test (aka [ ), explicitly advises against using it at all, and urges readers to use [[ whenever possible. The relevant section states: The command attempts to implement POSIX and its extensions where these are specified. Unfortunately there are intrinsic ambiguities in the syntax; in particular there is no distinction between test operators and strings that resemble them. The standard attempts to resolve these for small numbers of arguments (up to four); for five or more arguments compatibility cannot be relied on. Users are urged wherever possible to use the '[[ ' test syntax which does not have these ambiguities. I think I've come across similar advice for bash, but as I scan over the bash man page I can't find any "official" recommendation there on which form ([ or [[ ) to use. (Maybe I missed it?) Is there any reason, other than backward compatibility with "older shells", for using [ in a bash script? Or to put it differently, does bash keep [ along with [[ for reasons other than backward compatibility? |
No comments:
Post a Comment