Raspberry Pi

Bandwagon

Kolohe
<Silver Donator>
22,708
59,511
I can set up ssh, but I went for vnc so I could have a gui. Works fine on the lan, I need to set it up for access outside of the router though. I guess I'll just stick to setting up port forwarding.
 

Noodleface

A Mod Real Quick
37,961
14,508
I guess you could set up apache or something and serve a Web page but I'm not sure, more of a low level programming guy
 

Bandwagon

Kolohe
<Silver Donator>
22,708
59,511
So I got a 64gb card for the Pi, can't get it to boot. It did one time, installed the OS, now it won't boot. From the sounds of it, the Pi needs a FAT partition to be bootable, correct? I made a 4gb partition on the 64gb card and installed the OS, still nothing.
Oh well, I'll keep playing with the 4gb card for now.

I got tightVNC setup to run at boot, and I have a wifi dongle and pi camera on the way. I'll see if I can set up everything I want using wifi before trying to switch over to 4g.

edit: Nevermind, I didn't get it to run at boot. Noodle,theseare the instructions I'm trying to follow. Since I'm a windows guy with zero programming experience, I'm used to creating a batch file and just dropping it into the startup folder. Do you know how I can do this on the pi? The default login using tightVNC is a sudeo user, and I don't know how to change that so that I'm logged in as a superuser in the GUI. Trying to change permissions and move files/write scripts via the command line is annoying.
 

WhatsAmmataU_sl

shitlord
1,022
0
So I got a 64gb card for the Pi, can't get it to boot. It did one time, installed the OS, now it won't boot. From the sounds of it, the Pi needs a FAT partition to be bootable, correct? I made a 4gb partition on the 64gb card and installed the OS, still nothing.
Oh well, I'll keep playing with the 4gb card for now.

I got tightVNC setup to run at boot, and I have a wifi dongle and pi camera on the way. I'll see if I can set up everything I want using wifi before trying to switch over to 4g.

edit: Nevermind, I didn't get it to run at boot. Noodle,theseare the instructions I'm trying to follow. Since I'm a windows guy with zero programming experience, I'm used to creating a batch file and just dropping it into the startup folder. Do you know how I can do this on the pi? The default login using tightVNC is a sudo user, and I don't know how to change that so that I'm logged in as a superuser in the GUI. Trying to change permissions and move files/write scripts via the command line is annoying.
I recently set out to do exactly what you are trying to do bandwagon. I'm a total linux noob, and I found the exact same website but still ended up spending most of an afternoon getting it to work.

If I recall correctly, the problem is that command line to start the VNC server has an argument that was either deprecated or never worked to begin with. So, i'm talking about the bold line here:

#! /bin/sh
# /etc/init.d/vncboot

### BEGIN INIT INFO
# Provides: vncboot
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start VNC Server at boot time
# Description: Start VNC Server at boot time.
### END INIT INFO

USER=pi
HOME=/home/pi

export USER HOME

case "$1" in
start)
echo "Starting VNC Server"
#Insert your favoured settings for a VNC session
su - pi -c "/usr/bin/vncserver :0 -geometry 1280x800 -depth 16 -pixelformat rgb565"
;;

stop)
echo "Stopping VNC Server"
/usr/bin/vncserver -kill :0
;;

*)
echo "Usage: /etc/init.d/vncboot {start|stop}"
exit 1
;;
esac

exit 0

--------------------------------------------------------------------

You'll notice that's different from the command line arguments they use at the top of the article:

#!/bin/sh
vncserver :0 -geometry 1920x1080 -depth 24 -dpi 96

---------------------------------------------------------------------

Anyway, my mistake in debugging this was just in making that shell script, following their steps, restarting the thing and hoping it worked.

Instead:

1) Make sure a vnc server isn't actually running. There is a linux way to do this I think. I have no idea what it is. I just tried connecting from another PC on my network.
2) Run the shell script yourself from the command line. Does it work? Try connecting from your pc. Better yet, try executing just the single command line for starting the vnc server. Once you get that to work, put THAT into your shell script in place of the bolded line above, and then try the script
3) Once you get (2) to start a vnc server for you, try the boot sequencing steps. If the shell script works but the steps to start on boot don't work, then you're past my linux debugging skills.

Separately, there *might* be a default password setup by tightVNC. I just don't remember. If you connect from your PC and you're prompted for a password, then I'd say that you're making progress. Then you can worry about the password.
 

WhatsAmmataU_sl

shitlord
1,022
0
This page has the command line arguments for tightvnc:

TightVNC: Manual Page for vncserver(1)

The bolded line above looks legit, but I do seem to recall that that was my problem. Anyway, get that base case working of just getting a VNC server running, use that command in your shell script, and see where you get stuck next.
 

Bandwagon

Kolohe
<Silver Donator>
22,708
59,511
Hmm, a couple good points. I've actually been doing all of this with the vnc server already running so that I can use my laptop's keyboard instead of the shitty one I got for the Pi.
I also pasted all of the code into a text document and transferred it to the pi, then removed the .txt file extension. In windows, I used to change the .txt to .bat to make an executable - in linux, I just need to chmod -x or rightclick->allow executable, correct? Or do I need to be pasting this into one of the programming programs?

Anyways, thanks for the tips Ammata. I'll try these when I get home. Also, I set up teamviewer this morning. Let me know if you get time and are willing to connect.
 

Bandwagon

Kolohe
<Silver Donator>
22,708
59,511
Quick note on the 64gb card-

Initially, i did aquickformat followed be creating a smaller partition so that I could format it with FAT. Didn't work, as previously stated.

After doing afullformat and usingRidgecrop's FAT32 utility, everything seems to be working well. Glad I didn't get that 64gb card for nothing.
 

Noodleface

A Mod Real Quick
37,961
14,508
So I got a 64gb card for the Pi, can't get it to boot. It did one time, installed the OS, now it won't boot. From the sounds of it, the Pi needs a FAT partition to be bootable, correct? I made a 4gb partition on the 64gb card and installed the OS, still nothing.
Oh well, I'll keep playing with the 4gb card for now.

I got tightVNC setup to run at boot, and I have a wifi dongle and pi camera on the way. I'll see if I can set up everything I want using wifi before trying to switch over to 4g.

edit: Nevermind, I didn't get it to run at boot. Noodle,theseare the instructions I'm trying to follow. Since I'm a windows guy with zero programming experience, I'm used to creating a batch file and just dropping it into the startup folder. Do you know how I can do this on the pi? The default login using tightVNC is a sudeo user, and I don't know how to change that so that I'm logged in as a superuser in the GUI. Trying to change permissions and move files/write scripts via the command line is annoying.
If you use WinSCP on your windows machine and connect to the pi you can drag/drop stuff onto the pi - but also you can move stuff around on the pi with ease. It's like a windows explorer gui basically. You can also double click files and edit them in a notepad box that opens up on Windows. It's a bit easier for a newcomer to linux.

As far as running something at startup those instructions should work - are you placing it in /etc/init.d/ ?

The command:
is running VNC server as a super user, I believe. Does it work with 'su' and "-pi -c" taken out?

I've never used VNC before on the pi, so I'm not too well versed.
 

Bandwagon

Kolohe
<Silver Donator>
22,708
59,511
I might have to try Ammatu's code after Christmas. We got busy at work last night and I didn't get a chance to run it.

I am using WinSCP, but still running into permission issues in the gui. Can I just pull the sdcard and plug it into my laptop, and move files around? sudo gives access via command line, not sure how to give sudo permissions to "raspberrypi" user though, so I don't have to deal with that.
 

Noodleface

A Mod Real Quick
37,961
14,508
You can add the user to the sudoer list.

If you're adding a new user: sudo adduser <username> sudo

If you're editing a user you need to edit the sudoer file:

Be careful giving people sudo access though. You can probably pop the card into your laptop but I'm not sure if Windows/Mac will take over and fuck up the partitions.
 

Bandwagon

Kolohe
<Silver Donator>
22,708
59,511
Currently, I have-
pi ALL=(ALL) NOPASSWD: ALL

Do I just need to remove the NOPASSWD: part, or does that mean that I already have sudo permissions, but still need to enable each command with sudo?

edit - Don't worry about it, Noodle. I shouldn't be bugging you guys for Linux101 stuff. I'm reading through some more basics now.
 

Bandwagon

Kolohe
<Silver Donator>
22,708
59,511
So I got the vncserver at bootup to work by followingtheseinstructions. The instructions on the rasbian page weren't working for me, and I was being prompted for a password when running the command manually. Ammata's change on the display settings did work, though.
 

Bandwagon

Kolohe
<Silver Donator>
22,708
59,511
Also set up webiopi and weaved, so I've been driving the GF crazy with a laser pointer/LED flashlight that I had set up last night.

Can someone recommend a good place to go for coding tutorials? I'd like to be able to code, compile and simulate on the windows machine and then transfer to the Pi, but I haven't found a good resource for complete noobies. I'm thinking something on par with "Mario teaches typing".
 

Noodleface

A Mod Real Quick
37,961
14,508
What language?

It depends what you're doing as well, because linux and windows will use different system libraries and you'll compile the code differently.

If it's C/C++ you can try:

C, C++ Programming Tutorials - Cprogramming.com

If Python:

Learn Python

I don't know how much you get with a free trial, but I think $29.99 for that isn't a bad price. You could also find it free "somewhere" I'm sure.

For other languages it's a little different. Also good places for questions are stackoverflow (SORT OF, they're dicks), /r/learnprogramming, /r/programming, and also our very own comp sci thread - we love to solve programming problems:

Majoring in Comp Sci

Don't worry if you feel a question is too basic or stupid, we've all been there and since we're coders we can't help but debug stuff.

Also don't worry about Linux 101 stuff, we all started somewhere with it - sometimes if you don't know what you're looking for it can be difficult.
 

Bandwagon

Kolohe
<Silver Donator>
22,708
59,511
+1 that last part. My Google fu is strong, but not if I don't know the right terms.

Aiming for python. I assumed that what I need is a python IDE , so I downloaded pycharm community. I guess I need to find an interpreter now?

The learn python link looks good, but I think I'll hunt for the pro bono alternative for now.


edit- Just checked out stackoverflow. I actually remember that place from ~2003 when I was trying to learn how to make batch files to fuck with my coworker. "They're dicks" is exactly what I remember.
So just like previously mentioned, some of the terminology can be tough to figure out if I don't know what to search for-
Python IDE - This is what I need to be able to write and test on the laptop, correct?

Gui - Not sure what term I'm looking for here, but I'd like to have some sort of visual interface with macro buttons that I can edit with layout and the associated code. Would this be something like visual basic? Once the camera gets here, all I'm going to do is put the pi+ camera and pan/tilt on top of the rover and try to control the pan/tilt from the laptop. The pi won't be connected to the arduino, so I really just want to make an interface with some basic buttons like pan/tilt or start stream.

Also, thanks for the continued help. I'm glad I bumped an old thread.
 

Noodleface

A Mod Real Quick
37,961
14,508
Excuse my brevity as I'm on my phone.

You don't actually need an IDE to write python (or any language) code. I usually use notepad++ . That said, pycharm is probably fine.

If you have code you want to test with wjndows you'll need to install python 2. 7 or whatever flavor and include it in your PATH. then you just run your py files from the command line. Since it's an interpreted language you don't really build it.

It will be the same on the pi, just installing whatever packages necessary.

I've only built one gui in python and it was a wjndows app, but the comp Sci thread has a few guys that write python professionally.
 

LachiusTZ

Rogue Deathwalker Box
<Silver Donator>
14,472
27,162
http://www.geek.com/news/new-odroid-dev-board-outmuscles-a-raspberry-pi-for-just-5-more-1646393/
 

lurkingdirk

AssHat Taint
<Medals Crew>
40,735
172,606
I was thinking of getting one of these to attach to my TV and stereo so I can run all the media I own through this one system with no other components. Think I could swing that?