Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't run apps from command line
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
sl70
Guru
Guru


Joined: 18 Jun 2002
Posts: 449
Location: Saitama, JP

PostPosted: Mon Sep 23, 2002 4:11 pm    Post subject: Can't run apps from command line Reply with quote

This is really weird. There are lots of apps I can't run from the command line, but run fine from the desktop menu, or by clicking on icons (using Window Maker). For example, gnumeric and gnomecc give nothing -- I type the command at the prompt, and I get another prompt -- I get no error messages or anything. (Yes, they're on my path. See?)

    [sl70@musuko:~] <10:59:48> 508 ->> which gnumeric
    /usr/bin/gnumeric
    [sl70@musuko:~] <11:06:25> 509 ->> gnumeric
    [sl70@musuko:~] <11:06:38> 510 ->>

If I type emacs, abiword or konqueror at the command line, they give segfaults. All these work fine if run from the menu or by clicking on icons. Any ideas about this?
Back to top
View user's profile Send private message
sa
Guru
Guru


Joined: 10 Jun 2002
Posts: 450

PostPosted: Mon Sep 23, 2002 5:34 pm    Post subject: re: Can't run apps from command line Reply with quote

mabey this will help find out whats going on:
Code:
 emerge strace
 strace gnumeric

also mabey try another shell, your window manager is probably using /bin/sh, what are you using? mabey your shell is restricting the resources you can use? (ulimit?)

hth,
sa
Back to top
View user's profile Send private message
sl70
Guru
Guru


Joined: 18 Jun 2002
Posts: 449
Location: Saitama, JP

PostPosted: Mon Sep 23, 2002 8:21 pm    Post subject: Reply with quote

strace was an excellent idea. I found in the output to strace that all the problematic programs were segfaulting at this point:

readv(3, [{"@locale=ja_JP.SJIS,ja_JP.EUC,ja_"..., 52}, {"", 0}], 2) = 52
munmap(0x40d8d000, 116192) = 0
--- SIGSEGV (Segmentation fault) ---

I know how to fix this (remove export XMODIFIERS="@im=kinput2" from ~/.bashrc), but I don't know why this should be a problem. Also, I would like to keep that line in there so I can use Japanese in various applications. (But I can always include the line in a wrapper script to run those apps.)

Thanks to sa for the help. How do I mod him up? He should be made an apprentice, at least.
Back to top
View user's profile Send private message
Kawada
Apprentice
Apprentice


Joined: 22 Jul 2002
Posts: 159
Location: Florida, USA

PostPosted: Mon Sep 23, 2002 9:12 pm    Post subject: Reply with quote

sl70 wrote:
strace was an excellent idea. I found in the output to strace that all the problematic programs were segfaulting at this point:

readv(3, [{"@locale=ja_JP.SJIS,ja_JP.EUC,ja_"..., 52}, {"", 0}], 2) = 52
munmap(0x40d8d000, 116192) = 0
--- SIGSEGV (Segmentation fault) ---

I know how to fix this (remove export XMODIFIERS="@im=kinput2" from ~/.bashrc), but I don't know why this should be a problem. Also, I would like to keep that line in there so I can use Japanese in various applications. (But I can always include the line in a wrapper script to run those apps.)

Thanks to sa for the help. How do I mod him up? He should be made an apprentice, at least.


Okay, I think I know what is causing the problem. I think what you are trying to do is run a program with $XMODIFIERS="@im=kinput2" but with the $LANG and $LC_ALL values still set to their default rather than ja_JP (I am able to recreate your exact strace doing this). Most programs require that if you have your input method set to Japanese, you must also have the language of the program set to Japanese, otherwise, it will segfault. So try doing this from the commandline:
Code:
LANG=ja_JP LC_ALL=ja_JP XMODIFIERS="@im=kinput2" gnumeric
If that works, I would probably add export LANG=ja_JP and export LC_ALL=ja_JP to your ~/.bashrc. If you want a more detailed description of how to deal with Japanese input in programs, look at my posts here.
_________________
Kawada

2002 Nethack Tournament -- 317th runner-up http://nethack.devnull.net/
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Mon Sep 23, 2002 9:55 pm    Post subject: Reply with quote

Kawada wrote:
Most programs require that if you have your input method set to Japanese, you must also have the language of the program set to Japanese, otherwise, it will segfault.

Why is this? Am I the only person on the planet that prefers their UI in English, but with the ability to enter Japanese text whenever and whereever I might want? Is there a technical reason why these cannot be decoupled? Does it lie with POSIX locales in general, with X, with a toolkit, or at the application layer?
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
Kawada
Apprentice
Apprentice


Joined: 22 Jul 2002
Posts: 159
Location: Florida, USA

PostPosted: Tue Sep 24, 2002 12:01 am    Post subject: Reply with quote

rac wrote:
Kawada wrote:
Most programs require that if you have your input method set to Japanese, you must also have the language of the program set to Japanese, otherwise, it will segfault.

Why is this? Am I the only person on the planet that prefers their UI in English, but with the ability to enter Japanese text whenever and whereever I might want? Is there a technical reason why these cannot be decoupled? Does it lie with POSIX locales in general, with X, with a toolkit, or at the application layer?


No idea why, actually. Just something I've kind of noticed before. Would be nice to always have the xim set to Japanese, you know, just in case (especially when I need to search for something on google.co.jp)
_________________
Kawada

2002 Nethack Tournament -- 317th runner-up http://nethack.devnull.net/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
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