LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-23-2014, 05:36 PM   #1
ravindert
Member
 
Registered: Oct 2011
Posts: 68

Rep: Reputation: Disabled
vncserver -bash: /usr/bin/vncserver: /usr/bin/env: bad interpreter


Hi All,

I am trying to configure the vnc server and getting below error when i made the changes in the vncserver configuration file.

So please suggest the solution to this problem.

[root@local~]# vncserver
-bash: /usr/bin/vncserver: /usr/bin/env: bad interpreter: No such file or directory
[root@local~]#

Below is the configuration file and error when starting the vnc server.

[root@vfaul500 sysconfig]# /etc/init.d/vncserver restart
Shutting down VNC server: 1:rt083742 [FAILED]
Starting VNC server: 1:rt083742 -bash: /usr/bin/vncserver: /usr/bin/env: bad interpreter: No such file or directory
[FAILED]
[root@vfaul500 sysconfig]# cat /etc/sysconfig/vncservers
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# <URL:http://www.uk.research.att.com/archive/vnc/sshvnc.html>.

# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.

# Use "-nohttpd" to prevent web-based VNC clients connecting.

# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.

# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"

VNCSERVERS="1:rt083742"
VNCSERVERARGS[1]="-geometry 640x480"
[root@vfaul500 sysconfig]#
 
Old 07-23-2014, 05:48 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Please make use of bbcode code blocks. You haven't provided much information. What distro are you using?

On my system if I look at the interpreter:

Code:
$ ls -l $(which vncserver)
-rwxr-xr-x. 1 root root 20263 Nov 22  2011 /usr/bin/vncserver

$ head -n1 /usr/bin/vncserver
#!/usr/bin/env perl
My vncserver depends on the existence of perl as well as the existence of /usr/bin/env. I look up what package provides /usr/bin/env...

Code:
$ rpm -q --whatprovides /usr/bin/env
coreutils-8.12-9.fc16.x86_64
As you can see it's part of the coreutils package on my system. So at least I know it depends on coreutils and perl on my system. You should check your own system to see what you have installed as well as the permissions of the files/interpreters.
 
  


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
"bash: /usr/bin/: /lib/ld-linux.so.2: bad ELF interpreter: No such file or direc LittleMaster Linux - Server 4 05-25-2013 03:42 AM
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or director irlogo Red Hat 5 03-12-2012 04:38 AM
/usr/bin/env: bad interpreter: Permission denied Master Fox Linux - Software 8 02-09-2012 08:25 AM
[SOLVED] bash: /usr/local/bin/xdsi: /usr/bin/wish: bad interpreter: No such file or directory Berwhale Linux - Newbie 2 09-15-2011 02:59 PM
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 08:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:21 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