Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu User (http://www.linux-archive.org/ubuntu-user/)
-   -   An issue with sudo (http://www.linux-archive.org/ubuntu-user/190200-issue-sudo.html)

11-09-2008 01:31 AM

An issue with sudo
 
I already downloaded and installed TeXlive 2008 from tug.org/texlive



by default it is installed in /usr/local



after installation, if I would open a terminal and say xelatex, it would not recognise the command, so this what I did:(creating a custom .xesession)



1)* Open a terminal by opening the Applications menu, select Accessories, and then click Terminal.



2) To begin editing your script, type the following command at the prompt:



gedit ~/.xinitrc



3) Put the following texts inside the tex editor:



PATH=/usr/local/texlive/2008/bin/i386-linux:$PATH; export PATH &

MANPATH=/usr/local/texlive/2008/texmf/doc/man:$MANPATH; export MANPATH &

INFOPATH=/usr/local/texlive/2008/texmf/doc/info:$INFOPATH; export INFOPATH &

exec gnome-session



4) save the file and then cose it



5) write the following command in terminal:



chmod +x ~/.xinitrc



6) write the following command in terminal:



ln -s ~/.xinitrc ~/.xsession





after restarting my computer, I opened a terminal and wrote xelatex. This time fortunately it recognised my TeXLive installation. but if I write the following command in terminal:



sudo texhash



it gives:



sudo: texhash: command not found



but if I just say texhash, it recognises the command very well as follow:



texhash: /usr/local/texlive/2008/texmf: directory not writable. Skipping...

texhash: /usr/local/texlive/2008/texmf-config: directory not writable. Skipping...

texhash: /usr/local/texlive/2008/texmf-dist: directory not writable. Skipping...

texhash: /usr/local/texlive/2008/texmf-doc: directory not writable. Skipping...

texhash: /usr/local/texlive/2008/../texmf-local: directory not writable. Skipping...

texhash: /usr/local/texlive/2008/texmf-var: directory not writable. Skipping...

texhash: Done.





So can you please say what I need to do so that ubuntu recognises sudo texhash



Thanks





Get a FREE AOL Email account with unlimited storage. Experience Email and instant messaging together - chat while you mail and mail while you chat! Register for your free email account at http://free.aol.com.au


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Joel Goguen 11-09-2008 01:42 AM

An issue with sudo
 
On Sat, 2008-11-08 at 21:31 -0500, vafa@aol.com.au wrote:
> So can you please say what I need to do so that ubuntu recognises sudo
> texhash
The simplest thing is to run this command in the Terminal:

sudo ln
-s /usr/local/texlive/2008/bin/i386-linux/texhash /usr/bin/texhash

Watch for line breaks, that command should all be on one line. There
are other ways, such as telling sudo to pass your PATH variable, but
this is the simplest way AFAIK.

> Thanks
>
>
> __________________________________________________ ____________________
> Get a FREE AOL Email account with unlimited storage. Experience Email
> and instant messaging together - chat while you mail and mail while
> you chat! Register for your free email account at
> http://free.aol.com.au
>
--
Joel Goguen
Bug-free code is a myth.
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

11-09-2008 02:06 AM

An issue with sudo
 
thanks. but this has some problems. It gives:



/usr/bin/texhash: 115: kpsewhich: not found

texhash: Done.














-----Original Message-----

From: Joel Goguen <jgoguen@jgoguen.ca>

Sent: Sun, 9 Nov 2008 1:42 pm

Subject: Re: An issue with sudo











On Sat, 2008-11-08 at 21:31 -0500, vafa@aol.com.au wrote:

> So can you please say what I need to do so that ubuntu recognises sudo

> texhash

The simplest thing is to run this command in the Terminal:



sudo ln

-s /usr/local/texlive/2008/bin/i386-linux/texhash /usr/bin/texhash



Watch for line breaks, that command should all be on one line. There

are other ways, such as telling sudo to pass your PATH variable, but

this is the simplest way AFAIK.



> Thanks

>

>

> __________________________________________________ ____________________

> Get a FREE AOL Email account with unlimited storage. Experience Email

> and instant messaging together - chat while you mail and mail while

> you chat! Register for your free email account at

> http://free.aol.com.au

>

--

Joel Goguen

Bug-free code is a myth.








--

ubuntu-users mailing list

ubuntu-users@lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users







Get a FREE AOL Email account with unlimited storage. Experience Email and instant messaging together - chat while you mail and mail while you chat! Register for your free email account at http://free.aol.com.au


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Matthew Flaschen 11-09-2008 05:15 AM

An issue with sudo
 
vafa@aol.com.au wrote:
> thanks. but this has some problems. It gives:
>
> /usr/bin/texhash: 115: kpsewhich: not found
> texhash: Done.

The issue is that root (which sudo runs as) has a different PATH then
your username. You can either change the root path (which may be
dangerous) or do what Joel suggested for each file. This will be easier
in the zsh shell:

sudo apt-get install zsh
exec zsh
sudo ln -s =kpsewhich /usr/bin

If you get more "not found" errors, do the sudo ln -s command again in
zsh, but with whatever command is not found.

Matt Flaschen

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Nils Kassube 11-09-2008 05:48 AM

An issue with sudo
 
vafa@aol.com.au wrote:
> thanks. but this has some problems. It gives:
>
> /usr/bin/texhash: 115: kpsewhich: not found
> texhash: Done.
>
> -----Original Message-----
> From: Joel Goguen <jgoguen@jgoguen.ca>
> Sent: Sun, 9 Nov 2008 1:42 pm
> Subject: Re: An issue with sudo
>
> On Sat, 2008-11-08 at 21:31 -0500, vafa@aol.com.au wrote:
> > So can you please say what I need to do so that ubuntu recognises
> > sudo texhash
>
> The simplest thing is to run this command in the Terminal:
>
> sudo ln
> -s /usr/local/texlive/2008/bin/i386-linux/texhash /usr/bin/texhash

It seems this link isn't very useful and you should better remove it.
Furthermore IMHO it isn't wise to add a link to /usr/bin. If you later
install TeXlive from the Ubuntu repository it may overwrite your files
in /usr/local/texlive/2008/bin/i386-linux/. It would be better to link the
binaries to /usr/local/bin/. Then packet managers don't touch those links.

Your current problem is that the executable files of that installation are
not in the PATH for root. Therefore it might work if you issue this
command instead of yours:

sudo bash -c 'export PATH=/usr/local/texlive/2008/bin/i386-linux:$PATH;texhash'

That command should be only one line even if your mail program inserts line breaks.


Nils

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


All times are GMT. The time now is 11:23 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.