You are not logged in.

#1 2005-10-11 00:23:34

Trunks
Member
Registered: 2004-09-21
Posts: 28

/opt problems

I just found out that Arch is installing most of it's packages in /opt which is creating big problems.  I have to keep adding to the PATH variable everytime I want to run some software.  I don't like that at all.

Offline

#2 2005-10-11 00:25:19

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: /opt problems

PATH should be updated automatically.

Offline

#3 2005-10-11 00:39:14

Trunks
Member
Registered: 2004-09-21
Posts: 28

Re: /opt problems

It doesn't appear to have updated.  Even if I manually input the additional PATHs, it only applies to bash.  Xfce uses some other kind of variables.

Offline

#4 2005-10-11 00:44:38

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: /opt problems

Try 'source /etc/profile'.

Offline

#5 2005-10-11 00:45:56

Trunks
Member
Registered: 2004-09-21
Posts: 28

Re: /opt problems

Okay I tried that.  I don't think that did anything.

Offline

#6 2005-10-11 00:50:50

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: /opt problems

generally the paths are automatically updated, but you have to log out and back in to get them to be visible. Have you tried that?

Dusty

Offline

#7 2005-10-11 01:00:11

Trunks
Member
Registered: 2004-09-21
Posts: 28

Re: /opt problems

I just tried that and it worked.  How was the PATH automatically updated?  What changed that is now allowing me to run applications in Xfce?

Offline

#8 2005-10-11 01:11:31

kakabaratruskia
Member
From: Santiago, Chile
Registered: 2003-08-24
Posts: 596

Re: /opt problems

/etc/profile.d/*


And where were all the sportsmen who always pulled you though?
They're all resting down in Cornwall
writing up their memoirs for a paper-back edition
of the Boy Scout Manual.

Offline

#9 2005-10-11 08:08:25

bogomipz
Member
From: Oslo, Norway
Registered: 2003-11-23
Posts: 169

Re: /opt problems

The key to understand here is that there is no way at all to change the environment seen by running programs, and since your WM and apps inherit their environment from the X server, you need to log out and in again for the PATH and LD_LIBRARY_PATH variables to be updated.

Sourcing /etc/profile in an xterm only affects the shell running there, *not* your whole X session. After you do that, it should be possible to run the programs from this shell, but still won't be possible to start them from say a desktop menu.

So the general rule is that whenever you install something to /opt there's a great chance that you need to relogin.


All of your mips are belong to us!!

Offline

#10 2005-10-11 08:21:21

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: /opt problems

I wonder if all stock apps that install to /opt should check if X is running and then warn that you need to restart X...seems sensible to me!

Offline

#11 2005-10-11 09:21:54

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: /opt problems

Uhh... Sorry guys, relogin is not necessary. Do 'source /etc/profile' and 'ldconfig' (the latter as root), that will take care of it.

Offline

#12 2005-10-11 09:31:35

bogomipz
Member
From: Oslo, Norway
Registered: 2003-11-23
Posts: 169

Re: /opt problems

Gullible Jones wrote:

Uhh... Sorry guys, relogin is not necessary. Do 'source /etc/profile' and 'ldconfig' (the latter as root), that will take care of it.

Eh, no - that won't update PATH and some pkgs in /opt use LD_LIBRARY_PATH rather than ld.so.conf


All of your mips are belong to us!!

Offline

#13 2005-10-11 10:08:29

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: /opt problems

In my experience, this does work. Probably because of the stuff in /etc/profile.d...

Offline

#14 2005-10-11 10:56:53

bogomipz
Member
From: Oslo, Norway
Registered: 2003-11-23
Posts: 169

Re: /opt problems

As mentioned earlier, sourcing only affects the shell you source in and apps you start from that shell afterwards.


All of your mips are belong to us!!

Offline

#15 2005-10-11 14:12:22

Trunks
Member
Registered: 2004-09-21
Posts: 28

Re: /opt problems

Thank you very much for helping me.

Offline

#16 2007-02-25 01:34:17

pseudomind
Member
From: United States
Registered: 2005-11-18
Posts: 19
Website

Re: /opt problems

I just recently got one of my family members to try arch and they had the same problem as i did about "firefox not working" after an install. Of course I figured out what was wrong after some time, but even still it is an issue. By default /opt/bin is included in /etc/profile however, it does not exist in /opt.

So, I have a suggestion although I am not sure this is the correct forum for which to make such a suggestion. How about we take advantage of of the /opt/bin path that is included by default in /etc/profile and create a directory called /opt/bin in which we link the files of the bin directories inside of opt to i.e.(/opt/e17/bin , /opt/gnome/bin...). Using such an approach would maintain the current organization while sparing some headaches often encountered by new arch users.

Let me know if this request seems completely off base. Thanks

Offline

#17 2007-02-25 01:59:11

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: /opt problems

Your proposed solution wouldn't work because it's not just a path updating issue. The files that needs to be sourced in /etc/profile.d/ not only update the paths but they also define other environnement variables that are probably needed for the apps to function properly.

Offline

#18 2007-02-25 09:02:05

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: /opt problems

I just link "/opt/whatever/executable" to /usr/bin/executable.

Offline

#19 2007-03-13 05:07:18

louipc
Member
Registered: 2006-10-09
Posts: 85

Re: /opt problems

bogomipz wrote:

Eh, no - that won't update PATH and some pkgs in /opt use LD_LIBRARY_PATH rather than ld.so.conf

I read that LD_LIBRARY_PATH should never be used for normal shared library usage, it should only be used to temporarily include a library for testing.

See:
http://tldp.org/HOWTO/Program-Library-H … aries.html

Offline

Board footer

Powered by FluxBB