Script only works from konsole

Using applications, configuring, problems
Post Reply
Message
Author
fixit

Script only works from konsole

#1 Post by fixit »

For some reason, this only works from a konsole.
Same script works fine with Puppy 5.6.

Code: Select all

# Linux Puppy 6.5.0 and FatDog
#  Cpu_Temp.sh  Show CPU temperatures (duo core in my case)
# "echo" creates a newline in a text file
#
# 1st check if sensors is installed
cd /
cd root/my-applications/lm_sensors-3.3.5/prog/sensors
date "+DATE: %m/%d/%y%nTIME: %r" >> cpu_temp.txt
echo >> cpu_temp.txt
sensors -f >> cpu_temp.txt
geany cpu_temp.txt

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#2 Post by 8-bit »

What happens if you put a link to sensors in /root/my-applications/bin?
I ask because even if I change to the directory containing a script, to use a command in that directory, I have to precede it with dot forward slash.
This is because the command is not recognized unless it is in an executables directory such as bin.

Peterm321
Posts: 411
Joined: Thu 29 Jan 2009, 14:09
Location: UK

#3 Post by Peterm321 »

Not sure what you mean by working only in a console? Do you mean you can't drag it to the desktop and run it by clicking on an icon?

Anyway a couple of observations:

If I was intending to run a script as if it were a standalone application I would (a) Make sure the first line used the bang(!) operator to tell the system what application interprets the script and (b) make sure the script had the executable permission set:

e.g.

Code: Select all

chmod  +x     <path to script name>
The following script appears to be fine if dragged to the desktop

Code: Select all

#!/bin/bash
# Linux Puppy 6.5.0 and FatDog
#  Cpu_Temp.sh  Show CPU temperatures (duo core in my case)
# "echo" creates a newline in a text file
#
# 1st check if sensors is installed
# cd / 
cd /root/my-applications/lm_sensors-3.3.5/prog/sensors
date "+DATE: %m/%d/%y%nTIME: %r" >> cpu_temp.txt
echo >> cpu_temp.txt
sensors -f >> cpu_temp.txt
geany cpu_temp.txt

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#4 Post by watchdog »

I have a similar issue in slacko 5.7. The script I use to launch the manual install of skype works only in console if I use a qt-4.8.6-w5.sfs I obtained by me.

Code: Select all

#!/bin/sh
#export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so
#export LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so
exec skype
The script correctly works launched from a link to desktop in wary e puppy 4.3.2 with the same sfs loaded. The same script correctly works launched from desktop also in slacko 5.7 if I use qt-4.8.2-stripped.sfs.

fixit

#5 Post by fixit »

I think it has to do with Xfe file manager.

None of my scripts work when involved with Xfe.

They just open up in a text editor.

So, far I have been unable to install Thunar.

fixit

#6 Post by fixit »

FatDog is not as mature as Slacko.

It is harder to customize.

Before I do much more testing, I will need to determine if it

1. Can do things Slacko cannot
2. Is any faster

I do like that it is easier to create regular users accounts which I have done for better security.

Post Reply