why is shell (new terminal, new tmux panes/windows) slow to load? Posted: 01 Jun 2021 09:33 AM PDT When I open a new terminal it takes a couple seconds for the shell to load, when I open a new pane or window in tmux it might even take a second longer. The delay is about 3 seconds. I'm using zsh with oh-my-zsh and the ohmyzsh plugins: git, vi-mode, history-substring-search. My path looks like: /home/alec/.nvm/versions/node/v14.6.0/bin:/home/alec/.composer/vendor/bin:/home/alec/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/alec/code/bin Previously I had wondered if having a git repo on the path would be problematic. The final location in that path ~/code/bin used to be ~/bin and there was the .git database inside it. Now the .git directory is in ~/code (which seems to me like it would prevent the shell from looking through it for executables) but this hasn't delivered any performance improvements. I don't know any other guess-and-check possibilities, or any logical troubleshooting procedures to perform/investigate. Any suggestions? |
UUID Multiple Times in /dev Posted: 01 Jun 2021 09:21 AM PDT I have an external hard drive that shows up many times in /dev whenever its connected. Is there any way I can fix this? Or is it a problem with the drive itself? Output of cat /proc/partitions : major minor #blocks name 7 0 211992 loop0 7 2 101340 loop2 7 3 56780 loop3 7 4 63204 loop4 7 5 128704 loop5 7 6 155940 loop6 7 7 275188 loop7 259 0 117220824 nvme1n1 259 1 512000 nvme1n1p1 259 2 116175993 nvme1n1p2 259 3 528384 nvme1n1p3 259 4 488386584 nvme0n1 8 0 1953514584 sda 8 1 719323136 sda1 8 2 1 sda2 8 3 329252864 sda3 8 5 904936523 sda5 11 0 45255040 sr0 8 16 468851544 sdb 8 32 468851544 sdc 9 0 937438848 md0 7 8 165288 loop8 7 9 166776 loop9 7 10 249768 loop10 7 11 66324 loop11 7 12 224248 loop12 7 13 223124 loop13 7 14 66660 loop14 7 15 331272 loop15 7 16 266968 loop16 7 17 52248 loop17 7 18 52268 loop18 7 19 32856 loop19 7 20 156404 loop20 7 22 112720 loop22 7 23 183876 loop23 7 24 3112 loop24 7 25 32872 loop25 7 26 183760 loop26 7 27 56752 loop27 7 28 63212 loop28 7 29 1688 loop29 7 30 211992 loop30 7 31 283296 loop31 7 32 3112 loop32 7 33 101556 loop33 8 128 488386584 sdi 8 129 488385536 sdi1 8 48 7814026583 sdd 8 49 7814025216 sdd1 8 192 7814026583 sdm 8 193 7814025216 sdm1 8 224 7814026583 sdo 8 225 7814025216 sdo1 65 80 7814026583 sdv 65 81 7814025216 sdv1 8 144 7814026583 sdj 8 145 7814025216 sdj1 66 80 7814026583 sdal 66 81 7814025216 sdal1 65 128 7814026583 sdy 65 129 7814025216 sdy1 65 208 7814026583 sdad 65 209 7814025216 sdad1 65 96 7814026583 sdw 65 97 7814025216 sdw1 66 16 7814026583 sdah 66 17 7814025216 sdah1 66 144 7814026583 sdap 66 145 7814025216 sdap1 65 112 7814026583 sdx 65 113 7814025216 sdx1 66 112 7814026583 sdan 66 113 7814025216 sdan1 65 240 7814026583 sdaf 65 241 7814025216 sdaf1 66 176 7814026583 sdar 66 177 7814025216 sdar1 65 16 7814026583 sdr 65 17 7814025216 sdr1 65 176 7814026583 sdab 65 177 7814025216 sdab1 66 0 7814026583 sdag 66 1 7814025216 sdag1 66 32 7814026583 sdai 66 33 7814025216 sdai1 130 160 7814026583 sdfo 130 161 7814025216 sdfo1 71 48 7814026583 sddl 71 49 7814025216 sddl1 8 176 7814026583 sdl 8 177 7814025216 sdl1 128 128 7814026583 sdeg 128 129 7814025216 sdeg1 65 64 7814026583 sdu 65 65 7814025216 sdu1 67 192 7814026583 sdbi 67 193 7814025216 sdbi1 70 80 7814026583 sdcx 70 81 7814025216 sdcx1 67 144 7814026583 sdbf 67 145 7814025216 sdbf1 68 96 7814026583 sdbs 68 97 7814025216 sdbs1 129 16 7814026583 sdep 129 17 7814025216 sdep1 69 64 7814026583 sdcg 69 65 7814025216 sdcg1 130 224 7814026583 sdfs 130 225 7814025216 sdfs1 71 32 7814026583 sddk 71 33 7814025216 sddk1 71 160 7814026583 sdds 71 161 7814025216 sdds1 128 64 7814026583 sdec 128 65 7814025216 sdec1 66 128 7814026583 sdao 66 129 7814025216 sdao1 71 240 7814026583 sddx 71 241 7814025216 sddx1 71 208 7814026583 sddv 71 209 7814025216 sddv1 66 208 7814026583 sdat 66 209 7814025216 sdat1 67 32 7814026583 sday 67 33 7814025216 sday1 71 64 7814026583 sddm 71 65 7814025216 sddm1 69 208 7814026583 sdcp 69 209 7814025216 sdcp1 129 240 7814026583 sdfd 129 241 7814025216 sdfd1 128 112 7814026583 sdef 128 113 7814025216 sdef1 132 240 7814026583 sdgz 132 241 7814025216 sdgz1 66 96 7814026583 sdam 66 97 7814025216 sdam1 133 80 7814026583 sdhf 133 81 7814025216 sdhf1 70 240 7814026583 sddh 70 241 7814025216 sddh1 68 112 7814026583 sdbt 68 113 7814025216 sdbt1 67 96 7814026583 sdbc 67 97 7814025216 sdbc1 128 32 7814026583 sdea 128 33 7814025216 sdea1 133 0 7814026583 sdha 133 1 7814025216 sdha1 133 96 7814026583 sdhg 133 97 7814025216 sdhg1 128 224 7814026583 sdem 128 225 7814025216 sdem1 133 176 7814026583 sdhl 133 177 7814025216 sdhl1 68 208 7814026583 sdbz 68 209 7814025216 sdbz1 71 16 7814026583 sddj 71 17 7814025216 sddj1 68 240 7814026583 sdcb 68 241 7814025216 sdcb1 132 192 7814026583 sdgw 132 193 7814025216 sdgw1 133 160 7814026583 sdhk 133 161 7814025216 sdhk1 131 240 7814026583 sdgj 131 241 7814025216 sdgj1 134 224 7814026583 sdie 134 225 7814025216 sdie1 128 192 7814026583 sdek 128 193 7814025216 sdek1 132 0 7814026583 sdgk 132 1 7814025216 sdgk1 8 368 7814026583 sdjd 8 369 7814025216 sdjd1 129 96 7814026583 sdeu 129 97 7814025216 sdeu1 135 144 7814026583 sdip 135 145 7814025216 sdip1 70 192 7814026583 sdde 70 193 7814025216 sdde1 69 144 7814026583 sdcl 69 145 7814025216 sdcl1 70 96 7814026583 sdcy 70 97 7814025216 sdcy1 128 144 7814026583 sdeh 128 145 7814025216 sdeh1 134 144 7814026583 sdhz 134 145 7814025216 sdhz1 133 240 7814026583 sdhp 133 241 7814025216 sdhp1 69 0 7814026583 sdcc 69 1 7814025216 sdcc1 65 48 7814026583 sdt 65 49 7814025216 sdt1 132 96 7814026583 sdgq 132 97 7814025216 sdgq1 129 64 7814026583 sdes 129 65 7814025216 sdes1 71 224 7814026583 sddw 71 225 7814025216 sddw1 135 160 7814026583 sdiq 135 161 7814025216 sdiq1 128 176 7814026583 sdej 128 177 7814025216 sdej1 8 272 7814026583 sdix 8 273 7814025216 sdix1 65 32 7814026583 sds 65 33 7814025216 sds1 65 0 7814026583 sdq 65 1 7814025216 sdq1 67 128 7814026583 sdbe 67 129 7814025216 sdbe1 130 80 7814026583 sdfj 130 81 7814025216 sdfj1 67 0 7814026583 sdaw 67 1 7814025216 sdaw1 129 0 7814026583 sdeo 129 1 7814025216 sdeo1 8 288 7814026583 sdiy 8 289 7814025216 sdiy1 71 144 7814026583 sddr 71 145 7814025216 sddr1 134 16 7814026583 sdhr 134 17 7814025216 sdhr1 130 144 7814026583 sdfn 130 145 7814025216 sdfn1 128 16 7814026583 sddz 128 17 7814025216 sddz1 129 176 7814026583 sdez 129 177 7814025216 sdez1 135 0 7814026583 sdig 135 1 7814025216 sdig1 66 192 7814026583 sdas 66 193 7814025216 sdas1 67 176 7814026583 sdbh 67 177 7814025216 sdbh1 68 192 7814026583 sdby 68 193 7814025216 sdby1 134 160 7814026583 sdia 134 161 7814025216 sdia1 132 128 7814026583 sdgs 132 129 7814025216 sdgs1 8 208 7814026583 sdn 8 209 7814025216 sdn1 134 48 7814026583 sdht 134 49 7814025216 sdht1 8 304 7814026583 sdiz 8 305 7814025216 sdiz1 130 192 7814026583 sdfq 130 193 7814025216 sdfq1 135 176 7814026583 sdir 135 177 7814025216 sdir1 135 192 7814026583 sdis 135 193 7814025216 sdis1 67 224 7814026583 sdbk 67 225 7814025216 sdbk1 66 224 7814026583 sdau 66 225 7814025216 sdau1 69 240 7814026583 sdcr 69 241 7814025216 sdcr1 69 48 7814026583 sdcf 69 49 7814025216 sdcf1 68 80 7814026583 sdbr 68 81 7814025216 sdbr1 71 80 7814026583 sddn 71 81 7814025216 sddn1 132 160 7814026583 sdgu 132 161 7814025216 sdgu1 131 48 7814026583 sdfx 131 49 7814025216 sdfx1 68 176 7814026583 sdbx 68 177 7814025216 sdbx1 66 48 7814026583 sdaj 66 49 7814025216 sdaj1 135 80 7814026583 sdil 135 81 7814025216 sdil1 70 224 7814026583 sddg 70 225 7814025216 sddg1 131 128 7814026583 sdgc 131 129 7814025216 sdgc1 133 128 7814026583 sdhi 133 129 7814025216 sdhi1 69 112 7814026583 sdcj 69 113 7814025216 sdcj1 131 208 7814026583 sdgh 131 209 7814025216 sdgh1 67 80 7814026583 sdbb 67 81 7814025216 sdbb1 71 176 7814026583 sddt 71 177 7814025216 sddt1 70 32 7814026583 sdcu 70 33 7814025216 sdcu1 128 48 7814026583 sdeb 128 49 7814025216 sdeb1 66 64 7814026583 sdak 66 65 7814025216 sdak1 129 224 7814026583 sdfc 129 225 7814025216 sdfc1 135 128 7814026583 sdio 135 129 7814025216 sdio1 134 192 7814026583 sdic 134 193 7814025216 sdic1 132 16 7814026583 sdgl 132 17 7814025216 sdgl1 69 80 7814026583 sdch 69 81 7814025216 sdch1 65 160 7814026583 sdaa 65 161 7814025216 sdaa1 71 128 7814026583 sddq 71 129 7814025216 sddq1 132 48 7814026583 sdgn 132 49 7814025216 sdgn1 129 160 7814026583 sdey 129 161 7814025216 sdey1 68 32 7814026583 sdbo 68 33 7814025216 sdbo1 130 176 7814026583 sdfp 130 177 7814025216 sdfp1 132 80 7814026583 sdgp 132 81 7814025216 sdgp1 132 208 7814026583 sdgx 132 209 7814025216 sdgx1 135 16 7814026583 sdih 135 17 7814025216 sdih1 68 160 7814026583 sdbw 68 161 7814025216 sdbw1 67 240 7814026583 sdbl 67 241 7814025216 sdbl1 70 64 7814026583 sdcw 70 65 7814025216 sdcw1 71 192 7814026583 sddu 71 193 7814025216 sddu1 129 144 7814026583 sdex 129 145 7814025216 sdex1 135 112 7814026583 sdin 135 113 7814025216 sdin1 134 80 7814026583 sdhv 134 81 7814025216 sdhv1 8 320 7814026583 sdja 8 321 7814025216 sdja1 69 160 7814026583 sdcm 69 161 7814025216 sdcm1 134 240 7814026583 sdif 134 241 7814025216 sdif1 131 64 7814026583 sdfy 131 65 7814025216 sdfy1 70 176 7814026583 sddd 70 177 7814025216 sddd1 8 256 7814026583 sdiw 8 257 7814025216 sdiw1 130 128 7814026583 sdfm 130 129 7814025216 sdfm1 71 96 7814026583 sddo 71 97 7814025216 sddo1 68 144 7814026583 sdbv 68 145 7814025216 sdbv1 135 240 7814026583 sdiv 135 241 7814025216 sdiv1 129 128 7814026583 sdew 129 129 7814025216 sdew1 8 352 7814026583 sdjc 8 353 7814025216 sdjc1 65 192 7814026583 sdac 65 193 7814025216 sdac1 134 0 7814026583 sdhq 134 1 7814025216 sdhq1 8 240 7814026583 sdp 8 241 7814025216 sdp1 70 112 7814026583 sdcz 70 113 7814025216 sdcz1 134 208 7814026583 sdid 134 209 7814025216 sdid1 67 208 7814026583 sdbj 67 209 7814025216 sdbj1 134 64 7814026583 sdhu 134 65 7814025216 sdhu1 132 64 7814026583 sdgo 132 65 7814025216 sdgo1 133 48 7814026583 sdhd 133 49 7814025216 sdhd1 8 336 7814026583 sdjb 8 337 7814025216 sdjb1 67 16 7814026583 sdax 67 17 7814025216 sdax1 67 160 7814026583 sdbg 67 161 7814025216 sdbg1 133 16 7814026583 sdhb 133 17 7814025216 sdhb1 129 192 7814026583 sdfa 129 193 7814025216 sdfa1 69 176 7814026583 sdcn 69 177 7814025216 sdcn1 65 144 7814026583 sdz 65 145 7814025216 sdz1 133 208 7814026583 sdhn 133 209 7814025216 sdhn1 129 80 7814026583 sdet 129 81 7814025216 sdet1 135 32 7814026583 sdii 135 33 7814025216 sdii1 70 16 7814026583 sdct 70 17 7814025216 sdct1 70 48 7814026583 sdcv 70 49 7814025216 sdcv1 69 128 7814026583 sdck 69 129 7814025216 sdck1 131 16 7814026583 sdfv 131 17 7814025216 sdfv1 131 176 7814026583 sdgf 131 177 7814025216 sdgf1 68 48 7814026583 sdbp 68 49 7814025216 sdbp1 130 32 7814026583 sdfg 130 33 7814025216 sdfg1 130 16 7814026583 sdff 130 17 7814025216 sdff1 69 96 7814026583 sdci 69 97 7814025216 sdci1 134 112 7814026583 sdhx 134 113 7814025216 sdhx1 68 64 7814026583 sdbq 68 65 7814025216 sdbq1 71 112 7814026583 sddp 71 113 7814025216 sddp1 130 112 7814026583 sdfl 130 113 7814025216 sdfl1 70 128 7814026583 sdda 70 129 7814025216 sdda1 67 64 7814026583 sdba 67 65 7814025216 sdba1 131 144 7814026583 sdgd 131 145 7814025216 sdgd1 69 224 7814026583 sdcq 69 225 7814025216 sdcq1 65 224 7814026583 sdae 65 225 7814025216 sdae1 8 160 7814026583 sdk 8 161 7814025216 sdk1 68 16 7814026583 sdbn 68 17 7814025216 sdbn1 66 160 7814026583 sdaq 66 161 7814025216 sdaq1 131 160 7814026583 sdge 131 161 7814025216 sdge1 70 160 7814026583 sddc 70 161 7814025216 sddc1 68 128 7814026583 sdbu 68 129 7814025216 sdbu1 67 48 7814026583 sdaz 67 49 7814025216 sdaz1 130 208 7814026583 sdfr 130 209 7814025216 sdfr1 131 0 7814026583 sdfu 131 1 7814025216 sdfu1 131 112 7814026583 sdgb 131 113 7814025216 sdgb1 132 176 7814026583 sdgv 132 177 7814025216 sdgv1 133 64 7814026583 sdhe 133 65 7814025216 sdhe1 133 32 7814026583 sdhc 133 33 7814025216 sdhc1 129 112 7814026583 sdev 129 113 7814025216 sdev1 135 96 7814026583 sdim 135 97 7814025216 sdim1 71 0 7814026583 sddi 71 1 7814025216 sddi1 132 112 7814026583 sdgr 132 113 7814025216 sdgr1 69 192 7814026583 sdco 69 193 7814025216 sdco1 132 32 7814026583 sdgm 132 33 7814025216 sdgm1 130 64 7814026583 sdfi 130 65 7814025216 sdfi1 128 208 7814026583 sdel 128 209 7814025216 sdel1 135 64 7814026583 sdik 135 65 7814025216 sdik1 66 240 7814026583 sdav 66 241 7814025216 sdav1 128 160 7814026583 sdei 128 161 7814025216 sdei1 135 48 7814026583 sdij 135 49 7814025216 sdij1 128 96 7814026583 sdee 128 97 7814025216 sdee1 133 112 7814026583 sdhh 133 113 7814025216 sdhh1 133 192 7814026583 sdhm 133 193 7814025216 sdhm1 134 128 7814026583 sdhy 134 129 7814025216 sdhy1 69 32 7814026583 sdce 69 33 7814025216 sdce1 131 96 7814026583 sdga 131 97 7814025216 sdga1 131 32 7814026583 sdfw 131 33 7814025216 sdfw1 130 96 7814026583 sdfk 130 97 7814025216 sdfk1 129 48 7814026583 sder 129 49 7814025216 sder1 69 16 7814026583 sdcd 69 17 7814025216 sdcd1 135 208 7814026583 sdit 135 209 7814025216 sdit1 132 144 7814026583 sdgt 132 145 7814025216 sdgt1 128 0 7814026583 sddy 128 1 7814025216 sddy1 68 224 7814026583 sdca 68 225 7814025216 sdca1 130 0 7814026583 sdfe 130 1 7814025216 sdfe1 130 240 7814026583 sdft 130 241 7814025216 sdft1 134 32 7814026583 sdhs 134 33 7814025216 sdhs1 131 192 7814026583 sdgg 131 193 7814025216 sdgg1 133 224 7814026583 sdho 133 225 7814025216 sdho1 70 208 7814026583 sddf 70 209 7814025216 sddf1 129 208 7814026583 sdfb 129 209 7814025216 sdfb1 67 112 7814026583 sdbd 67 113 7814025216 sdbd1 128 240 7814026583 sden 128 241 7814025216 sden1 128 80 7814026583 sded 128 81 7814025216 sded1 131 80 7814026583 sdfz 131 81 7814025216 sdfz1 68 0 7814026583 sdbm 68 1 7814025216 sdbm1 132 224 7814026583 sdgy 132 225 7814025216 sdgy1 129 32 7814026583 sdeq 129 33 7814025216 sdeq1 70 0 7814026583 sdcs 70 1 7814025216 sdcs1 134 176 7814026583 sdib 134 177 7814025216 sdib1 135 224 7814026583 sdiu 135 225 7814025216 sdiu1 130 48 7814026583 sdfh 130 49 7814025216 sdfh1 134 96 7814026583 sdhw 134 97 7814025216 sdhw1 131 224 7814026583 sdgi 131 225 7814025216 sdgi1 70 144 7814026583 sddb 70 145 7814025216 sddb1 133 144 7814026583 sdhj 133 145 7814025216 sdhj1 |
Error in Fedora 34 after adding repo Posted: 01 Jun 2021 08:46 AM PDT I was adding the repo for Albert launcher , but then there was a Rawhide version of it and Fedora 34 IS Rawhide. I had added the Fedora 33 repo but then searched online ad disabled it by using "--set-disabled" instead of --add-repo. After I added the repos, I update. Then this error came: Problem 1: package kernel-modules-extra-5.12.5-300.fc34.x86_64 requires kernel-uname-r = 5.12.5-300.fc34.x86_64, but none of the providers can be installed - conflicting requests Problem 2: package kernel-5.12.5-300.fc34.x86_64 requires kernel-core-uname-r = 5.12.5-300.fc34.x86_64, but none of the providers can be installed
- conflicting requests I don't really think it's the adding repo error. I hadn't updated for about a week.
|
Change the Owner access Charlie root to user at a media device, possible? Posted: 01 Jun 2021 08:40 AM PDT how can I change from Charlie root to user access for my media devices (partitions /media/da0s1) on FreeBSD? |
Search and replace with find and xargs not working Posted: 01 Jun 2021 08:33 AM PDT I am trying to search and replace a url present in source code of html/css files in target folder and subfolders. I have tried to use the following command : find . -type f | xargs sed -i 's/https\:*\.websitedomain\.fr\///g' What i am i missing ? Thanks in advance for any advice |
Where does miscdevice device drivers returned values stored? Posted: 01 Jun 2021 07:46 AM PDT Problem I am learning about Linux kernel module development. I am writing a misc char device driver which can write to the buffer. When the character device node is written to, the data sent to the kernel needs to be checked. If it matches the assigned id, then it should return a correct write return value else "invalid value" error value. How to catch or handle the return value of write function when the device is registered from miscdevice ? Code static ssize_t write(struct file * file, const char * buf, size_t count, loff_t *ppos) { ssize_t len; char *hello_str = "test"; char *msg = kmalloc (count + 1, GFP_KERNEL); if (!msg) return -ENOMEM; if (strlen(hello_str) != count-1) return -EINVAL; len = simple_write_to_buffer(msg, count, ppos, buf, count); if (strncmp(msg, hello_str, strlen(hello_str)) != 0) return -EINVAL; return len; } static const struct file_operations file_ops = { .owner = THIS_MODULE, .write = hello_write, }; static struct miscdevice misc_dev = { MISC_DYNAMIC_MINOR, //Dynamic number for testing "test_device", &file_ops }; static int helloworld(void) { pr_debug("Hello World!\n"); return misc_register(&misc_dev); } module_init(helloworld); |
Regular expression - SQL manipulation Posted: 01 Jun 2021 08:44 AM PDT [pol@fedora data]$ lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: Fedora Description: Fedora release 34 (Thirty Four) Release: 34 Codename: ThirtyFour I'm trying to convert a sample database file from MS SQL Server to PostgreSQL. So, I'm having two small niggles that I can't resolve. shipname NVARCHAR(40) NOT NULL, That's (always) two spaces identifier (i.e. field name) - always [a-z] - lower case alphabetical followed by an unknown number of spaces followed by NVARCHAR(xy) NOT NULL or it may be followed by NVARCHAR(xy) NULL and I want to transform this into shipname TEXT NOT NULL CHECK (LENGTH(shipname) <= xy), or shipname TEXT NULL, What I have so far: sed 's/^ [a-z]+[ ]+NVARCHAR([0-9]+) NOT NULL/TEXT NOT NULL CHECK \(LENGTH\((\1) <= (\2)\)/g' So, ^ is the beginning of the string followed by two spaces followed by my field name [a-z]+ followed by an arbitrary no. of spaces [ ]+ NVARCHAR([0-9]+) and substitute in TEXT followed by NOT NULL then CHECK(LENGTH(xy) - back reference 1 - <= back reference 2... I've tried various permutations and combinations of the above, but nothing appears to work for me. [pol@fedora data]$ sed 's/^ [a-z]+[ ]+NVARCHAR([0-9]+) NOT NULL/TEXT NOT NULL CHECK \(LENGTH\((\1) <= (\2)\)/g' sed: -e expression #1, char 87: invalid reference \2 on `s' command's RHS Get invalid back reference... Ideally, and I stress ideally, if the string following NVARCHAR(xy) is NULL and not NOT NULL , I don't want any length check - because it doesn't make sense to take the LENGTH of a NULL... this is conditional behaviour - not sure if it's possible in regexps.... p.s. thought this would be trivial. Have data like this: N'Strada Provinciale 1234', N'Reggio Emilia', NULL, N'10289', N'Italy'); I want to change the N' into just plain apostrophe ' (the N' is a SQL Server thing) but I don't want to change the NULL into the empty string, or worse ULL - so I tried: [pol@fedora data]$ sed 's/N\'\'/g TSQLV5.sql but get sed: -e expression #1, char 7: unterminated `s' command I know that I've used sed a lot, but would be open to any awk commands that could perform the tasks required. |
How do I set up a CIFS and NFS multi-protocol cluster? Posted: 01 Jun 2021 07:12 AM PDT I have two NFS servers and two CIFS servers, all four with a lustre backend. Users are running into problems that changes to files on one protocol are not visible on the other protocol. I have CTDB on the NFS servers and on the CIFS servers separately but that's apparently not enough. Do I link all four servers together in CTDB or do I turn them into four NFS servers and run CIFS over NFS on two of those? What's the right way to proceed here? |
Reading stale file data with debugfs cat Posted: 01 Jun 2021 07:11 AM PDT I'm trying to read the contents of a file using the file's inode. This works fine: echo "First line" > data.txt sync sudo debugfs -R "cat <$(ls -i data.txt | cut -d' ' -f1)>" /dev/sda3 debugfs tells me the file contents are "First line". This part of the command gets data.txt's inode number: $(ls -i data.txt | cut -d' ' -f1) . Things go awry when adding a second line: echo "Second line" >> data.txt sync sudo debugfs -R "cat <$(ls -i data.txt | cut -d' ' -f1)>" /dev/sda3 I still only get "First line" from debugfs. This doesn't change after adding more lines, running sync again, or retrying a couple of days later. Why doesn't debugfs show the remainder of the file contents? Am I using debugfs the wrong way? I can reproduce this behavior reliably with other files. I'm on Arch Linux 5.12.3 using debugfs 1.46.2. The file system on /dev/sda3 is ext4. Calling debugfs -R "stat ..." produces the following, which seems unsuspicious to me: Inode: 16515371 Type: regular Mode: 0644 Flags: 0x80000 Generation: 3923658711 Version: 0x00000000:00000001 User: 1000 Group: 1000 Project: 0 Size: 34 File ACL: 0 Links: 1 Blockcount: 8 Fragment: Address: 0 Number: 0 Size: 0 ctime: 0x60b639e5:71315fa0 -- Tue Jun 1 15:45:09 2021 atime: 0x60b63988:b7c456cc -- Tue Jun 1 15:43:36 2021 mtime: 0x60b639e5:71315fa0 -- Tue Jun 1 15:45:09 2021 crtime: 0x60b63988:b7c456cc -- Tue Jun 1 15:43:36 2021 Size of extra inode fields: 32 Inode checksum: 0xbfa4390e EXTENTS: (0):66095479 |
Connecting to PIA VPN using OpenVPN on Raspberry Pi 4 (Raspbian) Posted: 01 Jun 2021 07:51 AM PDT I used these directions to setup Private Internet Access (PIA) VPN for my Raspberry Pi 4: https://www.raspberrypi-spy.co.uk/2020/06/raspberry-pi-vpn-setup-guide/ I'm running Raspbian, and using the Pi as a mini desktop computer attached to my TV. And I'd like to have a VPN connection to avoid sharing my IP. Unfortunately, my IPv6 is still being broadcasted. So I used these instructions to disable IPv6: https://cwesystems.com/?p=231 Unfortunately, when running sudo openvpn ca_vancouver.ovpn, I still get the following error: Tue Jun 1 07:49:22 2021 WARNING: file 'auth.txt' is group or others accessible Tue Jun 1 07:49:22 2021 OpenVPN 2.4.7 arm-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Feb 20 2019 Tue Jun 1 07:49:22 2021 library versions: OpenSSL 1.1.1d 10 Sep 2019, LZO 2.10 Tue Jun 1 07:49:22 2021 TCP/UDP: Preserving recently used remote address: [AF_INET]208.78.42.222:1198 Tue Jun 1 07:49:22 2021 UDP link local: (not bound) Tue Jun 1 07:49:22 2021 UDP link remote: [AF_INET]208.78.42.222:1198 Tue Jun 1 07:49:22 2021 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this Tue Jun 1 07:49:22 2021 [vancouver412] Peer Connection Initiated with [AF_INET]208.78.42.222:1198 Tue Jun 1 07:49:23 2021 OpenVPN ROUTE6: OpenVPN needs a gateway parameter for a --route-ipv6 option and no default was specified by either --route-ipv6-gateway or --ifconfig-ipv6 options Tue Jun 1 07:49:23 2021 OpenVPN ROUTE: failed to parse/resolve route for host/network: 2000::/3 Tue Jun 1 07:49:23 2021 TUN/TAP device tun0 opened Tue Jun 1 07:49:23 2021 /sbin/ip link set dev tun0 up mtu 1500 Tue Jun 1 07:49:23 2021 /sbin/ip addr add dev tun0 10.32.112.52/24 broadcast 10.32.112.255 Tue Jun 1 07:49:23 2021 WARNING: OpenVPN was configured to add an IPv6 route over tun0. However, no IPv6 has been configured for this interface, therefore the route installation may fail or may not work as expected. Tue Jun 1 07:49:23 2021 Initialization Sequence Completed More so, when trying to browse to any website in Chromium, I get the following error (in this case I'm trying www.privateinternetaccess.com): This site cant be reached www.privateinternetaccess.com. Server IP address could not be found. Error: DNS_PROBE_FINISHED_BAD_CONFIG Any advise or support available to help resolve this problem while blocking my IPv6? |
Able to ping websites but gui programs have no Internet access Posted: 01 Jun 2021 07:26 AM PDT The internet in my area went down today and on coming back up I am experiencing wired and WiFi Internet connectivity issues. The connection manager applet shows me as connected and I am able to ping google.com (for example) but the various programs I use, Firefox, Dropbox, liferea, thunderbird etc cannot connect to Internet. I have tried resetting via network manager restart, nmcli networking off and a few other commands I have forgotten. Any ideas how I resolve this? Edit: using a Virgin hub 3.0 router. Wireless adaptor is qualcomm atheros ar9485. I also use one fo those tplink WiFi extenders but even if I stand right next to router it doesn't work. I had connection issues with my work machine which runs windows after Internet came back on but that appears to have resolved itself now. |
Support for AMD RX560X graphics card in Solus OS Posted: 01 Jun 2021 08:23 AM PDT Is my video card supported by the system? If so, tell me what I need to do to fix the discrete graphics card performance issue. ACER nitro 5 an515-42 laptop configuration: 16 GB of RAM, APU Risen 2500u with integrated Vega 8 graphics card, discrete AMD RX560X graphics card. $ lspci 00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Root Complex 00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 IOMMU 00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge 00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0] 00:01.6 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0] 00:01.7 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0] 00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge 00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A 00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus B 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61) 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51) 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 0 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 1 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 2 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 3 00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 4 00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 5 00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 6 00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 7 01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] (rev c0) 02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTL8411B PCI Express Card Reader (rev 01) 02:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12) 03:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32) 04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] (rev c4) 04:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio Controller 04:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor 04:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1 04:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1 04:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller 05:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 61) $ lspci -v -s 04:00.0 04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] (rev c4) (prog-if 00 [VGA controller]) Subsystem: Acer Incorporated [ALI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] Flags: bus master, fast devsel, latency 0, IRQ 44 Memory at b0000000 (64-bit, prefetchable) [size=256M] Memory at c0000000 (64-bit, prefetchable) [size=2M] I/O ports at 1000 [size=256] Memory at e0800000 (32-bit, non-prefetchable) [size=512K] Capabilities: [48] Vendor Specific Information: Len=08 <?> Capabilities: [50] Power Management version 3 Capabilities: [64] Express Legacy Endpoint, MSI 00 Capabilities: [a0] MSI: Enable- Count=1/4 Maskable- 64bit+ Capabilities: [c0] MSI-X: Enable+ Count=3 Masked- Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?> Capabilities: [200] Resizable BAR <?> Capabilities: [270] Secondary PCI Express Capabilities: [2a0] Access Control Services Capabilities: [2b0] Address Translation Service (ATS) Capabilities: [2c0] Page Request Interface (PRI) Capabilities: [2d0] Process Address Space ID (PASID) Capabilities: [320] Latency Tolerance Reporting Kernel driver in use: amdgpu $ lspci -v -s 01:00.0 01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] (rev c0) Subsystem: Acer Incorporated [ALI] Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] Physical Slot: 0 Flags: bus master, fast devsel, latency 0, IRQ 54 Memory at d0000000 (64-bit, prefetchable) [size=256M] Memory at e0000000 (64-bit, prefetchable) [size=2M] I/O ports at 3000 [size=256] Memory at e0a00000 (32-bit, non-prefetchable) [size=256K] Expansion ROM at e0a40000 [disabled] [size=128K] Capabilities: [48] Vendor Specific Information: Len=08 <?> Capabilities: [50] Power Management version 3 Capabilities: [58] Express Legacy Endpoint, MSI 00 Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+ Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?> Capabilities: [270] Secondary PCI Express Capabilities: [320] Latency Tolerance Reporting Kernel driver in use: amdgpu $ DRI_PRIME=0 vblank_mode=0 glxgears ATTENTION: default value of option vblank_mode overridden by environment. 32991 frames in 5.0 seconds = 6598.002 FPS 35251 frames in 5.0 seconds = 7050.055 FPS 34655 frames in 5.0 seconds = 6930.774 FPS $ DRI_PRIME=1 vblank_mode=0 glxgears ATTENTION: default value of option vblank_mode overridden by environment. 17674 frames in 5.0 seconds = 3534.720 FPS 18294 frames in 5.0 seconds = 3658.656 FPS 18430 frames in 5.0 seconds = 3685.798 FPS $ DRI_PRIME=0 glxinfo | grep "OpenGL renderer" OpenGL renderer string: AMD Radeon(TM) Vega 8 Graphics (RAVEN, DRM 3.40.0, 5.11.22-180.current, LLVM 11.1.0) $ DRI_PRIME=1 glxinfo | grep "OpenGL renderer" OpenGL renderer string: AMD Radeon (TM) RX Graphics (POLARIS11, DRM 3.40.0, 5.11.22-180.current, LLVM 11.1.0) $ inxi -G Graphics: Device-1: AMD Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] driver: amdgpu v: kernel Device-2: AMD Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] driver: amdgpu v: kernel Device-3: Realtek HD WebCam type: USB driver: uvcvideo Display: x11 server: X.Org 1.20.11 driver: loaded: amdgpu,ati unloaded: fbdev,modesetting,vesa resolution: 3440x1440 OpenGL: renderer: AMD Radeon Vega 8 Graphics (RAVEN DRM 3.40.0 5.11.22-180.current LLVM The problem is that the performance of the integrated Vega 8 graphics card is higher than that of the discrete RX560X. As a result, in the game The Witcher 3 using Valve Proton, the number of FPS is 5. And on Windows 10, the number of FPS 30. Also, the native game War Thunder has in Windows 10 the number of FPS 60. And on SolusOS, the number of FPS is 9. Found the same problem on Fedora 28. And this problem was solved, as I understand it, by replacing or patching the kernel. I don't know much about Linux OS. Is there a similar solution for Solus OS? |
How do I find the first non-zero byte on a block device, with an optional offset? Posted: 01 Jun 2021 07:19 AM PDT I'm trying to find the first non-zero byte (starting from an optional offset) on a block device using dd and print its offset, but I am stuck. I didn't mention dd in the title as I figured there might be a more appropriate tool than dd to do this, but I figured dd should be a good start. If you know of a more appropriate tool and/or more efficient way to reach my goal, that's fine too. In the meantime I'll show you how far I've come with dd in bash, so far. #!/bin/bash # infile is just a temporary test file for now, which will be replaced with /dev/sdb, for instance infile=test.txt offset=0 while true; do byte=`dd status='none' bs=1 count=1 if="$infile" skip=$offset` ret=$? # the following doesn't appear to work # ret is always 0, even when the end of file/device is reached # how do I correctly determine if dd has reached the end of file/device? if [ $ret -gt 0 ]; then echo 'error, or end of file reached' break fi # I don't know how to correctly determine if the byte is non-zero # how do I determine if the read byte is non-zero? if [ $byte ???? ]; then echo "non-zero byte found at $offset" break fi ((++offset)) done As you can see, I'm stuck with two issues that I don't know how to solve: a. How do I make the while loop break when dd has reached the end of the file/device? dd gives an exit code of 0 , where I expected a non-zero exit code instead. b. How do I evaluate whether the byte that dd read and returns on stdout is non-zero? I think I've read somewhere that special care should be taken in bash with \0 bytes as well, but I'm not even sure this pertains to this situation. Can you give me some hints on how to proceed, or perhaps suggest and alternative way to achieve my goal? |
Why does the HOME variable have different values during startup Posted: 01 Jun 2021 07:33 AM PDT I put the code PATH="$HOME/.local/bin" in my .profile file. Then, after startup, if I type in echo $PATH it will print out /home/.local/bin However, if I run PATH="$HOME/.local/bin after start up and try echo $PATH it will instead print out /home/[my username]/.local/bin instead. So the HOME variable changes at some point from /home to /home/[my username] . Why is this? Does the HOME variable get altered by the OS during/after startup? It's very strange, and makes setting up dotfiles more arcane. If it helps, I'm using mint as my distro, and bash as the shell. |
g++ unrecognized option not part of the command Posted: 01 Jun 2021 07:35 AM PDT I'm trying to compile a project, I used make and got the following output g++ -g -Wall -std=c++11 -I include/ -o build/example.o -c example/example.cpp as: unrecognized option '--64' The error states that the option --64 is used and unrecognized while it is not in the command. Other occurrences online of this error suggests changing --64 to --m64 . This problem is related to the gcc version used. But the option is not present in my case, how can this error appear while the command does not contain the specified option ? Edit: make -m results in the same output. And the error occurs even when running the g++ command manually. Edit: The error appears in the terminal after sourcing a file: source setup.bash (required by the project for some operation) The script exports the following variable but they don't seem to be in relation with gcc. - OPENOCD_SCRIPTS
- IDF_PATH
- IDF_TOOLS_EXPORT_CMD
- IDF_PYTHON_INSTALL_CMD
- IDF_PYTHON_ENv_PATH
It also adds some path to PATH Even with this information, I still don't get why the error occurs. Even if the gcc version was changed because of the paths added to PATH , the option is not part of the command. |
pulseaudio setup, to listen my left HDMI display as left speaker and my right as right speaker Posted: 01 Jun 2021 09:13 AM PDT I have two displays in front of me and both are connected with DP/HDMI. Now I try to setup Pulseaudio to have a sink which is mapped as: Both speakers (R/L) from my left displays should go to the left channel and Both speakers (R/L) from my right display should go to the right channel I currently have set them as a combined-sink. load-module module-alsa-sink device=hdmi:CARD=NVidia,DEV=0 sink_properties="device.description='NVIDIA DP #1'" load-module module-alsa-sink device=hdmi:CARD=NVidia,DEV=1 sink_properties="device.description='NVIDIA DP #2'" load-module module-combine-sink sink_name="DP1+2" sink_properties=device.description=Combined-DP slaves=alsa_output.hdmi_CARD_NVidia_DEV_0,alsa_output.hdmi_CARD_NVidia_DEV_1 channels=2 But then left and right is totally mixed up :) |
How to get rows from csv file that only have numerical values (without english letters)? Posted: 01 Jun 2021 09:27 AM PDT I want to get rows from CSV files that only include numbers. My input file looks like this: 8.1.0,289,,,,,,,,,,,,,,,, 9,260,,,,,,,,,,,,,,,, 10,207,,,,,,,,,,,,,,,, 9,206,,,,,,,,,,,,,,,, Note,8,,,,,,,,,,,,,,,, 10,194,,,,,,,,,,,,,,,, 8.1.0,184,,,,,,,,,,,,,,,, it should able to get the numbers have above format like 9 , 9.0.0 , 8.1 etc. How can I use csvgrep or awk or sed command for this? The CSV file have two columns. It should omit the lines which have any letter in them. |
Proxy Server not able to connect with Backend Server Posted: 01 Jun 2021 06:57 AM PDT I deployed Proxy Server running on Redhat 7.6 and Apache is configured as Reverse Proxy Server. But when i try to open the URL of proxy server in browser in Logs of Reverse proxy server it is giving this error message [Tue Jun 01 08:37:47.399377 2021] [proxy_http:error] [pid 130294] (103)Software caused connection abort: [client 192.168.xx.xxx:43702] AH01102: error reading status line from remote server msolarwinds:443 [Tue Jun 01 08:37:47.399514 2021] [proxy:error] [pid 130294] [client 192.168.xx.xx:43702] AH00898: Error reading from remote server returned by / Solarwinds is running as Backend. Reverse Proxy VirtualHost <VirtualHost *:80> ServerAdmin webmaster@domain ServerName revproxy-01.domain ServerAlias revproxy-01 Redirect permanent / https://192.168.xxx.xxx #ProxyPass /Orion/ https://msolarwinds.domain:443/ #ProxyPassReverse /Orion/ https://msolarwinds.domain:443/ #ErrorLog "/var/log/httpd/reverseproxy-error_log" #CustomLog "/var/log/httpd/reverseproxy-access_log" common </VirtualHost> <VirtualHost *:443> SSLEngine on SSLProxyEngine on SSLProtocol all -SSLv2 -SSLv3 SSLProxyProtocol all -SSLv2 SSLv3 #SSLProxyProtocol +TLSv1 -TLSv1.2 -SSLv2 -SSLv3 SSLCertificateFile /etc/pki/tls/certs/ca.crt SSLCertificateKeyFile /etc/pki/tls/private/ca.key ServerAdmin webmaster@domain ServerName revproxy-01.domain ServerAlias revproxy-01 #<IfModule mod_proxy.c> # <Proxy *> # Require all granted # </Proxy> # backend server and forwarded path #SSLProxyCheckPeerCN off #SSLProxyCheckPeerExpire off #SSLProxyCheckPeerName off #SSLProxyVerify none #ProxyAddHeaders off #ProxyRequests off #ProxyVia off #ProxyPreserveHost on #ProxyPass / https://172.16.xxx.xxx:443/ timeout=7200 ProxyPass / https://msolarwinds.domain:443/ ProxyPassReverse / https://msolarwinds.domain:443/ ErrorLog "/var/log/httpd/reverseproxy-error_log" CustomLog "/var/log/httpd/reverseproxy-access_log" common #</IfModule> </VirtualHost> if i run curl msolarwinds.domain:443 on RevProxy server it replies with <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>502 Proxy Error</title> </head><body> <h1>Proxy Error</h1> <p>The proxy server received an invalid response from an upstream server.<br /> The proxy server could not handle the request <em><a href="/">GET /</a></em>.<p> Reason: <strong>Error reading from remote server</strong></p></p> </body></html> |
Can't read ~/.Xauthority after implementing NFS Kerberos mount Posted: 01 Jun 2021 09:23 AM PDT I'm using debian Buster where I have Kerberos, LDAP and SSSD working. I was monting my home directory to the client using NFS however I realized it was insecure. So I implemented kerberos mounting. However when trying to login through lightdm on boot it goes black and boots me back to the lightdm login screen with no error. I found this in /var/log/syslog Error reading existing Xauthority: Failed to open file "/home/ben/.Xauthority": Permission denied Error writing X authority: Failed to open X authority /home/ben/.Xauthority: Permission denied I logged in as root from tty1 then did su ben , ran kinit and it seems I can't read/write to any file in my home directory that is owned by me only ones with read set on other. Here is my /etc/exports from my server. /home/ 192.168.16.0/24(rw,sec=krb5p,sync,fsid=0,crossmnt,no_subtree_check) Here is my /etc/fstab 192.168.16.20:/home /home nfs defaults,exec 0 0 Clients keytab file as requested. host/client@DOMAIN host/client@DOMAIN nfs/client@DOMAIN nfs/client@DOMAIN NFS principals in Kadmin on server nfs/server@DOMAIN nfs/client@DOMAIN I've been debugging this for sometime and I'm really struggling to get anywhere. The mount looks like its mounted correctly. My user has a kerberos ticket. The permissions look perfect and the I can read/write with the same user just fine on the server. Please let me know if you need any more information to help fix this issue. Update I found this in the auth log of the server when I try to login on the client. NEEDED_PREAUTH: ben@DOMAIN for krbtgt/DOMAIN@DOMAIN, Additional pre-authentication required ISSUE: authtime 1622558991, etypes {rep=18 tkt=18 ses=18}, ben@DOMAIN for krbtgt/DOMAIN@DOMAIN However I don't know why as I'm running ntp on the server and have ntpdate on the client pointing to the server. Also if I run watch -n 1 date -R on the client and server, place the terminal windows side by side they show the exact same time. This error also appears when authenticating with kinit so I'm not sure if it's related to the issue. |
Print text using black ink on HP Laserjet color printer Posted: 01 Jun 2021 08:07 AM PDT I have a HP LaserJet CP1025NW (color) printer installed on a Linux Mint 20.1 machine using HPLIP (required plugin installed, version 3.20.11). For some reason, whenever I try to print a document (e.g. PDF, a text file, etc.) with black text inside, the text is always printed using the three CMY colors. The result is not as pretty looking as if the text had been printed using the black cartridge only; also, it is a waste of ink. Notice that if the same document is printed via a Windows machine on the same printer, I get the expected result of black text printed in pure black. I could not find any option (neither in CUPS, nor in HPLIP) to adjust this undesired behavior. Any help is appreciated. |
Error while trying to use numpy, maybe because two version of python are installed? Posted: 01 Jun 2021 09:34 AM PDT I'm new to Linux, I installed Mint 20.1. The thing is that while trying to use some code using numpy I get this error: I tried updating python and now it seems I have two versions of it. If in terminal I type python3 I get this message If I type python3.9 i see this Maybe is because of this? I really appreciate your help, thanks! |
xrdp disconnects immediately after connection from Windows10/Centos to Centos7 Posted: 01 Jun 2021 07:18 AM PDT This is my xrdp config: [Globals] ini_version=1 fork=true port=3389 use_vsock=false tcp_nodelay=true tcp_keepalive=true security_layer=negotiate crypt_level=high certificate= key_file= ssl_protocols=TLSv1.2, TLSv1.3 autorun= allow_channels=true allow_multimon=true bitmap_cache=true bitmap_compression=true bulk_compression=true max_bpp=128 use_compression=yes new_cursors=true use_fastpath=both blue=009cb5 grey=dedede ls_top_window_bg_color=009cb5 ls_width=350 ls_height=430 ls_bg_color=dedede ls_logo_filename= ls_logo_x_pos=55 ls_logo_y_pos=50 ls_label_x_pos=30 ls_label_width=65 ls_input_x_pos=110 ls_input_width=210 ls_input_y_pos=220 ls_btn_ok_x_pos=142 ls_btn_ok_y_pos=370 ls_btn_ok_width=85 ls_btn_ok_height=30 ls_btn_cancel_x_pos=237 ls_btn_cancel_y_pos=370 ls_btn_cancel_width=85 ls_btn_cancel_height=30 [Logging] LogFile=xrdp.log LogLevel=DEBUG EnableSyslog=true SyslogLevel=DEBUG [Channels] rdpdr=true rdpsnd=true drdynvc=true cliprdr=true rail=true xrdpvr=true tcutils=true [Xvnc] name=Xvnc lib=libvnc.so username=ask password=ask ip=127.0.0.1 port=-1 [Xorg] name=Xorg lib=libxup.so username=ask password=ask ip=127.0.0.1 port=-1 code=20 I am trying to connect with mstsc to this machine (this is after fresh pc restart, noone has logged in): while in this login box, no disconnect happens: after I put there correct login/password, I get black screen first and then mstsc window closes. I tried to connect from KDE remote connection application, but it also failed same way. xrdp.log doesn't seem to contain anything interesting: [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350 [20190606-04:14:36] [INFO ] xrdp_wm_log_msg: sesman connect ok [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait... [20190606-04:14:36] [DEBUG] return value from xrdp_mm_connect 0 [20190606-04:14:36] [INFO ] xrdp_wm_log_msg: login successful for display 10 [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: VNC started connecting [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: VNC connecting to 127.0.0.1 5910 [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: VNC tcp connected [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: VNC security level is 2 (1 = none, 2 = standard) [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: VNC password ok [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: VNC sending share flag [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: VNC receiving server init [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: VNC receiving pixel format [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: VNC receiving name length [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: VNC receiving name [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: VNC sending pixel format [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: VNC sending encodings [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: VNC sending framebuffer update request [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: VNC sending cursor [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: VNC connection complete, connected ok [20190606-04:14:36] [DEBUG] xrdp_wm_log_msg: connected ok [20190606-04:14:36] [DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful [20190606-04:14:36] [DEBUG] Closed socket 18 (AF_INET 127.0.0.1:47744) [20190606-04:14:37] [DEBUG] Closed socket 20 (AF_UNIX) [20190606-04:14:37] [DEBUG] Closed socket 12 (AF_INET 127.0.0.1:3389) [20190606-04:14:37] [DEBUG] xrdp_mm_module_cleanup [20190606-04:14:37] [DEBUG] VNC mod_exit [20190606-04:14:37] [DEBUG] Closed socket 19 (AF_INET 127.0.0.1:40224) How can I fix that? |
Customize bash looks for user profile on debian 9 Posted: 01 Jun 2021 08:46 AM PDT I am trying to customize the bash prompt on Linux Debian 9. I got the script from Github and I modified the file .bashrc On the terminal, when I log in as root, I can see the customization I was looking for, but once I exit to the normal user, all the customization vanishes and I go back to the old looking of Debian's terminal. On the /root folder I have 2 relevant files .bashrc and .profile The .profile file is configured to import the configuration from the .bashrc file by default, so I did not change anything in there. The /root/.profile file configuraton: # ~/.profile: executed by Bourne-compatible login shells. if [ "$BASH" ]; then if [ -f ~/.bashrc ]; then . ~/.bashrc fi fi mesg n || true So the question is: how can I make my user bash customization the same as my root (su) bash customization? Screenshots included: When I first launch my terminal: When I log in as root: When I exit root: |
how to assign log as a variable in bash Posted: 01 Jun 2021 08:53 AM PDT I want to assign log output to "line", I tried the following line=tail -1000 /var/log/syslog but it doesn't work. myscript is like below #!/bin/bash line=`tail -1000 /var/log/syslog` d1=$(date --date="-10 min" "+%b %_d %H:%M") d2=$(date "+%b %_d %H:%M") while read line; do [[ $line > $d1 && $line < $d2 || $line =~ $d2 ]] && echo $line done |
Zorin OS, can't boot from USB Posted: 01 Jun 2021 07:03 AM PDT I recently installed Zorin OS on my Lenovo Yoga 2. I completely got rid of Windows and am not dual booting. I am now trying to get back to Windows 10. I created a Windows 10 USB drive, but I can't get the computer to boot from it. When I change the UEFI boot order, it still boots into Zorin, and when I go back to the UEFI, it has changed the boot order back. I also created another Zorin USB drive, thinking I would boot from it, then format the Zorin partition so it would have to boot from USB. Same thing, it just won't boot from USB. Is there a way to trigger booting from USB from within Zorin? If not, any ideas on how to get rid of Zorin some other way? |
How to install Linux on the Playstation 2 Posted: 01 Jun 2021 08:00 AM PDT Looking to learn about game development? Are you a Linux enthusiast looking to test the claim that "Linux runs on everything"? Perhaps you are a software developer who is looking to release for multiple architectures, and you don't have another MIPS Little Endian machine on-hand for testing your programme. Whatever your situation there are a surprising number of reasons to install Linux on a Playstation 2, even sixteen years after it's release (boy do I feel old all of a sudden.), yet an equally surprising lack of documentation about it or how to install it. Now don't get me wrong, if you want to use the original Sony Linux Kit, or one of it's updated open source releases on a fat PS2 with a network adapter and an IDE hard disk you can find plenty of info. However this requires the acquisition of several things, and can be quite expensive, especially when it comes to the Sony Linux Kit itself. This guide will cover some basics about the PS2's native hardware, and it's hardware compatibility, and then we'll move on to how to install Linux on a wider variety of PS2. What CPU does the PS2 use? The PS2 uses a single core "Emotion Engine" CPU, clocked at 295MHz in the original fat models, and 299MHz in newer slim models. The Emotion Engine is a 64-bit MIPS Little Endian CPU, with support for 128-bit addresses. How much RAM does the PS2 have? It has 32MB RDRAM and 4MB of eDRAM. What kind of GPU does it have? The PS2 uses the "Graphics Synthesizer" GPU clocked at 147.4MHz, and is capable of outputting up to 1920x1080 graphics at 60Hz in 32-bit color. What external storage does it support? An unmodified PS2 supports Audio-CD, Video-DVD, and up to two memory cards of up to 128MB in size for game saves. A PS2 modified with a software exploit also supports two memory cards of up to 128MB for general file management and storage, and browsing files on data-CD/DVDs via a 3rd party file manager such as uLaunchELF, as well as some USB 1.1 disks, with support for USB 2.0 disks being available on newer slim models via software support. A PS2 modified with a modchip has added support for data-CDs and DVDs without a 3rd party programme. Now on to the Linux installation: (a quick side note, if you just want to test or play around with Linux on your PS2, you can simply burn the image found here: [link] (https://sourceforge.net/projects/kernelloader/files/BlackRhino%20Linux%20Distribution/Live%20Linux%20DVD/PS2%20Live%20Linux%20DVD%20v3/ps2linux_live_v3_ntsc_large_no_modchip.7z/download) to a DVD and run this programme [link] (https://sourceforge.net/projects/kernelloader/files/Kernelloader/Kernelloader%203.0/kloader3.0.elf/download) via uLaunchELF from a flash drive or memory card with no setup required. Now on with the Linux!) |
boot linux kernel (4.7) with efistub, initrd, and lvm Posted: 01 Jun 2021 08:37 AM PDT for a few days, I googled everywhere to see if someone ever had the same issues as I do. here is my linux kernel on my Lenovo Z50-70 ( maybe it's important) $ uname -a Linux Z50-Debian 4.7.0-1-amd64 #1 SMP Debian 4.7.8-1 (2016-10-19) x86_64 GNU/Linux $ lvdisplay |grep -i path LV Path /dev/Debian/Home LV Path /dev/Debian/Root LV Path /dev/Debian/Swap # gdisk /dev/sda -l |grep 0 GPT fdisk (gdisk) version 1.0.1 Disk identifier (GUID): 4A75B640-D8A2-03A2-906D-9D9228B6E800 Partitions will be aligned on 2048-sector boundaries Total free space is 3707 sectors (1.8 MiB) 1 2048 3653631 1.7 GiB 2700 Basic data partition 2 3653632 4601855 463.0 MiB EF00 EFI system partition 3 4601856 6752255 1.0 GiB EF00 Basic data partition 4 6752256 7014399 128.0 MiB 0C01 Microsoft reserved ... 5 7014400 907063665 429.2 GiB 0700 Basic data partition 6 907065344 908787711 841.0 MiB 2700 7 908787712 910155775 668.0 MiB EF00 8 910155776 953745407 20.8 GiB 8E00 Linux 9 953745408 976773119 11.0 GiB 2700 Basic data partition I've followed two guides to use efi-stub (the kernel UEFI self-bootlaoder) official debian wiki on efistub and bitbinary guide on debian and efistub but none of them worked. issue 1: My firmware doesn't find the EFI/Debian/vmlinuz.efi ( but it did find rEFInd efi app, as well as grub when I first installed Debian) issue 2: when starting the vmlinuz.efi through rEFInd , It stop the boot process with a initramfs prompt and errors telling me it couldn't mount/find root. also cat /proc/cmdline does not echo my /proc/cmdline , but a generic one without any specified option for root mounting issue 3: as on the guide i've used efibootmgr , but as each reboot my new entry is deleted. I'm fairly new to the (U)EFI world, but I really wish I could make this work. As I'm pretty much out of ideas for now, if you know anything that could help me, please shout it out ! Thank you. |
Ctrl-space not getting through ssh Posted: 01 Jun 2021 09:24 AM PDT I am on windows 8 using GIT bash to access a remote server via ssh . When I press Ctrl+Space in emacs running locally in console (emacs -nw ), everything works as expected. However, when going over ssh , Ctrl+Space simply inserts a space, while other commands like Ctrl+X work fine. Why doesn't Ctrl+Space get through? I have considered switching to a different terminal, but I am also curious as to why this is happening. |
how can I add (subtract, etc.) two numbers with bash? Posted: 01 Jun 2021 08:41 AM PDT I can read the numbers and operation in with: echo "First number please" read num1 echo "Second number please" read num2 echo "Operation?" read op but then all my attempts to add the numbers fail: case "$op" in "+") echo num1+num2;; "-") echo `num1-num2`;; esac Run: First number please 1 Second mumber please 2 Operation? + Output: num1+num2 ...or... echo $num1+$num2;; # results in: 1+2 ...or... echo `$num1`+`$num2`;; # results in: ...line 9: 1: command not found Seems like I'm getting strings still perhaps when I try add add ("2+2" instead of "4"). |
No comments:
Post a Comment