oh what the hell! vnc4server: command not found

xSauronx

Lifer
Jul 14, 2000
19,582
4
81
Ok ive got an etch box ive been running for almost a month without a problem. i have vnc4server that was working just fine until a couple of days ago.
anyway, i closed firefox and when i tried to open it later, it wouldnt start :(

thinking it had hung up, i tried to open an xterm and *that* wouldnt start. so i shh'd and killed Xvnc4

when i tried to start it up again, i got "command not found"

so i tried:
aptitude reinstall vnc4server

still nada

i havent changed anything on it related to vnc. (ive done a few things on the box, the biggest of which was setup Samba) any way i can find out *why*? and, barring that, whats the best way to make it available to users again?

im not sure where to start looking outside the log file, the only important bit of which seems to be this:

/bin/sh: uxterm: command not found
/bin/sh: x-terminal-emulator: command not found


ive used both those under the vnc session before, so i have no idea whats going on :/
 

xSauronx

Lifer
Jul 14, 2000
19,582
4
81
Originally posted by: Nothinman
Those are both in /usr/bin, did you mess up your PATH?

i nevah touched anything that should have anything to do with it.

other things in /usr/bin seem to be working randomly

which works
nano works

locate does not
yes does not
and they both give command not found

execute permissions are on everything *shrug*

the *only* thing i did in the last two days was change ownership and permissions on /multimedia and set up Samba to share that directory and its subdirectories.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
If they're there and they're set executable then your PATH is messed up or maybe /usr got mounted noexec.
 

xSauronx

Lifer
Jul 14, 2000
19,582
4
81
Originally posted by: Nothinman
If they're there and they're set executable then your PATH is messed up or maybe /usr got mounted noexec.

but if thats the case shouldnt it be all or nothing working from /usr/bin ?

what i can do that would try and set it straight, or what can i check, because *I* in no way altered any of it, so im particularly baffled.
 

xSauronx

Lifer
Jul 14, 2000
19,582
4
81
Originally posted by: silverpig
cd to that directory and ls -lah locate and compare it to ls -lah nano

actium:/usr/bin# ls -lah locate
-rwxr-xr-x 1 root root 30K 2006-08-06 04:12 locate
actium:/usr/bin# ls -lah nano
lrwxrwxrwx 1 root root 9 2007-09-14 10:50 nano -> /bin/nano
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
locate is executable for everyone, so if /usr/bin is in your PATH you should be able to type 'locate' and if not you'd just have to type '/usr/bin/locate' to run it.
 

silverpig

Lifer
Jul 29, 2001
27,703
12
81
Originally posted by: xSauronx
Originally posted by: silverpig
cd to that directory and ls -lah locate and compare it to ls -lah nano

actium:/usr/bin# ls -lah locate
-rwxr-xr-x 1 root root 30K 2006-08-06 04:12 locate
actium:/usr/bin# ls -lah nano
lrwxrwxrwx 1 root root 9 2007-09-14 10:50 nano -> /bin/nano

Ah, my guess is your path is messed up. It seems as though you will probably have /bin in your path, but for some reason you lost /usr/bin. Do an

echo $PATH

and see if /usr/bin is in the list somewhere. If it isn't then just add it on the command line like so:

PATH=$PATH:/usr/bin
export PATH

then try locate again. If it works, then set your path in a file in your home directory such as .bash_profile. Just add the line:


PATH=$PATH:/usr/bin;export PATH
 

xSauronx

Lifer
Jul 14, 2000
19,582
4
81
xsauronx@actium:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/games

its there to start with
 

xSauronx

Lifer
Jul 14, 2000
19,582
4
81
Originally posted by: silverpig
Odd. What happens if you type:

/usr/bin/locate

as Nothinman suggested?

oh; permission denied

my user cant access /usr/bin at all
 

Robor

Elite Member
Oct 9, 1999
16,979
0
76
Originally posted by: xSauronx
Originally posted by: silverpig
Odd. What happens if you type:

/usr/bin/locate

as Nothinman suggested?

oh; permission denied

my user cant access /usr/bin at all

Try this: sudo /usr/bin/locate
 

xSauronx

Lifer
Jul 14, 2000
19,582
4
81
Originally posted by: Robor
Originally posted by: xSauronx
Originally posted by: silverpig
Odd. What happens if you type:

/usr/bin/locate

as Nothinman suggested?

oh; permission denied

my user cant access /usr/bin at all

Try this: sudo /usr/bin/locate

i dont have sudo set up on the box, its not even installed.
 

xSauronx

Lifer
Jul 14, 2000
19,582
4
81
Originally posted by: Nothinman
What are the permissions on the /usr/bin directory?


xsauronx@actium:/usr$ ls -l | grep bin
drw------- 2 root root 20480 2007-11-07 15:37 bin


ahhh i see now :) i should have thought of checking this instead of just the permissions on the individual files :eek:

what *should* the permissions be on /usr/bin? anyone care to hazard a guess? again this is with Debian Etch, and everything was working fine until a few days ago. i certainly didnt do this myself.

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
drwxr-xr-x 2 root root 65536 2007-11-04 04:50 /usr/bin

But if you didn't do that yourself, even by accident, I'd be worried.
 

xSauronx

Lifer
Jul 14, 2000
19,582
4
81
Originally posted by: Nothinman
drwxr-xr-x 2 root root 65536 2007-11-04 04:50 /usr/bin

But if you didn't do that yourself, even by accident, I'd be worried.

i kinda am, because as i stated i only ever modified /multimedia (an entirely different piece of hardware)

is there anywhere i can look that might lead me to find out how it got changed?
 

xSauronx

Lifer
Jul 14, 2000
19,582
4
81
Originally posted by: Nothinman
There's no auditing enabled by default, if that's what you mean.

is there a way i can enable that now, so if it happens again i can find out *how* it happened?

thanks everyone, by the way :)