Programs and scripts that are not yet internationalized

For efforts in internationalising Puppy and solving problems in this area
Message
Author
robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#46 Post by robwoj44 »

The only way I know for running as fido is to use the 'fido' button at first shutdown.
How did you "permanently change the user to fido user" ?
By chance. I run root2user. I did not write the password and closed root2user by pprocess. After reboot I was still fido user. It was not possible to change to root by login manager.
I tried to change the password (for fido user?) by root2user. This password did not work in login manager and when I started for example puppy package manager. In login manager only worked the password "woofwoof", but after the reboot I was still fido user.
It was not possible to run rxvt. I have no time to check on and finally I reinstalled racy:)

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#47 Post by robwoj44 »

/usr/local/ppg/ppg-gui.sh

Code: Select all

#!/bin/sh

#       Puppy Podcast Grabber v0.9.9
#       Brad Coulthard <Coulthard@ieee.org>
# 
#		Feedback is great! email me.
#
#       This script is my own work but I did use some commands and 
#       ideas from both PodGet and Bash Podder.
#
#		http://sourceforge.net/projects/podget/
#		http://linc.homeunix.org:8080/scripts/bashpodder/
#
#		This program is for Puppy Linux www.puppylinux.com
#		If you would like to use it for another disto go for it.
#		Please give me credit for my work.
#
#      This program is free software; you can redistribute it and/or modify
#      it under the terms of the GNU General Public License as published by
#      the Free Software Foundation; either version 2 of the License, or
#      (at your option) any later version.
#
#      This program is distributed in the hope that it will be useful,
#      but WITHOUT ANY WARRANTY; without even the implied warranty of
#      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#      GNU General Public License for more details.
#
#      You should have received a copy of the GNU General Public License
#      along with this program; if not, write to the Free Software
#      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

#130523 robwoj44 internationalized

. gettext.sh
export TEXTDOMAIN=ppg-gui.sh
export TEXTDOMAINDIR=/usr/share/locale
export OUTPUT_CHARSET=UTF-8



#-------------------------------------------------------------------
# This is just in case you need to install ppg to somwhere else or 
# somthing.  You should be able to change anything here and it will 
# be the only place you need to change it
#-------------------------------------------------------------------



cd /usr/local/ppg
maindir=/usr/local/ppg/  # where all files should be
serverlistname=serverlist.txt  # the list of RSS feeds 
serverlistdir=$maindir # the dir where the list file is located
serverlist=$serverlistdir$serverlistname

#-----------------------------------
# Main menu ( not like the c main ). 
#-----------------------------------

main ()
{
Xdialog --no-tags --title "$(gettext 'Puppy Podcast Grabber')" --menu "" 20 45 15 \
1 "$(gettext '=======  HELP!!  =======')" 2 "$(gettext '*  Check For New Podcast')" 3 "$(gettext '==  VIEW          Podcast Feeds')" 4 "$(gettext '==  ADD          A Podcast Feed')" 5 "$(gettext '==  REMOVE    A Podcast Feed')" 6 "$(gettext '==  EDIT          A Podcast Feed')" 7 "$(gettext '==  EDIT          by Hand ( Caution )')" 8 "$(gettext '=+  Quit')"
}


#-----------------------------------------------
# Lists all podcast feeds from serverlist file.  Then alows the user to select one.
# Used in "edit" and "delete" menu options.
#-----------------------------------------------
listpod ()
{
plist=$(count=1
while read test_url test_keep test_name; do
	echo -n "$count"
	echo -n " \"$test_name\" "
	let "count=$count+1"
done <"${serverlistdir}${serverlistname}")

eval "Xdialog --no-tags --title \"$(gettext 'Puppy Podcast Grabber')\" --menu \"$(gettext 'Select A Podcast')\" 20 45 15 $plist"
}


listpodlong ()
{
plist=$(
count=1
while read test_url test_keep test_name; do
	let "noff=25-${#test_name}"
	noffsp=$(noff=12
count02=1
while [ $count02 -lt $noff ];do
	echo -n " "
	let "count02=count02+1"
done)
	echo -n "$count"
	echo -n " \"$test_name$noffsp $test_keep  $test_url\" "
	let "count=$count+1"
done <"${serverlistdir}${serverlistname}"
)
#echo "Xdialog --no-tags --title \"Puppy Podcast Grabber\" --menu \"Select A File\" 20 45 15 $plist"
#read
eval "Xdialog --no-tags --title \"$(gettext 'Puppy Podcast Grabber')\" --menu \"$(gettext 'Current Podcasts')\" 20 80 15 $plist"
}


## 
	if [ "$menucommand" == "1" ]; then
		t=$(listpodlong 2>&1)
	fi
menucommand="2"
while [ "$menucommand" != "" ]; do
	menucommand=$(main 2>&1)

	echo $menucommand




	#-----------------------------------------------
	# view RSS feeds See above function "listpod"
	#-----------------------------------------------
	if [ "$menucommand" == "3" ]; then
		t=$(listpodlong 2>&1)
	fi



	# Add a new RSS feed
	if [ "$menucommand" == "4" ]; then
		name=""; url="";days="7"
		ret=$(Xdialog --separator "|" --3inputsbox "$(gettext 'Edit Podcast')" 20 100 "$(gettext 'NAME')" "$name" "$(gettext 'URL')" "$url" "$(gettext 'Days')" "$days" 2>&1)
		if [ "$ret" != "" ]; then
			newname=$(echo $ret | cut -d"|" -f1)
			newurl=$(echo $ret | cut -d"|" -f2)
			newday=$(echo $ret | cut -d"|" -f3)
			echo "$newurl $newday $newname" >> $serverlist
		fi
	fi




	#------------------------------------------------------------------------------
	# Edit RSS feed info.. How long to keep files, URL and your name for the feed
	#------------------------------------------------------------------------------
	if [ "$menucommand" == "6" ]; then
		mc=$(listpod 2>&1)
		count=1
		while read test_url test_keep test_name; do
			if [ "$count" = "$mc" ]; then
				name="$test_name"
				url=$test_url
				days=$test_keep
				
			fi
			let "count=$count+1"
		done <"${serverlistdir}${serverlistname}"
		if [ "X$name" != "X" ]; then
			ret=$(Xdialog --separator "|" --3inputsbox "$(gettext 'Edit Podcast')" 20 100 "$(gettext 'NAME')" "$name" "$(gettext 'URL')" "$url" "$(getetxt 'Days')" "$days" 2>&1)
			if [ "$ret" != "" ]; then
				newname=$(echo $ret | cut -d"|" -f1)
				newurl=$(echo $ret | cut -d"|" -f2)
				newday=$(echo $ret | cut -d"|" -f3)
				while read test_url test_keep test_name; do
					if [ "$test_name" = "$name" ]; then
						echo "$newurl $newday $newname" >>"${serverlistdir}.${serverlistname}.tmp" 
					else
						echo "$test_url $test_keep $test_name" >>"${serverlistdir}.${serverlistname}.tmp" 
					fi
				done <"${serverlistdir}${serverlistname}"
			rm -f $serverlist
			cat "${serverlistdir}.${serverlistname}.tmp" >$serverlist
			rm -f "${serverlistdir}.${serverlistname}.tmp"
			fi
		fi
	fi





	#-------------------------------------------------
	#Removes an RSS feed from the serverlist file
	#------------------------------------------------
	if [ "$menucommand" == "5" ]; then
		mc=$(listpod 2>&1)
		count=1
		while read test_url test_keep test_name; do
			if [ "$count" = "$mc" ]; then
				name="$test_name"
				url=$test_url
				days=$test_keep
				
			fi
			let "count=$count+1"
		done <"${serverlistdir}${serverlistname}"
		if [ "X$name" != "X" ]; then
		
				while read test_url test_keep test_name; do
					if [ "$test_name" = "$name" ]; then
						echo "$newurl $newday $newname" >>/dev/null
					else
						echo "$test_url $test_keep $test_name" >>"${serverlistdir}.${serverlistname}.tmp" 
					fi
				done <"${serverlistdir}${serverlistname}"
			rm -f $serverlist
			cat "${serverlistdir}.${serverlistname}.tmp" >$serverlist
			rm -f "${serverlistdir}.${serverlistname}.tmp"
			fi
		fi
	
	
	
	
	#--------------------------------------
	#Edit the serverlist yourself
	#--------------------------------------
	if [ "$menucommand" == "7" ]; then
		defaulttexteditor "$serverlist"
	fi




	#-------------------------------------
	# Get the files (Podcasts)
	#-------------------------------------

	if [ "$menucommand" == "2" ]; then
		rxvt -title "$(gettext 'Puppy Podcast Grabber')" -sl 1000 -e "./ppg.sh"
	fi
	
	
	
	#------------------------------------
	# Help !
	#------------------------------------
	if [ "$menucommand" == "1" ]; then
		defaultbrowser $maindir/readme.html &
	fi




	#-----------------------------------
	# Quit
	#-----------------------------------
	if [ "$menucommand" == "8" ]; then
		exit
	fi






done

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#48 Post by robwoj44 »

Concerning gfnrename I found
"Removed support for gettext in an effort to reduce dependencies. Support for
gettext can easily be put back in by running Glade with the gfnrename.glade
file and setting the gettext option there."
How to put it back exactly. I tried but without the success.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

/usr/sbin/loginmanager

#49 Post by L18L »

robwoj44 wrote:
The only way I know for running as fido is to use the 'fido' button at first shutdown.
How did you "permanently change the user to fido user" ?
By chance. I run root2user. I did not write the password and closed root2user by pprocess. After reboot I was still fido user. It was not possible to change to root by login manager.
I tried to change the password (for fido user?) by root2user. This password did not work in login manager and when I started for example puppy package manager. In login manager only worked the password "woofwoof", but after the reboot I was still fido user.
It was not possible to run rxvt. I have no time to check on and finally I reinstalled racy:)
Congrats
You found a bug
I fixed it http://murga-linux.com/puppy/viewtopic. ... 7&start=94
:D

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#50 Post by robwoj44 »

Another problem. Booting from a pendrive after "loading kernel modules" the system changes the resolution and it loses the console font. In the effect the national chars are not good displayed.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Programs and scripts that are not yet internationalized

#51 Post by L18L »

robwoj44,
sorry, your version appears to be pre-130310.

Code: Select all

#130310 BK: Xdialog may o/p error msgs on stderr, require option --stdout. note, where i have inserted 2>/dev/null not really required, just suppresses any error msg.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

Re: /usr/sbin/loginmanager

#52 Post by BarryK »

L18L wrote:
robwoj44 wrote:
The only way I know for running as fido is to use the 'fido' button at first shutdown.
How did you "permanently change the user to fido user" ?
By chance. I run root2user. I did not write the password and closed root2user by pprocess. After reboot I was still fido user. It was not possible to change to root by login manager.
I tried to change the password (for fido user?) by root2user. This password did not work in login manager and when I started for example puppy package manager. In login manager only worked the password "woofwoof", but after the reboot I was still fido user.
It was not possible to run rxvt. I have no time to check on and finally I reinstalled racy:)
Congrats
You found a bug
I fixed it http://murga-linux.com/puppy/viewtopic. ... 7&start=94
:D
I don't see that it's a bug.

root2user is only run during the shutdown process.

See my other response:
http://murga-linux.com/puppy/viewtopic. ... 548#705548
[url]https://bkhome.org/news/[/url]

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: /usr/sbin/loginmanager

#53 Post by L18L »

BarryK wrote:...I don't see that it's a bug.
Changing back to autologin as root did not work.
The bug I see is

Code: Select all

echo "$ADMINPASSWORD" | su root
does not change to root.
BarryK wrote:root2user is only run during the shutdown process.
robwoj44 has used it to change password(s)
my console wrote:# root2user

Password for 'root' changed
Password for 'fido' changed
#
I have changed separate passwords for root and fido using passwd.
..and I could reproduce his "not being able to change back to autologin as root"

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#54 Post by robwoj44 »

I checked once more the issue in racy 5.5.
Directly I run root2user from /usr/sbin and changed the password for root.
After rebooting I was fido user (ok).
New password for root worked ok after the reboot (ok).
I used login manager to change back to root.
I typed root password and received the info that everything ok, but after rebooting I was still fido user. I used L18L script to change back to root and it worked ok, but the owner of every file in the folder root was fido (is it ok?)
So I can confirm the problem with login manager.

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

#55 Post by robwoj44 »

sorry, your version appears to be pre-130310.

Code:
#130310 BK: Xdialog may o/p error msgs on stderr, require option --stdout. note, where i have inserted 2>/dev/null not really required, just suppresses any error msg.

No. I have this error only in precise 5.6 (wary, racy too) intalled in my pendrive. Someone reported me the same problem in precise 5.6.1 full installation in HD. As I wrote before during loading kernel modules the screen change the resolution and puppy lose console font.


User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#57 Post by Argolance »

Hello,
Thanks!
NOTICE: Gettexted srcipt "PSIP" is missing in the tarball! :(
EDIT
Sorry, I did not see Psip has to be compiled...

Cordialement.

Post Reply