loopylee
Posts: 14
Joined: Thu May 26, 2016 7:53 pm

so frustrated

Tue May 31, 2016 6:18 pm

Hi,
Im finding using the raspberry pi with raspbian so frustrating in thinking of giving the little box of hell a good drink of sea water.

why does it have to be so dificult to edit a simple text file.

no mater what i do it always tells me i dont have permision. WTF...

Im the only user, how can i not give my self permision..

So before i send the piece of **** to a watery death can anyone tell me how to give myself permenent permission to do what the hell i want with my box.

If i balls up the o/s, i dont care, i can scrub it and start again in 10 minutes.

As it is its no use to me at all when everything i do has to be scrapped because i dont have pemision to create anything.

Thanks.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: so frustrated

Tue May 31, 2016 6:20 pm

You're really going to mess up the OS, but you asked for it:
add sudo in front of every command. For editing a file :
gksu leafpad
There are 10 types of people: those who understand binary and those who don't.

loopylee
Posts: 14
Joined: Thu May 26, 2016 7:53 pm

Re: so frustrated

Tue May 31, 2016 6:32 pm

Thanks but I know how to use sudo in the terminal but thats no use to me when im trying to edit folders from the desktop.

Im not new to computers, ive been a windows user since windows 3.1.

Ive built many widows based systems from scatch and i know not to mess with system files.

Maybe its because ive been a windows user for so long that im having so much trouble with this thing.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: so frustrated

Tue May 31, 2016 6:38 pm

It's not that you would mess up system files (although that is half of what it prevents ) it's also that you mess up permissions which programs rely on. Where do you want to move to?
gksu pcmanfm
Will give you a sudo file browser.
There are 10 types of people: those who understand binary and those who don't.

loopylee
Posts: 14
Joined: Thu May 26, 2016 7:53 pm

Re: so frustrated

Tue May 31, 2016 6:56 pm

i have a empty file called temper.log, i set this up whilst trying to get a usb thermometer working.

nothing can be writen to the file from the desktop, i cant change file permisions or delete the file because i dont have permision to do so.

i can even create a new txt file in the same folder because i get the message "permission denied".

what im trying to do is record the output of the thermometer into a txt file once every 30 minutes.

several peole tell me i need to set up a cron job to do this.

That would be great if i could just get something to work.

Ive followed lots of youtube vids on how to get cron working but for me it does nothing. no files are writen, no text is is entered and no processes are started.

like i said, so frusatrating.

loopylee
Posts: 14
Joined: Thu May 26, 2016 7:53 pm

Re: so frustrated

Tue May 31, 2016 7:13 pm

kusti8 wrote: gksu pcmanfm
Will give you a sudo file browser.
This is just what i was looking for.

Thank you.

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: so frustrated

Tue May 31, 2016 8:53 pm

loopylee wrote:
Im not new to computers, ive been a windows user since windows 3.1.
... that's actually the problem. You are frustrated (and I am being genuine) because for the first time in your life you're using a real computer !

Unix is not Windows.

... if you treat it as though it were, you'll be even more frustrated (words to the wise).
marcus
:ugeek:

W. H. Heydt
Posts: 10899
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: so frustrated

Tue May 31, 2016 8:56 pm

Unix and Linux are multiuser systems. The file protections are, in part, to protect users from each other. Permissions are a *feature* not a bug. That Windows (mostly) lacks them is a bug (formally, a software defect).

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: so frustrated

Tue May 31, 2016 9:47 pm

loopylee wrote:
kusti8 wrote: gksu pcmanfm
Will give you a sudo file browser.
This is just what i was looking for.
I haven't tried this but it is likely to leave various files with the wrong permissions, at least I would watch for that.

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: so frustrated

Tue May 31, 2016 10:02 pm

loopylee wrote:several peole tell me i need to set up a cron job to do this. That would be great if i could just get something to work.
Ive followed lots of youtube vids on how to get cron working but for
I would avoid videos unless I was generally kicking back and trying to learn around a topic. You are unlikely to learn what you need though for some specific problem by watching a lecture and especially from watching a video you randomly found on youtube. This is more true with programming than it is with changing a wheel cylinder in your car since the latter does involve physicality that is often useful to see done. But it's also very smart to read about that too.
me it does nothing. no files are writen, no text is is entered and no processes are started. like i said, so frusatrating.
Programming can certainly involve frustration, try writing things in bash. First they tell you to put quotes around everything and then they tell you, well, not around that.

Problems with cron often involve permissions and/or the environment. Since you are new to all those issues, you could largely avoid them by just not using cron for this application, at least at this point. If you want to do something every 30 minutes, you could use cron, or you could just write your program and tell it to sleep for 30 minutes after doing whatever your program does and then awake and do whatever your program does again. Just like that you've gone around the problem. Frustration is always reduced when you feel like you are moving forward.

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: so frustrated

Tue May 31, 2016 10:11 pm

A metaphor comes to mind, again...

... Windows is like this large plastic toy with bendable arms and eyes that light up (you can play with it till its broken or you're bored with it) and it pretty much just does that, whatever 'that' is... on windows everyone is waiting for the next new killer app/ well, not so much any longer.

... Unix is like a box of Lego blocks... zillions of small, tight, interlocking pieces which are infinitely configurable and limitless in combination and permutation. You never get bored with it, because everyday its something new (which comes mostly from your own experience and imagination)! The paradigm in Unix is that 'Unix' is the killer app! Its a system of intricately interconnected parts that work together seamlessly in a true multi-user non pre-emptive multi-tasking environment.

Permissions in Unix are like the little bumps on the plastic Lego blocks... they keep everything lined up so that the kids can play happily for hours and hours... without the little bumps on the plastic blocks everything falls apart... see?

:mrgreen:
marcus
:ugeek:

User avatar
Douglas6
Posts: 4767
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: so frustrated

Tue May 31, 2016 10:55 pm

I agree that LINUX file permissions should be understood, not ignored. But that analogy is a hoot, and the gratuitous Windows bashing a bit disingenuous.

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: so frustrated

Tue May 31, 2016 11:31 pm

Douglas6 wrote:I agree that LINUX file permissions should be understood, not ignored. But that analogy is a hoot, and the gratuitous Windows bashing a bit disingenuous.
Especially given that the Windows permissions scheme is very capable and extensive, e.g https://msdn.microsoft.com/en-us/library/bb727008.aspx . The fact that many people have essentially run their computers as root all the time does diminish effectiveness in practice, of course.

asandford
Posts: 1997
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: so frustrated

Wed Jun 01, 2016 12:33 am

Has davenull got a new account?

User avatar
rpdom
Posts: 15219
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: so frustrated

Wed Jun 01, 2016 5:37 am

asandford wrote:Has davenull got a new account?
I was actually wondering that.

texy
Forum Moderator
Forum Moderator
Posts: 5157
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: so frustrated

Wed Jun 01, 2016 6:40 am

Lets not go off-topic - the OP's question has been answered. Let's leave it at that.
Thank you.
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

loopylee
Posts: 14
Joined: Thu May 26, 2016 7:53 pm

Re: so frustrated

Wed Jun 01, 2016 7:07 am

thanks for all your replies.

Some im sure will be usefull.

The only reason i bought a pi3 was to log the temperature in a greenhouse.

i have a usb thermometer which i have working fine from terminal.

all i have to do is type sudo temperv14 and im presented with the date, time and temperature.

im told that i can get this output writen to a file by writing a shell script and creating a crontab to run the script every 30 minutes.

sound simple.

if only the box would give me permission to run the script and let cron create and write the file.

i realy dont care that this little box can do other stuff or that i might break something im never going to use if i go poking around.

if it was easier to use it would be sat in the greenhouse doing its job untill the end of its days.

with windows i just have to load a cd, click the icon and i have a fully working thermometer thats recording temperatures.

at the moment owning a linux based maching seems like ordering a new car and being delivered 20000 pieces and 40000 oppinions on how to put it together.

User avatar
rpiMike
Posts: 909
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: so frustrated

Wed Jun 01, 2016 7:41 am

Are you able to set the permission on the specific file ?

sudo chmod a+w filename
(give all write access to file)

https://en.wikipedia.org/wiki/Chmod

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: so frustrated

Wed Jun 01, 2016 8:17 am

Have you doen the shell script?
Does it work when run as root? (sudo script)
Have you created the crontab from root account?

texy
Forum Moderator
Forum Moderator
Posts: 5157
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: so frustrated

Wed Jun 01, 2016 9:03 am

loopylee wrote:thanks for all your replies.

Some im sure will be usefull.

The only reason i bought a pi3 was to log the temperature in a greenhouse.

i have a usb thermometer which i have working fine from terminal.

all i have to do is type sudo temperv14 and im presented with the date, time and temperature.

im told that i can get this output writen to a file by writing a shell script and creating a crontab to run the script every 30 minutes.

sound simple.

if only the box would give me permission to run the script and let cron create and write the file.

i realy dont care that this little box can do other stuff or that i might break something im never going to use if i go poking around.

if it was easier to use it would be sat in the greenhouse doing its job untill the end of its days.

with windows i just have to load a cd, click the icon and i have a fully working thermometer thats recording temperatures.

at the moment owning a linux based maching seems like ordering a new car and being delivered 20000 pieces and 40000 oppinions on how to put it together.
We all agree it is frustrating to learn something new. I know I struggled to do the most basic thing with the pi when I first got it - I'm sure many others did too. But you need to help us to help you - we can only guess the hardware you have, the software you are trying to use and the object of the exercise. Only in this post do you mention what you are trying to achieve. There are lots of tutorials and projects that are raspberry pi based that measure and log temperatures. Whats your set-up? Are you using a guide to get this working and if so do you have a link?
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23699
Joined: Sat Jul 30, 2011 7:41 pm

Re: so frustrated

Wed Jun 01, 2016 9:19 am

There re lots of guides on linux permissions etc, but as above, we really need to know what you are trying to do to really help.

For example, usually, there should be no problems with permissions if you are working in your home folder (unless using GPIO's perhaps), So, presumably you are trying to edit files elsewhere. But that would be an odd thing to do, so maybe that is where the issue lies, rather than permission per-se.

So, more information would help us get you on the right track.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

loopylee
Posts: 14
Joined: Thu May 26, 2016 7:53 pm

Re: so frustrated

Wed Jun 01, 2016 5:33 pm

once again, thank you all for being so helpfull.

my settup is as follows,
Raspberry pi3 with official power supply.
8gig Sandisk micro sd card
o/s is raspbian.
the usb thermometer is a TEMperV14 which is plugged into a 3 meter usb cable.
The guide i used to install the drivers for this device is at http://dev-random.net/temperature-measu ... pberry-pi/

The software has been installed into a folder at home/pi/temperv14 and to get a reading in terminal i have to type sudo temperv14

This give a line of txt like 2016/06/01 18:15:55 Temerature 65.41F 18.56C

The reason for buying the pi was to run this thermometer in a greenhouse and record the temperatures every 30 minutes. The thermometer came with a windows disk that has a small program that records the temperature in the same configeration and writes it to a file or excel spreadsheet.

All im trying to do with the pi is to get the information from the thermometer into a text file as a simple line of text.

I have looked at several other websites where people have used the same thermometer to record the temperatures in server rooms and send emails when temperatures get too hot. others have linked several thermometers together for the same reason.
ive found one website where someone has rigger the same thermometer to a homebrew setup and uses it to turn on coolers and heaters to maintaine a steady temerature.

None of these websites show how to just record the data.

The advice to write a shell script to run the comand and use cron to repeat the process cand from another thread on this website.
viewtopic.php?f=63&t=149542&p=983180#p983180

User avatar
rpiMike
Posts: 909
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: so frustrated

Wed Jun 01, 2016 5:59 pm

One of the comments on that guide web page suggests :
I solved the rights problem by having temperv14 run as root and allow anyone to run it. That seemed the simplest solution.
sudo chown root temperv14
sudo chmod +s temperv14

User avatar
dasmanul
Posts: 502
Joined: Wed Sep 30, 2015 10:20 am
Location: Frankfurt, Germany

Re: so frustrated

Wed Jun 01, 2016 6:02 pm

Please type the following at a command prompt and post the output here, preferably in Code-tags:

Code: Select all

cd /home/pi/temperv14
ls -l
ls -ld .
which temperv14
ls -l $(which temperv14)
crontab -l
sudo crontab -l

loopylee
Posts: 14
Joined: Thu May 26, 2016 7:53 pm

Re: so frustrated

Wed Jun 01, 2016 8:47 pm

dasmanul wrote:Please type the following at a command prompt and post the output here, preferably in Code-tags:

Code: Select all

cd /home/pi/temperv14
ls -l
ls -ld .
which temperv14
ls -l $(which temperv14)
crontab -l
sudo crontab -l
This is what i get when i folow the instructions above.

pi@raspberrypi:~ $ cd /home/pi/temperv14
pi@raspberrypi:~/temperv14 $ ls -l
total 24
-rw-r--r-- 1 root root 96 Jan 6 10:43 99-tempsensor.rules
-rw-r--r-- 1 root root 215 Aug 19 2013 Makefile
-rw-r--r-- 1 root root 12985 Aug 19 2013 temperv14.c
pi@raspberrypi:~/temperv14 $ ls -ld .
drwxr-xr-x 2 root root 4096 Jun 1 21:43 .
pi@raspberrypi:~/temperv14 $ which temperv14
/usr/bin/temperv14
pi@raspberrypi:~/temperv14 $ ls -l $(which temperv14)
-rwxr-xr-x 1 root root 16600 May 26 19:29 /usr/bin/temperv14
pi@raspberrypi:~/temperv14 $ crontab -l
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#

# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow
pi@raspberrypi:~/temperv14 $ sudo crontab -l
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command



pi@raspberrypi:~/temperv14 $

Return to “Beginners”