Go to advanced search

by swampdog
Thu Oct 06, 2016 12:30 am
Forum: General programming discussion
Topic: [bash] Zenity loop
Replies: 7
Views: 1648

Re: [bash] Zenity loop

#!/bin/bash NAM=`basename "$0"` OUT="/tmp/""$NAM"".txt" fcp_zenity () { local title="$1" shift zenity --width=200 --height=150 --list --column "" --title="$title" "[email protected]" } fcp_m0 () { local m=( "Go to next menu" "test" ) case "$1" in 0) fcp_zenity m0 "${m[@]}" > "$OUT" ;; *) for ((i=0;i<${#m[@]};i++)...
by swampdog
Wed Oct 05, 2016 11:10 pm
Forum: Other programming languages
Topic: Portable GUI C89 Programming.
Replies: 145
Views: 21317

Re: Portable GUI C89 Programming.

One of the most simple and effective GUI systems was Digital Research's GEM, as used by early Apple Mac and Atari ST micros. There was no GUI per se. What you had was an array of objects in a tree structure, drawn in a given order, with a simple clipping rectangle. It could be created manually, in c...
by swampdog
Wed Oct 05, 2016 10:34 pm
Forum: Advanced users
Topic: Remotely Access Kodi
Replies: 2
Views: 2269

Re: Remotely Access Kodi

This says not..


http://forum.kodi.tv/showthread.php?tid=210173


I must admit. It would have been handy.
by swampdog
Wed Oct 05, 2016 10:18 pm
Forum: Beginners
Topic: X Forwarding under SSH on Mac
Replies: 10
Views: 3588

Re: X Forwarding under SSH on Mac

For future reference: does that mean $DISPLAY is set appropriately or not? From the looks of it, I'd say natively $DISPLAY on MacOS X is of limited use as it points to a unix socket, but through the ssh tunnel it looks ok on the Pi (except this is Lite, I don't have X installed...) It looks like $D...
by swampdog
Wed Oct 05, 2016 10:05 pm
Forum: C/C++
Topic: Question about make files and a _start warning, linker
Replies: 13
Views: 1989

Re: Question about make files and a _start warning, linker

crt1.o by the looks of it. On a native rpi..

$ nm -A /usr/lib/arm-linux-gnueabihf/crt1.o | egrep "T[[:space:]]{1,}_start"


..yields..

/usr/lib/arm-linux-gnueabihf/crt1.o:00000000 T _start
by swampdog
Wed Oct 05, 2016 6:44 pm
Forum: C/C++
Topic: Generate a variable in an included file - keep it for others
Replies: 9
Views: 1138

Re: Generate a variable in an included file - keep it for ot

Two flavours.. "foo.h" #ifndef FOO_H #define FOO_H FOO_H extern int foo; char* bar(void); #endif /* FOO_H */ "foo.c" #include "foo.h" int foo; char * bar(void) {static char s[1024]; return s; } "c.c" #include <stdio.h> #include <string.h> #include "foo.h" int main() { foo = 69; strcpy(bar(),"Hello W...
by swampdog
Fri Sep 30, 2016 9:48 pm
Forum: Other programming languages
Topic: [Bash] Executing a script at a given time
Replies: 4
Views: 796

Re: [Bash] Executing a script at a given time

Hello there! Here is my bash-script if someone want to cast an eye on it. #!/usr/bin/bash #creating the directory where the files will be downloaded and switching to it dateOfTheDirectory=$(date +%d-%m-%Y) mkdir $dateOfTheDirectory cd $dateOfTheDirectory #downloading the files from the ftp server w...
by swampdog
Fri Sep 30, 2016 8:43 pm
Forum: Beginners
Topic: Getting started
Replies: 15
Views: 1541

Re: Getting started

A cursory glance at the amazon customer reviews indicates at least one person is in the same situation as yourself. Use a usb keyboard & usb mouse and do what DougieLawson says.

With luck, once it is up & running, you'll be in a position to get the bluetooth stuff working.
by swampdog
Fri Sep 30, 2016 8:28 pm
Forum: Beginners
Topic: Minimum Space Needed to Boot to USB
Replies: 5
Views: 744

Re: Minimum Space Needed to Boot to USB

I haven't tried booting off USB but I do have a couple of RPI2's booting off NFS. I can't imagine it will be any different for USB. All you need is what's on /boot/.. eg: [email protected]:~ $ dfh 192.168.1.20:/mnt/nfsd/pi05 32G 23G 7.3G 76% / mmcblk0p1 1023M 30M 994M 3% /boot mmcblk0p2 2.6G 1.9G 610M 76% ...
by swampdog
Fri Sep 30, 2016 8:14 pm
Forum: Beginners
Topic: X Forwarding under SSH on Mac
Replies: 10
Views: 3588

Re: X Forwarding under SSH on Mac

epoch1970 wrote:Even with the right environment variables, the windowing system on the Mac is not feature-compatible with X11.
You need to run XQuartz (an X11 server) to exchange windows with other X11 hosts.
For future reference: does that mean $DISPLAY is set appropriately or not?
by swampdog
Fri Sep 30, 2016 5:21 pm
Forum: Beginners
Topic: X Forwarding under SSH on Mac
Replies: 10
Views: 3588

Re: X Forwarding under SSH on Mac

I'd imagine.. echo $DISPLAY ..works the same on a Mac as other Unix flavours. If there's no output then "whatever you're typing into" is unaware of your X server (on the host). As epoch1970 suggests, launch something that is. Once you've "ssh"d into the target, type the above again. You should see s...
by swampdog
Wed Sep 28, 2016 10:40 pm
Forum: Troubleshooting
Topic: gcc ARM options
Replies: 20
Views: 12291

Re: gcc ARM options

Yes I was still using "-mpu=native" there. The wierdness was that the 'strace' doesn't show the double close. Then again I don't use strace that often. strace doesn't show close() a second time because close() never gets called the second time, libc knows that the actual stream has been closed so d...
by swampdog
Tue Sep 27, 2016 2:58 pm
Forum: Troubleshooting
Topic: gcc ARM options
Replies: 20
Views: 12291

Re: gcc ARM options

Fwiw, it is a bit wierd. Same (nfs jessie) with same gcc. One works. One bombs. <snip> The only difference is the hardware (and the mmap address). The working one is an RPI2 whilst the failing one is an RPI3. Are you still trying to use -mcpu=native here? That option doesn't work on the RPi3, at le...
by swampdog
Tue Sep 27, 2016 2:48 pm
Forum: Networking and servers
Topic: debugging my raid-1 array
Replies: 15
Views: 2236

Re: debugging my raid-1 array

That's taking a while! Don't forget once it has rebuilt to investigate the "internal bitmap" option.
by swampdog
Thu Sep 22, 2016 6:43 pm
Forum: C/C++
Topic: Motion video script - basic code help!!
Replies: 5
Views: 908

Re: Motion video script - basic code help!!

sprintf() works the same as printf() except instead of displaying text onto the screen, it writes the output into memory. #include <stdio.h> const char msg[]="Hello World\n"; int main() { printf("%s",msg); return 0; } Now with sprintf().. #include <stdio.h> const char msg[]="Hello World\n"; char tst...
by swampdog
Thu Sep 22, 2016 3:09 pm
Forum: Troubleshooting
Topic: gcc ARM options
Replies: 20
Views: 12291

Re: gcc ARM options

Fwiw, it is a bit wierd. Same (nfs jessie) with same gcc. One works. One bombs. This works (strace snippet).. access("/usr/lib/gcc/arm-linux-gnueabihf/specs", R_OK) = -1 ENOENT (No such file or directory) open("/proc/cpuinfo", O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFREG|0444, st_size=0, .....
by swampdog
Thu Sep 22, 2016 11:23 am
Forum: Beginners
Topic: Install VNC on Raspberry Pi 3B
Replies: 27
Views: 4367

Re: Install VNC on Raspberry Pi 3B

Fwiw, I've also had success with NoMachine.
by swampdog
Thu Sep 22, 2016 11:21 am
Forum: Other programming languages
Topic: [Bash] Script to install software
Replies: 16
Views: 3437

Re: [Bash] Script to install software

If you are setting static IP addresses then this can "be the only machine". In other words, aside from the learning experience, there is no point because as soon as your working script runs on a second pi their IP addresses will collide. In order to solve that problem you need your script to initial...
by swampdog
Thu Sep 22, 2016 10:49 am
Forum: Networking and servers
Topic: debugging my raid-1 array
Replies: 15
Views: 2236

Re: debugging my raid-1 array

This is the best I can find..

https://www.seagate.com/files/www-cont ... 6111a.pdf

..in case it helps.
by swampdog
Wed Sep 21, 2016 2:23 pm
Forum: Other programming languages
Topic: [Bash] Script to install software
Replies: 16
Views: 3437

Re: [Bash] Script to install software

These kind of scripts have a habit of getting out of control. Assuming you want to roll your own I'd be looking at rsync and/or diff&patch for as much of it as possible.
by swampdog
Tue Sep 20, 2016 6:18 pm
Forum: Networking and servers
Topic: debugging my raid-1 array
Replies: 15
Views: 2236

Re: debugging my raid-1 array

Wierd. Anything in /var/log/messages?
by swampdog
Tue Sep 20, 2016 11:08 am
Forum: Networking and servers
Topic: debugging my raid-1 array
Replies: 15
Views: 2236

Re: debugging my raid-1 array

Yes, that disk looks fine. This should do the job.. $ mdadm --zero-superblock /dev/sdb1 ..but google first. eg: http://serverfault.com/questions/535231/mdadm-zero-superblock-on-disks-with-other-partitions-on-them ..because I've only used it once a long time ago. Provided you don't get the wrong devi...
by swampdog
Fri Sep 16, 2016 7:26 pm
Forum: Networking and servers
Topic: debugging my raid-1 array
Replies: 15
Views: 2236

Re: debugging my raid-1 array

This is typical "long" output. You're lucky I've got a failing disk on a raid6 array. This is it (/dev/sdb).. smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-642.1.1.el6.x86_64] (local build) Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net === START OF INFORMATION SECT...
by swampdog
Fri Sep 16, 2016 2:17 pm
Forum: Networking and servers
Topic: debugging my raid-1 array
Replies: 15
Views: 2236

Re: debugging my raid-1 array

You should run (initially, a short) then a long test with 'smartctl'. I don't have the details readily available because typically what is done is configure "smartd.conf" to perform the tests. I suggest you don't fiddle with mdadm any more until you have those 'smartd' results - and interpreting the...
by swampdog
Thu Sep 15, 2016 9:31 pm
Forum: C/C++
Topic: Cross Compiling Pi kernel using arch linux
Replies: 2
Views: 2449

Re: Cross Compiling Pi kernel using arch linux

A quick google suggests arch linux uses "pacman" so methinks you need to ask there how to perform its equivalent of "apt-cache search".

You could attempt to roll your own (as I did with centos) but it's a lengthy process not for the feint hearted!

Go to advanced search