Go to advanced search

by tpyo kingg
Fri Apr 19, 2019 4:40 pm
Forum: Beginners
Topic: How to "automatically" connect raspberry pi to new wifi router
Replies: 3
Views: 74

Re: How to "automatically" connect raspberry pi to new wifi router

If the router has Wi-Fi Protected Setup ( WPS ) then you can press a button on it (physical or via the admin interface) and then have your Raspberry Pi connect automatically during a limited window of opportunity following WPS activation. It's not necessarily terribly secure, but then neither is Wi-...
by tpyo kingg
Tue Apr 16, 2019 7:41 am
Forum: Troubleshooting
Topic: BASH clone of ZORK game (Help needed)
Replies: 7
Views: 182

Re: BASH clone of ZORK game (Help needed)

Or work from Colossal Cave or Eamon. Eamon is in the public domain and Colossal Cave is now officially Free Software though it always had been before too though it predates software licensing significantly.
by tpyo kingg
Fri Apr 12, 2019 2:41 pm
Forum: Beginners
Topic: How to change system language to English
Replies: 4
Views: 129

Re: How to change system language to English

Even after reboot?

You can also change it graphically from the Raspberry Menu -> Preferences -> Configruation du Raspberry Pi -> Localisation

Then reboot.
by tpyo kingg
Fri Apr 12, 2019 11:25 am
Forum: Beginners
Topic: How to change system language to English
Replies: 4
Views: 129

Re: How to change system language to English

The utility raspi-config can set the locale. See the menus under "4 Localisation Options", "I1 Change Locale"
by tpyo kingg
Fri Apr 12, 2019 11:22 am
Forum: Beginners
Topic: How to run an executable file from CRON?
Replies: 5
Views: 101

Re: How to run an executable file from CRON?

You would remove the dot to have an absolute path, not a relative path. That is to say, use /dir1/dir2/dir3/program As to specifying the account name, that depends on how you set up the cron job. If you use 'crontab -e' under the account 'pi' then it should not be added. If you edit the system-wide,...
by tpyo kingg
Thu Apr 11, 2019 4:18 am
Forum: Networking and servers
Topic: Can I assign the pi two ip addresses
Replies: 6
Views: 295

Re: Can I assign the pi two ip addresses

If you leave dhcpcd.conf as it was by default and then add a file, say /etc/network/interfaces.d/eth0-static, then the former will get you an address over DHCP and the latter will give you your second address however you like it.

[
by tpyo kingg
Wed Apr 10, 2019 7:55 am
Forum: Networking and servers
Topic: Can I assign the pi two ip addresses
Replies: 6
Views: 295

Re: Can I assign the pi two ip addresses

Those modifications can be added in a separate file under /etc/network/interfaces.d/ so as to leave the /etc/network/interfaces file itself alone. That might help with maintenance. However, a question I have is if there will be an official Raspbian / Debian way to add additional IP addresses, since ...
by tpyo kingg
Tue Apr 09, 2019 10:22 am
Forum: General discussion
Topic: How to display process that runs in background? CLI mode
Replies: 4
Views: 150

Re: How to display process that runs in background? CLI mode

There are several options. One would be to run it inside a terminal multiplexor like tmux. Launch tmux, start your script, then detach the session (or if connecting over SSH disconnect the terminal emulator). Later you can check on the script by reattaching to the session. See either of these for ge...
by tpyo kingg
Mon Apr 08, 2019 4:56 am
Forum: General programming discussion
Topic: Sed command not working
Replies: 7
Views: 1357

Re: Sed command not working

Is there a way I can easily add lines? Yes, you can append using either sed or as shell redirection. Both methods are shown above. An advantage of using sed with -i is that it can create a backup file. The advantage of the appending redirection >> is that it is simple. Can you please say a little a...
by tpyo kingg
Sun Apr 07, 2019 6:17 pm
Forum: General programming discussion
Topic: Sed command not working
Replies: 7
Views: 1357

Re: Sed command not working

There are not normally 78 lines in config.txt, at least not by default. So the condition will never be met and the insertion never made. If you would like to append to the file, try something like this to insert or append on the final line: sudo sed -i.bak '$i\arm_freq=1500' /boot/config.txt # or su...
by tpyo kingg
Sat Apr 06, 2019 10:23 am
Forum: C/C++
Topic: How to connect a C program with a webpage (RPI 3+ )
Replies: 7
Views: 1385

Re: How to connect a C program with a webpage (RPI 3+ )

It's one line in the web server configuration, and one loop plus a reference to include a module in the main application. I realize that some might like javascript, which is fine, de gustibus non disputandum est and all that, and try to find uses for it everywhere, which can be questioned, but it is...
by tpyo kingg
Sat Apr 06, 2019 7:35 am
Forum: C/C++
Topic: How to connect a C program with a webpage (RPI 3+ )
Replies: 7
Views: 1385

Re: How to connect a C program with a webpage (RPI 3+ )

In that case use the FastCGI API instead and have your program run standalone so that it communicates with the web server via a socket. Your choices there are fcgi_stdio for C, flup for python, or CPAN's FCGI for perl. For Apache2, the directive FcgidIPCDir is not so clearly named. For Nginx, the di...
by tpyo kingg
Fri Apr 05, 2019 10:44 am
Forum: C/C++
Topic: How to connect a C program with a webpage (RPI 3+ )
Replies: 7
Views: 1385

Re: How to connect a C program with a webpage (RPI 3+ )

... but until now i dont figured it out how to connect the webpage and the c program. I just need some advices to do this. You can use an off the shelf web server like Apache2 or Nginx with C and a CGI or FastCGI API: https://kristaps.bsd.lv/kcgi/ Or use PHP or Perl or Python via CGI or FastCGI to ...
by tpyo kingg
Wed Apr 03, 2019 4:37 pm
Forum: General discussion
Topic: Hosting Minecraft server on 3B+ but i have two 0 W's
Replies: 7
Views: 139

Re: Hosting Minecraft server on 3B+ but i have two 0 W's

You might be able to add swap space over NFS to some tmpfs files systems on the 0 Ws but there are a lot of problems with that. An alternative might be to add two to four identical USB sticks to the 3B+ and set up RAID 0 (striping) across them and then use that as swap. When using USB sticks in RAID...
by tpyo kingg
Wed Apr 03, 2019 6:23 am
Forum: Troubleshooting
Topic: rc.local tmux session not running after boot up
Replies: 6
Views: 152

Re: rc.local tmux session not running after boot up

tmux new -d -s mqttListen 'python /home/pi/Documents/python/mqttReceive.py' tmux new -d -s tsrbrclocal 'python /home/pi/Documents/python/tsrb430v3.py' Why would the second one run but not the first one? One possibility is that the first one's script either ran to completion, with success or failure...
by tpyo kingg
Fri Mar 15, 2019 9:46 am
Forum: Raspbian
Topic: Webmin or an alternative
Replies: 8
Views: 415

Re: Webmin or an alternative

Thanks, both. I have had it installed since yesterday morning. I'm now in the stage where I have to consider writing a guide for it, writing scripts for the three lone functions I need from it, writing up SSH + shell guide for those three functions any way, or just setting udeve to trigger a gracefu...
by tpyo kingg
Thu Mar 14, 2019 11:42 am
Forum: Troubleshooting
Topic: 3A+ locking up when removing 3G dongle
Replies: 0
Views: 71

3A+ locking up when removing 3G dongle

I've got a Raspberry Pi 3A+ with Raspbian GNU/Linux 9.8 (stretch) which freezes up -- most of the time -- when I remove a 3G modem from the sole USB port. When I add the modem, the system behaves as expected. When I remove the modem, either directly from the Pi or from an attached extension cable to...
by tpyo kingg
Thu Mar 14, 2019 9:29 am
Forum: Raspbian
Topic: Webmin or an alternative
Replies: 8
Views: 415

Re: Webmin or an alternative

Thanks. It seems to run fine on Raspbian GNU/Linux 9.8 (stretch). It looks much improved since the last time I saw it. Now I'll have to see how it updates and if the UI is too complex for what I have in mind.
by tpyo kingg
Wed Mar 13, 2019 7:27 pm
Forum: Beginners
Topic: cron question Answered
Replies: 15
Views: 363

Re: cron question

You can look in /var/log/syslog for CRON entries and it will show you what was run but not much in regards to errors. One way to capture errors would be to append 2>/tmp/error.log to your entry and then check that file after cron runs. The $PATH variable will not be the same in cron, remember that t...
by tpyo kingg
Wed Mar 13, 2019 7:20 pm
Forum: Beginners
Topic: CURL send file txt data, how?
Replies: 3
Views: 92

Re: CURL send file txt data, how?

You can upload data using curl with a slightly different syntax.

Code: Select all

curl -F "data=@/home/pi/tmp/realtime.txt" http://www.example.com/weewx/data.php
That will upload the contents of the file "/home/pi/tmp/realtime.txt" as the value of the variable "data"

See "man curl" and scroll down to -F
by tpyo kingg
Wed Mar 13, 2019 6:07 pm
Forum: Raspbian
Topic: Webmin or an alternative
Replies: 8
Views: 415

Re: Webmin or an alternative

Speed's not an issue in this case but I would like to avoid making some custom scripts. However, all I need, at this time, is to be able to shut down the system gracefully, add/remove/rename logins, and change login passwords. One or two accounts would have those abilities. The rest subject to modif...
by tpyo kingg
Wed Mar 13, 2019 5:51 pm
Forum: Beginners
Topic: cron question Answered
Replies: 15
Views: 363

Re: cron question

According to the entry you show, it will execute, once and only once, when the system clock rolls around to 2:30 AM on Tuesdays, Wednesdays, Thursdays, and Fridays. You can test it by changing the time in the cron job to one or two minute in the future and then waiting the requisite amount of time t...
by tpyo kingg
Wed Mar 13, 2019 4:05 pm
Forum: Raspbian
Topic: Webmin or an alternative
Replies: 8
Views: 415

Webmin or an alternative

I notice that the package webmin is not in the Raspbian repository. Is there an alternative, besides writing some custom scripts? Or is there a semi-official way to bring it in from some third-party repository such that it can be updated automatically when patches are published? Just downloading the...
by tpyo kingg
Wed Mar 13, 2019 10:58 am
Forum: Beginners
Topic: cron question Answered
Replies: 15
Views: 363

Re: cron question

path=/home/pi/rpi-rgb-led-matrix/bindings/python/samples 30 10-20 * * 2-5 /home/pi/rpi-rgb-led-matrix/bindings/python/samples/opengreen.$ #crontab to run open sign That will run the script once each hour on the half-hour from Tuesday through Friday inclusive. See "man 5 crontab" about that. The fol...
by tpyo kingg
Tue Mar 12, 2019 5:55 pm
Forum: Other programming languages
Topic: Play music with bash
Replies: 5
Views: 336

Re: Play music with bash

That will potentially zap many things. If you have more that one instance of bash, for example, those other instances will get killed, too. Best to save the Process ID of just the one process so that you can single it out when you need to.

Go to advanced search