| Author |
Message |
Sylvander
Joined: 15 Dec 2008 Posts: 2855 Location: West Lothian, Scotland, UK
|
Posted: 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
|
|
 |
Keef

Joined: 20 Dec 2007 Posts: 428 Location: Staffordshire
|
Posted: 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
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 2678 Location: Kiel,Germany
|
Posted: 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
|
|
 |
Sylvander
Joined: 15 Dec 2008 Posts: 2855 Location: West Lothian, Scotland, UK
|
Posted: 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.
Any consensus on what I should do?
|
|
Back to top
|
|
 |
Semme
Joined: 07 Aug 2011 Posts: 2051 Location: World_Hub
|
Posted: 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
|
|
 |
Sylvander
Joined: 15 Dec 2008 Posts: 2855 Location: West Lothian, Scotland, UK
|
Posted: 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.
|
|
Back to top
|
|
 |
Semme
Joined: 07 Aug 2011 Posts: 2051 Location: World_Hub
|
Posted: 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
|
|
 |
Semme
Joined: 07 Aug 2011 Posts: 2051 Location: World_Hub
|
Posted: Tue 07 Aug 2012, 07:58 Post subject:
|
|
Looks like a few syntax errors there. Replace yours with mine- make executable..
| Description |
|

Download |
| Filename |
libglib2.sh.gz |
| Filesize |
500 Bytes |
| Downloaded |
77 Time(s) |
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7019 Location: qld
|
Posted: 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
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1718 Location: Burghaslach, Germany
|
Posted: 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
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
|
|
 |
Sylvander
Joined: 15 Dec 2008 Posts: 2855 Location: West Lothian, Scotland, UK
|
Posted: Tue 07 Aug 2012, 11:23 Post subject:
|
|
I'm now 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
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1718 Location: Burghaslach, Germany
|
Posted: 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
|
|
 |
Sylvander
Joined: 15 Dec 2008 Posts: 2855 Location: West Lothian, Scotland, UK
|
Posted: 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
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1718 Location: Burghaslach, Germany
|
Posted: 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
|
|
Back to top
|
|
 |
Sylvander
Joined: 15 Dec 2008 Posts: 2855 Location: West Lothian, Scotland, UK
|
Posted: 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  |
Could you be specific?
Which script do I not run, and how do I make it not run?
|
|
Back to top
|
|
 |
|