You are not logged in.

#1 2013-11-01 18:42:27

rasolercrespo
Member
Registered: 2013-11-01
Posts: 4

LXDE: sudo (command) won't work

Hi all,

I just installed a new copy of Arch and configured LXDE. For some reason, in LXTerm, when I try to use:

sudo nano filename

The terminal yells at me saying

sudo: nano: command not found

However, if I run individually sudo and nano, they both work. Note I can also get on the root account using su... but I wouldn't want to resort to this. My user is part of the wheel usergroup, and I have it so I don't need to input a password for users in the wheel usergroup. I also tested this before I installed LXDE and it worked fine.

I've also tried doing various other commands like

sudo pacman

but nothing seems to work!

Any ideas? Thanks in advance!

Offline

#2 2013-11-01 19:12:17

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: LXDE: sudo (command) won't work

Does 'sudo pacman -Syu' work in xterm or in the tty?

Offline

#3 2013-11-01 19:20:31

rasolercrespo
Member
Registered: 2013-11-01
Posts: 4

Re: LXDE: sudo (command) won't work

It's not working in xterm either. It worked in the tty, but after I installed LXDE I can't jump into them anymore (Ctrl+Alt+F keys just gets me a black screen). Trying to do the same (sudo pacman) as root isn't working either...

EDIT: Now that I notice, other commands seem to have borked. iwconfig isn't working either -- in my user account, or in root -- independent of using Xterm or LXTerm.

EDIT2: I disabled everything related to LXDM and LXDE (so I boot into the tty provided by Arch as the default). From there, I can do sudo nano from my account with no problems. I can also do the command you mentioned with no problems.

Last edited by rasolercrespo (2013-11-01 19:39:10)

Offline

#4 2013-11-01 20:18:31

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: LXDE: sudo (command) won't work

rasolercrespo wrote:

Any ideas? Thanks in advance!

Out of curiosity, what are the output of:

sudo echo $PATH
and of (as your user)
which nano


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2013-11-01 20:24:48

rasolercrespo
Member
Registered: 2013-11-01
Posts: 4

Re: LXDE: sudo (command) won't work

Within LXDE (using LXTerm):

echo $PATH responds with

/bin:/usr/bin:/usr/ucb:/usr/local/bin

and which nano responds with

/bin/nano

Within TTY (default Arch boot):

echo $PATH responds with

/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/core_perl

and which nano responds with

/usr/bin/nano

So they don't agree (and I guess that is the reason why the LXTerm is going haywire)!

A quick update: if I open the files using:

sudo /usr/bin/nano filename
sudo /usr/bin/pacman

it works fine in LXTerm (and XTerm).

Last edited by rasolercrespo (2013-11-01 21:07:57)

Offline

#6 2013-11-01 21:06:25

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: LXDE: sudo (command) won't work

Can you look through any files that may be sourced when you start X for things that set your path?

Try:  grep PATH ~/.* 2>/dev/null


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#7 2013-11-01 21:12:05

rasolercrespo
Member
Registered: 2013-11-01
Posts: 4

Re: LXDE: sudo (command) won't work

If I do that command I get a list that shows two files. First, /home/rafael/.histfile (showing all the times I checked and echo'd $PATH before). The other one is /home/rafael/.zcompdump. These show:

/home/rafael/.zcompdump: '-value-, *PATH,-default-' '_dir_list'
/home/rafael/.zcompdump: 'value-,RUBY(LIB|OPT|PATH),-default-' '_ruby'

EDIT: using source on the zcompdump file doesn't bring up anything, either.

Last edited by rasolercrespo (2013-11-01 21:21:47)

Offline

Board footer

Powered by FluxBB