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 Fri 29 Aug 2014, 06:05
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
[SOLVED] Bash error displayed in console window
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [18 Posts]   Goto page: 1, 2 Next
Author Message
Sylvander

Joined: 15 Dec 2008
Posts: 3426
Location: West Lothian, Scotland, UK

PostPosted: Mon 06 Aug 2012, 16:31    Post subject:  [SOLVED] Bash error displayed in console window
Subject description: Also displayed on screen as Puppy loads
 

Puppy = Slacko-5.3.3.1-SCSI
1. Here's what is displayed in the console:
bash: /etc/profile.d/libglib2.csh: line 28: syntax error: unexpected end of file

2. Here's what is displayed on line 26 of file /etc/profile.d/libglib2.csh:
setenv G_BROKEN_FILENAMES 1
Lines 27 & 28 are blank.

Does anyone have any idea how to fix this?

Last edited by Sylvander on Wed 08 Aug 2012, 14:57; edited 1 time in total
Back to top
View user's profile Send private message 
Keef


Joined: 20 Dec 2007
Posts: 622
Location: Staffordshire

PostPosted: Mon 06 Aug 2012, 17:31    Post subject:  

Try changing #!/bin/csh to #!/bin/csh -f

If it works, thank a search engine and
stackoverflow.
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3964
Location: Kiel,Germany

PostPosted: Mon 06 Aug 2012, 17:42    Post subject: Re: Bash error displayed in console window
Subject description: Also displayed on screen as Puppy loads
 

Sylvander wrote:
Puppy = Slacko-5.3.3.1-SCSI
1. Here's what is displayed in the console:
bash: /etc/profile.d/libglib2.csh: line 28: syntax error: unexpected end of file

2. Here's what is displayed on line 26 of file /etc/profile.d/libglib2.csh:
setenv G_BROKEN_FILENAMES 1
Lines 27 & 28 are blank.

Does anyone have any idea how to fix this?


This is an error that is posted once every two months here on the forum.

You need to have csh installed to cope with csh syntax.

If the file has a normal #!/bin/sh interpreter as first line it would normally call /bin/bash in Puppy Linux.

The syntax of csh and bash is similar but many times incompatible.
Back to top
View user's profile Send private message Visit poster's website 
Sylvander

Joined: 15 Dec 2008
Posts: 3426
Location: West Lothian, Scotland, UK

PostPosted: Mon 06 Aug 2012, 19:29    Post subject:  

Here's the code in the file:
-----------------------------------------------------------------------------------------------------------------
#!/bin/csh
#
# Description: This script sets the environment variables G_FILENAME_ENCODING
# and G_BROKEN_FILENAMES for the glib-2.0 library.
#
# G_FILENAME_ENCODING
# This environment variable can be set to a comma-separated list of
# character set names. GLib assumes that filenames are encoded in the
# first character set from that list rather than in UTF-8. The special
# token "@locale" can be used to specify the character set for the
# current locale.
#
# G_BROKEN_FILENAMES
# If this environment variable is set, GLib assumes that filenames are
# in the locale encoding rather than in UTF-8.

# If the LANG you have set contains any form of "UTF", we will guess you are
# using a UTF-8 locale. Hopefully we're correct.
echo $LANG | grep -iq UTF
if ($status == 0) then
setenv G_FILENAME_ENCODING "@locale"
endif

# It doesn't hurt to export this since G_FILENAME_ENCODING takes priority
# over G_BROKEN_FILENAMES:
setenv G_BROKEN_FILENAMES 1
empty line
empty line

---------------------------------------------------------------------------------------------------------------
.
This kind of thing is incomprehensible to me. Confused
Any consensus on what I should do?
Back to top
View user's profile Send private message 
Semme

Joined: 07 Aug 2011
Posts: 3770
Location: World_Hub

PostPosted: Mon 06 Aug 2012, 19:34    Post subject:  

Change the opening line to this: #!/bin/csh -f and save.. Refire!

If it doesn't work- install tcsh.
Back to top
View user's profile Send private message 
Sylvander

Joined: 15 Dec 2008
Posts: 3426
Location: West Lothian, Scotland, UK

PostPosted: Tue 07 Aug 2012, 00:33    Post subject:  

Did the 1st and saved the change to the file, but it made no difference.
Did the 2nd and saved the session changes and rebooted, but it made no difference.
Same error being displayed in the console window. Sad
Back to top
View user's profile Send private message 
Semme

Joined: 07 Aug 2011
Posts: 3770
Location: World_Hub

PostPosted: Tue 07 Aug 2012, 06:20    Post subject:  

Try that file with ONE empty line.

Not sure if Slacko has this but- one other thought.

And if you wouldn't mind, enclose your script in *code*..
Back to top
View user's profile Send private message 
Semme

Joined: 07 Aug 2011
Posts: 3770
Location: World_Hub

PostPosted: Tue 07 Aug 2012, 07:58    Post subject:  

Looks like a few syntax errors there. Replace yours with mine- make executable..
libglib2.sh.gz
Description 
gz

 Download 
Filename  libglib2.sh.gz 
Filesize  500 Bytes 
Downloaded  113 Time(s) 
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7794
Location: qld

PostPosted: Tue 07 Aug 2012, 07:59    Post subject:  

Undo everything you've done and run:

Code:
rm -f /etc/profile.d/*.csh


EDIT: only one poster in this thread was on to it Wink

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Tue 07 Aug 2012, 08:54    Post subject:  

Sylvander wrote:

#!/bin/csh
#
# Description: This script sets the environment variables G_FILENAME_ENCODING
# and G_BROKEN_FILENAMES for the glib-2.0 library.
#

# It doesn't hurt to export this since G_FILENAME_ENCODING takes priority
# over G_BROKEN_FILENAMES:
setenv G_BROKEN_FILENAMES 1

Any consensus on what I should do?

Not use that script Laughing
G_FILENAME_ENCODING takes priority
and is already set:
/etc/profile wrote:
#w003 no longer needed as woof now uses utf8...
#w004 no, leave in, have made utf8 optional...
##Sylpheed 2.0.1 requires this (also some other gtk2 apps)...
export G_FILENAME_ENCODING=@locale
Back to top
View user's profile Send private message 
Sylvander

Joined: 15 Dec 2008
Posts: 3426
Location: West Lothian, Scotland, UK

PostPosted: Tue 07 Aug 2012, 11:23    Post subject:  

I'm now confused. Confused
Three different posters each giving seemingly different instructions on what to do.
Are all three instructions in conflict?
Or 3 different ways of achieving the same result?

01micko:
Your instruction is simple, and I believe I understand it.

Semme:
Your file [libglib2.sh] is not the one I've been working on [libglib2.csh].
Do you really intend this to be the file I should replace?

L18L:
I don't understand the meaning of what you said.
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Tue 07 Aug 2012, 13:29    Post subject:  

Sylvander wrote:
L18L:
I don't understand the meaning of what you said.

You want your environment variable G_FILENAME_ENCODING to have the value @locale. That is what your script wants to do.

I do not understand why because in puppy this variable is @locale
So why use the script ?
01micko wrote:
Undo everything you've done
That is exactly what I am meaning, too.

If the output of
Code:
echo $G_FILENAME_ENCODING

is not
@locale
then
Code:
export G_FILENAME_ENCODING=@locale

will set it.
Back to top
View user's profile Send private message 
Sylvander

Joined: 15 Dec 2008
Posts: 3426
Location: West Lothian, Scotland, UK

PostPosted: Tue 07 Aug 2012, 15:17    Post subject:  

1.
01micko wrote:
Undo everything you've done

L18L said: That is exactly what I am meaning, too.
My answer: I've done this.

2. L18L said: If the output of
Code:
echo $G_FILENAME_ENCODING

is not
@locale
My answer: It IS @locale.
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Tue 07 Aug 2012, 15:30    Post subject: Re: Bash error displayed in console window
Subject description: Also displayed on screen as Puppy loads
 

Sylvander wrote:
Does anyone have any idea how to fix this?

My idea is : do not run that script because you do not need it and there is nothing to fix Laughing
Back to top
View user's profile Send private message 
Sylvander

Joined: 15 Dec 2008
Posts: 3426
Location: West Lothian, Scotland, UK

PostPosted: Tue 07 Aug 2012, 17:57    Post subject: Re: Bash error displayed in console window
Subject description: Also displayed on screen as Puppy loads
 

L18L wrote:
My idea is : do not run that script because you do not need it and there is nothing to fix Laughing

Could you be specific?
Which script do I not run, and how do I make it not run?
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [18 Posts]   Goto page: 1, 2 Next
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.0845s ][ Queries: 12 (0.0059s) ][ GZIP on ]