LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-18-2012, 08:31 AM   #16
rainbowsally
Member
 
Registered: Oct 2011
Posts: 47
Blog Entries: 138

Rep: Reputation: Disabled

Quote:
Originally Posted by amgilman View Post
The first (non-obedient) machine is running PClinuxOS with KDE desktop. The other machine (Mandriva) has, I think, a gnome (or gnome-ish) desktop.

Thank you for the suggestion about the kernel. I am really pretty new at this, so that is an option for when I know (much) more.
First try adding a file association in konqueror or in the personal/system settings menu. (I assume you're using kde... they are really getting out of control over there.)

Rt-click and open file with 'bash -c %f' and if that works, you're home free until kde screws it up again.

Run it again and set it to 'remember' the association, if you can. Or add it to file associations in the personal (or sytem) settings menu.

If that doesn't work, all's not quite lost. I had the same problem. The newer KDE throws away too much of your environment (noticed on kubuntu) and is somewhat brain-dead when it comes to identifying file types.

We may need a 'runner' for these things -- a smart one would be nice and not too hard to create but for now a simple one will have to do.

And if we need that runner (see link below) it can be added to the file associations for mime-type "x-executable".

This unfortunately may not run by default on newer kde's but it will be selectable by right-clicking and selecting the scrood utility to open the executable with.

See SCROOD (Shell Can Run On Our Desktop) here.
http://kubuntuforums.net/forums/inde...opic=3119762.0

It's named for shell scripts but works on binary executables too.

It's a drastic measure, to be sure, but it's there if you want to try it and it can be removed from the file associations if you find (or create) something better.

[PROGRAMMERS: You can dump these things with "hexdump -C <filename>" or any other hex viewer. If the header is '#!<path>' or "ELF\0", it should be considered potentially executable. Perms need only be checked for scripts. Libs will simply fail to run.]

Last edited by rainbowsally; 01-18-2012 at 08:39 AM. Reason: cleanups
 
1 members found this post helpful.
Old 01-19-2012, 06:34 AM   #17
amgilman
LQ Newbie
 
Registered: Mar 2011
Posts: 12

Original Poster
Rep: Reputation: 0
I will pursue these and see where they lead me. Thanks again (still) for all these suggestions. I like the KDE desktop because it is (seems) more straightforward and less cluttered than the alternatives that I have seen. Perhaps not so much.

Anyway,I appreciate the clear and helpful suggestions
 
Old 01-19-2012, 07:40 AM   #18
rainbowsally
Member
 
Registered: Oct 2011
Posts: 47
Blog Entries: 138

Rep: Reputation: Disabled
Quote:
Originally Posted by amgilman View Post
The first (non-obedient) machine is running PClinuxOS with KDE desktop. The other machine (Mandriva) has, I think, a gnome (or gnome-ish) desktop.

Thank you for the suggestion about the kernel. I am really pretty new at this, so that is an option for when I know (much) more.
I think you'll find that the problem is newer KDE's wipe out the environment too throroughly and lose the PWD and also PATH and LD_LIBRARY_PATH, though I think the problem here is that PWD is getting lost.

I posted a link to a utility to help iron this out, but it got lost or deleted by the moderators.

I don't see any warnings anywhere so let's try this again.

Shell Can Run On Our Desktop (the scrood shell utility).
http://kubuntuforums.net/forums/inde...opic=3119762.0

Let us know if that was the problem.
 
Old 01-20-2012, 07:49 AM   #19
amgilman
LQ Newbie
 
Registered: Mar 2011
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for this post (link), which takes me just to the very edge of my understanding (and perhaps a little beyond). I did try 'bash -c %f' command, to no avail, so maybe the SCROOD program is what I need. But the surprising thing is that other programs launch as expected (ie with a click or with a application launcher). This makes me think that I have done something in the non-obedient program to offend the KDE desktop. Since this is all for fun, my first idea is to strip down the program to see if it works, and then add back elements to see where the problem lies. Someone described carpenter ants as running around randomly until something falls into place, and that pretty well describes my programming.

Thanks for any and all thoughts.
 
Old 01-20-2012, 10:52 AM   #20
rainbowsally
Member
 
Registered: Oct 2011
Posts: 47
Blog Entries: 138

Rep: Reputation: Disabled
Quote:
Originally Posted by amgilman View Post

<snippage>

Thanks for any and all thoughts.
Another thought.

"kshell4 %f" might also work.

I tried that in kubuntu, I'm pretty sure, and it didn't work but I've been playing with it lately in another distro and I don't see why it shouldn't work. Looks like it should. Basically all you need is the full path to the application, I think. The SCROOD utility also enables sandboxed libraries.

But whatever works works. :-)

Keep us posted if you can.

re. "sandboxed". That's just stuff that needs to run in my home folder instead of in the main system -- mostly for testing, debugging.

re. the sed code in the scrood utility. It just extracts the PATHS text as text and forces it to load even if kde doesn't want to 'source' a bashrc file, which it appears to refuse to do.

re. kde. lemmings do that too.
 
Old 01-20-2012, 07:02 PM   #21
amgilman
LQ Newbie
 
Registered: Mar 2011
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks encore.

A problem seems to be when the program wants to open a file. One wants to get an image to display; another text to put in a buffer. The program with the text is the more recent one. It will partially open when the icon clicked, but only partially (it runs fine from a terminal instruction "./file_name). I think this is true of the program wanting the image, though I am not 100% sure. When I remove the file request, the program will run with a click on the icon. If this is problem with the KDE desktop, I think my "solution" is to load a different distro, but this seems like giving in.
 
Old 01-21-2012, 06:18 AM   #22
rainbowsally
Member
 
Registered: Oct 2011
Posts: 47
Blog Entries: 138

Rep: Reputation: Disabled
Quote:
Originally Posted by amgilman View Post
Thanks encore.

A problem seems to be when the program wants to open a file. One wants to get an image to display; another text to put in a buffer. The program with the text is the more recent one. It will partially open when the icon clicked, but only partially (it runs fine from a terminal instruction "./file_name). I think this is true of the program wanting the image, though I am not 100% sure. When I remove the file request, the program will run with a click on the icon. If this is problem with the KDE desktop, I think my "solution" is to load a different distro, but this seems like giving in.
Let's nail this down amigilman.

This sounds very much like incorrect mime settings, though it's not exactly clear.

Can you compare konqueror to dolphin (if you have both) and see if they both (mis)behave the same way?

You did find the menu for setting the file associations, at least it sounded like it with the "bash -c %f" adventure. :-)

Let's try something crazy. Copy the file temporarily with a new name ending with ".png". Don't change the orig, just make a copy.

Does it try to open as a png image? (Probably does) And then delete the png file.

If it tries to open as a png image file, now we're on an easter egg hunt. Somehow we need to find what apps are trying to open a file that should be mime-type x-executable and attempt to disable those. We may also have to re-arrange the mime types in a list so that x-executable is found before the miscreant app(s) that are trying to open it.

Short of that, you may not need a completely new distro, probably just revert to something a generation earlier than the one you have.
 
Old 01-22-2012, 02:16 AM   #23
rainbowsally
Member
 
Registered: Oct 2011
Posts: 47
Blog Entries: 138

Rep: Reputation: Disabled
Amgilman,

Quote:
Originally Posted by rainbowsally View Post
Let's nail this down amigilman.

This sounds very much like incorrect mime settings, though it's not exactly clear.
Been poking around looking for where the mime settings might be getting set wrong.

Got some other stuff on my plate at the moment but this might be interesting to experiment with, if nothing else, to become familiar with the low level stuff going on in KDE.

I poked around a bit to see some stuff that might cause problems with x-executable
mime types.

In my HOME folder I found this.
.kde4/share/config/filetypesrc:embed-application/x-executable=false

I used this command (adding ahd subtracting splats to set the directory level to search. After cd-ing to my HOME folder...
Code:
grep "x-executable" .??*/*/*/* 2>/dev/null
I'm not ready to play with that flag on my system, but you MIGHT want to try flipping it to see if it changes how things work. But bear in mind that this flag may not be updated if you set it using kde because stuff is often held in chaches in the /var folders and only updated at logout which in this case could overwrite your changes. You might have to use a console login and after changing it (depending on your distro) you might even have to reboot to set the flag.

In opensuse you can 'su', 'init 1', 'init 5', to restart the system and get back to the kde system. On kubuntu, it's easiest to just reboot.

Still looking for clues... I don't have this problem at present but I have in the past before I reverted to an older KDE version.

If we solve this issue for you, I might go back to the newer distro myself.

.
 
Old 01-23-2012, 11:13 AM   #24
amgilman
LQ Newbie
 
Registered: Mar 2011
Posts: 12

Original Poster
Rep: Reputation: 0
I certainly appreciate these suggestions, but I regret to say that I have thrown in the towel and have installed another distro (Debian). This, of course, comes with its own quirks (no GTK+3.0 that I can readily find).

I am almost persuaded to go back to the KDE environment (PClinuxOS) just to track down this problem. However, now I am beginning to think that the flaw may be with some gtk affiliated files not being load (for instance, perhaps the pixbuf file), although this might not explain why something runs from the command line but not from GUI.

Perhaps people have recommendations for introductory books about linux systems that might help?

Thanks again.
 
Old 01-23-2012, 09:25 PM   #25
rainbowsally
Member
 
Registered: Oct 2011
Posts: 47
Blog Entries: 138

Rep: Reputation: Disabled
Quote:
Originally Posted by amgilman View Post
I certainly appreciate these suggestions, but I regret to say that I have thrown in the towel and have installed another distro (Debian). This, of course, comes with its own quirks (no GTK+3.0 that I can readily find).

I am almost persuaded to go back to the KDE environment (PClinuxOS) just to track down this problem. However, now I am beginning to think that the flaw may be with some gtk affiliated files not being load (for instance, perhaps the pixbuf file), although this might not explain why something runs from the command line but not from GUI.

Perhaps people have recommendations for introductory books about linux systems that might help?

Thanks again.
Best of luck to you. But once you start shopping it's often hard to stop... something's gone wrong in paradise lately.

Thanks for the conversations.
 
Old 01-26-2012, 03:21 PM   #26
rainbowsally
Member
 
Registered: Oct 2011
Posts: 47
Blog Entries: 138

Rep: Reputation: Disabled
[Edited: 'exec' to 'shell-exec' due to name conflict with another commandline function.]

Got a hit, I think.

Even my *.exec (bash scripts that run gui apps) work.

amgilman:

If you happen to still have your KDE setup sitting around, it's basically a throw-away by now, right?

Been looking at several angles from HOME/.local/applications/ files (interesting, by the way) to this, which looks like it will at least work for me.

Here's a tool you can use to test and try to launch these gizmos. Might work on other distros (e.g., kubuntu possibly even gnome with the xdg-mime app.)

#file: exec (executable script) -rs
file: shell-exec (executable script)
purpose: run executable programs when clicked or ENTER key when selected.
[/code]
#!/bin/sh

# for testing only... remove when no longer needed
msg="
PWD= $PWD
PATH= $PATH
FILE= $1
LD_LIBRARY_PATH = $LD_LIBRARY_PATH
"
kdialog -msgbox "$msg"
# or.. xmessage "$msg"

# Add the real code as needed here, for example,
cd `dirname "$0"` # to go to the directory where the file was clickded on
"$1" # run it -- only tested on openSUSE so far, I suspect kubuntu won't play tho.

[/code]

The test is: make sure the dialog pops up. Run it from a commandline with no parameters and it should still at least show the popup.

If that works for you: You can use the 'systemsettings' program as root to set and remember this file association for an executable binary or you can do it as a regular user to give only the current user this ability.

This can also be done on the commandline using the 'xdg-mime' application which I think may be programmed better than it's documentated.

Appears to works for openSUSE. (Even my *.exec files now launch when I press ENTER on them but this needs more testing.) May require additional tweeks in kubuntu to get both the PATH and LD_LIBRARY_PATH and whatever else that might getting fouled up on your system. May not.

And there may yet be other hitches, but it's getting close.

This post applies to my "Need to regain lost functionality in KDE" post also.
http://www.linuxquestions.org/questi...65#post4574765

-----------------------
* KDE again: If they don't like this criticism, they can go around and see what the distros are doing to their software and disenfrachise them if they don't get on the ball. Or if KDE is at fault, the distros should start filing bug reports of their own. That is if any of the developers actually use the systems they are developing which seems very unlikely.

And BOTH should encourage, not discourage, attack or ban those who are willing to do the mid- to low-level work on an installed system that they themselves should have been doing.

Last edited by rainbowsally; 01-26-2012 at 06:16 PM. Reason: name conflict in program
 
Old 01-27-2012, 09:05 AM   #27
amgilman
LQ Newbie
 
Registered: Mar 2011
Posts: 12

Original Poster
Rep: Reputation: 0
I admire your tenacity.

Thank you very much for this. I am not sure exactly where I am. I have been trying out various distros (currently Ubuntu). As you said, once you start, you just keep going. Your success encourages me to give OpenSuse a try.

Thank you.
 
Old 01-28-2012, 03:16 AM   #28
rainbowsally
Member
 
Registered: Oct 2011
Posts: 47
Blog Entries: 138

Rep: Reputation: Disabled
Quote:
Originally Posted by amgilman View Post
I admire your tenacity.

Thank you very much for this. I am not sure exactly where I am. I have been trying out various distros (currently Ubuntu). As you said, once you start, you just keep going. Your success encourages me to give OpenSuse a try.

Thank you.
I got the (alleged) "finalized" 11.x version which was 11.4.

I think I'd avoid 12.x.
 
Old 01-30-2012, 12:13 PM   #29
amgilman
LQ Newbie
 
Registered: Mar 2011
Posts: 12

Original Poster
Rep: Reputation: 0
I had already loaded the 12.4 version before receiving your caution. So far, it is behaving itself (other than not showing frame borders on the little gui programs I have come up with - a small irritation). What should I be watching out for?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
problem running executable kostis Linux - Newbie 14 03-08-2007 04:57 AM
problem running executable kostis Linux - Software 1 03-05-2007 05:33 PM
Running a Java executable class from another executable class LUB997 Programming 22 07-24-2005 05:57 AM
Running an executable. wesleyarchbell Linux - Software 4 05-03-2005 04:50 AM
running an executable wogga Linux - Software 8 06-12-2004 05:21 AM


All times are GMT -5. The time now is 08:24 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration