LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-17-2005, 11:21 AM   #1
High-gain
Member
 
Registered: Dec 2004
Location: London,UK
Distribution: Mandriva 2007
Posts: 156

Rep: Reputation: 15
10.1 - script files


Hi There - hope someone can help.

I am trying to configure 'Liquid Weather' on the desktop. So far I have some things that are showing ok. When I try and edit the script I have got a bit stuck, the following files when I look in my root dir seem to be in a different place to where the script indicates.

mountpoint /home /mnt/hda1 hdb

also can't find

networks eth0 /sbin/ip addr show eth0

My questions is if - when I find these files, should I copy them to the location of 'Liquid Weather' to get it to run.


Thanks for looking
 
Old 06-17-2005, 02:30 PM   #2
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
read http://www.catb.org/~esr/faqs/smart-questions.html

Could you please post a copy of (parts of) the script, and point at the faulty line(s)?

Quote:
when I find these files
Exactly which files? `mountpoint /home /mnt/hda1 hdb'?
There probably is no file called `mountpoint'--that's just the technical term for `the directory in which you mount <foo>' (= "foo's mountpoint").

now `hdb' is probably only the correct path to the file you want if you're in /dev;

but having /dev/hda1 mount at /home -- that makes sense.

Unfortunately I don't have the context--so please post the script as I said.

--Jonas
 
Old 06-17-2005, 03:56 PM   #3
High-gain
Member
 
Registered: Dec 2004
Location: London,UK
Distribution: Mandriva 2007
Posts: 156

Original Poster
Rep: Reputation: 15
*

Thank you jonaskoelker for trying to answer my question, just sorry I did not explain myself to well. Here is the script I am stuck on.

# Harddrive Information
text x=50 y=163 value="/" color=0,0,0 fontsize=9 font="Omicron Zeta"
text x=90 y=163 sensor=disk mountpoint="/" format="%u MB / %up%" color=1,1,1 fontsize=9 font="Omicron Zeta" interval=60000
bar x=92 y=175 sensor=disk mountpoint="/" format="%up" path="progress.png"

text x=50 y=173 value="/home" color=0,0,0 fontsize=9 font="Omicron Zeta"
text x=90 y=173 sensor=disk mountpoint="/home" format="%u MB / %up%" color=1,1,1 fontsize=9 font="Omicron Zeta" interval=60000
bar x=92 y=185 sensor=disk mountpoint="/home" format="%up" path="progress.png"

text x=50 y=183 value="/hda1" color=0,0,0 fontsize=9 font="Omicron Zeta"
text x=90 y=183 sensor=disk mountpoint="/mnt/hda1" format="%u MB / %up%" color=1,1,1 fontsize=9 font="Omicron Zeta" interval=60000
bar x=92 y=195 sensor=disk mountpoint="/mnt/hda1" format="%up" path="progress.png"

text x=50 y=193 value="/hdb" color=0,0,0 fontsize=9 font="Omicron Zeta"
text x=90 y=193 sensor=disk mountpoint="/hdb" format="%u MB / %up%" color=1,1,1 fontsize=9 font="Omicron Zeta" interval=60000
bar x=92 y=205 sensor=disk mountpoint="/hdb" format="%up" path="progress.png"

### and here is the network part of the script####

# Network Information
text x=50 y=218 value="Down:" color=0,0,0 fontsize=9 font="Omicron Zeta"
text x=90 y=218 sensor=network device="eth0" format="%in kb/s" color=1,1,1 fontsize=9 font="Omicron Zeta" interval=1000
text x=50 y=228 value="Up:" color=0,0,0 fontsize=9 font="Omicron Zeta"
text x=90 y=228 sensor=network device="eth0" format="%out kb/s" color=1,1,1 fontsize=9 font="Omicron Zeta" interval=1000
text x=50 y=238 value="IP:" color=0,0,0 fontsize=9 font="Omicron Zeta"
text x=90 y=238 sensor=program program="/sbin/ip addr show eth0 | grep 'inet ' | cut -d t -f2 | cut -d / -f1 | cut -b 2-" color=1,1,1 fontsize=9 font="Omicron Zeta"

####

I need to enter the correct details for this script but cannot find where they are on my system, and also if I find where they are, what do I do next.

Sorry this sounds such a stupid question but not had much experience of this.

Thanks again for trying to help.
 
Old 06-17-2005, 04:07 PM   #4
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
Quote:
I need to enter the correct details for this script but cannot find where they are on my system, and also if I find where they are, what do I do next.
Could you try to state clearly:
1) What you're trying to do--seen both from a user's POV and from a programmers POV.
2) How you're trying to do it.
3) What the exact problem is.

--Jonas
 
Old 06-17-2005, 04:49 PM   #5
High-gain
Member
 
Registered: Dec 2004
Location: London,UK
Distribution: Mandriva 2007
Posts: 156

Original Poster
Rep: Reputation: 15
Hi again -

It's a bit difficult for me to explain so please bear with me.

# I have installed 'Liquid Weather' on the desktop ok but some of the figures do not correspond to what I have on my system. So I would like to edit the scipt so that it will show the correct figures.

At the moment it indicates that /home has 422mb/1%
/hda1 has 0 mb/0%
/hdb has 0 mb/0%

The newwork configuration has Down: 0 kb/s
Up: 0 kb/s
IP:

Firstly I would like to find out where and what /hda I have on my system

Second I would like to be able to enter my IP address, but don't know where to find it.

If I find answers to the above questions, what do I have to do if the file is in the wrong place

# I hope the above makes some sense to you so please forgive my ignorance.

Thanks again
 
Old 06-17-2005, 06:12 PM   #6
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
Quote:
Firstly I would like to find out where and what /hda I have on my system
Code:
$ df -h
Quote:
Second I would like to be able to enter my IP address, but don't know where to find it.
You can always try 127.0.0.1 or localhost (they're always "this computer").
but also
Code:
$ ip addr show
$ ip addr show eth0
Quote:
If I find answers to the above questions, what do I have to do if the file is in the wrong place
Errm... which file?

Quote:
please forgive my ignorance.
You're willing to learn. That's infinitely more important than how much you know *now*.

See http://www.catb.org/~esr/faqs/smart-questions.html

hth --Jonas
 
Old 06-18-2005, 02:00 AM   #7
High-gain
Member
 
Registered: Dec 2004
Location: London,UK
Distribution: Mandriva 2007
Posts: 156

Original Poster
Rep: Reputation: 15
Thanks again for your reply

Here is the output of $df -h


Filesystem Size Used Avail Use% Mounted on
/dev/hda1 5.8G 2.5G 3.0G 46% /
/dev/hda6 106G 425M 106G 1% /home

Here is the output of $show ip addr

$No such command

Now that I have the info about the /dev/hda1 and /dev/hda6 how can I find the address( or place ) where these are kept. When I find that info, do I insert that in the script.

#
Have tried entering several different combinations of the $show ip addr but still cannot get any info on that.
Maybe you might have another suggestion.

Thanks again for your help - just sorry that I am painfully slow in picking things up
 
Old 06-18-2005, 06:26 AM   #8
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
Quote:
Here is the output of $df -h: <snip>
Quote:
Here is the output of $show ip addr
It's "ip addr show", not "show ip addr".

if you, on `$ ip', get `no such command', try these:
Code:
$ whereis ip
$ locate 'ip' | grep '/ip$'
$ find / -name 'ip'
Quote:
Now that I have the info about the /dev/hda1 and /dev/hda6 how can I find the address( or place ) where these are kept?
What to you mean "the place where they're kept"? Where what are kept? You mean the mount points of /dev/hda1 and -6?

The mount points are shown by `df -h'.

Quote:
When I find that info, do I insert that in the script?
I'm still not sure what info you're trying to find.

--Jonas
 
Old 06-18-2005, 12:51 PM   #9
High-gain
Member
 
Registered: Dec 2004
Location: London,UK
Distribution: Mandriva 2007
Posts: 156

Original Poster
Rep: Reputation: 15
Thanks again Jonas for your reply. Still not able to solve this problem so have decided to start again.
Many thanks for your time and attention, much appreciated. Good Luck.
 
Old 06-18-2005, 06:56 PM   #10
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
You're welcome
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Script files lucs Slackware 2 02-15-2005 03:45 AM
renaming files script. xushi Programming 4 10-10-2004 08:06 AM
Simple Script Files jcai Linux - General 4 09-19-2004 07:15 AM
how do i open .sh script files? elamigo2004 Linux - Software 1 04-17-2004 03:41 PM
Script to remove old files. cmfarley19 Linux - General 2 03-24-2003 01:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration