# No Pico? No Man? WTF?



## stizz (Feb 26, 2003)

Last login: Wed Feb 26 00:26:49 on ttyp1
[smokey:~] stizz% whoami
stizz
[smokey:~] stizz% cd /etc/cups
[smokey:/etc/cups] stizz% ls
apple.convs     client.conf     mime.convs      ppd
apple.types     cupsd.conf      mime.convs.bak  ppds.dat
certs           cupsd.conf.old  mime.types      printers.conf
classes.conf    interfaces      mime.types.bak  printers.conf.O
[smokey:/etc/cups] stizz% sudo pico mime.convs
Password:
sudo: pico: command not found
[smokey:/etc/cups] stizz% man pico
man: Command not found.
[smokey:/etc/cups] stizz% pico mime.convs
pico: Command not found.
[smokey:/etc/cups] stizz% 


wtf?

no pico? no man?


----------



## profx (Feb 26, 2003)

profx% whereis pico
/usr/bin/pico
profx% whereis man
/usr/bin/man


see if they are there

profx% echo $path
/sw/bin /sw/sbin /bin /sbin /usr/bin /usr/sbin /usr/X11R6/bin

see if the dirrectorys above include a path to pico


----------



## Darkshadow (Feb 26, 2003)

*stizz* - you'll need to have installed the BSD subsytem when you installed OS X to have those commands.


----------



## gatorparrots (Feb 26, 2003)

You may also need to fix the default tcsh environment as well:
http://www.macosx.com/forums/showthread.php?s=&threadid=26337


----------



## stizz (Feb 26, 2003)

that may be it - I did not install the complete BSD subsystem when installing 10.2, so you may be onto something there. Is there a way to install what I need without reinstalling 10.2 again?  Or more importantly, is there a way I can edit etc/cups/mime.convs without pico? I would like to just edit the files I need in TextEdit, however I cannot seem to locate the physical files themselves, even when logged into the finder as root.

The whole point being I need to edit several files in order to make a printer work on a crossplatform network http://www.macosxhints.com/article.php?story=20021101062604548


----------



## Darkshadow (Feb 28, 2003)

Sure - load up the 10.2 install CD, and pick a custom install, then just pick to install the BSD subsytem and nothing else.  Pretty easy


----------



## MacMarshall (Mar 13, 2003)

> _Originally posted by stizz _
> *Last login: Wed Feb 26 00:26:49 on ttyp1
> [smokey:/etc/cups] stizz% sudo pico mime.convs
> Password:
> ...


 I don't have a Mac yet, but your problem may be that the configuration for the super user account is different than the config for administrator. These configs are loaded using files named .login and .tcsrc (names may vary on the Mac). On the systems I've worked on, the superuser's paths are very limited, so that you can execute only the core UNIX commands. Most admins wouldn't want you to run Pico when you're super user, for example. You should login as su, run chmod, logout, mod the file, then login as su and chmod the file back again.


----------



## stormbringer (Mar 13, 2003)

Why not try vi?
Pico has a the bad habit of insering unwanted returns and wrapping text.
vi is alot nicer (file friendly) but does not have the menu display that pico has.


----------



## davidbrit2 (Mar 13, 2003)

By running 'pico -w' you can disable the automatic reflowing for that editing session. I can't believe how long I went without knowing that.


----------



## MacMarshall (Mar 15, 2003)

> _Originally posted by davidbrit2 _
> *By running 'pico -w' you can disable the automatic reflowing for that editing session.  I can't believe how long I went without knowing that. *


 OH MY GAWD! I can't believe how long my entire company has gone without knowing that.


----------



## Gimpy00Wang (May 3, 2003)

Hehe..."-w" is your friend. Another nice alternative to pico is nano. Most people who like pico, but not pico's license use nano. Vi scares me. I only use it when it's the only thing on the system and I can't install pico or nano or ee. 

- G!mpy



> _Originally posted by MacMarshall _
> *OH MY GAWD! I can't believe how long my entire company has gone without knowing that. *


----------



## Koelling (May 3, 2003)

in answer to your question about not needing pico, you could do this

cd /etc/cups
sudo open -e mime.convs

you can open any application as root but it's dangerous. This will open mime.convs in textedit (notice the -e flag on open).


----------



## davidbrit2 (May 3, 2003)

Hmm, can someone confirm via ps that using 'sudo open' will actually launch an application as root? I seem to remember hearing that it just gives the open command root privileges, which then just opens the app as the invoking user, and thus, not as root.


----------

