Go to advanced search

by jojopi
Fri Sep 25, 2020 10:58 pm
Forum: Troubleshooting
Topic: how to remove 320,000 files?
Replies: 22
Views: 393

Re: how to remove 320,000 files?

line 6: /bin/mv: Argument list too long In modern Linux, the argument list (and environment) can be one quarter of the current stack limit. Distros typically have no hard stack limit, but a soft limit of around 8MiB to catch infinite recursion. You can effectively avoid the E2BIG error by first run...
by jojopi
Thu Sep 24, 2020 12:48 pm
Forum: Raspberry Pi Desktop for PC and Mac
Topic: [Solved] Mouse jumps back to the top right corner of my screen (also happens in Winows7)
Replies: 16
Views: 563

Re: Mouse jumps back to the top right corner of my screen (also happens in Winows7)

KineticCapybara wrote:
Thu Sep 24, 2020 12:35 pm
I'm just out of ideas here...
Have you been able to try a different mouse yet?

As I said, if the mouse is faulty, it is only likely to get worse.
by jojopi
Thu Sep 24, 2020 12:04 pm
Forum: Troubleshooting
Topic: Circles of Hell ... 'nano' from source
Replies: 8
Views: 376

Re: Circles of Hell ... 'nano' from source

Just to clarify my single machine suggestion: (sudo apt install build-essential ncurses-dev) wget https://www.nano-editor.org/dist/v5/nano-5.2.tar.xz tar xf nano-5.2.tar.xz cd nano-5.2/ ./configure # maybe edit src make -j3 sudo make install sudo cp /etc/nanorc /usr/local/etc/ hash -d nano Apart fro...
by jojopi
Wed Sep 23, 2020 4:02 pm
Forum: Beginners
Topic: Internal RasPi Pull-Up/Down Resistor Failure
Replies: 9
Views: 330

Re: Internal RasPi Pull-Up/Down Resistor Failure

First of all, are you also seeing under-voltage warnings from the Pi? If so, then you do have a problem on the power supply side and may need to add some kind of filtering. Otherwise, I think you are just expecting too much from the internal pull resistors. They are fine with short wires in quiet en...
by jojopi
Wed Sep 23, 2020 3:07 pm
Forum: Troubleshooting
Topic: Circles of Hell ... 'nano' from source
Replies: 8
Views: 376

Re: Circles of Hell ... 'nano' from source

You should not be trying to install your own stuff in /bin or /usr/bin, especially if you know that it conflicts with a system package. apt could clobber your changes at any time. It might work a bit better if you uninstall the system package, and more so if you block it. However, your binary from o...
by jojopi
Tue Sep 22, 2020 3:13 am
Forum: General discussion
Topic: run a bash script without ". /"?
Replies: 11
Views: 505

Re: run a bash script without ". /"?

path="$PATH:~johnsmith/bin" Surely PATH= That still leaves the problem that tilde expansion does not work inside quotes. Interestingly bash does not mind having a literal tilde in the path, and will expand it at search time. But it breaks in /bin/sh. It actually was not necessary to double quote th...
by jojopi
Mon Sep 21, 2020 3:16 pm
Forum: Troubleshooting
Topic: Where is the boot log?
Replies: 3
Views: 133

Re: Where is the boot log?

Any logs that there are will be in /var/log/. The timestamps on and in the logs may be wildly wrong if the Pi is not getting as far as connecting to the network. There is no onboard real time clock. If the Pi is not getting as far as checking the root filesystem, then it will not be able to write an...
by jojopi
Mon Sep 21, 2020 2:30 pm
Forum: Raspberry Pi Desktop for PC and Mac
Topic: [Solved] Mouse jumps back to the top right corner of my screen (also happens in Winows7)
Replies: 16
Views: 563

Re: Mouse jumps back to the top right corner of my screen (also happens in Winows7)

the mouse cursor jumps back to the top and almost the right of my screen. If I move it, it jumps back to the same position. If you mean the very corner of the screen, that is easily explained by the (faulty) mouse generating spurious up and right reports. If you really do mean a specific distance a...
by jojopi
Sat Sep 19, 2020 5:17 am
Forum: Beginners
Topic: Sourcing a list of alias's
Replies: 9
Views: 194

Re: Sourcing a list of alias's

It should contain just aliases, nothing else. Function definitions should go elsewhere. Aliases are on their way out (say the bash developers) so maybe the default sourcing of that file will go away eventually The alias utility is required by POSIX. It will not be removed from bash. .bash_aliases i...
by jojopi
Fri Sep 18, 2020 10:17 am
Forum: Raspberry Pi OS
Topic: How to enable Ctrl/Alt/Backspace?
Replies: 5
Views: 192

Re: How to enable Ctrl/Alt/Backspace?

The option is still in raspi-config (via dpkg-reconfigure keyboard-configuration). You can enable it manually by editing /etc/default/keyboard: XKBOPTIONS="terminate:ctrl_alt_bksp" See also man 5 keyboard, and /usr/share/X11/xkb/rules/xorg.lst for many other options. Most of them do not have dedicat...
by jojopi
Tue Sep 15, 2020 12:54 pm
Forum: Beginners
Topic: File Manager / detailed list: show folder sizes
Replies: 2
Views: 84

Re: File Manager / detailed list: show folder sizes

A directory is just a list of file names (and their inode numbers). The folder analogy is not very apt, because a directory does not actually contain the files; just their names. To the extent that a directory has a size, it is a few kilobytes and is insignificant compared to the size of the files t...
by jojopi
Mon Sep 14, 2020 11:15 pm
Forum: General discussion
Topic: apt upgrade error
Replies: 4
Views: 247

Re: apt upgrade error

You can check what package a file belongs to with dpkg -S FILE, and then reinstall that package with sudo apt reinstall PACKAGE should fix all the non-configuration files of that package.
by jojopi
Mon Sep 14, 2020 9:43 pm
Forum: General discussion
Topic: apt upgrade error
Replies: 4
Views: 247

Re: apt upgrade error

files list file for package 'bluez-firmware' contains empty filename You have a corrupt file. If it is the only problem, you should just be able to empty it: sudo truncate -s0 /var/lib/dpkg/info/bluez-firmware.list sudo apt upgrade Technically this means that any files removed from the package may ...
by jojopi
Sat Sep 12, 2020 12:17 am
Forum: Beginners
Topic: Executing a program in terminal - dumb question
Replies: 15
Views: 566

Re: Executing a program in terminal - dumb question

jahboater wrote:
Fri Sep 11, 2020 3:20 pm
Yes that's true, rebooting is OTT.
Just start a new terminal window.
That is not sufficient. The check for ~/bin existing is in .profile (login shells only), not .bashrc.

Whether a new terminal window is a login shell varies, but in the default lxterminal it is not.
by jojopi
Fri Sep 11, 2020 5:49 pm
Forum: Troubleshooting
Topic: [SOLVED] Screwed-up path oddity
Replies: 9
Views: 273

Re: Screwed-up path oddity

Another way to find executable's is to use the "which" command, as in: which sdcc which is an external command (except in some C shells), so it is useless for diagnosing behaviour. The POSIX(XSI) and bash builtin utility to indicate how the current shell will interpret a command is type . pi@tau:~ ...
by jojopi
Mon Sep 07, 2020 4:05 pm
Forum: Raspberry Pi OS
Topic: File Manage not Refreshing.
Replies: 7
Views: 228

Re: File Manage not Refreshing.

pcmanfm uses the Linux inotify mechanism to be informed when files change on disk. In the case of NFS mounts, this appears to work if the changes are made from the Pi, but not if they are made from another client. I do not know if it could be made to work better, with server support. The solution is...
by jojopi
Thu Sep 03, 2020 12:31 am
Forum: General discussion
Topic: Using cd from within a bash script
Replies: 42
Views: 1232

Re: Using cd from within a bash script

I suppose we should also acknowledge the Otto Pilot method, from the movie Airplane!

Code: Select all

#! /bin/sh
cat << EOF |python3
import fcntl, termios
for c in """cd /var/spool\n""":
  fcntl.ioctl(2, termios.TIOCSTI, c)
EOF
by jojopi
Wed Sep 02, 2020 10:54 pm
Forum: General discussion
Topic: ping but no SSH
Replies: 4
Views: 260

Re: ping but no SSH

Ping replies are sent from inside the Linux kernel. They should continue to work even if most of the user processes on the machine have died or become unresponsive. Incoming SSH requires that sshd be still running; it can be scheduled on one of the CPU cores; there is enough RAM and other resources ...
by jojopi
Wed Sep 02, 2020 8:38 pm
Forum: General discussion
Topic: Using cd from within a bash script
Replies: 42
Views: 1232

Re: Using cd from within a bash script

Several similar links used .bash_profile which I had to create instead of .bashrc which existed I'd like to put the script in /bin with all my others Do not create .bash_profile. Debian uses .profile and .bashrc, and creating .bash_profile will cause those to be ignored. Do not put your own program...
by jojopi
Wed Sep 02, 2020 7:45 pm
Forum: General discussion
Topic: Using cd from within a bash script
Replies: 42
Views: 1232

Re: Using cd from within a bash script

emma1997 wrote:
Wed Sep 02, 2020 7:11 pm
Either don't work at all or reverts after reboot.
For the methods that revert after a reboot, add the commands (such as alias) to ~/.bashrc instead of just typing them into your current shell.
by jojopi
Wed Aug 26, 2020 1:22 pm
Forum: General discussion
Topic: Swapping memory from two places
Replies: 12
Views: 553

Re: Swapping memory from two places

Swapping to a file does not mean that the pages are going through the filesystem code. During swapon, the file is reduced to a block list, sorted, and its extents added as swap areas. Unless the file is significantly fragmented, it is just like swapping to a partition. On a rusty gyroscope, data loc...
by jojopi
Wed Aug 19, 2020 11:27 pm
Forum: General discussion
Topic: RANT: When will the Linux devs get the mess with /dev/ttyUSB fixed?
Replies: 66
Views: 3224

Re: RANT: When will the Linux devs get the mess with /dev/ttyUSB fixed?

I can hardly understand why the brilliant Linux-kernel team is still unable, after more than 30 years of development, to handle /dev/ttyUSBx reliably out-of-the-box. The kernel has no storage across reboots, let alone upgrades or reinstalls. There is no way it could remember what numbers it had ass...
by jojopi
Mon Aug 17, 2020 12:32 pm
Forum: Troubleshooting
Topic: NAK bailout crash
Replies: 16
Views: 601

Re: NAK bailout crash

map: vt02 => fbo Oops: Interrupt map: vt02 => fbo map: vt02 => fbo Oops: Interrupt map: vt02 => fbo map: vt02 => fbo These are normal messages from fbi (except for the spelling of fb0). Each invocation prints one map notice, and Oops: Interrupt means that that instance exited because of SIGINT (Ctr...
by jojopi
Sat Aug 08, 2020 7:20 pm
Forum: Python
Topic: Kill a SoX terminal window from Python
Replies: 5
Views: 275

Re: Kill a SoX terminal window from Python

The start_new_session parameter was introduced in Python 3.2. Raspbian buster has Python 3.7.3, so it should be fine. Your code is written using python3 syntax for the print() functions, but from the output including the parentheses such as ('Running', <subprocess.Popen object at 0xb5f0c2f0>, 2), I ...
by jojopi
Thu Aug 06, 2020 3:48 pm
Forum: Troubleshooting
Topic: Using cryptsetup
Replies: 3
Views: 130

Re: Using cryptsetup

Was it working previously, or is this your first attempt (on the Pi)? The error suggests that your kernel might lack dm_mod support. What does sudo modprobe dm_mod say? Have you built your own kernel, switched to 64bit, installed beta firmware for USB MSD boot, changed drives, or anything relevant l...

Go to advanced search