Go to advanced search

by bulletmark
Fri Jan 18, 2013 11:01 pm
Forum: Beginners
Topic: sudo halt or sudo shutdown
Replies: 23
Views: 79618

Re: sudo halt or sudo shutdown

I always shut unix/linux boxes down with "sudo poweroff". Or reboot them with "sudo reboot".
by bulletmark
Thu Jan 17, 2013 9:59 pm
Forum: Beginners
Topic: x11vnc auto-stop
Replies: 2
Views: 1584

Re: x11vnc auto-stop

I am not going to read that long thread you quoted so this comment may conflict with that but why don't you just set your default pi server X session to auto login and then just use x11vnc directly from the remote ssh command line to connect and disconnect from the default console (:0)? Read man x11...
by bulletmark
Thu Jan 17, 2013 9:51 pm
Forum: General discussion
Topic: Split screen in script?
Replies: 25
Views: 4675

Re: Split screen in script?

byobu is a tmux enhancement ... [/url] Actually, just to correct you Bill. tmux is an enhanced alternative to the ancient gnu screen program. byobu is not related to tmux, it is a Ubuntu project which just adds slight cosmetic enhancements to screen. I have used screen from before many here were bo...
by bulletmark
Wed Jan 16, 2013 2:51 am
Forum: General discussion
Topic: Connecting remotely UNIX program
Replies: 14
Views: 2247

Re: Connecting remotely UNIX program

It may be an old unix server not set up with ssh. Try telnet:

Code: Select all

sudo aptitude install telnet

telnet unix_server
by bulletmark
Mon Jan 14, 2013 10:40 pm
Forum: Python
Topic: Python versions
Replies: 12
Views: 19642

Re: Python versions

Sorry, I haven't used python 3, only python2, so I,m not sure about RPi,GPIO for python 3. I have a current vanilla raspian install and I notice that both rpi.gpio is already installed for both python 2 and python 3: pi@pi:~ aptitude search rpi.gpio i python-rpi.gpio - Python GPIO module for Raspbe...
by bulletmark
Wed Dec 05, 2012 11:06 pm
Forum: Python
Topic: Python. Copying text from one file to another help..
Replies: 4
Views: 1144

Re: Python. Copying text from one file to another help..

Just quickly: In modern python it is preferred to use the with statement so you do not have to worry about (or forget to) do the closes. Also, rather than split on \n it is best to use native splitlines(). Also, don't explicitly split on a space char as split will split on whitespace by default. e.g...
by bulletmark
Tue Dec 04, 2012 10:51 pm
Forum: Advanced users
Topic: Persistant SSH connection
Replies: 11
Views: 2500

Re: Persistant SSH connection

Note that screen has largely been superseded by tmux nowadays which looks slightly better, has better defaults, has horizontal screen split, etc. If you are learning something new then you may as well choose tmux.

BTW. I have used for screen for 10 years or so but use tmux almost exclusively now.
by bulletmark
Tue Dec 04, 2012 4:16 am
Forum: General discussion
Topic: VNC over internet.
Replies: 14
Views: 34249

Re: VNC over internet.

I did not have to do any additional port forwarding in my router. What I port forwarded is just my ssh port (I moved it back to a random port) and my web server port. I didn't suggest you add any additional port forward. I was merely suggesting you use port 443 as your public port (instead of what ...
by bulletmark
Mon Dec 03, 2012 12:26 pm
Forum: General discussion
Topic: VNC over internet.
Replies: 14
Views: 34249

Re: VNC over internet.

If you connected your vnc client to localhost, then yes it is now tunnelled via your ssh. The vncserver running on the pi just sits and accepts connections on it's host port 5901. It doesn't know, in this case, that the connection has actually been proxied from another program (sshd) running on the ...
by bulletmark
Mon Dec 03, 2012 10:28 am
Forum: General discussion
Topic: VNC over internet.
Replies: 14
Views: 34249

Re: VNC over internet.

ssh -L5901:localhost:5901 pi@piaddr I guess above command is illustrated from a pi terminal. How to do this from putty on windows? No, it is not done in the pi terminal. It is done on your client exactly as the command quoted earlier, i.e. "ssh pi@piaddr" but with the extra -L option. As I said ear...
by bulletmark
Mon Dec 03, 2012 4:37 am
Forum: General discussion
Topic: VNC over internet.
Replies: 14
Views: 34249

Re: VNC over internet.

Are you running a home web server? What is that port 80 forward for? Those other two 443 and 22 forwards are not what I suggested so delete them too if you thought you needed them for something I said. Forget about the router until you get the basic ssh + vnc stuff going first. Make sure you can ssh...
by bulletmark
Sun Dec 02, 2012 7:46 am
Forum: General discussion
Topic: VNC over internet.
Replies: 14
Views: 34249

Re: VNC over internet.

No. Don't touch ssh and anything on your pi. Please put it back how it was, i.e. leave sshd running on the standard default port 22. You said you were familiar with port forwarding so I did not go into the detail. You say you forwarded your "random" ssh port and 443 to "pi's LAN address". That does ...
by bulletmark
Sat Dec 01, 2012 11:36 pm
Forum: General discussion
Topic: VNC over internet.
Replies: 14
Views: 34249

Re: VNC over internet.

In short (google to fill in the details), just forward a port from your home router to port 22 on your pi for ssh only. You don't need to forward VNC because you will tunnel that over ssh. I usually recommend using port 443 on your router for reasons I won't go into here. So: 1. Set a port forward o...
by bulletmark
Sun Nov 25, 2012 9:00 am
Forum: Beginners
Topic: How to set the clock/time?
Replies: 24
Views: 28191

Re: How to set the clock/time?

sdjf wrote: but I have not figured out what format the date string should be in.
On linux if you want to know how to use a command what arguments + options it takes etc, then use the man command. So type "man date".
by bulletmark
Sat Nov 24, 2012 10:49 pm
Forum: Beginners
Topic: How to set the clock/time?
Replies: 24
Views: 28191

Re: How to set the clock/time?

If the Pi has been cold booted after being down for some time, and you don't have an internet connection, then you just have to set the clock manually. Just make sure you can ping an internet site from your Pi command line. You could install the ntpdate command to try to sync internet time from the ...
by bulletmark
Sat Nov 24, 2012 10:30 pm
Forum: Beginners
Topic: How to set the clock/time?
Replies: 24
Views: 28191

Re: How to set the clock/time?

There is no onboard clock. Read the FAQ link above to see why. The ntpd program (from the ntp package) is started at boot to sync time from the internet. You can use the date command to set time manually.
by bulletmark
Thu Nov 22, 2012 9:38 am
Forum: Automation, sensing and robotics
Topic: Home alarm system retrofit.
Replies: 36
Views: 21335

Re: Home alarm system retrofit.

C program is faster than python program. I've been programming professionally in C and C++ for 25 years, and also python for about the last 4 years. Honestly, I use python nearly everywhere now and only touch C/C++ on legacy systems. Python is perfect for an app like this. Performance is a complete...
by bulletmark
Sat Nov 17, 2012 12:41 pm
Forum: Beginners
Topic: redirecting stdout
Replies: 6
Views: 6351

Re: redirecting stdout

hexelpdkk wrote: If you need to redirect stderr as well. use command > /dev/null 2>&1
In modern bash the above still works but it is essentially depreciated by the &>/dev/null format.
by bulletmark
Sat Nov 17, 2012 6:10 am
Forum: HATs and other add-ons
Topic: PiFace
Replies: 7
Views: 7722

Re: PiFace

The PiFace Mk2 board is just perfect for a project I have planned for my recently acquired Pi. Does anybody have any idea when Element14 will start selling it?
by bulletmark
Fri Nov 16, 2012 11:32 pm
Forum: Troubleshooting
Topic: SSH Key setup
Replies: 8
Views: 5285

Re: SSH Key setup

You say you set the permissions but ensure that ~/.ssh/authorized_keys is chmod 600 and ~/.ssh is chmod 700. This is a really common error. Also make sure you pasted the public key in ~/.ssh/authorized_keys as only one line, your editor may have wrapped it.
by bulletmark
Thu Nov 15, 2012 12:47 pm
Forum: Raspberry Pi OS
Topic: use of raspberry as server
Replies: 3
Views: 1084

Re: use of raspberry as server

A server is just a box that has no screen attached and which you normally access remotely over a network, i.e. via ssh for the Pi. I have never attached a screen to my Pi, even when I initially installed it. You just download the image, install the SD card, boot your Pi with a network cable attached...

Go to advanced search