|
|
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » TheIDE runs differently under root
TheIDE runs differently under root [message #38475] |
Wed, 19 December 2012 21:18 |
|
CppMod
Messages: 11 Registered: February 2011 Location: Plano, TX
|
Promising Member |
|
|
I have a program that must run as root because of some low level I/O (embedded system). I can build the program at user level, but then I have to go to a root terminal to run it.
I can start TheIDE in a root terminal ok, but the pane on the far left is missing, and I have not figured out how to add a file without
1) going back to a user terminal,
2) running TheIDE there,
3) right-click to add the file(s),
4) going back to the root terminal,
5) running TheIDE,
6) selecting File|Open File Directory, and
7) dragging and dropping the new file(s) onto TheIDE.
I tried running TheIDE in my user terminal using sudo, and the result was "No protocol specified (<unknown>:2801): Gtk-WARNING **: cannot open display:0.0
su - gave the same error.
I dimly recall that there is a way to set up the display, but I don't remember how.
But the basic question is, "Why does TheIDE run differently as root?" Followed by, "What do I need to do to fix this?"
P.S. Right-clicking "File" on the menu does nothing, either as root or as user.
611bb927f8731cdc83c3f1eb09e758ac
|
|
|
Re: TheIDE runs differently under root [message #38477 is a reply to message #38475] |
Wed, 19 December 2012 22:28 |
Didier
Messages: 683 Registered: November 2008 Location: France
|
Contributor |
|
|
Hi CppMod,
I am currently doing some playing around with a gumstix and I first ran TheIde on the target itself.
The default user (and only available) is root and everything works fine.
You probably know everything I'm about to say, but just in case.
To export the screen on my PC I run ssh from my PC to connect to the gumstix:
PC:
ssh -XY myGumstix
in ssh shell :
export DISPLAY=:0
... do whatever you need,
the apps will pop up on you're PC
This sound's like what you are trying to do
[Updated on: Wed, 19 December 2012 22:29] Report message to a moderator
|
|
|
Re: TheIDE runs differently under root [message #38479 is a reply to message #38475] |
Wed, 19 December 2012 23:13 |
|
Hi CppMod,
Can you tell us what OS and desktop environment do you use? I have no problem running TheIDE as root, but the problems you report seems more like a fault in the communication with X or DE. Please check that File menu is not opening underneath theide (you can test by resizing it to small enough window so that the menu is long enough to stick out on the bottom). There have been troubles like this in past.
Also, you can run TheIDE as normal user and create a macro to execute the program as root. Some examples and docs can be found in the Macro page in manual and some helpful tricks might also be in the article about cross compiling.
Best regards,
Honza
[Updated on: Thu, 20 December 2012 06:54] Report message to a moderator
|
|
|
Re: TheIDE runs differently under root [message #38484 is a reply to message #38475] |
Thu, 20 December 2012 08:06 |
omari
Messages: 273 Registered: March 2010
|
Experienced Member |
|
|
Hi,
there is a script auto-executed when a terminal open, its name is ".${SHALL}rc"
if your shall is bash (the default) then the file is ".bashrc"
compare the one in your Home directory with the one in the root directory, i think the source of problem is here.
Regards
omari.
regards
omari.
|
|
|
|
Re: TheIDE runs differently under root [message #38504 is a reply to message #38484] |
Thu, 20 December 2012 23:12 |
|
CppMod
Messages: 11 Registered: February 2011 Location: Plano, TX
|
Promising Member |
|
|
omari wrote on Thu, 20 December 2012 01:06 | Hi,
there is a script auto-executed when a terminal open, its name is ".${SHALL}rc"
if your shall is bash (the default) then the file is ".bashrc"
compare the one in your Home directory with the one in the root directory, i think the source of problem is here.
Regards
omari.
| That sounds about right. I've been away from *nix long enough that I've forgotten a lot of those sorts of details, and all of the help/man files assume you know and remember that sort of thing.
I actually have several years of Linux/Unix experience, but very little of it involved anything to do with administering the system. Now that I'm the admin, I can't just go running to the admin for setup tasks
There are several other things I need to learn as I get my *nix finger-habits back, that would probably be major time-savers.
I think I have enough information to fix this problem. I'll be back, probably tomorrow morning, to mark this SOLVED. I hope.
Thanks!
611bb927f8731cdc83c3f1eb09e758ac
|
|
|
|
Re: TheIDE runs differently under root [message #38506 is a reply to message #38505] |
Thu, 20 December 2012 23:24 |
Didier
Messages: 683 Registered: November 2008 Location: France
|
Contributor |
|
|
Quote: | The export DISPLAY=:0 didn't do anything on the user terminal.
|
Sorry I mixed up my explanations:
To export display to your computer:
ssh -YC myGumstix
To display on the lcd of my gumstix
ssh myGumstix ( no -YC )
in ssh console : export DISPLAY=:0
If I don't in the gumstix console
I get the same errors as you when launching my app.
[Updated on: Thu, 20 December 2012 23:24] Report message to a moderator
|
|
|
|
|
|
|
|
Re: TheIDE runs differently under root [message #38531 is a reply to message #38522] |
Fri, 21 December 2012 19:32 |
Novo
Messages: 1371 Registered: December 2006
|
Ultimate Contributor |
|
|
CppMod wrote on Fri, 21 December 2012 10:03 | I think that TheIDE is getting some initialization from a different place if it's running under root.
|
Try to run TheIDE with strace. You will be able to see all files it opens up. Filter them out and you will be able to see where it gets its configuration.
Just my 2 cents.
Regards,
Novo
|
|
|
Goto Forum:
Current Time: Fri Sep 20 06:19:04 CEST 2024
Total time taken to generate the page: 0.02727 seconds
|
|
|