Hot answers tagged

4

To avoid messing things up outside the virtualenvs, I recommend using the packaged versions: sudo apt install python-pip virtualenv (along with python3-pip for Python 3 support, if appropriate). You’ll probably need to remove the versions of pip and virtualenv installed in your home directory, and any others on your PATH outside /usr/bin. When setting up ...


3

The /proc filesystem is simply a set of data exposed as files, so you can operate on them like you do any other file, with cat, grep, etc. One example of a thing I do in my shell configuration is operate a little differently depending on the process that started my shell. So I can write something like this: case $(readlink /proc/$PPID/exe) in *tmux) ...


3

I wouldn't trust the Hardware RAID. If that bios or motherboard ever failed, you're done. No recovery is possible. I would turn that off and go with a software type of RAID 10. That way you have a better chance of recovery from another source.


2

The main statistics regarding Debian version use are the popularity-contest statistics. If you scroll down to “Statistics per popularity-contest releases”, you’ll see what releases the systems reporting popularity-contest data are running. This doesn’t necessarily reflect the general Debian-using population. I would recommend only supporting the releases ...


2

Upon further investigation and discussion with Stephen Kitt I found that I had 2 different versions of virtualenv on my PC: $ find /usr/ -iname "virtualenv" | grep bin /usr/local/bin/virtualenv /usr/bin/virtualenv The one in /usr/bin/virtualenv does not throw errors when I run it: $ /usr/bin/virtualenv --version 15.1.0 And doing some web searches I found ...


2

apt-cache pkgnames is designed for use in tab-completion: it quickly generates a list of all the package names apt knows about for the system’s main architecture (whether installed, available remotely, or simply mentioned in some other package’s relationships). It’s not intended for direct human consumption, and doesn’t spend much time filtering, so it lists ...


2

Fixed. My time was off. I changed the time to be accurate with date -s "correct time nstuff here" after fixing my time I was able to download all packages.


2

When your only connection to an X11 server is untrusted, you cannot forward it further. The untrusted X11 forwarding works by the ssh client connecting to the local display, and using the xauth generate $DISPLAY . untrusted command to generate an untrusted key / cookie. But for that, the xauth command needs the SECURITY extension to be present on the ...


2

FILE_NAME is being passed directly to bash -c in the -exec option of your find command. This causes problems if FILE_NAME contains quotes/shell code. In fact, arbitrary code could be executed. Example: in this particular case, the input file could contain a line '; echo "run commands";' Instead, pass the loop var to bash -c as a positional parameter. e.g.: ...


2

Based on suggestions from @Kusalananda, the answers (by @guest and @Jetchisel), and this detailed answer by Kevin, I came up with this: #! /bin/bash # # Search for 'Name' field match in torrent metadata for all .torrent files in # current directory and directories 1-level below. # # USAGE e.g.: # cd ~/torrent-files # location of .torrent files # Run `~/...


2

Each architecture speaks its own hardware language so of course ARM CPUs can only run ARM binaries natively. If you want to run binaries for another architecture you need to use an emulator. The most famous x86-64 emulators are qemu and bochs But emulation is extremely slow so it won't be suitable for time-sensitive applications, and should be the last ...


1

You need to boot in legacy-mode, that's all. Enter your UEFI-settings and choose correct boot device, dont choose the ubuntu-entry, that's for EFI-mode, instead boot to your HDD, then grub will open, choose ubuntu then and run sudo update-grub again. You have an obsolete boot-loader for ubuntu on your drive which will boot in efi-mode, but grub is also in ...


1

Here is an example how I am parsing the output of 'pactl subscribe'. In this example the trigger for an action was the string "Event change on card #0" when a headphone was plugged or unplugged. #!/bin/bash function MySubscription() { if [ "$1" != "Event change on card #0" ]; then return 0 fi #detect plug state pactl list | grep "...


1

Is /sbin in your path? Run echo $PATH to check. Often /sbin is a symlink to /usr/bin so check if that is also in the path. See this question for how to modify the path.


1

You have to add /sbin to your PATH: vagrant@stretch:~$ PATH="/sbin:$PATH" vagrant@stretch:~$ command -v fdisk /sbin/fdisk And use fdisk with sudo: vagrant@stretch:~$ sudo fdisk -l Disk /dev/sda: 19.8 GiB, 21265121280 bytes, 41533440 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/...


1

Assuming systemd you could create the two systemd units shown below, enable them with systemctl --user enable bt-agent-d.service; systemctl --user enable pulseaudio-d.service and finally enable lingering in order to start them at boot and not to stop them if the user logs out with loginctl enable-linger username. PS The 'username' in the last command is a ...


1

Your file system is over 16 TiB in size, so mke2fs defaulted to the “huge” file system type, with an inode ratio of 65,536 bytes. See the -T option in the linked manpage, and the huge type in mke2fs.conf: huge = { inode_ratio = 65536 }


1

I also tried a lot to do this. Actually there is a term for this called "persistence". In my experience, it works only when I create the bootable usb drive with Rufus. In Rufus, when you are creating the bootable usb, there will be an option to set persistence and the size of the persistent partition. It will make the live boot slower but at least you will ...


1

I believe the 'Host Bridge' that lspci is referring to is the PCI host bridge that connects the CPU to the PCI bus. I have a 3rd generation Core i5 and my host bridge description says: 00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller (rev 09) I think what it means is that the host bridge is designed for use with ...


1

Nautilus currently doesn't support shortcut's customization. There are many similar threads as this one with complaints about Nautilus' lack of shortcut customization and the old solutions available don't seem to work in 2020. Backspace is probably not enabled by default for navigating one folder back because it might create issues when editing a text (for ...


1

The following command should do the trick: dpkg -l | grep "using multiple display manager"


Only top voted, non community-wiki answers of a minimum length are eligible