[SOLVED] Ubuntu's kdesu does not pass full environment
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Since starting to use Kubuntu, environment variables I set have not been passed on to emacs. Lisp functions that work with Gentoo/KDE4 fail.
I have narrowed the problem to kdesu, which I use to start emacs. Kubuntu's version seriously restricts what it passes to programs it starts. I'm using
To select what environment variables are passed by sudo, you can edit "/etc/sudoers" (by visudo of course). kdesu nor kdesudo does not decide about that. There should be "env_reset" flag set, so you could set if off (some security complications) or add your own variables to be passed by
It works, but not quite what I'm looking for. kdesudo uses /etc/sudoers but kdesu does not appear to. Using kdesudo means having 2 menu items and 2 icons rather than singles with an option.
At least it works from the command line in konsole, but I'm still looking.
I have just determined that using kdesudo from the command line works, but it does not work in the menu.
In first exec is "/usr/bin/emacs23 %F", and you have just "kdesudo emacs", are you sure there is a program with that name, maybe try "kdesudo /usr/bin/emacs23 %F".
So, if "kdesudo from the command line works, but it does not work in the menu", how you set these environment variables? Settings in /etc/environment or these exported by ~/.profile should be passed.
When using the KDE desktop, I have 2 ways to start emacs.
The first is to select it from the Start menu.
The second is to start Konsole and enter 'emacs' as a command.
The first does not pass environment variables while the second does.
Yes, I understand, but you must somewhere set these environment variables. Can you explain how you do that? I just check how behave my Kubuntu and it pass my variables to program launched from menu.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.