Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 16 Sep 2014, 05:47
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Script only works from konsole
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
fixit


Joined: 16 Mar 2013
Posts: 662
Location: El Lago, Texas

PostPosted: Mon 05 May 2014, 18:22    Post subject:  Script only works from konsole  

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


Code:
# 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

_________________
Andy
Slacko Puppy 5.6.0
OpenSuse 13.1 KDE
Windows XP SP3
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3368
Location: Oregon

PostPosted: Mon 05 May 2014, 18:55    Post subject:  

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.
Back to top
View user's profile Send private message 
Peterm321

Joined: 29 Jan 2009
Posts: 227

PostPosted: Tue 06 May 2014, 06:29    Post subject:  

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:
chmod  +x     <path to script name>


The following script appears to be fine if dragged to the desktop

Code:
#!/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
Back to top
View user's profile Send private message 
watchdog

Joined: 28 Sep 2012
Posts: 564

PostPosted: Tue 06 May 2014, 11:00    Post subject:  

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:
#!/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.
Back to top
View user's profile Send private message 
fixit


Joined: 16 Mar 2013
Posts: 662
Location: El Lago, Texas

PostPosted: Tue 06 May 2014, 11:35    Post subject:  

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.

_________________
Andy
Slacko Puppy 5.6.0
OpenSuse 13.1 KDE
Windows XP SP3
Back to top
View user's profile Send private message 
fixit


Joined: 16 Mar 2013
Posts: 662
Location: El Lago, Texas

PostPosted: Tue 06 May 2014, 12:34    Post subject:  

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.

_________________
Andy
Slacko Puppy 5.6.0
OpenSuse 13.1 KDE
Windows XP SP3
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0551s ][ Queries: 12 (0.0058s) ][ GZIP on ]