Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
how do i tell gnome to reread my ~/.profile
How to change environment variables without re-logging to UI?

I'm trying to reload my ~/.profile without login out.

I can use source to reload it in bash for example, but I haven't found out how to reload it for the whole desktop.

When I launch applications from menus, they aren't aware of the changes in ~/.profile. Those changes are exclusively export commands.

How can I reload it for the whole desktop?

share|improve this question

marked as duplicate by Ulrich Dangel, jw013, Gilles, Warren Young, Michael Mrozek Jul 23 '12 at 22:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

It would probably help to post which desktop environment you are using. I think the easiest way is to log out and back in - any other way will be difficult and not fool-proof. – jw013 Jul 23 '12 at 16:00
If you use Gnome, then this is not possible, unfortunately. See how do i tell gnome to reread my ~/.profile – Marco Jul 23 '12 at 16:12

The ~/.profile is read by few processes, among them shells and desktop sessions. Everything else will simply inherit from its parent. So if you start your application from your desktop session, then restarting the desktop session is the only way. So logging out and back in appears to be the most sensible course of action.

There might be cases where the session is started from some script, and you could alter that script in such a way that it provides a mechanism to start a new session if the previous one exits, if some condition is satisfied. That would perhaps allow you to avoid giving your credentials once more. But this mechanism would be very hackish, and would have to be in place before you start the session.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.