Opened 10 years ago

Closed 6 years ago

Last modified 6 years ago

#45791 closed defect (worksforme)

geany: cannot open display

Reported by: shreyasjoshi15@… Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.3.2
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: geany

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I have installed the geany using macport

#sudo port install geany

Now, when I try to launch geany from spot light. I get the following errors.

A terminal opens -

Last login: Wed Nov  5 23:44:51 on ttys001
SHREYASs-MacBook-Pro:~ shreyasjoshi$ /opt/local/bin/geany ; exit;

(process:9451): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.
Geany: cannot open display

logout

[Process completed]

Change History (25)

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Description: modified (diff)
Owner: changed from macports-tickets@… to kiarash@…
Port: geany added
Summary: Cannot open geany after installing the geany from macport?geany: cannot open display

Usually one launches command-line applications like geany from a terminal window, not from Spotlight or the Finder. Running geany from a terminal window works for me. If that doesn't work for you either, what is the value of your DISPLAY environment variable? (You can run the env command to find out.)

comment:2 Changed 10 years ago by shreyasjoshi15@…

This is the env

SHREYASs-MacBook-Pro:~ shreyasjoshi$ env
TERM_PROGRAM=Apple_Terminal
SHELL=/bin/bash
TERM=xterm-256color
TMPDIR=/var/folders/zr/8m0tnsqj3x54m3myk_1m08kh0000gn/T/
Apple_PubSub_Socket_Render=/tmp/launch-7oJDvm/Render
TERM_PROGRAM_VERSION=326
SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
TERM_SESSION_ID=FFFE4487-150B-46F2-8447-C9BCE2A6CA2C
USER=shreyasjoshi
SSH_AUTH_SOCK=/tmp/launch-WdawR2/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0:0
PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
__CHECKFIX1436934=1
PWD=/Users/shreyasjoshi
DBUS_LAUNCHD_SESSION_BUS_SOCKET=/tmp/launch-2jTwHm/unix_domain_listener
SHLVL=1
HOME=/Users/shreyasjoshi
LOGNAME=shreyasjoshi
LC_CTYPE=UTF-8
_=/usr/bin/env
SHREYASs-MacBook-Pro:~ shreyasjoshi$ 
Last edited 10 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:3 Changed 10 years ago by shreyasjoshi15@…

Even geany is not getting opened from terminal -

SHREYASs-MacBook-Pro:~ shreyasjoshi$ geany

(process:10224): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.
Geany: cannot open display

SHREYASs-MacBook-Pro:~ shreyasjoshi$
Last edited 10 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Ok, so the DISPLAY environment variable is not set. Do you have an X server installed? Such as the xorg-server port, or the Xquartz package? If not, you should install it. Then close the terminal window, open a new one, and try again.

comment:5 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Please reply in the ticket, not by email.

what will you recommend to install?

They're the same software, so the choice is just whether you would like to update it via MacPorts or a standalone installer.

comment:6 Changed 10 years ago by shreyasjoshi15@…

should I use

#sudo port install xorg-server

or

#sudo port install Xquartz

Which one will you recommend?

Last edited 10 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:7 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Xquartz is not a port; it's a standalone package you can download from http://xquartz.macosforge.org . Or if you prefer to install the same software with MacPorts, you can use "sudo port install xorg-server". I prefer installing and updating software with MacPorts so I would recommend using xorg-server.

comment:8 Changed 10 years ago by shreyasjoshi15@…

I installed xorg-server. It works, but it throws error on the console. Also, I don't see the style good as compare to what I see in Linux.

SHREYASs-MacBook-Pro:~ shreyasjoshi$ /opt/local/bin/geany ; exit;

(process:479): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.
Fontconfig warning: ignoring UTF-8: not a valid region tag
logout

[Process completed]
Last edited 10 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:9 Changed 10 years ago by shreyasjoshi15@…

After installing Xorg-server. I restarted my macbook.

comment:10 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

The warnings you see in the terminal are because your LC_CTYPE environment variable is set to the invalid value UTF-8. Valid values would be any of the locales listed in the directory /usr/share/locale. Are you deliberately setting LC_CTYPE in one of your shell startup files? If so, try not doing that, and letting the terminal set things automatically. (The terminal will set the LANG environment variable to a value that corresponds to your selections in the Language & Region pane of System Preferences, and LC_CTYPE will take on the value of LANG if LC_CTYPE is not set.)

As for the "style", what do you mean exactly? Certainly X11 applications won't look as nice as native OS X applications, but the way they look should be comparable to the way they look on other operating systems that use X11.

comment:11 Changed 10 years ago by shreyasjoshi15@…

No, I am not aware of any LC_Type environment. I have not done anything deliberately. Can you please suggest me the way to set the LC_CTYPE environment correctly on my macbook? The valid one.

comment:12 Changed 10 years ago by shreyasjoshi15@…

I want to setup for Standard English.

comment:13 Changed 10 years ago by shreyasjoshi15@…

SHREYASs-MacBook-Pro:~ shreyasjoshi$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
Last edited 10 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:14 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

In System Preferences > Language & Region, have you selected English as the language and United States as the region?

In Terminal > Preferences > Profiles > Advanced, have you enabled the "Set locale and environment variables on startup" checkbox and set the "Text encoding" popup menu to "Unicode (UTF-8)"?

comment:15 Changed 10 years ago by shreyasjoshi15@…

English as the language and India as the region. have you enabled the "Set locale and environment variables on startup" -> Yes. Yes, the character encoding is UTF-8 unicode.

comment:16 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Ah, ok. Yes, OS X does not have an "en_IN.UTF-8" locale in the /usr/share/locale directory, so the automatic locale selection won't work for this combination of language and region. You could manually set the LANG environment variable to one of the locales in /usr/share/locale, for example:

export LANG=en_US.UTF-8

Do this in your shell startup file, such as ~/.profile, ~/.bash_profile, ~/.bashrc, etc.

comment:17 Changed 10 years ago by shreyasjoshi15@…

I only have a ~/.profile file on my mac. I don't have bashrc and bash_profile. Is it sufficient to set only on ~./profile?

comment:18 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Sure, set it in whichever shell startup file you use.

comment:19 Changed 10 years ago by shreyasjoshi15@…

Isnt' a bug from Mac OS that they don't have bothered to have support for India and English.

comment:20 in reply to:  19 Changed 10 years ago by larryv (Lawrence Velázquez)

Apple cannot provide a locale file for every possible combination of country, language, and encoding. You’re free to file a bug with them if you wish.

comment:21 Changed 10 years ago by shreyasjoshi15@…

I guess, you can close this. It is good to support locale for India, I will say. India is the large market for computers. Also, there is a significant contribution by India in the technology. I am moved that Apple don't even bother for India, but I am sure that there are many Indians, who works for great companies like Apple, Google, and Facebook.

comment:22 in reply to:  21 Changed 10 years ago by larryv (Lawrence Velázquez)

Replying to shreyasjoshi15@…:

I am moved that Apple don't even bother for India

As I already said, locales aren’t about “supporting” every combination of country, language, and encoding, as that would be an infeasible task. If you look inside /usr/share/locale, the only English locales are for Australia, Canada, Ireland, New Zealand, the United Kingdom, and the United States — probably because those are the primary countries in which English is a dominant language.

The comprehensive list at the Unicode Common Locale Data Repository doesn’t suggest any India/English locales either. I’m almost sure that China has more English speakers than Ireland, but there are no en_CN.* locales. And the population of Spanish speakers in the United States is almost as great as the entire population of Spain, but there are no es_US.* locales.

Did you actually get the locale to work? I’d expect that en_GB.UTF-8 would be closest to what you want.

comment:23 Changed 6 years ago by mf2k (Frank Schima)

Owner: kiarash@… deleted
Status: newassigned

See #57151.

comment:24 Changed 6 years ago by mf2k (Frank Schima)

Resolution: worksforme
Status: assignedclosed

Based on the latest reply from the reporter and the fact that I don't see what needs to change in the port, I'm closing this.

Last edited 6 years ago by mf2k (Frank Schima) (previous) (diff)

comment:25 Changed 6 years ago by jmroot (Joshua Root)

There's really nothing that needs to be fixed at this point. The reporter just didn't like the warning being printed. That's just another instance of the common issues relating to LC_CTYPE=UTF-8, it being technically valid according to the standards but not really used outside of Apple systems, so a lot of software doesn't like it.

Note: See TracTickets for help on using tickets.