MK5 Golf GTI

General => Random Chat => Topic started by: cooljimy84 on December 09, 2014, 10:37:40 am

Title: Linux
Post by: cooljimy84 on December 09, 2014, 10:37:40 am
So at work we are moving to Linux OpenSuse 12.4 for most of our phone system.

I kinda know enough to get by i.e. like a normal windows user knows enough to get by. However work are calling for a deeper understanding of the OS, security lock down etc. I can follow guides for installing bits and setting up bits, but logs and diagnostics are out of my knowledge.

Can anyone in the know point me in a good starting direction ? kinda like CBT Nuggets, but for Linux....

Spanks !
Title: Re: Linux
Post by: dazza on December 09, 2014, 12:13:34 pm
If your a windows user anyway i would switch to linux on your home machine. Start leaning simple command line stuff. And build up from there.
Title: Re: Linux
Post by: th3_f15t on December 09, 2014, 12:28:37 pm
A Raspberry Pi is a great tool for learning Linux in all it's various forms. It's being used by the national curriculum to teach children how to program it's that good. And it's cheap, everything bought it'll cost less than £60 (using an existing keyboard, mouse and HDMI screen). Going to start on one myself very soon. :happy2:
Title: Re: Linux
Post by: cooljimy84 on December 09, 2014, 01:04:31 pm
Thanks, also ready running Linux on my laptop and i have a PI that controls my lights via voice command.

The trouble is i need to get the knowledge to fix issues, and both of these don't have any issues (as yet)

I might just have a look through YouTube and see if i can find any good guides, trouble is each distro is a little different.

Thanks tho, keep the good ideas flowing.
Title: Re: Linux
Post by: AndrewJB on December 09, 2014, 08:12:07 pm
Been using Linux since 2002 and I learn something new everyday.
Title: Re: Linux
Post by: mrxbox360 on December 11, 2014, 03:37:55 pm
i use a mac for home use & linux minix neo n8h for xbmx for my telly needs  :evilgrin:
Title: Re: Linux
Post by: cooljimy84 on December 11, 2014, 04:07:43 pm
Kool, so from what other off forum people are saying as well is use it to learn it more.

cheers
Title: Re: Linux
Post by: cooljimy84 on December 12, 2014, 10:02:37 am
Having an issues with a crontab script on ubuntu server, if any one can help ? so they script runs ok if i execute it from the terminal, but when it's s crontab job it doesn't seem to get very far.

so the entry in crontab is
* * * * * root /bin/bash /home/username/checkping.sh >> /home/username/result.txt

once it has run i loook at result.txt and it shows only the following

ping 192.168.1.200 (192.168.1.200) 56 (84) bytes of data.
from 192.168.1.200 icmp_seq=1 destination host unreachable
from 192.168.1.200 icmp_seq=2 destination host unreachable
from 192.168.1.200 icmp_seq=3 destination host unreachable
--- 192.168.1.200 ping stats ---
3 packets transmitted, 0 recived , +3 errors, 100% packet loss, time 2000ms
pipe 3

the script looks like this.

Code: [Select]
#!/bin/bash
if ping -c 3 192.168.1.200
then
  : # Null for exit
else
/usr/local/bin/lightwaverf "Living Room" "Router" off
sleep 10
/usr/local/bin/lightwaverf "Living Room" "Router" on
fi

It works if i run it, and just exits if 192.168.1.200 pings, and runs the lightwaverf command fine with a sleep if 192.168.1.200 doesn't ping.

I suspect that i need to pipe/catch a variable from the ping command and do a test or something, as it's not running the same way as a terminal would...

Please help !
Title: Re: Linux
Post by: cooljimy84 on December 12, 2014, 01:54:48 pm
figured it out.
i was calling the program as root, and root didn't have a config file for that program, so running it as my user now and it works fine...
Title: Re: Linux
Post by: pjuster on December 14, 2014, 08:15:18 pm
How about installing Cygwin on your windows machine, you don't need to partition your HDD it's an install like any other application and gives you a 90% Linux/Unix experience from the command line.

Hth
Paul
Title: Re: Linux
Post by: th3_f15t on December 14, 2014, 08:56:36 pm
I've heard that Arch Linux is a great way to learn Linux through and through, you have to configure everything via command line so you learn how everything is controlled at the lowest level. Could be something to work through in the back ground.
Title: Re: Linux
Post by: rich83 on December 14, 2014, 09:27:49 pm
Having an issues with a crontab script on ubuntu server, if any one can help ? so they script runs ok if i execute it from the terminal, but when it's s crontab job it doesn't seem to get very far.

so the entry in crontab is
* * * * * root /bin/bash /home/username/checkping.sh >> /home/username/result.txt

once it has run i loook at result.txt and it shows only the following

ping 192.168.1.200 (192.168.1.200) 56 (84) bytes of data.
from 192.168.1.200 icmp_seq=1 destination host unreachable
from 192.168.1.200 icmp_seq=2 destination host unreachable
from 192.168.1.200 icmp_seq=3 destination host unreachable
--- 192.168.1.200 ping stats ---
3 packets transmitted, 0 recived , +3 errors, 100% packet loss, time 2000ms
pipe 3

the script looks like this.

Code: [Select]
#!/bin/bash
if ping -c 3 192.168.1.200
then
  : # Null for exit
else
/usr/local/bin/lightwaverf "Living Room" "Router" off
sleep 10
/usr/local/bin/lightwaverf "Living Room" "Router" on
fi

It works if i run it, and just exits if 192.168.1.200 pings, and runs the lightwaverf command fine with a sleep if 192.168.1.200 doesn't ping.

I suspect that i need to pipe/catch a variable from the ping command and do a test or something, as it's not running the same way as a terminal would...

Please help !

We've got rf lights too. What do you do with this system??
Title: Re: Linux
Post by: jamie on December 25, 2014, 08:30:02 pm
I like Linux. The powerful debugging facilities are amazing!

Be careful running things as root...  :laugh:

To be extra careful, run things as a "normal" user and prefix root pre-requisite  commands with sudo.
Title: Re: Linux
Post by: cooljimy84 on December 29, 2014, 09:03:49 am
@rich83 (http://www.mk5golfgti.co.uk/forum/index.php?action=profile;u=709)
I use two dimmer plugin modules. One for our up lighter, and one for a fan (tho we shouldn't use it for the fan.... But Meh)
I have also just got a basic switch on/off which is being controlled by this script. So the pings fail and it calls lightwave to turn off the switch, which has my virgin media router on it and then back on again !
Also have a pi with ir blaster with web interface, and a mic which uses uses Google speech to text to control ir blaster or lightwave.

All made following other peoples work tho.