VectorLinux

The nuts and bolts => X-Rated => Topic started by: Colonel Panic on April 24, 2007, 03:10:50 am

Title: Starting "awkward" programs, i.e. those that install into their own directories
Post by: Colonel Panic on April 24, 2007, 03:10:50 am
Hi! A small problem has arisen in connection with Adobe Acrobat Reader 7, which installs into its own directory. I can't seem to be able to start it from the menu of any window manager I use, even though I include the path to the start up file (acroread).

Any ideas as to why this might be the case?

Thanks in advance,

Colonel Panic.
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: exeterdad on April 24, 2007, 05:03:15 am
Have you:  echo $PATH  to check if the export worked or not?  Does the path to acroread show /usr/local/Adobe/Acrobat7.0/bin or something like that?

I like creating sym links in /usr/bin to those oddball locations so my path doesn't get too messy.
Title: Re: Starting "awkward" programs, i.e. those that install into their own directories
Post by: lagagnon on April 24, 2007, 07:33:27 am
Either the pathname you are typing is is not complete or incorrect or the executable is not set as executable. Check with "ls -al fullpathname" to see if it is executable.
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Colonel Panic on April 24, 2007, 11:54:15 am

Thanks for your advice. ls -ad doesn't seem to like the spaces in the directory name (Adobe Reader 7), so I'm going to change it to something continuous and try again.
Title: Re: Starting "awkward" programs, i.e. those that install into their own directories
Post by: JohnB316 on April 24, 2007, 06:54:51 pm
Colonel Panic,

I happen to have Acrobat Reader on my box. Since I installed it from the tarball made by Adobe, I installed it into the /usr/local/Adobe... directory. What I then did was to create a symlink in /usr/bin as root to point to acroread, since I don't necessarily want to add the Adobe directory to my PATH variable. Assuming that your Adobe Reader executable (acroread) is installed in /usr/local/Adobe/Acrobat7.0/bin/ do things like so:

1) Open a terminal and become root via the su command.
2) Type cd /usr/bin[/tt] at the prompt.
3) Now type ln -s /usr/local/Adobe/Acrobat7.0/bin/acroread . at the prompt (don't forget that period at the end of the command!). You'll be able to launch acroread from a terminal or from a launcher.

HTH,
John
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: exeterdad on April 24, 2007, 07:43:08 pm
Not trying to hijack the thread.  But I don't get why the period is important?  I didn't add one and I haven't noticed anything odd.  Did I do it wrong? *interested*
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Triarius Fidelis on April 24, 2007, 08:21:54 pm
Not trying to hijack the thread.  But I don't get why the period is important?  I didn't add one and I haven't noticed anything odd.  Did I do it wrong? *interested*

For ln? It's implicit to put the link in the current directory, I believe. One familiar with linguistics might call it the null morpheme in the ln invocation...
Title: Re: Starting "awkward" programs, i.e. those that install into their own directories
Post by: GrannyGeek on April 24, 2007, 10:12:19 pm
I think it's a lot easier to make a symlink with Midnight Commander than trying to remember all the commands and syntax. Just open MC, have the directory with Adobe Reader's executable in one panel and the directory where you want the symlink (such as /usr/bin) in the other panel. Highlight the Adobe Reader executable (on my system it's /usr/local/Adobe/Acrobat7.0/bin/acroread). Then hit Control-x, s (or File menu, Symlink). MC will create a symlink in /usr/bin or whatever directory is visible in the other panel.

Now you should be able to start Adobe Reader with an acroread command, no path necessary.
--GrannyGeek
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Lyn on April 25, 2007, 01:40:15 am
I think it's a lot easier to make a symlink with Midnight Commander ....

Snip

Now you should be able to start Adobe Reader with an acroread command, no path necessary.
--GrannyGeek

This is one reason why I think that MC is such a great utility/file manager - so versatile.  Thanks for that Granny!
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Triarius Fidelis on April 25, 2007, 02:30:11 am
I was going to say how the CLI way is a zillion-fold faster once one is accustomed, but that's a sure way to start a flame war.  :P
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: exeterdad on April 25, 2007, 09:03:11 am
For ln? It's implicit to put the link in the current directory, I believe. One familiar with linguistics might call it the null morpheme in the ln invocation...

Oh dear Lord!

Now I'm really confused about that period.  I actually lost sleep last night about your explaination.  I have to admit I'm envious of your obvious understanding of Linux.

I can't for the life of me understand what you just explained.  I went into my .bash_history file and found that when I created the symbolic link I used "ln -s /usr/local/Adobe/Acrobat7.0/bin/acroread acroread".  Which was pretty cool because the way you did it is easier (I also did that command from within /usr/bin).

So I deleted my acroread link and did it your way and launched acroread fron another console.  Of course it launched.as expected.  Then for the heck of it I deleted it once more and did the very same command without the period.  There was no complaints afterwards and acroread launched the same as before. So that got me even more puzzled.

So that got me on Google for a couple hours this morning trying to find whatever I could about using a period with ln.  Perhaps I used the wrong keywords, but I couldn't find anything.  So then I searched about setting up a symbolic link with acroread and found many different ways go go about it, but none of them had a period.

Now please understand I am in no way doubting your knowledge or expertise, but am interested in doing things the correct way.  And even more...  I have to understand the logic involved in it.  If you could point me to more info on this I would be grateful, because I can't seem to find it.

I need to get out more, rather than obsessing about silly stuff!  lol

Regards, Lee
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: uelsk8s on April 25, 2007, 09:16:36 am
exeterdad,
the dot "." is a "shortcut" to the current dir
Code: [Select]
cd /usr/bin
ln -s /usr/local/Adobe/Acrobat7.0/bin/acroread .
is the same as
Code: [Select]
ln -s /usr/local/Adobe/Acrobat7.0/bin/acroread /usr/bin or
Code: [Select]
cd /usr/bin
ln -s /usr/local/Adobe/Acrobat7.0/bin/acroread acroread
or even
Code: [Select]
ln -s /usr/local/Adobe/Acrobat7.0/bin/acroread /usr/bin/acroread
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: exeterdad on April 25, 2007, 09:23:41 am
And the light goes on!!

Thanks for putting it in "Lee is an idiot" terms.  I knew it had to be something simple.  ;D
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Colonel Panic on April 25, 2007, 10:16:32 am

A quick update; I solved the problem by shortening the directory name from "Adobe Reader 7" to "AR7", thus removing the spaces which it turns out were the cause of the problem (despite the fact they were part of the tarball); the menu entry now works properly. Thanks everybody.

I can see I've still got a lot to learn about Linux though, like how to create a symlink when I need to.
Title: Re: Starting "awkward" programs, i.e. those that install into their own directories
Post by: EyesOnly on April 25, 2007, 03:13:31 pm
Yes, thanks uelsk8s for explaining that. Unlike Lee, I didn't loose any sleep over it as I just happened in on this subject after being away for a few days. But like Lee I like to understand the logic on why things are done the way that they are. That was interesting and easy to understand. Thanks for explaining---and thanks for your persistence Lee for those of us who wouldn't normally have asked. -blush!-

Amicalement,

Eyes-Only
"L'Peau-Rouge"
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Triarius Fidelis on April 25, 2007, 06:30:27 pm
And the light goes on!!

Thanks for putting it in "Lee is an idiot" terms.  I knew it had to be something simple.  ;D

Well, mea culpa my fault for using expensive terms like 'null morpheme'. It should have been an exercise in erudition simply educational, but I had to go and make it into a pseudo-intellectual dog's breakfast.

I'm glad you understand it now anyway. Your efforts are valiant.

Edit:

Exeter, eh? A number of my ancestors are from southern England, although it really might be more in the neighborhood of Norfolk and Suffolk for me, what with all this thick Norse facial hair I've grown...
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: exeterdad on April 25, 2007, 07:33:41 pm
Yup...  seems I've hijacked the heck out of this thread  ::)

hanumizzle...   Exeter NH  USA  The revolutionary war capitol *ducking*
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Triarius Fidelis on April 25, 2007, 08:43:57 pm
Yup...  seems I've hijacked the heck out of this thread  ::)

hanumizzle...   Exeter NH  USA  The revolutionary war capitol *ducking*

 :o OMG LOL!!!  ;D
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Colonel Panic on April 26, 2007, 01:13:31 am
I think it's a lot easier to make a symlink with Midnight Commander than trying to remember all the commands and syntax. Just open MC, have the directory with Adobe Reader's executable in one panel and the directory where you want the symlink (such as /usr/bin) in the other panel. Highlight the Adobe Reader executable (on my system it's /usr/local/Adobe/Acrobat7.0/bin/acroread). Then hit Control-x, s (or File menu, Symlink). MC will create a symlink in /usr/bin or whatever directory is visible in the other panel.

Now you should be able to start Adobe Reader with an acroread command, no path necessary.
--GrannyGeek

Excellent, I'll try that with my other programs too such as SwiftFox and Flock. Thanks for the advice.
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: EyesOnly on April 26, 2007, 07:36:14 am
We're neighbours then exeterdad as I'm across the border from you in Maine, 20 miles north of Augusta. ;) Interesting how different people think of different places of the world when they see a word but it stands to reason on a global forum. Hanumizzle thought England and I thought our sister state. hehe!

@Hanumizzle: Sorry my friend... I didn't mean to capitalise on the fact that I couldn't understand your wording and I hope that I didn't offend you as that wasn't my intention in the least so please forgive me---forgive us as I think you'll find this wasn't exeterdad's intention either. For me personally someone can explain something 50 different ways the exact same thing and yet sometimes it's the 51st way of explaining it that the message will "click". It may be a complicated manner of explaining it, or a simple manner, it doesn't matter as it's the way the person has said it. And I don't think I'm being very clear so maybe I should stop. :(

One thing though: I've been a lurker on this forum since VL5.1 (along towards the end of the distro maybe 6 to 8 months before 5.8 came out) and I do want you to know Hanumizzle that there have been many times throughout that period when it's been what you've said which has "clicked" when what others said didn't---and allowed me to solve a problem I was having. I hope that helped?

By the way---thanks GrannyGeek for that hint on MC as that's neat! I don't personally use that myself but I'll have to investigate that more I guess. Myself, I use mostly ROX and Krusader (and in Puppy lotsa times Emelfm2) and making systemlinks in those programmes is a "drag n' drop" dream come true.  ;D

Amicalement,

Eyes-Only
"L'Peau-Rouge"
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Triarius Fidelis on April 26, 2007, 07:48:11 am
We're neighbours then exeterdad as I'm across the border from you in Maine, 20 miles north of Augusta. ;) Interesting how different people think of different places of the world when they see a word but it stands to reason on a global forum. Hanumizzle thought England and I thought our sister state. hehe!

Well, few names are more English than Exeter, except maybe for Ælfred (meaning Elf-rede, or Elf-counsel).
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Colonel Panic on May 03, 2007, 03:30:05 pm

I thought Exeter, England too (I live about 60 miles from there).
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Triarius Fidelis on May 03, 2007, 07:36:24 pm

I thought Exeter, England too (I live about 60 miles from there).

Really? What city?
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Colonel Panic on May 04, 2007, 04:25:20 am

I live in a village about 20 miles north-east of Plymouth.
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Triarius Fidelis on May 04, 2007, 03:17:59 pm

I live in a village about 20 miles north-east of Plymouth.

Ok, out in the West Country then. Does the sea bring you nice weather or no?  ;)
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Pita on May 13, 2007, 11:49:57 pm
I usually start those programs by putting a file into ~/bin with a simple line such as "/usr/local/Adobe/Acrobat7.0/bin/acroread &" (w/o the qotes) and make the file executable.
Name the file short like acb. Can then be accessed from anywhere. ~/bin is the first place linux is looking in for an executable file.
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Triarius Fidelis on May 14, 2007, 11:30:34 am
Just remember #!/bin/sh at the top.
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Pita on May 14, 2007, 06:25:25 pm
Just remember #!/bin/sh at the top.

Yes, I just wonder. I used to put it, however, found on one and two liners there seems to be no need or is it I don't understand why it should be there.

I just put this in as killmcs file and it works just fine w/o that top line:

X=$(/sbin/pidof -x xfce-mcs-manager)
kill $X
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Triarius Fidelis on May 14, 2007, 09:01:36 pm
Maybe that's the first guess made?

I'm not sure. Do you have the binfmt_misc code in the kernel? Might be a module.
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Pita on May 15, 2007, 02:01:44 am
Maybe that's the first guess made?

I'm not sure. Do you have the binfmt_misc code in the kernel? Might be a module.

Yes,

locate binfmt_misc
/lib/modules/2.6.20.3/kernel/fs/binfmt_misc.ko

it's there
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Triarius Fidelis on May 15, 2007, 02:07:00 am
Yes, that certainly might explain why the system execution call automatically recognizes your shell scripts.

For the sake of portability, it's best to add the opening line #!/bin/sh.
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Pita on May 15, 2007, 05:44:48 pm
Yes, that certainly might explain why the system execution call automatically recognizes your shell scripts.

For the sake of portability, it's best to add the opening line #!/bin/sh.

Thanks!

will do in future and correct the old ones.

Regards
Title: Re: Starting "awkward" programs, i.e. those that install into their own director
Post by: Triarius Fidelis on May 15, 2007, 08:42:04 pm
More on binfmt_misc:

http://www.tat.physik.uni-tuebingen.de/~rguenth/linux/binfmt_misc.html