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 Wed 26 Nov 2014, 11:09
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 Posts_count  
Author Message
fixit

Joined: 16 Mar 2013
Posts: 930
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

_________________
Thanks,
Andy

Primary O.S. Tahr Puppy 6.0 Thunar is file manager.
Puppy 5.9.3 ( Beta )
Windows XP SP3
Back to top
View user's profile Send_private_message 
8-bit


Joined: 03 Apr 2007
Posts: 3393
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: 241

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: 639

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: 930
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.

_________________
Thanks,
Andy

Primary O.S. Tahr Puppy 6.0 Thunar is file manager.
Puppy 5.9.3 ( Beta )
Windows XP SP3
Back to top
View user's profile Send_private_message 
fixit

Joined: 16 Mar 2013
Posts: 930
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.

_________________
Thanks,
Andy

Primary O.S. Tahr Puppy 6.0 Thunar is file manager.
Puppy 5.9.3 ( Beta )
Windows XP SP3
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0533s ][ Queries: 11 (0.0056s) ][ GZIP on ]