Go to advanced search

by jojopi
Fri Oct 18, 2019 4:29 pm
Forum: Python
Topic: Determine version of Python within running code?
Replies: 9
Views: 884

Re: Determine version of Python within running code?

if [version of python] < 3      raw_input(. . . . . .) elif [version of python] < 4      input(. . . . . .) That is cumbersome, and not really a good solution. Since Python2's input() is so dangerous and should never be used, the best thing is to redefine it as raw_input at the top of any file that...
by jojopi
Thu Oct 03, 2019 9:47 am
Forum: Python
Topic: Threading using 2 cores?
Replies: 2
Views: 384

Re: Threading using 2 cores?

I mean, isn't threading supposed to use just 1 core? No. There is no real difference between threads and processes, as far as Linux' scheduler is concerned. It will try to run as many tasks as are runnable, on as many cores as are available. The main difference between threads and processes is that...
by jojopi
Mon Sep 30, 2019 8:30 pm
Forum: Troubleshooting
Topic: [Resolved (nearly)] PackageKit asks "root" password
Replies: 13
Views: 553

Re: PackageKit asks "root" password

AdminIdentities=unix-group:sudo But no effect, no change Was your user actually in the sudo group, though? In standard Debian, that group is the easiest way to give an administrator with-password access to both sudo and pkexec. However, it is not the only way. There is nothing special about the gro...
by jojopi
Mon Sep 30, 2019 5:18 pm
Forum: Troubleshooting
Topic: [Resolved (nearly)] PackageKit asks "root" password
Replies: 13
Views: 553

Re: PackageKit asks "root" password

I suspect this is another symptom of the missing configuration file in Raspbian's policykit-1 package.

See https://www.raspberrypi.org/forums/view ... 8#p1488298.
by jojopi
Mon Sep 30, 2019 3:47 pm
Forum: Raspbian
Topic: Buster localisation - directory names
Replies: 1
Views: 143

Re: Buster localisation - directory names

I do not see anything in raspi-config (or rc_gui) that should affect these directories, if they already exist. However, they will be created and named according to the locale in force when the GUI first launches for any given user. Is it possible in this install that you set your locale prior to sta...
by jojopi
Mon Sep 30, 2019 8:00 am
Forum: Troubleshooting
Topic: Seriouly, what is up with locale settings?
Replies: 2
Views: 182

Re: Seriouly, what is up with locale settings?

LC_ALL = "en_US.UTF-8", LANG = "en_GB.UTF-8" So you have left the system default locale as British, but overridden LC_ALL somewhere to US. That is fine, except that in Debian/Raspbian you also need to generate any locales you wish to use (by un-commenting in /etc/locale.gen and running locale-gen)....
by jojopi
Wed Aug 28, 2019 1:59 pm
Forum: Raspbian
Topic: Issues changing keyboard in raspi-config
Replies: 14
Views: 1769

Re: Issues changing keyboard in raspi-config

/usr/share/i18n/locales/fr_FR has: thousands_sep "<U202F>" That is Unicode NARROW NO-BREAK SPACE. This has changed since stretch, where it was just a regular ASCII space. Apparently your PuTTY font does not have a glyph for the character and is not smart enough to substitute a fixed space. You could...
by jojopi
Tue Jul 30, 2019 9:44 am
Forum: Python
Topic: Python output of ssh command vs local command
Replies: 4
Views: 406

Re: Python output of ssh command vs local command

You have quotes around 'cpu ' to tell the shell that the trailing space is part of the argument. After the local shell splits the arguments up and removes the quotes, ssh has to join them back into one string to pass to the remote system. The shell on the remote system can no longer see the intentio...
by jojopi
Sat Jul 20, 2019 8:08 am
Forum: Compute Module
Topic: File under: the gods only know why
Replies: 3
Views: 1758

Re: File under: the gods only know why

The line you transcribed is just the equivalent of "—✂—CUT—✂—HERE—✂—". Also, the panic dump is mostly useful for debugging kernel logic problems, which is probably not the issue here. You want to try to scroll back before the panic (Shift+PgUp may still work) and look for any errors relating to ext4...
by jojopi
Fri Jul 19, 2019 10:03 am
Forum: C/C++
Topic: sched: RT throttling activated
Replies: 3
Views: 730

Re: sched: RT throttling activated

Realtime processes take precedence over all other tasks. However, this is intended to ensure low latency in time-critical tasks, not to allow a process to take over the CPU completely. By default, if realtime processes use more than 0.95s of CPU time in one second the kernel assumes there is a probl...
by jojopi
Thu Jul 18, 2019 11:00 pm
Forum: Raspbian
Topic: gksudo deprecated
Replies: 10
Views: 2097

Re: gksudo deprecated

It doesn't protect files in your /home directory and some configuration files may end up owned by root (see link above). gksudo does nothing to reduce that risk, compared with regular sudo. The only file it treats specially is .Xauthority, and that file is never written to by normal clients. The re...
by jojopi
Wed Jul 17, 2019 10:26 am
Forum: Raspbian
Topic: gksudo deprecated
Replies: 10
Views: 2097

Re: gksudo deprecated

"sudo sudo -V" shows that DISPLAY and XAUTHORITY variables are preserved by default, and I cannot find any evidence that gksudo was ever really needed in Debian/Raspbian:

Code: Select all

sudo pcmanfm
I do notice that "ssh -X" sessions first require:

Code: Select all

export XAUTHORITY=~/.Xauthority
by jojopi
Thu Jul 11, 2019 6:17 pm
Forum: General programming discussion
Topic: Liberation through Computer Literacy
Replies: 1764
Views: 94574

Re: A Final Fidonacci Challenge

I have not followed all of the past discussion on this problem, so apologies if this idea has been proposed before. Without mentioning names, I recently became aware of a solution in BBC BASIC V on RISC OS. It does not give a fully correct result do to a slight bug in the carry handling. But what re...
by jojopi
Sat Jun 29, 2019 12:46 pm
Forum: C/C++
Topic: Quick log2????
Replies: 35
Views: 2150

Re: Quick log2????

GCC provides __builtin_clz(), et al, which will emit the hardware bit counting instruction when available, or otherwise call a helper function for the architecture. Traditionally you would want to try to avoid these operations in code that needs to be both fast and portable. On platforms without the...
by jojopi
Sat Jun 29, 2019 9:17 am
Forum: Raspbian
Topic: Buster bug report thread
Replies: 270
Views: 45459

Re: Buster bug report thread

The Debian package policykit-1 provides a file /etc/polkit-1/localauthority.conf.d/51-debian-sudo.conf that says: [Configuration] AdminIdentities=unix-group:sudo In the corresponding Raspbian package, this file is missing. The omission means that admin users cannot reboot or install packages, or are...
by jojopi
Fri Jun 28, 2019 7:40 am
Forum: Raspbian
Topic: Buster bug report thread
Replies: 270
Views: 45459

Re: Buster bug report thread

The following additional packages will be installed: libjansson4 libnftables0 nftables The iptables package recommends nftables, but does not require it. Whether recommended packages are included depends on method and options such as --no-install-recommends. This is not a bug, unless you are saying...
by jojopi
Thu Jun 27, 2019 2:27 pm
Forum: Other projects
Topic: Calculating Inductance
Replies: 9
Views: 1636

Re: Calculating Inductance

If you pass a constant 1 Amp through a 1 Henry inductance, the Voltage will increase by 1 Volt per Second. No, if the current in a one henry inductor is changing at a rate of one ampere per second, the emf will be one volt. Your definition is actually a one farad capacitor. Which is going to explode.
by jojopi
Wed Jun 26, 2019 11:14 pm
Forum: Beginners
Topic: cron job not being run
Replies: 7
Views: 939

Re: cron job not being run

I am attempting to learn how to use cron on the raspberry Pi. Are you really attempting to learn about cron, or are you attempting to fix a problem with "mydevices agent" or whatever? 5 * * * * date >> /home/pi/testing_cron which I believe should run the date command every hour at 5 minutes past th...
by jojopi
Wed Jun 26, 2019 7:32 pm
Forum: Raspbian
Topic: Issues changing keyboard in raspi-config
Replies: 14
Views: 1769

Re: Issues changing keyboard in raspi-config

I love this bug! There is a typical Debian Perl script, /usr/share/console-setup/kbdnames-maker that is responsible for looking up the translations of every keyboard layout and variant in every language. This script has not changed since stretch, but apparently something has changed in Locale::gette...
by jojopi
Tue Jun 25, 2019 9:43 pm
Forum: General discussion
Topic: Users via ssh can't scan with Raspbian Buster anymore
Replies: 9
Views: 1467

Re: Users via ssh can't scan with Raspbian Buster anymore

/lib/udev/rules.d/* have changed between stretch and buster. In stretch, 60-libsane.rules identified any device supported by SANE, gave it ENV{libsane_matched}="yes", and then because of that applied a fACL granting rw access to group "scanner". In buster, 60-libsane.rules still identifies supported...
by jojopi
Tue Jun 25, 2019 7:48 pm
Forum: General discussion
Topic: Upgrading from Stretch to Buster: Any experiences?
Replies: 2
Views: 761

Re: Upgrading from Stretch to Buster: Any experiences?

I have done it. It is the kind of thing that will only ever cause problems if you do not know how to fix them—but then you could lose all your data. However, I would not really recommend version upgrading on an SD card even if you are confident of fixing any issues. For one thing, updating a hundred...
by jojopi
Thu Jun 20, 2019 1:26 pm
Forum: Beginners
Topic: Error using SSH for raspberry pi - Permission denied (public key password)
Replies: 8
Views: 853

Re: Error using SSH for raspberry pi - Permission denied (public key password)

I am using a raspberry with Ubuntu MATE OS whenever I used the default password "raspberry" If you got the image from https://ubuntu-mate.org/raspberry-pi/, then according to that page: There are no predefined user accounts. The first time you boot the Ubuntu MATE image it will run through a setup ...
by jojopi
Mon Jun 17, 2019 1:53 pm
Forum: Off topic discussion
Topic: how heavy is raspbian ?
Replies: 30
Views: 4795

Re: how heavy is raspbian ?

Given that the Pi and it's SD card will be electrically neutral no matter if the SD is programmed on blank, it will always have the same mass. The charges on those gates are balanced elsewhere. Certainly in a regular capacitor we would expect the electrons added to the negative plate to be closely ...
by jojopi
Fri Jun 14, 2019 1:49 am
Forum: Beginners
Topic: USB Numeric Keypad with RPI3
Replies: 4
Views: 637

Re: USB Numeric Keypad with RPI3

Note, a regular keyboard will control the PDF document as inteneded with the stand alone directional arrows but now with arrows on keypad, something we failed to note during first attempts. So, the unspecified application you are running treats the keypad arrows differently than the dedicated arrow...
by jojopi
Sat May 25, 2019 6:18 am
Forum: General discussion
Topic: Incorrect mapping of the 79 keys official keyboard
Replies: 9
Views: 1243

Re: Incorrect mapping of the 79 keys official keyboard

It does seem strange to go with a hybrid layout that is not completely supported in the recommended operating system. However, the initial announcement last month said that these keyboards can report their country to the host, so maybe RPF/T plan to add software to configure them at some point. Out ...

Go to advanced search