Cannot start games, wrong $PATH
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ugr-seeds |
Confirmed
|
Critical
|
Unassigned |
Bug Description
can't start foobillard or any other game that is located in /usr/games ,from the menu or from any location Inside a terminal because /usr/games isnt't in the Environment Variable Path.
Davide Alberelli (dadexix86) wrote : | #1 |
affects: | ugr-cantarell → ugr-meta |
JC Hulce (soaringsky) wrote : | #2 |
It is known that GNOME 3 messes up the $PATH setting
summary: |
- foobillard doesn't start from the menu + Cannot start games, wrong $PATH |
Changed in ugr-meta: | |
status: | New → Confirmed |
importance: | Undecided → High |
importance: | High → Critical |
JC Hulce (soaringsky) wrote : | #3 |
I wonder if it would be possible to ship a patch in a package. I don't think you could ship .bashrc itself, but maybe some symlinks would solve the issue?
Davide Alberelli (dadexix86) wrote : | #4 |
No you can't ship the .bashrc, bacause it is in the user home and it would overwrite the personal one.
Maybe you can symlink the /usr/bin to the /usr/games.
I don't know how the $PATH is generated and from which command.
But i think the best solution is to find this information and add /urs/share/games to the $PATH in this way.
Another way is to create a script (it shouldn't be hard with a little programming skills) that takes the .bashrc file(s), one per user, and search if there is the string
"export PATH*"
If there isn't, it inserts a new line with "export PATH=$PATH:
If there is, it looks, after that, if there isn't the string ":/usr/games" and adds it.
Otherwise, if this two condition are satisfied, exit without doing anything.
I've got an exam thursday so I can't take this for the moment.
I can do a try after that, but I'll do it in bash. And I don't know how to list all the users in the system (maybe with ls /home can be a good idea).
Daniel Sandman (almehdi-deactivatedaccount) wrote : | #5 |
Wouldn't a *.postinstall or similar with the string: "echo 'export PATH=$PATH:
JC Hulce (soaringsky) wrote : Re: [Bug 778900] Re: Cannot start games, wrong $PATH | #6 |
That seems like one of the better ways to solve this issue. I will start
writing a blueprint in ugr-meta.
Davide Alberelli (dadexix86) wrote : Re: [Ubuntugnometeam] [Bug 778900] Re: Cannot start games, wrong $PATH | #7 |
But you should look before if it isn't already there.
And you should add it to all the users .bashrc :)
2011/5/10 JC Hulce <email address hidden>
> That seems like one of the better ways to solve this issue. I will start
> writing a blueprint in ugr-meta.
>
> --
> You received this bug notification because you are a member of Team UGR,
> which is subscribed to ugr-meta.
> https:/
>
> Title:
> Cannot start games, wrong $PATH
>
> Status in Ubuntu Gnome Remix Metapackages:
> Confirmed
>
> Bug description:
> can't start foobillard or any other game that is located in /usr/games
> ,from the menu or from any location Inside a terminal because
> /usr/games isnt't in the Environment Variable Path.
>
> --
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>
--
Davide Alberelli.
___
OpenPGP: 8CB4467F
___
On Google <http://
deviantART<http://
Facebook <http://
JC Hulce (soaringsky) wrote : [Bug 778900] Re: Cannot start games, wrong $PATH | #8 |
@Davide my thoughts exactly - the symlink idea might actually be better.
Davide Alberelli (dadexix86) wrote : Re: [Ugr-testing] [Bug 778900] Re: Cannot start games, wrong $PATH | #9 |
I tried the symlink this way and it doesn't function:
1) $ sudo ln -s /usr/games /usr/bin/games
2) reboot
3) $ ls -l /usr/bin/ | grep games
lrwxrwxrwx 1 root root 11 2011-05-11 01:18 games -> /usr/games/
(so here it is)
4) $ supertuxkart
Command 'supertuxkart' is available in '/usr/games/
The command could not be located because '/usr/games' is not included in the
PATH environment variable.
supertuxkart: command not found
So this way doesn't function :) Is there another way to create symlinks that
I can try?
2011/5/10 JC Hulce <email address hidden>
> @Davide my thoughts exactly - the symlink idea might actually be
> better.
>
> --
> You received this bug notification because you are a member of Ubuntu
> GNOME Remix: Testing Team, which is subscribed to UGR (Ubuntu Gnome
> Remix) Project.
> https:/
>
> Title:
> Cannot start games, wrong $PATH
>
> Status in Ubuntu Gnome Remix Metapackages:
> Confirmed
>
> Bug description:
> can't start foobillard or any other game that is located in /usr/games
> ,from the menu or from any location Inside a terminal because
> /usr/games isnt't in the Environment Variable Path.
>
> --
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>
--
Davide Alberelli.
___
OpenPGP: 8CB4467F
___
On Google <http://
deviantART<http://
Facebook <http://
Jochen Leonhard (funeralhome) wrote : | #10 |
I think you are on the wrong The $PATH should be set in /etc/enviroment. take a look here: https:/
" PATH="/
And sorry for picking the wrong package.
JC Hulce (soaringsky) wrote : | #11 |
@Jochen thank you very much
Any new fix ideas anyone?
Changed in ugr-meta: | |
milestone: | none → 1.0.0 |
JC Hulce (soaringsky) wrote : | #12 |
I did some research on this. See https:/
There are several places that we could use to specify $PATH:
===Session-wide environment variables===
~/.profile - This is probably the best file for placing environment variable assignments in, since it gets executed automatically by the DisplayManager during the startup process desktop session as well as by the login shell when one logs-in from the textual console.
~/.bash_profile or ~./bash_login - If one of these file exist, bash executes it rather then "~/.profile" when it is started as a login shell. (Bash will prefer "~/.bash_profile" to "~/.bash_login"). However, these files won't influence a graphical session by default.
~/.bashrc - Because of the way Ubuntu currently sets up the various script files by default, this may be the easiest place to set variables in. The default configuration nearly guarantees that this file will be executed in each and every invocation of bash as well as while logging in to the graphical environment. However, performance-wise this may not be the best thing to do since it will cause values to be unnecessarily set many times.
===System-wide environment variables===
/etc/
/etc/profile - This file gets executed whenever a bash login shell is entered (e.g. when logging in from the console or over ssh), as well as by the DisplayManager when the desktop session loads. This is probably the file you will get referred to when asking veteran UNIX system administrators about environment variables. In Ubuntu, however, this file does little more then invoke the /etc/bash.bashrc file.
/etc/
Obviously, we shouldn't use the per-user ones because there might be several users on a system. Also, some of these files might already be owned by a package (most are shipped by bash itself). /etc/environment looks like the best option since it is system wide and not owned. Maybe we could ship a custom version of that?
Davide Alberelli (dadexix86) wrote : Re: [Ubuntugnometeam] [Bug 778900] Re: Cannot start games, wrong $PATH | #13 |
Ok after this I did a bit try out and /etc/environment doesn't function.
I took away /usr/games from my ~/.bashrc, then restarted and did this:
$ cat /etc/environment
PATH="/
to be sure /usr/games is in that file.
But it isn't enough:
$ supertuxkart
Command 'supertuxkart' is available in '/usr/games/
The command could not be located because '/usr/games' is not included in the
PATH environment variable.
supertuxkart: command not found
So any other ideas? :P
2011/5/16 JC Hulce <email address hidden>
> I did some research on this. See
> https:/
> There are several places that we could use to specify $PATH:
> ===Session-wide environment variables===
> ~/.profile - This is probably the best file for placing environment
> variable assignments in, since it gets executed automatically by the
> DisplayManager during the startup process desktop session as well as by the
> login shell when one logs-in from the textual console.
> ~/.bash_profile or ~./bash_login - If one of these file exist, bash
> executes it rather then "~/.profile" when it is started as a login shell.
> (Bash will prefer "~/.bash_profile" to "~/.bash_login"). However, these
> files won't influence a graphical session by default.
> ~/.bashrc - Because of the way Ubuntu currently sets up the various
> script files by default, this may be the easiest place to set variables in.
> The default configuration nearly guarantees that this file will be executed
> in each and every invocation of bash as well as while logging in to the
> graphical environment. However, performance-wise this may not be the best
> thing to do since it will cause values to be unnecessarily set many times.
>
> ===System-wide environment variables===
> /etc/environment - This file is specifically meant for system-wide
> environment variable settings. It is not a script file, but rather consists
> of assignment expressions, one per line. Specifically, this file stores the
> system-wide locale and path settings.
> /etc/profile - This file gets executed whenever a bash login shell is
> entered (e.g. when logging in from the console or over ssh), as well as by
> the DisplayManager when the desktop session loads. This is probably the file
> you will get referred to when asking veteran UNIX system administrators
> about environment variables. In Ubuntu, however, this file does little more
> then invoke the /etc/bash.bashrc file.
> /etc/bash.bashrc - This is the system-wide version of the ~/.bashrc
> file. Ubuntu is configured by default to execute this file whenever a user
> enters a shell or the desktop environment.
>
> Obviously, we shouldn't use the per-user ones because there might be
> several users on a system. Also, some of these files might already be
> owned by a package (most are shipped by bash itself). /etc/environment
> looks like the best option since it is system wide and not owned. Maybe
> we could ship a custom version of that?
>
> --
> You received this bug notification because you are a member of Team UGR,
> which is subscribed to ugr-meta.
> ht...
JC Hulce (soaringsky) wrote : | #14 |
I really am stuck... /usr/games is in my /etc/environment also, but it appears that file isn't being parsed as expected.
Jochen Leonhard (funeralhome) wrote : | #15 |
I'm stuck too, but it's strange, when I use su $USERNAME the $PATH is correct. It must be overwritten somewhere.
Jochen Leonhard (funeralhome) wrote : | #16 |
GDM overwrittes it. Today i downgraded GDM to the Version natty ships and now $PATH is correct.
Jochen Leonhard (funeralhome) wrote : | #17 |
It is gdm3 there is also a discussion on the gnome3team mailing list:
https:/
Chris Gummin (proxy-qtz-deactivatedaccount) wrote : | #18 |
Oh! This may be the reason that The Board isn't working!
JC Hulce (soaringsky) wrote : | #19 |
Alright. Because this is caused by GDM (everyone, see this mailing list link if you haven't: https:/
Thanks to everyone for helping out
Sander Deryckere (sanderd17) wrote : | #20 |
If anyone is interested, editng the .profile file to add the path worked for me.
23dornot23d (keithaerospace92) wrote : | #21 |
I did it like this - is this the correct way to do it ?
_______
What did you change in here to make it work ok (please) ?
(but editing the .profile file worked)
Needs to do - if it does not exist then add it - otherwise ignore it ......
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$
fi
_______
so I suppose you could say
# set PATH so it includes /usr/games
if [ -d "/usr/games" ] ; then
PATH="/
fi
_______
- will this work ok .... ?
JUST TRIED IT AND IT WORKS SO GUESS SO
Now Alt+F2 works .... gbrainy ...... not that I use it .... but who knows - I might now,
keith@keith-
gbrainy 1.65 (built on 2011-04-11 01:01:38 UTC)
Extensions database: /home/keith/
Games registered: 157: 60 logic puzzles, 11 calculation trainers, 10 memory trainers, 76 verbal analogies
Startup time 00:00:00.5510620
Davide Alberelli (dadexix86) wrote : | #22 |
The big problem is that if there are more accounts, you have to do it on all
the users accounts.
2011/6/10 23dornot23d <email address hidden>
> I did it like this - is this the correct way to do it ?
>
> _______
>
> What did you change in here to make it work ok (please) ?
> (but editing the .profile file worked)
>
> Needs to do - if it does not exist then add it - otherwise ignore it
> ......
>
>
> # ~/.profile: executed by the command interpreter for login shells.
> # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
> # exists.
> # see /usr/share/
> # the files are located in the bash-doc package.
>
> # the default umask is set in /etc/profile; for setting the umask
> # for ssh logins, install and configure the libpam-umask package.
> #umask 022
>
> # if running bash
> if [ -n "$BASH_VERSION" ]; then
> # include .bashrc if it exists
> if [ -f "$HOME/.bashrc" ]; then
> . "$HOME/.bashrc"
> fi
> fi
>
> # set PATH so it includes user's private bin if it exists
> if [ -d "$HOME/bin" ] ; then
> PATH="$
> fi
>
>
> _______
>
> so I suppose you could say
>
> # set PATH so it includes /usr/games
> if [ -d "/usr/games" ] ; then
> PATH="/
> fi
>
> _______
> - will this work ok .... ?
>
>
> JUST TRIED IT AND IT WORKS SO GUESS SO
>
> Now Alt+F2 works .... gbrainy ...... not that I use it .... but who
> knows - I might now,
>
> keith@keith-
> gbrainy 1.65 (built on 2011-04-11 01:01:38 UTC)
> Extensions database: /home/keith/
> Games registered: 157: 60 logic puzzles, 11 calculation trainers, 10 memory
> trainers, 76 verbal analogies
> Startup time 00:00:00.5510620
>
> --
> You received this bug notification because you are a member of Team UGR,
> which is subscribed to ugr-meta.
> https:/
>
> Title:
> Cannot start games, wrong $PATH
>
> Status in Ubuntu Gnome Remix Metapackages:
> Confirmed
>
> Bug description:
> can't start foobillard or any other game that is located in /usr/games
> ,from the menu or from any location Inside a terminal because
> /usr/games isnt't in the Environment Variable Path.
>
> To manage notifications about this bug go to:
> https:/
>
> --
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>
--
Davide Alberelli.
___
OpenPGP: 8CB4467F
___
On Google <http://
deviantART<http://
Facebook <http://
JC Hulce (soaringsky) wrote : | #23 |
@Sander/others Does it work if you make the changes in one of the other config files ( https:/
Solution/workaround that worked for me:
export PATH=$PATH:
export PATH=$PATH: /usr/games/
1) Open the file .bashrc
2) Go to the end of the file
3) Add the direcroty to the path, changing (or adding) this
into this, adding /usr/games/: