Blinking screen after messing with lighdm greeter at Zorin OS 15 Lite Posted: 27 Jun 2021 09:58 AM PDT Ok I messed up I was trying to modify our login screen in Zorin 15 Lite and when I rebooted my laptop I couldnt even access the login screen. My monitor keeps blinking and it renders only the mouse arrow... |
how to modify the anaconda environment prompt in zsh? Posted: 27 Jun 2021 09:36 AM PDT To make my command line prompt look prettier on zsh, I added this line to .zshrc : PROMPT='%F{green}%n%f %B%F{blue}%1~%f%b $ ' However, when I activate an anaconda virtual environment (i.e. conda activate base ), I see the name of the virtual environment on the left like this: (base) myusername ~ $ I wonder how I can modify the virtual environment part of the prompt (say we want to color it to cyan for example) |
ext4 free blocks or overhead clusters Posted: 27 Jun 2021 10:03 AM PDT When I create an ext4 file system on a sparse 16GB file without reserving root space, the actual free size is 15.58GB. Why does this happen? Commands I use: fallocate -l 16G test.img mkfs -t ext4 -m 0 test.img mount test.img test In tune2fs there is a value Overhead clusters: 109857 that can be multiplied by 4096 (block size) and divided by 1024^3 to get the value in gigabytes, then get the missing ~0.41 GB. https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout says something very strange about Overhead clusters: Overhead blocks/clusters in fs. (Huh? This field is always zero, which means that the kernel calculates it dynamically.) What is the meaning of this? Does it have something to do with this issue? What size should I set in fallocate so that the total size of the mounted image would be 16 GB? |
Slurm multifactor priority - how to configure Slurm to consider past usage? Posted: 27 Jun 2021 09:10 AM PDT I'm trying to configure our Slurm to allocate users' jobs according to past usage. The goal is to have the job priority consider past time usage of mainly GPUs. I understand I must use the FairShare tree to configure its weight, but I'm not sure how to configure for Fairshare what variables to consider. I just don't seems to get the gist of how this is supposed to work. Current configuration is: > '''###Job Priority## > #Fair tree, multifactor with its parameters (http://slurm.schedmd.com/fair_tree.html) > #PriorityFlags=FAIR_TREE > #PriorityType=priority/multifactor > #PriorityDecayHalfLife=14-0 > #PriorityMaxAge=7-0 > #PriorityUsageResetPeriod=NONE > #PriorityWeightAge=100 > #PriorityWeightFairshare=10000 > #Unused weights > #PriorityWeightJobSize=0 > #PriorityWeightPartition=0 > #PriorityWeightQOS=0''' > Possible configuration (correct me if I'm wrong): > ###Job Priority## > #Fair tree, multifactor with its parameters (http://slurm.schedmd.com/fair_tree.html) > PriorityType=priority/multifactor > #PriorityDecayHalfLife=14-0 PriorityMaxAge=7-0 PriorityWeightAge=1000 PriorityWeightFairshare=10000 > #Unused weights PriorityWeightJobSize=100 PriorityWeightPartition=0 PriorityWeightQOS=0 > > PriorityUsageResetPeriod=MONTHLY > > AccountingStorageTRES=gres/gpu,gres/gpu:geforce_rtx_1080,gres/gpu:titan,gres/gpu:quadro,gres/gpu:geforce_rtx_3090,gres/gpu:v100 > TRESBillingWeights="CPU=1.0,Mem=0.25G,gres/gpu=1.0" Would this do the trick? Change the weights for TRESBilling? Thanks to those who would answer! |
How to extend an encryted partition? (Kali linux) Posted: 27 Jun 2021 09:43 AM PDT Hi my encrypted partition is full, how can I extend it step by step please? I tried with Thank you so much. https://ibb.co/9ZLNVCz |
Makefile for texi2pdf command Posted: 27 Jun 2021 09:03 AM PDT I use texi2pdf to generate pdf files from texinfo files using the command texi2pdf myfile.texi Am working on using a makefile for this and have written name=06a-amcoh texi=${name}.texi pdf=${name}.pdf all: ${pdf} ${pdf}: ${texi} texi2pdf $< clear: rm -f ${pdf} I could do with some help on the correct way to write the makefile and how to run it. |
SELinux Prevents httpd to do shared memory syscall Posted: 27 Jun 2021 08:44 AM PDT looks like the workaround is to allow httpd_t to run in unconfined_t for shm, which doesn't look right. I don't know how the shm need unconfined_t for key=1392707921? Can we give permission to the "key"? type=IPC msg=audit(1624375715.312:4225): ouid=0 ogid=0 mode=0666 obj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 type=PROCTITLE msg=audit(1624375715.312:4225): proctitle=2F7573722F7362696E2F6874747064002D44464F524547524F554E44 type=AVC msg=audit(1624375724.580:4226): avc: denied { unix_read unix_write } for pid=25626 comm="httpd" key=1392707921 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=shm permissive=0 type=SYSCALL msg=audit(1624375724.580:4226): arch=c000003e syscall=29 success=no exit=-13 a0=53030951 a1=4338 a2=1b6 a3=6b items=0 ppid=25612 pid=25626 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm="httpd" exe="/usr/sbin/httpd" subj=system_u:system_r:httpd_t:s0 key=(null) [root@localhost build]# audit2allow -w -a type=AVC msg=audit(1624375724.580:4226): avc: denied { unix_read unix_write } for pid=25626 comm="httpd" key=1392707921 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=shm permissive=0 Was caused by: Missing type enforcement (TE) allow rule. You can use audit2allow to generate a loadable module to allow this access. [root@localhost build]# audit2allow -a #============= httpd_t ============== allow httpd_t unconfined_t:shm { unix_read unix_write }; [root@localhost build]# allow httpd_t unconfined_t:shm { unix_read unix_write }; bash: allow: command not found [root@localhost build]# |
Opening py files in vim by default without having to type "vim filename.py" Posted: 27 Jun 2021 08:50 AM PDT I was wondering whether it is possible to open python files in vim, without typing "vim" in front of it. For example: Instead of: vim filename.py simply $ filename.py Would open the file in vim. I believe it is not upto .vimrc but .bashrc or .zshrc (in my case), which would interpret the .py files to be executable with vim or something. I am using ubuntu (wsl2), with zsh (oh-my-zsh). It is possible that this has been asked before, but I couldn't find such a question. Thank you. |
Attach a drive to RISCV-64 Linux in qemu does not work Posted: 27 Jun 2021 07:47 AM PDT based on this instruction Set Up The Environment for RISCV-64 Linux I've created RISCV-64 Linux Image on arch Linux(I did not compile the qemu because there was a binary package) and I want to attach disk (image file) to my VM but it does not work Additional steps for attaching a disk: for adding sda cd dev mknod sda b 8 0 after that I've created a raw disk image: qemu-img create -f raw rootfs.img 1G and then running the VM: sudo qemu-system-riscv64 -nographic -machine virt -kernel Image -initrd initramfs/initramfs.cpio.gz -append "root=/dev/sda console=ttyS0" -device virtio-blk-device,drive=sda -drive file=rootfs.img,format=raw,id=sda after running the VM successfully I can not mount a /dev/sda (I know that I should make a partition & file system first, but fdisk dose not find /dev/sda) / # mkdir /mnt / # mount /dev/sda /mnt mount: mounting /dev/sda on /mnt failed: No such device or address / # fdisk /dev/sda fdisk: can't open '/dev/sda': No such device or address Booting log: OpenSBI v0.9 ____ _____ ____ _____ / __ \ / ____| _ \_ _| | | | |_ __ ___ _ __ | (___ | |_) || | | | | | '_ \ / _ \ '_ \ \___ \| _ < | | | |__| | |_) | __/ | | |____) | |_) || |_ \____/| .__/ \___|_| |_|_____/|____/_____| | | |_| Platform Name : riscv-virtio,qemu Platform Features : timer,mfdeleg Platform HART Count : 1 Firmware Base : 0x80000000 Firmware Size : 100 KB Runtime SBI Version : 0.2 Domain0 Name : root Domain0 Boot HART : 0 Domain0 HARTs : 0* Domain0 Region00 : 0x0000000080000000-0x000000008001ffff () Domain0 Region01 : 0x0000000000000000-0xffffffffffffffff (R,W,X) Domain0 Next Address : 0x0000000080200000 Domain0 Next Arg1 : 0x0000000087000000 Domain0 Next Mode : S-mode Domain0 SysReset : yes Boot HART ID : 0 Boot HART Domain : root Boot HART ISA : rv64imafdcsu Boot HART Features : scounteren,mcounteren,time Boot HART PMP Count : 16 Boot HART PMP Granularity : 4 Boot HART PMP Address Bits: 54 Boot HART MHPM Count : 0 Boot HART MHPM Count : 0 Boot HART MIDELEG : 0x0000000000000222 Boot HART MEDELEG : 0x000000000000b109 [ 0.000000] Linux version 5.13.0-rc3 (geo@world) (riscv64-linux-gnu-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.36) #1 SMP Thu May 27 10:37:40 +0430 2021 [ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000 [ 0.000000] Machine model: riscv-virtio,qemu [ 0.000000] efi: UEFI not found. [ 0.000000] Zone ranges: [ 0.000000] DMA32 [mem 0x0000000080200000-0x0000000087ffffff] [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000080200000-0x0000000087ffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x0000000087ffffff] [ 0.000000] SBI specification v0.2 detected [ 0.000000] SBI implementation ID=0x1 Version=0x9 [ 0.000000] SBI TIME extension detected [ 0.000000] SBI IPI extension detected [ 0.000000] SBI RFENCE extension detected [ 0.000000] software IO TLB: Cannot allocate buffer [ 0.000000] SBI v0.2 HSM extension detected [ 0.000000] riscv: ISA extensions acdfimsu [ 0.000000] riscv: ELF capabilities acdfim [ 0.000000] percpu: Embedded 18 pages/cpu s33640 r8192 d31896 u73728 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 31815 [ 0.000000] Kernel command line: root=/dev/sda console=ttyS0 [ 0.000000] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes, linear) [ 0.000000] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 0.000000] Sorting __ex_table... [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Virtual kernel memory layout: [ 0.000000] fixmap : 0xffffffcefee00000 - 0xffffffceff000000 (2048 kB) [ 0.000000] pci io : 0xffffffceff000000 - 0xffffffcf00000000 ( 16 MB) [ 0.000000] vmemmap : 0xffffffcf00000000 - 0xffffffcfffffffff (4095 MB) [ 0.000000] vmalloc : 0xffffffd000000000 - 0xffffffdfffffffff (65535 MB) [ 0.000000] lowmem : 0xffffffe000000000 - 0xffffffe007e00000 ( 126 MB) [ 0.000000] kernel : 0xffffffff80000000 - 0xffffffffffffffff (2047 MB) [ 0.000000] Memory: 105364K/129024K available (7292K kernel code, 4907K rwdata, 4096K rodata, 2149K init, 309K bss, 23660K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] rcu: Hierarchical RCU implementation. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1. [ 0.000000] rcu: RCU debug extended QS entry/exit. [ 0.000000] Tracing variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 [ 0.000000] riscv-intc: 64 local interrupts mapped [ 0.000000] plic: plic@c000000: mapped 53 interrupts with 1 handlers for 2 contexts. [ 0.000000] random: get_random_bytes called from start_kernel+0x3be/0x5a4 with crng_init=0 [ 0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0] [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns [ 0.000084] sched_clock: 64 bits at 10MHz, resolution 100ns, wraps every 4398046511100ns [ 0.003107] Console: colour dummy device 80x25 [ 0.004858] Calibrating delay loop (skipped), value calculated using timer frequency.. 20.00 BogoMIPS (lpj=40000) [ 0.005002] pid_max: default: 32768 minimum: 301 [ 0.007941] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear) [ 0.007977] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear) [ 0.029636] ASID allocator using 16 bits (65536 entries) [ 0.030395] rcu: Hierarchical SRCU implementation. [ 0.031803] EFI services will not be available. [ 0.033578] smp: Bringing up secondary CPUs ... [ 0.033663] smp: Brought up 1 node, 1 CPU [ 0.040994] devtmpfs: initialized [ 0.046811] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.047075] futex hash table entries: 256 (order: 2, 16384 bytes, linear) [ 0.051365] NET: Registered protocol family 16 [ 0.079047] wait_for_initramfs() called before rootfs_initcalls [ 0.096414] vgaarb: loaded [ 0.097828] SCSI subsystem initialized [ 0.099222] usbcore: registered new interface driver usbfs [ 0.099457] usbcore: registered new interface driver hub [ 0.099578] usbcore: registered new device driver usb [ 0.108688] clocksource: Switched to clocksource riscv_clocksource [ 0.119454] NET: Registered protocol family 2 [ 0.120572] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.123332] tcp_listen_portaddr_hash hash table entries: 128 (order: 0, 5120 bytes, linear) [ 0.123419] TCP established hash table entries: 1024 (order: 1, 8192 bytes, linear) [ 0.123609] TCP bind hash table entries: 1024 (order: 3, 32768 bytes, linear) [ 0.123739] TCP: Hash tables configured (established 1024 bind 1024) [ 0.124705] UDP hash table entries: 256 (order: 2, 24576 bytes, linear) [ 0.124978] UDP-Lite hash table entries: 256 (order: 2, 24576 bytes, linear) [ 0.126172] NET: Registered protocol family 1 [ 0.128603] RPC: Registered named UNIX socket transport module. [ 0.128657] RPC: Registered udp transport module. [ 0.128671] RPC: Registered tcp transport module. [ 0.128687] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.128806] PCI: CLS 0 bytes, default 64 [ 0.133173] Unpacking initramfs... [ 0.137086] workingset: timestamp_bits=62 max_order=15 bucket_order=0 [ 0.153566] NFS: Registering the id_resolver key type [ 0.154300] Key type id_resolver registered [ 0.154339] Key type id_legacy registered [ 0.154631] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 0.154734] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering... This boot took 0.45 seconds /bin/sh: can't access tty; job control turned off / # ls /dev console ptmx random tty tty1 tty3 urandom null ram sda tty0 tty2 tty4 zero |
How to redirect, in postfix, outgoing mails that get blocked, to another email address? Posted: 27 Jun 2021 07:21 AM PDT I'm a happy user of a postfix mail server. But, every now and than an outgoing mail is blocked by the receiving system. Be it that that system considers the mail as spam, or for some other reason. I would like such outgoing, but blocked (or otherwise failing) mails to be redirected to another mail address. Thanks in advance for any hint how to configure this. |
How to increase kali linux terminal scrollback buffer size Posted: 27 Jun 2021 07:03 AM PDT My problem is the number of lines in kali terminal, it has too few lines to display a result. Some commands just exceed the line limit and the result disappears. So, my question is how to increase the number of line displayed in terminal on kali? (I'm not sure if it's called a scrollback buffer size.) Note that I know there are commands like more or less , but sometimes those commands just don't work, so I'm looking for something similar to Ubuntu which you can set it easily through UI. (but I just couldn't find it on Kali) What terminal emulator I'm using is "Qterminal" Hope someone knows the answer, thank you in advance! |
Send a 'net send like' message from a Linux Host to ALL Linux and Windows computers on the network Posted: 27 Jun 2021 06:53 AM PDT I have a mixed set of computers on my work environment here, comprsed of a few Fedora Workstations, CentOS servers, Windows 2016 servers and Windows 10 Workstations. Now when I need to update a firewall or switch I normally send out an e-mail with a time and date to execute that. But I would also like to inform everyone still on the network 5 minutes before and at the time of start the execution. Normally I use the windows tool net send or msg (lately) to shoot out a message with an unmistakable not able to ignore message. Now Myself switched to Fedora as my main driver, and struggle to send out simular messages... I would like to send out 1 message to all Windows and Linux users on the network. Is that possible or if required te make 2 messages 1 for all linux users, and 1 for all windows users fine, but they need to be send to ALL users at once. from my Fedora machine. Tried smbclient but always get an error. Tried linpopup can't get it to work. are there alternatives? |
What does “Case sensitivity is a function of the Linux filesystem not the Linux operating system” mean? Posted: 27 Jun 2021 06:17 AM PDT So, I just read the following sentence: Case Sensitivity is a function of the Linux filesystem NOT the Linux operating system. What I deduced from this sentence is that - If I'm on a Linux machine but I am working with a device formatted using the Windows File System then case sensitivity will NOT be a thing. So, I tried the following to verify this: $ ~/Documents: mkdir Test temp $ ~/Documents: touch Test/a.txt temp/b.txt $ ~/Documents: ls te* b.txt And it listed only the files within the temp directory which was expected because I am inside a Linux Filesystem. But when I navigated to a Windows File System (NOTE: I am using WSL2), I still get the same results, but I was expecting it to list files inside both directories ignoring case sensitivity. $ /mnt/d: mkdir Test temp $ /mnt/d: touch Test/a.txt temp/b.txt $ /mnt/d: ls te* b.txt I tried it with both BASH and ZSH. I feel that it's somehow related to BASH (or ZSH), because I also read that BASH enforces case sensitivity even when working with case insensitive file systems. And this test works on Powershell so it means that the file system is indeed case insensitive. |
Is changing a service's port from one to another done by shells? Posted: 27 Jun 2021 06:40 AM PDT Some companies change the port address (number) of a service from one to another; for example, some companies change the address of SSH port from 22 to something else. Is changing a service's port from one to another done through a shell directly? For example, is there a Bash built-in to do so, or is it done solely from the file tree of each application (such as SSH and alike)? |
Inplace upgrade from RHEL 7 to RHEL 8 Posted: 27 Jun 2021 06:10 AM PDT I am trying to do inplace upgrade from RHEL7 to RHEL8 using yum and ISO without amy subscription manager. This is for my development purpose and so there is no subscription attached to it. I mounted the RHEL8 ISO file as var/lib/libvirt/images/rhel-8.4-x86_64-dvd.iso on /run/media/RHEL8 type iso9660 (ro,relatime) I ran yum clean all I ran yum makecache Everything looks so good ill here. Now when I execute, yum update , I could see yum running but continuously with lines keep on scrolling as processing dependency : xxxxxxx package version for package... ..... .... .... .... This continuous lines keep on going for 3 hours or more than that and I need to kill this process from another Shell window. I did this for 4 -5 times and still the same issue, Any idea on this |
grub:secure boot forbids loading module Posted: 27 Jun 2021 07:10 AM PDT when I tried to set my Kali Linux system to equip it with secure boot. everything is ok(well.....actually not,it used about 10 hours to reach the state). The shim has pass the check of secure boot but the problem is in grub,it raised me that: secure boot forbids loading module from ..... i'm not sure what kinds of addition operates i need to take. may be i need to config the grub. but i have no idea about it. |
ls /dev/sd cannot access: No such file or directory Error Posted: 27 Jun 2021 09:32 AM PDT How this error should be resolved? [root@ljl ~]# ls /dev/sd ls: cannot access /dev/sd: No such file or directory |
xdotool - Qt: failed to retrieve the virtual modifier names from XKB Posted: 27 Jun 2021 08:17 AM PDT I seem to be unable to make xdotool work. I'm trying to emulate keyboard shortcuts as "super+Left" via external output. I looked it up and xdotool seems to do exactly that, emulate keyboard strokes. But when I run my script I get this error: Qt: failed to retrieve the virtual modifier names from XKB when running something like this: xdotool key super+Left from my code, but if I do the same, and others shortcuts as (ctrl+alt t), from a common terminal I get nothing at all as output, the process just finishes. Obviously I have no expirience with this tool so probably I'm missing something but I can't figure out why and I don't see this error replicated anywhere. ------ edit My "external output" is a python script that given circumstances executes different commands like this: process = subprocess.Popen(command) output, error = process.communicate() I'm using Ubuntu 21.04 |
Stripping and Renaming parent directory for each line output in tar -T -? Posted: 27 Jun 2021 08:16 AM PDT I have an list of directory output from the following command that I want to tar: find ./temp -type f -name '*' ./temp/main/randomfile.txt ./temp/main/dir_a/random.txt ./temp/main/dir_b/random.txt ./temp/main/dir_c/random.txt Then I pipe the result: tar -zchf ./tars/randomtar.tar.gz -T - Combined commands: find ./temp -type f -name '*' | tar -zchf ./tars/randomtar.tar.gz -T - This will take each result from the output and tar into randomtar.tar.gz How do I change the parent directory of each output from find command when compressing? When I untar the file, I would get: ./temp/main/randomfile.txt ./temp/main/dir_a/random.txt ./temp/main/dir_b/random.txt ./temp/main/dir_c/random.txt I want to get this result when I untar: ./new_parent_name_main/randomfile.txt ./new_parent_name_main/dir_a/random.txt ./new_parent_name_main/dir_b/random.txt ./new_parent_name_main/dir_c/random.txt |
Passing options to lintian in pdebuild Posted: 27 Jun 2021 08:51 AM PDT debuild has an option --lintian-opts that allows to pass options to lintian. How can I pass options to lintian from pdebuild? |
httpd, avc: denied { unix_read unix_write } Posted: 27 Jun 2021 08:06 AM PDT I am new to selinux concept and here I am stuck on how to make httpd perform {unix_read unix_write} Below is the audit log message. type=IPC msg=audit(1624375715.312:4225): ouid=0 ogid=0 mode=0666 obj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 type=PROCTITLE msg=audit(1624375715.312:4225): proctitle=2F7573722F7362696E2F6874747064002D44464F524547524F554E44 type=AVC msg=audit(1624375724.580:4226): avc: denied { unix_read unix_write } for pid=25626 comm="httpd" key=1392707921 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=shm permissive=0 type=SYSCALL msg=audit(1624375724.580:4226): arch=c000003e syscall=29 success=no exit=-13 a0=53030951 a1=4338 a2=1b6 a3=6b items=0 ppid=25612 pid=25626 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm="httpd" exe="/usr/sbin/httpd" subj=system_u:system_r:httpd_t:s0 key=(null) [root@localhost build]# audit2allow -w -a type=AVC msg=audit(1624375724.580:4226): avc: denied { unix_read unix_write } for pid=25626 comm="httpd" key=1392707921 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=shm permissive=0 Was caused by: Missing type enforcement (TE) allow rule. You can use audit2allow to generate a loadable module to allow this access. [root@localhost build]# audit2allow -a #============= httpd_t ============== allow httpd_t unconfined_t:shm { unix_read unix_write }; [root@localhost build]# allow httpd_t unconfined_t:shm { unix_read unix_write }; bash: allow: command not found [root@localhost build]# looks like the workaround is to allow httpd_t to run in unconfined_t for shm, which doesn't look right. I don't know how the shm need unconfined_t for key=1392707921? |
How to move old logs - mysql logs Posted: 27 Jun 2021 09:51 AM PDT I need to move old binlogs to a directory and aso compress it before moving it to a new folder. I have a space crunch because of which we am facing issues. below commadn is not working. ls -t binlog* | tail -n +4 | xargs mv /path-to-directory ls -t binlog* | tail -n +4 | xargs echo mv /path-to-directory |
I don't know what is producing the gigabytes of error in syslog Posted: 27 Jun 2021 09:56 AM PDT The error is showing itself like this: Jan 11 16:39:52 pop-os org.gnome.Nautilus[1514]: [00007fa4fc465ce0] vdpau_chroma filter error: video mixer rendering failure: An invalid handle value was provided. Jan 11 16:39:52 pop-os org.gnome.Nautilus[1514]: [00007fa4fc465ce0] vdpau_chroma filter error: video mixer features failure: An invalid handle value was provided. Jan 11 16:39:52 pop-os org.gnome.Nautilus[1514]: [00007fa4fc465ce0] vdpau_chroma filter error: video mixer attributes failure: An invalid handle value was provided. Jan 11 16:39:52 pop-os org.gnome.Nautilus[1514]: [00007fa4fc465ce0] vdpau_chroma filter error: video mixer rendering failure: An invalid handle value was provided. Jan 11 16:39:52 pop-os org.gnome.Nautilus[1514]: [00007fa4fc465ce0] vdpau_chroma filter error: video mixer features failure: An invalid handle value was provided. Jan 11 16:39:52 pop-os org.gnome.Nautilus[1514]: [00007fa4fc465ce0] vdpau_chroma filter error: video mixer attributes failure: An invalid handle value was provided. Jan 11 16:39:52 pop-os org.gnome.Nautilus[1514]: [00007fa4fc465ce0] vdpau_chroma filter error: It has consumed my whole SSD. |
Lock Virtual Terminals when resuming Posted: 27 Jun 2021 07:22 AM PDT Many screen lockers (mine is i3lock) do not block access to other Virtual Terminals. This means that, if I leave a session opened in some VT, then even when the desktop is locked (for example when resuming), a malicious person can switch to the VT and do anything. This is an actual issue for me, as I occasionally switch to a VT, then switch back to the graphical environment and forget to log out from the VT. The question then is: how to add VT-locking on top of an existing screen locker? The Arch Linux wiki suggests to simply disable VTs from Xorg, with this piece of configuration for the X server: Section "ServerFlags" # disable VT switching: Option "DontVTSwitch" "True" # disable "zapping", ie. killing the X server with Ctrl-Alt-Bksp: Option "DontZap" "True" EndSection This is not an option since I use VTs, as already explained above. Maybe one solution would be to set and reset those options dynamically, but I found nothing to change X server options at runtime, at least in general (there are things like setxkbmap for keyboard layouts, or xset for misc stuff). Is this possible? I also found the command vlock -a which, when called from a text-based VT, locks the session and disable VT switching. However, it does not work from the graphical environment, and would anyway be redundant with the graphical screen locker. How can I solve this problem? |
patsplit vs split in gawk Posted: 27 Jun 2021 09:44 AM PDT In the gawk manual, I found two functions patsplit and split . I am wondering what their differences are? I understand the purpose of split , but what is the purpose of patsplit ? Thanks. |
Prevent "notify-send" from stacking Posted: 27 Jun 2021 09:21 AM PDT I have wrote this script, when the increase volume button is pressed to display desktop notifications with "notify-send". when the button is pressed: notify-send "Current volume 'pamixer --get-volume'" The problems is that the notifications get stacked e.g. Is there a way to prevent the notifications from stacking and just display the newest notification? |
Python virtualenvwrapper and ZSH prompt Posted: 27 Jun 2021 08:04 AM PDT I am using archlinux with zsh and python simha@gauranga ~ % echo $SHELL /usr/bin/zsh simha@gauranga ~ % python3 --version Python 3.5.1 my .zshrc is export WORKON_HOME=~/.virtualenvs source /usr/bin/virtualenvwrapper.sh Once i open a new terminal I could create a new virtualenv in the following way. (simha is the home folder name and gauranga is the computer name) simha@gauranga ~ % mkvirtualenv new2 Using base prefix '/usr' New python executable in /home/simha/.virtualenvs/new3/bin/python3 Also creating executable in /home/simha/.virtualenvs/new3/bin/python Installing setuptools, pip, wheel...done. virtualenvwrapper.user_scripts creating /home/simha/.virtualenvs/new3/bin/predeactivate virtualenvwrapper.user_scripts creating /home/simha/.virtualenvs/new3/bin/postdeactivate virtualenvwrapper.user_scripts creating /home/simha/.virtualenvs/new3/bin/preactivate virtualenvwrapper.user_scripts creating /home/simha/.virtualenvs/new3/bin/postactivate virtualenvwrapper.user_scripts creating /home/simha/.virtualenvs/new3/bin/get_env_details Now i am entering the virtualenv simha@gauranga ~ % workon new3 simha@gauranga ~ % if we see above there is no change in the prompt to shown which env in am in. I have followed the http://virtualenvwrapper.readthedocs.io/en/latest/tips.html for zsh prompt still its not working the following are the postactivate and postdeactivate files simha@gauranga ~ % tail -f .virtualenvs/postactivate .virtualenvs/postdeactivate ==> .virtualenvs/postactivate <== PS1="$_OLD_VIRTUAL_PS1" _OLD_RPROMPT="$RPROMPT" RPROMPT="%{${fg_bold[white]}%}(env: %{${fg[green]}%}`basename \"$VIRTUAL_ENV\"`%{${fg_bold[white]}%})%{${reset_color}%} $RPROMPT" ==> .virtualenvs/postdeactivate <== RPROMPT="$_OLD_RPROMPT" |
Restart bash from terminal without restarting the terminal application (mac)? Posted: 27 Jun 2021 06:23 AM PDT I've looked around and bit for an answer to this question but I don't seem to find it (which is weird). My question is, is there any simple way to restart the bash session from within the terminal on mac. I just want the same behaviour as if I closed the terminal application and started it again (all variables reset, .bash_profile sourced etc). I know how to source .bash_profile, but that's not what I want. One of the reasons I want to do this is because a plugin for my bash prompt has code that prevents colors from being loaded multiple times. Therefore, sourcing .bash_profile doesn't reload the color variables and I have to restart the terminal application to get changes in effect. |
Battery indicator problems after installing and uninstalling kubuntu-desktop package on Xubuntu 15.04 x64 Posted: 27 Jun 2021 09:08 AM PDT A few weeks ago, I decided to get adventurous and install different interfaces on my Lenovo T420 running Xubuntu. I decided to jettison Kubuntu after trying it out (just not my style) and kept Xubuntu and Ubuntu with Unity. After doing this, I noticed that a problem emerged: the battery charge indicators no longer worked that well when I docked my laptop into the Lenovo base station I bought for it. From what I can tell, it's still charging through the base, as it had before I did the work with the interface packages. When I use my power cord, it seems to notice changes in the charge level, but does so unreliably. If I take my battery out with the cord plugged in (not on the base), turn on the computer, and put the battery back in, the difference in charge begins to show up in the battery indicator icon in the system tray. This occurs whether I use XFCE's battery indicator or the one in Unity. I found a similar topic on here dealing with this, but that was on Debian and a different version of XFCE. I'll probably end up re-installing Xubuntu with the 15.10 or 16.04 release, and that should take care of the problem, but in the meantime, what can I do to fix this? EDIT: Adding this logging from running xfce4-power-manager --debug : TRACE[xfpm-main.c:192] xfpm_start(): Starting the power manager TRACE[xfpm-xfconf.c:631] xfpm_xfconf_init(): lock screen TRUE TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for general-notification TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for critical-power-level TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for show-brightness-popup TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for handle-brightness-keys TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for show-tray-icon TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for critical-power-action TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for hibernate-button-action TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for sleep-button-action TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for lid-action-on-ac TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for lid-action-on-battery TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for brightness-level-on-ac TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for brightness-level-on-battery TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for brightness-slider-min-level TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for dpms-sleep-mode TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for inactivity-on-ac TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for inactivity-on-battery TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for inactivity-sleep-mode-on-ac TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for inactivity-sleep-mode-on-battery TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for brightness-on-ac TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for brightness-on-battery TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for network-manager-sleep TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for logind-handle-power-key TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for logind-handle-suspend-key TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for logind-handle-hibernate-key TRACE[xfpm-polkit.c:314] xfpm_polkit_init_data(): Using unix session polkit subject TRACE[xfpm-polkit.c:406] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.power-off is authorized=TRUE TRACE[xfpm-polkit.c:406] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.reboot is authorized=TRUE TRACE[xfpm-polkit.c:406] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.suspend is authorized=TRUE TRACE[xfpm-polkit.c:406] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.hibernate is authorized=FALSE TRACE[xfpm-power.c:957] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/line_power_AC TRACE[xfpm-power.c:915] xfpm_power_add_device(): 'line-power' device added TRACE[xfpm-power.c:957] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/battery_BAT0 TRACE[xfpm-power.c:915] xfpm_power_add_device(): 'battery' device added TRACE[xfpm-power.c:925] xfpm_power_add_device(): Battery device type 'battery' detected at: /org/freedesktop/UPower/devices/battery_BAT0 TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 124 : ((XfpmButtonKey) BUTTON_POWER_OFF) (xfce4-power-manager:6283): xfce4-power-manager-WARNING **: could not map keysym 1008ffa8 to keycode TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 213 : ((XfpmButtonKey) BUTTON_HIBERNATE) TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 150 : ((XfpmButtonKey) BUTTON_SLEEP) TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 233 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP) TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 232 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN) TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 244 : ((XfpmButtonKey) BUTTON_BATTERY) TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 238 : ((XfpmButtonKey) BUTTON_KBD_BRIGHTNESS_UP) TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 237 : ((XfpmButtonKey) BUTTON_KBD_BRIGHTNESS_DOWN) TRACE[xfpm-battery.c:189] xfpm_battery_refresh_icon(): Battery state 1 TRACE[xfpm-battery.c:240] xfpm_battery_refresh_icon(): Battery icon xfpm-primary-060-charging TRACE[xfpm-power.c:213] xfpm_power_check_polkit_auth(): using logind suspend backend TRACE[xfpm-polkit.c:406] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.suspend is authorized=TRUE TRACE[xfpm-polkit.c:406] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.hibernate is authorized=FALSE TRACE[xfpm-power.c:1448] xfpm_update_blank_time(): Timeout: 10 TRACE[xfpm-power.c:1448] xfpm_update_blank_time(): Timeout: 10 TRACE[xfpm-power.c:1448] xfpm_update_blank_time(): Timeout: 10 TRACE[xfpm-power.c:1448] xfpm_update_blank_time(): Timeout: 15 TRACE[xfpm-manager.c:556] xfpm_manager_inhibit_sleep_systemd(): Inhibiting systemd sleep: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch (xfce4-power-manager:6283): xfce4-power-manager-WARNING **: Unable to set the kernel brightness switch parameter to 0. TRACE[xfpm-backlight.c:259] xfpm_backlight_brightness_on_ac_settings_changed(): Alarm on ac timeout changed 9 TRACE[xfpm-backlight.c:280] xfpm_backlight_brightness_on_battery_settings_changed(): Alarm on battery timeout changed 120 (xfce4-power-manager:6283): xfce4-power-manager-WARNING **: Failed to get keyboard max brightness level : Method "GetMaxBrightness" with signature "" on interface "org.freedesktop.UPower.KbdBacklight" doesn't exist TRACE[xfpm-polkit.c:251] xfpm_polkit_free_data(): Destroying Polkit data TRACE[xfpm-battery.c:189] xfpm_battery_refresh_icon(): Battery state 1 TRACE[xfpm-battery.c:240] xfpm_battery_refresh_icon(): Battery icon xfpm-primary-060-charging TRACE[xfpm-battery.c:189] xfpm_battery_refresh_icon(): Battery state 1 TRACE[xfpm-battery.c:240] xfpm_battery_refresh_icon(): Battery icon xfpm-primary-060-charging TRACE[xfpm-battery.c:189] xfpm_battery_refresh_icon(): Battery state 1 TRACE[xfpm-battery.c:240] xfpm_battery_refresh_icon(): Battery icon xfpm-primary-060-charging TRACE[xfpm-battery.c:189] xfpm_battery_refresh_icon(): Battery state 1 TRACE[xfpm-battery.c:240] xfpm_battery_refresh_icon(): Battery icon xfpm-primary-060-charging TRACE[xfpm-battery.c:189] xfpm_battery_refresh_icon(): Battery state 1 TRACE[xfpm-battery.c:240] xfpm_battery_refresh_icon(): Battery icon xfpm-primary-060-charging TRACE[xfpm-battery.c:189] xfpm_battery_refresh_icon(): Battery state 1 TRACE[xfpm-battery.c:240] xfpm_battery_refresh_icon(): Battery icon xfpm-primary-060-charging TRACE[xfpm-battery.c:189] xfpm_battery_refresh_icon(): Battery state 1 TRACE[xfpm-battery.c:240] xfpm_battery_refresh_icon(): Battery icon xfpm-primary-060-charging TRACE[xfpm-battery.c:189] xfpm_battery_refresh_icon(): Battery state 1 TRACE[xfpm-battery.c:240] xfpm_battery_refresh_icon(): Battery icon xfpm-primary-060-charging TRACE[xfpm-battery.c:189] xfpm_battery_refresh_icon(): Battery state 1 TRACE[xfpm-battery.c:240] xfpm_battery_refresh_icon(): Battery icon xfpm-primary-060-charging TRACE[xfpm-battery.c:189] xfpm_battery_refresh_icon(): Battery state 1 TRACE[xfpm-battery.c:240] xfpm_battery_refresh_icon(): Battery icon xfpm-primary-060-charging TRACE[xfpm-battery.c:189] xfpm_battery_refresh_icon(): Battery state 1 TRACE[xfpm-battery.c:240] xfpm_battery_refresh_icon(): Battery icon xfpm-primary-060-charging TRACE[xfpm-battery.c:189] xfpm_battery_refresh_icon(): Battery state 1 TRACE[xfpm-battery.c:240] xfpm_battery_refresh_icon(): Battery icon xfpm-primary-060-charging |
Tool to create recipe to preseed partitioning Posted: 27 Jun 2021 07:01 AM PDT I want to preseed an Ubuntu 12.04 installer using a custom partitioning recipe. My disk layout is reasonably complex, and so is the recipe syntax itself. Hand-crafting such a recipe seems tedious and error prone. Is there a tool to simply create a recipe from an existing disk, including its partitions and LVM configuration? |
No comments:
Post a Comment