LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 02-04-2010, 07:20 AM   #1
multi
LQ Newbie
 
Registered: Feb 2010
Distribution: Ubuntu 9.10 / the grandndma distro
Posts: 1

Rep: Reputation: 0
sudo -i -u username Xephyr, fails


My goal - run another desktop environment as another user in Xephyr,

Everything works fine when i as local user run the command
Code:
peter@multi:~$ xinit ~/.xinitrc-fvwmtst -- /usr/bin/Xephyr :3
, but when i want to sudo it to another user
Code:
peter@multi:~$ sudo -i -u fvwmusr xinit /home/fvwmusr/.xinitrc-fvwmtst -- /usr/bin/Xephyr :4
i got this message :
Invalid MIT-MAGIC-COOKIE-1 key
Xephyr cannot open host display. Is DISPLAY set?
giving up.

I have tried login as the user i want to sudo and then run the command locally.
Code:
peter@multi:~$ sux fvwmusr
Password:

fvwm@multi:~$ xinit /home/fvwmusr/.xinitrc-fvwmtst -- /usr/bin/Xephyr :5
(i use sux because it's an X-app)
then everything works fine.

I have checked the /tnp/.X?-lock and justified the displaynumbers to match unused values.

I have the habit to increase the display-parameter with one just to avoid problem with the lock-files, which is another problem - i wish they was automagicaly destroyed after properly exiting Xephyr.

/multi

ps - ( I hope this is the right forum to post,i before i post i did a search for Xephyr and had expected to find most of the hits in the virtualization forum, but - so if this is the wrong forum, please move the thread to its right place )

Last edited by multi; 02-04-2010 at 07:21 AM.
 
Old 02-05-2010, 04:43 PM   #2
in_texas_dallas
Member
 
Registered: Sep 2009
Location: DFW
Distribution: Debian Lenny
Posts: 38

Rep: Reputation: 17
Exclamation

multi> See this post, I had to pullt he google cached because the original would not display properly.

http://74.125.47.132/search?q=cache:...ient=firefox-a

FOR CLARITY, I will post the pertinent part of that document.

Quote:
Allowing other users to run sudo

To add a new user to sudo, open the Users and Groups tool from System->Administration menu. Then click on the user and then on properties. Choose the User Privileges tab. In the tab, find Administer the system and check that.

*

In Hardy Heron and newer, you must first Unlock, then you can select a user from the list and hit Properties. Choose the User Privileges tab and check Administer the system.

/!\ In the terminal this would be: sudo adduser <username> admin, where you replace <username> with the name of the user (without the <>).

Logging in as another user

Please don't use this to become root, see further down in the page for more information about that.

sudo -i -u <username>

For example to become the user amanda for tape management purposes.

sudo -i -u amanda

The password being asked for is your own, not amanda's.


root account

Enabling the root account

IconsPage/IconWarning3.png


Enabling the root account is rarely necessary. Almost everything you need to do as administrator of an Ubuntu system can be done via sudo or gksudo. If you really need a persistent root login, the best alternative is to simulate a root login shell using the following command...


IconsPage/IconWarning3.png

sudo -i

To enable the root account (i.e. set a password) use:

sudo passwd root

Use at your own risk!

IconsPage/dont.png


Logging in to X as root may cause very serious trouble. If you believe you need a root account to perform a certain action, please consult the official support channels first, to make sure there is not a better alternative.


IconsPage/dont.png

Re-disabling your root account

IconsPage/info.png


If for some reason you have enabled your root account and wish to disable it again, use the following command in terminal...


IconsPage/info.png

sudo usermod -p '!' root
Hope that helps.

BTW, if you can post more specifically what you are trying to do, others or myself can find a solution. As it is, I'm not sure why you taking that approach.

Last edited by in_texas_dallas; 02-05-2010 at 04:45 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sudo fails - "sudo: can't get hostname: Success" fantasygoat Linux - Server 3 10-01-2009 02:59 PM
logging into VMserver fails with bad username/password error galliar Slackware 1 09-10-2009 11:29 PM
Suggestions on using Xnest and Xephyr? Need help linus72 Linux - Software 0 08-16-2009 06:43 PM
sudo apt-get -f install always fails for glibc upgrade ... kedar.mhaswade Linux - Software 3 08-06-2009 02:48 AM
sudo fails due to hostname edgjerp Ubuntu 6 05-05-2008 12:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 09:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration