Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
{SOLVED} Env Variable Problem when trying to launch program
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
roytheman
n00b
n00b


Joined: 08 Nov 2009
Posts: 65

PostPosted: Thu Oct 31, 2013 5:03 pm    Post subject: {SOLVED} Env Variable Problem when trying to launch program Reply with quote

Hello Gentoo users,

I am trying to start a Linux program (/usr/bin/vkeybd) from a bash script. But when I execute the script by clicking on it, the program will not open but if I drop the same script into a terminal window, the program will successfully launch. The script looks like this:

Code:

#!/bin/bash

/usr/bin/vkeybd --addr 20.0 &


The executable bit of the script is turned on also.

Vkeybd is a MIDI virtual keyboard in case anyone is wondering what it is.



Here is some background information that might help solve the problem:

I noticed after I first emerged vkeybd, I got a notice that reads like this:

Code:

The system-wide keymap is locale-sensitive now. A file
 * vkeybdmap-$LANG is searched in prior. For example, /etc/vkeybdmap-de
 * can be used for the german locale. See the localization guide:
 *
 * http://www.gentoo.org/doc/en/guide-localization.xml


And at that point, vkeybd would not launch PERIOD, no matter how I tried to launch it until I used the Gentoo command "eselect locale list" to find a good US locale, then I used the command "eselect locale set 226", which make it use the en_US.iso88591 locale. I also tried the en_US.utf8 locale. It worked with each of those locales. After choosing one or the other locale, I ran the command "env-update && source /etc/profile". With each of these locales, vkeybd would finally launch when typed in a terminal window. But it will not lanuch by clicking on the startup script as I mentioned at the beginning of this post. It would also lauch if I dropped the script into a terminal window, but not by clicking on it.

Will someone be so kind as to give me a hint as to what I need to do to get this script to launch vkeybd by clicking on it? Remember it will work if I drop the script in a terminal window or if I type "vkeybd" in a terminal window.

I'm sure the script works because I tested it out by substiting VLC (media player) for vkeybd and vlc would launch by clicking on the script. So the script itself works. It willl work with VLC but not with vkeybd.

I am using a late version of KDE4 and a recent version of Gentoo.

Thanks for your time,
Roy


Last edited by roytheman on Thu Oct 31, 2013 5:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
roytheman
n00b
n00b


Joined: 08 Nov 2009
Posts: 65

PostPosted: Thu Oct 31, 2013 5:50 pm    Post subject: [SOLVED] Simple Bash Script Needed for VDR and Konsole Reply with quote

I think I solved my problem. I needed to reboot for it to work. I'm sorry I posted so quickly without exploring all other possibilities.

All the best,
Roy
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