Xfce Forum

Sub domains
 

You are not logged in.

#1 2014-12-18 16:35:37

landstander
Member
Registered: 2014-12-14
Posts: 5

man pages command gives "env: : No such file or directory" error.

Specs:
OS: Xubuntu 14.04 (Fresh new installation)
Desktop: XFCE 4.10
Terminal: xfce4-terminal 0.6.3
Shell: bash 4.3.11(1)-release (x86_64-pc-linux-gnu)
Man Pages: manpages 3.54 (3.54-1ubuntu1)
Man Pages Database: man-db 2.6.7.1

Description of problem:
Man pages were modified to have color by following the suggestions given here:
Arch Linux "Colored man pages"
This actually worked for a while and man pages were given in color for users with non elevated privileges. After a few updates and some reboots the man pages are no longer working for non elevated users. For example, from a command prompt if the following command is issued:

man ls

What is expected is that the man page for the ls command should be displayed on the active terminal.
What happens instead is this:

~$ man ls
env: 	: No such file or directory
env: 	: No such file or directory
env: 	: No such file or directory
env: 	: No such file or directory
env: 	: No such file or directory
env: 	: No such file or directory
env: 	: No such file or directory
env: 	: No such file or directory
env: 	: No such file or directory
^C
~$ 

Where "~$ " is the command prompt and ^C is the key combination "CTRL+C" being issued in order to stop output shown above.
Note: If "sudo man ls" is given instead the man page for the ls command is displayed on the active terminal as expected.

Things I have tried:

  • A backup copy of the ~/.bashrc file was made before any changes were applied. The changes made to the ~/.bashrc file (as suggested in the above link) have been undone by restoring this file to its original state before the changes were made, and the following command was issued:

    source ~/.bashrc

    ...but the problem still persists.

  • Core packages have been reinstalled including the packages that contain the man command as well as the man database.

  • I have tried logging out and back in, as well as rebooting the computer.

  • An extensive web search was made which returned results that contained similar output as shown above but non of the solutions have illuminated a fix for the current problem.

  • A search of the forums on this website returned no relevant results.

  • I have also checked the environment variables via the "env" command from a command promp which returns the following:

XDG_VTNR=7
SELINUX_INIT=YES
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/username
SESSION=xubuntu
GLADE_PIXMAP_PATH=:
TERM=xterm
SHELL=/bin/bash
XDG_MENU_PREFIX=xfce-
DERBY_HOME=/usr/lib/jvm/java-8-oracle/db
USER=username
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
GLADE_MODULE_PATH=:
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
DEFAULTS_PATH=/usr/share/gconf/xubuntu.default.path
XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/usr/share/upstart/xdg:/etc/xdg:/etc/xdg
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
DESKTOP_SESSION=xubuntu
JOB=dbus
PWD=/home/username
JAVA_HOME=/usr/lib/jvm/java-8-oracle
LANG=en_US.UTF-8
GDM_LANG=en_US
MANDATORY_PATH=/usr/share/gconf/xubuntu.mandatory.path
IM_CONFIG_PHASE=1
GDMSESSION=xubuntu
SESSIONTYPE=
SHLVL=1
XDG_SEAT=seat0
HOME=/home/username
LANGUAGE=en_US
UPSTART_INSTANCE=
UPSTART_EVENTS=started xsession
LOGNAME=username
XDG_DATA_DIRS=/usr/share/xubuntu:/usr/share/xfce4:/usr/local/share/:/usr/share/:/usr/share
J2SDKDIR=/usr/lib/jvm/java-8-oracle
LESSOPEN=| /usr/bin/lesspipe %s
INSTANCE=
UPSTART_JOB=startxfce4
TEXTDOMAIN=im-config
XDG_RUNTIME_DIR=/run/user/1000
DISPLAY=:0.0
GLADE_CATALOG_PATH=:
XDG_CURRENT_DESKTOP=XFCE
J2REDIR=/usr/lib/jvm/java-8-oracle/jre
LESSCLOSE=/usr/bin/lesspipe %s %s
TEXTDOMAINDIR=/usr/share/locale/
COLORTERM=xfce4-terminal
XAUTHORITY=/home/username/.Xauthority
_=/usr/bin/env

Notes: Certain lines in the above output have been omitted due to it being unclear if it is safe from a security standpoint to display those lines to the general public. The username on the output has also been changed from the actual username to simply "username" because it is in the process of being changed. It is unknown what set the last line, but the "env" command works as is evidenced by the above output which suggests that the last line shown above is irrelevant to the current problem.

Questions:

  1. Are there any daemons that need to be running for the man command to work for users with non elevated privileges?

  2. Is there any way an update could have caused this problem if the man pages were subsequently reinstalled?

  3. Is there anything else that can be done or checked to shed some light on why this is happening?

  4. Are there any solutions for this problem?

Thanks.

Last edited by landstander (2014-12-18 17:08:14)

Offline

#2 2014-12-18 19:16:01

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

Re: man pages command gives "env: : No such file or directory" error.

Great post.
You've obviously already done a lot of work trying to trouble-shoot this already. Given the information you've provided, especially the fact that it works with sudo which pretty much rules out a system problem, it sounds like there is an intermediary function that is interfering in user profiles. What does the following command return:

command -V man

...and does the following work?

command man ls

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2014-12-18 19:33:53

landstander
Member
Registered: 2014-12-14
Posts: 5

Re: man pages command gives "env: : No such file or directory" error.

Thanks Toz,

Input: command -V man
Output:

man is /usr/bin/man

Input: "command man ls"
Output: Shows the man page entry for the ls command as expected.

Note: I just checked the man command by itself on the CLI and it returned what was expected and in fact it appears to be working as it should now. I haven't changed anything since my first post so I'm completely confused as to why this problem has magically vanished by itself.

Questions:

  1. Could issuing one of the your suggested command have fixed this problem? There was no manual entry for "command" nor was there any --help argument for it allowed.

  2. If not then how did this problem just suddenly go away by itself?

I will leave this post open for the rest of the day for comments and suggestions about what happened here. Otherwise I'll have to mark the problem as solved even though we haven't clearly stated (or possibly found?) what was causing the problem in the first place and how it was fixed.

Thanks for the compliment on my first post.

Offline

#4 2014-12-18 20:55:55

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: man pages command gives "env: : No such file or directory" error.

landstander wrote:

If not then how did this problem just suddenly go away by itself?

Did you reboot between not working and working? Did you install any updates between not working and working?

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#5 2014-12-18 22:47:21

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

Re: man pages command gives "env: : No such file or directory" error.

landstander wrote:

Could issuing one of the your suggested command have fixed this problem? There was no manual entry for "command" nor was there any --help argument for it allowed.

No, it wouldn't of fixed it.

If not then how did this problem just suddenly go away by itself?

My best guess is that there was a man function from a bash config file that was still active (assuming you used the man() function from the arch wiki page you linked to earlier).

If the problem resurfaces, run:

command -V man

...again to see if it says something other that /usr/bin/man.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2014-12-19 00:16:39

landstander
Member
Registered: 2014-12-14
Posts: 5

Re: man pages command gives "env: : No such file or directory" error.

For MountainDewManiac:
When I last checked and found that the problem was still present, I hadn't logged out or rebooted, but I may have issued some commands to refresh the package archives such as the following:

sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get update
sudo apt-get -f install
sudo apt-get check manpages
sudo apt-get check man-db
sudo dpkg --configure -a

The above commands plus the ones ToZ suggested in post #2 above are the only commands that were issued since the last check when it was broken. So to be clear, it wasn't working, then the above commands were issued and the ones given by ToZ, and now it appears to be working again. Note that none of the apt-get commands above gave any results that would suggest that anything was fixed or out of place to begin with. So this was a weird one.

Quoting ToZ, post #5

My best guess is that there was a man function from a bash config file that was still active (assuming you used the man() function from the arch wiki page you linked to earlier).

Does this mean that for example possibly ~/.bashrc was getting into some kind of stuck state each time I opened a terminal? I guess that could be so but then that would beg the question of why everything was working fine for a while after that file was modified. Maybe I should modify it again to see if I can get it to break by the same steps I took before?

I still have some other work to do so this might have to wait until tomorrow.
Thank you both for the input. Its got me thinking a bit about how I might test this more.

Offline

#7 2014-12-21 18:23:05

landstander
Member
Registered: 2014-12-14
Posts: 5

Re: man pages command gives "env: : No such file or directory" error.

[Update:]
I have re-implemented the colored man pages as instructed by the arch linux link in the first post in order to try and find a way to duplicate the problem. This time I have added the suggested script snippet to the end of the ~/.bashrc file instead of near material that looked r

Results:
So far the problem has not resurfaced.

Questions remaining:

  1. If this problem does start happening again, and if the "man()" function (from the arch linux link in the first post, that was added to the ~/.bashrc file) is somehow "still active", then is there a way to determine if the ~/.bashrc file is in an "active" state and weather or not this state could be causing the problem?

  2. If the problem occurs again, what are some things I might try in order to determine what it is about changing that ~/.bashrc script that could be causing the problem?

Offline

#8 2014-12-21 20:30:28

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

Re: man pages command gives "env: : No such file or directory" error.

landstander wrote:

If this problem does start happening again, and if the "man()" function (from the arch linux link in the first post, that was added to the ~/.bashrc file) is somehow "still active", then is there a way to determine if the ~/.bashrc file is in an "active" state and weather or not this state could be causing the problem?

Any terminal window that you have open will create its own environment based on the information contained in the ~/.bashrc (and related) files (see 'man bash'). If you disable the function in one terminal, it may not be disabled in another. Running "command -V man" will let you know which 'man' is the active one. If you disable the function and source the updated .bashrc file, it should no longer be active.

If the problem occurs again, what are some things I might try in order to determine what it is about changing that ~/.bashrc script that could be causing the problem?

First, verify which 'man' is the active one. Secondly, review 'man bash' to see under which circumstances which config files are being used and in what order.

It's also quite possible that you have come across a bug. If you can reliably replicate this issue, it would be important to create a bug report for it.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 610.32 KiB (Peak: 627.16 KiB) ]