Go to advanced search

by jojopi
Sat Dec 03, 2016 3:20 pm
Forum: Troubleshooting
Topic: Cloned SD cards are always slower
Replies: 10
Views: 2277

Re: Cloned SD cards are always slower

Compare between the original and cloned boots:

Code: Select all

systemd-analyze blame
by jojopi
Fri Dec 02, 2016 9:17 pm
Forum: C/C++
Topic: chmod u+s -- Then what??
Replies: 10
Views: 2186

Re: chmod u+s -- Then what??

Is there another way that the bad guys can get in by hitting the environment? Variables such as IFS and ENV can cause shells to misbehave. LD_LIBRARY_PATH and LD_PRELOAD can make any program load with additional code added. There is special handling for setuid programs in shells and in ld-linux, ju...
by jojopi
Fri Dec 02, 2016 10:43 am
Forum: Raspberry Pi OS
Topic: New Raspbian release "2016-11-25"
Replies: 132
Views: 34816

Re: New Raspbian release "2016-11-25"

Note, BTW, that even if you have changed pi's pw, running this script still takes some time; I can see that it takes longer to login than it used to. Amusingly, it does all the slow stuff before the test for sshd that inhibits the warning. (Is it a defect that it does not check whether sshd accepts...
by jojopi
Fri Dec 02, 2016 4:25 am
Forum: C/C++
Topic: chmod u+s -- Then what??
Replies: 10
Views: 2186

Re: chmod u+s -- Then what??

The problem is that system() involves a shell, and the shell detects that it is running setuid (real user not equal to effective user) and drops privileges. You could add a setreuid(0,0) to your program to defeat the test, but that is very dangerous. By setting environment variables, it is quite lik...
by jojopi
Wed Nov 30, 2016 2:33 pm
Forum: Raspberry Pi OS
Topic: New Raspbian release "2016-11-25"
Replies: 132
Views: 34816

Re: New Raspbian release "2016-11-25"

We have a responsibility to protect our users, and the combination of a known password and an open SSH port is an accident waiting to happen. The majority of Pi users won't even know what SSH is, so disabling it by default is reasonable - can you think of another OS for non-Power Users which enable...
by jojopi
Wed Nov 30, 2016 12:18 pm
Forum: General discussion
Topic: Something went terribly wrong!
Replies: 6
Views: 1351

Re: Something went terribly wrong!

# Nuke it apt-get --purge remove $p "Nuke it" seems correct. I tested your procedure on one of my Raspbian systems, which was recently dist-upgraded. It wanted to remove 1448 packages, including such gems as apt, bash, dash, dpkg, libc6, and mount, without which the system would neither boot nor be...
by jojopi
Tue Nov 29, 2016 12:52 am
Forum: C/C++
Topic: GCC is too surprising...[resolved]
Replies: 7
Views: 1578

Re: GCC is too surprising...

-Wconversion will warn about dropping the imaginary part from a complex type. It may be surprising that that is not included in -Wall or -Wextra. I am not too concerned about the compiler failing to detect logic errors, however. I do think that accepting a possible typo as a barely-useful extension ...
by jojopi
Mon Nov 28, 2016 11:49 pm
Forum: C/C++
Topic: GCC is too surprising...[resolved]
Replies: 7
Views: 1578

Re: GCC is too surprising...

Ouch!

I am going to be using "gcc -pedantic" in future.
by jojopi
Mon Nov 28, 2016 9:51 pm
Forum: Troubleshooting
Topic: Speedtest via bash script (speedtest-ifttt.sh)
Replies: 4
Views: 1610

Re: Speedtest via bash script (speedtest-ifttt.sh)

pi@raspberrypi:~$ sh speedtest-ifttt.sh speedtest-ifttt.sh: 21: speedtest-ifttt.sh: Syntax error: "(" unexpected The script was intended to be interpreted by bash, not sh. I do not understand why people insist on writing non-POSIX shell scripts. In this case the extraneous word "function" on line 2...
by jojopi
Mon Nov 28, 2016 6:49 pm
Forum: C/C++
Topic: undefined reference to `memcpy'
Replies: 15
Views: 6035

Re: undefined reference to `memcpy'

tScreen[1] = startNewTerminalScreen(800, 600); This seems to be the line that requires copying a structure. (Removing the call to tprint later may mask the problem simply because it allows the optimizer to eliminate the variable whose address is no longer taken.) If startNewTerminalScreen took a po...
by jojopi
Sat Nov 26, 2016 10:00 pm
Forum: Raspberry Pi OS
Topic: Keyboard Layout reverts back to default in login screen
Replies: 4
Views: 1120

Re: Keyboard Layout reverts back to default in login screen

If you switch to the text console with Ctrl+Alt+F2, are you seeing the correct (fr) layout there?
by jojopi
Sat Nov 26, 2016 9:24 pm
Forum: Raspberry Pi OS
Topic: Keyboard Layout reverts back to default in login screen
Replies: 4
Views: 1120

Re: Keyboard Layout reverts back to default in login screen

The fact that you had to resort to the LXDE method suggests that your attempt using raspi-config did not succeed. It is correct that the GUI settings only affect the current user. For security reasons the console and login manager will use the system default layout, which must be set using "sudo ras...
by jojopi
Sat Nov 26, 2016 5:27 am
Forum: C/C++
Topic: undefined reference to `memcpy'
Replies: 15
Views: 6035

Re: undefined reference to `memcpy'

The reference to memcpy is in the function drawLineC. I do not believe you have shown us the piece of code in question. It will be something that copies or initializes a structure, not merely takes its address. You may be able to avoid the copy. Alternatively you can provide your own memcpy implemen...
by jojopi
Wed Nov 23, 2016 6:47 pm
Forum: General programming discussion
Topic: Making readable modifyable code.
Replies: 309
Views: 67652

Re: Making readable modifyable code.

(The fiftieth percentile is called the median.)
by jojopi
Wed Nov 23, 2016 6:11 pm
Forum: Troubleshooting
Topic: I get 'command not found' not a prompt to apt-get
Replies: 11
Views: 8837

Re: I get 'command not found' not a prompt to apt-get

You can enable this behaviour in Raspbian: sudo apt-get update sudo apt-get install command-not-found sudo update-command-not-found (Then you may need to log in again to initialize your shell's handler.) Under the bonnet, this sets up the "apt-file" package, which actually knows a lot more than just...
by jojopi
Wed Nov 23, 2016 1:31 pm
Forum: Raspberry Pi OS
Topic: Will there be a Devuan port for RPi1?
Replies: 23
Views: 6908

Re: Will there be a Devuan port for RPi1?

paulwratt wrote:I have issues with Raspbian Jessie & SystemD (especially kernal memory swap)
What is the problem you are referring to? And if it is a kernel issue, then how does it relate to systemd?
by jojopi
Wed Nov 23, 2016 11:50 am
Forum: Raspberry Pi OS
Topic: Problem with accents
Replies: 1
Views: 557

Re: Problem with accents

The Pi is sending "á" with UTF-8 (Unicode) encoding, but something is interpreting it as ISO-8859-1 "á".

Are you connecting remotely? You need to configure the client system for UTF-8. For PuTTY: http://thegreyblog.blogspot.co.uk/2009/ ... utf-8.html
by jojopi
Tue Nov 22, 2016 11:07 pm
Forum: General programming discussion
Topic: Making readable modifyable code.
Replies: 309
Views: 67652

Re: Making readable modifyable code.

DavidS wrote:ON ERROR PRINT "LINE : " + STR$(ERL) + " ERROR : " + REPORT$ : END
Why this? It seems both uglier and less efficient than the standard:

Code: Select all

REPORT:PRINT" at line ";ERL:END
by jojopi
Mon Nov 21, 2016 3:01 pm
Forum: Other programming languages
Topic: Solution to X-Toolkit and portability.
Replies: 161
Views: 25746

Re: Solution to X-Toolkit and portability.

Some of them will produce a -1 for true, some will produce a 1 for true, and at least three of them produced a 32767 (which is 0x7FFF = 0b0111111111111111). So there is not a constant for the result of TRUE, it is compiler dependent (unless it is a part of the C11 standard, as most compilers are st...
by jojopi
Sun Nov 20, 2016 6:40 am
Forum: Other programming languages
Topic: Solution to X-Toolkit and portability.
Replies: 161
Views: 25746

Re: Solution to X-Toolkit and portability.

Your original example used a struct that mirrored the icon block argument to RISC OS system call WIMP_CreateIcon.

Are you now claiming that you "always" translate your non-C++ to C on an Atari platform, prior to compiling it on RISC OS?
by jojopi
Sat Nov 19, 2016 9:11 pm
Forum: Troubleshooting
Topic: Debian Wheezy on RPI 3?
Replies: 8
Views: 3615

Re: Debian Wheezy on RPI 3?

It is possible to install Debian wheezy armel (soft float). That was fully supported at one time. The Pi3 can also run Debian wheezy armhf. The author clearly means Raspbian wheezy, though, and the full blog posts do state that. You should probably start with Raspbian jessie . You will get better he...
by jojopi
Sat Nov 19, 2016 2:05 pm
Forum: Other programming languages
Topic: Solution to X-Toolkit and portability.
Replies: 161
Views: 25746

Re: Solution to X-Toolkit and portability.

DavidS wrote:NOTE: I always overload the = operator for the case of both sides being a char *, so I can dirrectly assign strings.
I do not believe that is possible. Do you have a working example?
by jojopi
Sat Nov 19, 2016 1:24 pm
Forum: Troubleshooting
Topic: STICKY: Pi3 UART stopped working? Read this.
Replies: 49
Views: 113508

Re: Pi3 UART stopped working? Read this.

I have a micro controller sending the alphabet one letter a second. My laptop with minicom works fine but when I use a Pi3 with Jessie and /dev/ttyS0 the pi seems to miss a lot of data. Out of interest, how were you connecting the 3.3V micro to the laptop, and did you try the same method with the P...
by jojopi
Thu Nov 17, 2016 12:48 pm
Forum: Troubleshooting
Topic: pi3 "find ... -type f -delete" not working
Replies: 7
Views: 1225

Re: pi3 "find ... -type f -delete" not working

Fluks wrote:but when i enter this cmd on my pi3 (jessie) nothing happens.
Although the files appear to represent a nine day period, the directory listing shows that they are all dated Nov 17. It is correct that nothing happens.
by jojopi
Sun Nov 13, 2016 12:24 am
Forum: Raspberry Pi OS
Topic: Why is Jessie asking for a password?
Replies: 29
Views: 17811

Re: Why is Jessie asking for a password?

Okay, I see your point. Attempting to configure boot to desktop using raspi-config in a Lite image of course fails. During the failure it recommends the command "sudo apt-get install lightdm". That command is sufficient to allow raspi-config to configure the boot mode, but it is not sufficient to ma...

Go to advanced search