Works from console but not when clicked in KDE


 
Thread Tools Search this Thread
Top Forums Programming Works from console but not when clicked in KDE
# 8  
Old 04-23-2007
Quote:
Originally Posted by jasonkb
Still leaves me with the problem of determining where the program is actually located so I could read in config files.
Or why not have a look and see how other applications solve problems like this on UNIX?

Let application name="foo"

UNIX apps typically do the following....

1. check $HOME directory for directory called .foo and finds config in there, such as $HOME/.foo/foo.conf

2. check a package directory, eg /usr/pkg/etc/foo.conf or /opt/MYfoo/etc/foo.conf

3. check the gobals, /etc/foo.conf

4. use sensible defaults

5. have a wrapper script that does the setting up of environment before running the actually binary with exec, allows installation to code directory paths in a shell script outside of the binary.

NB, There is no portable way to determine the filename of a program at startup.
# 9  
Old 04-23-2007
Those last suggestions of yours were really good. I had a look in the ~/ dir and ls -a showed a hidden directory for every program I have installed. When I checked in each they had funnily enough config files that as you said:

had package lists and sensible program defaults in them.

I think I'll copy that style of application launching.
Thanks for your patience, it has been really helpful for me.

Jason.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

IP Console Vs Serial console.

Hi Gurus, Can some one explain me the difference between a IP console and a serial console. (1 Reply)
Discussion started by: rama krishna
1 Replies

2. Solaris

Trap signal on Window Manager "X" button clicked?

Well, my first post... thanks in advance! Can applications be notified of the X Window close (with "X" button) so the signal handler can run a cleanup process method? About the app: built with GNU C/C++ on Solaris 10, with WxWidgets. It is launched by a shell script as a background task. The... (2 Replies)
Discussion started by: HandsOGold
2 Replies

3. AIX

SSH login hangs, serial console works

Server, running AIX 6.1 developed strange problem when logging in via SSH -- ssh client hangs without any error. It is possible to run commands on server, using ssh ("ssh servername ls -l" is OK) It is possible to log in normally, using serial console connected to server. It was possible to... (2 Replies)
Discussion started by: ivar.zarans
2 Replies

4. UNIX for Dummies Questions & Answers

Windows to Linux remote console using VNC brings up blank console screen with only mouse pointer

:confused:Hi This was installed on the Linux box a few weeks back by a guy that no longer works for us. All worked fine until last week. Now when we connect its just a blank screen with no icons. I get a whole bunch of errors when starting the service too: Tue Feb 23 14:29:45 2010 ... (1 Reply)
Discussion started by: wbdevilliers
1 Replies

5. Shell Programming and Scripting

how to access console of a switch having rj45 on switch side to db 9 female on pc side console cable

hi, how to access console of a switch having rj45 on switch side to db 9 female on pc side console cable which needs to be connected to one console server having rj11 on its side and db 9 female on other end.i.e. on switch side,console cable has rj45 and db 9 pin female connector on other side of... (1 Reply)
Discussion started by: pankajd
1 Replies

6. UNIX for Dummies Questions & Answers

KDE on Solaris ?

I want to install KDE on my Solaris PC , I downloaded solaris companion CD and question is there KDE available to install because I want that all my households work on one stable PC , but one condition is they must have K3B for burning files , and some GUI torrent program for downloading like Vuze... (2 Replies)
Discussion started by: solaris_user
2 Replies

7. UNIX for Advanced & Expert Users

console /dev/console get image

We are using software (Pegasys) which runs on SunOS 5.8 and reads images from a Philips nuclear camera. The software is designed to run from the console. I need to be able to capture the images it produces on the display. The caveat is that I cannot use the X Windows display because the X Server... (3 Replies)
Discussion started by: sreyes27
3 Replies

8. What is on Your Mind?

KDE names

I was kinda bored one day, so I renamed my files in KDE. Here are some examples: 1) I renamed my Hard Drive "Komputer" 2) I renamed my Trashcan to "Krap Bin" I'm kinda stuck on those two and I would like some suggestions on other file names. Please help a bored luser! ^_^ (1 Reply)
Discussion started by: gnerd
1 Replies

9. UNIX for Dummies Questions & Answers

How To...KDE on Solaris 8

I have my shinny new SunFire 280 server with a fresh copy of Solaris 8 installed. I installed the options CD which includes KDE. I can't seem to get it to work. (This is what happens when management gives a Unix box to an x86 Network Admin and says "Figure it out" ) I have played with Mandrake and... (1 Reply)
Discussion started by: RandySmith23
1 Replies

10. UNIX Desktop Questions & Answers

Kde 3.0

Hello, i,ve installed suse with kde 3.0, I had never used an X for unix before. So I don't know much. Most things were easy to find, but what anoyes me a lot is that the desktop is larger than mij monitor, so I have to move my mouse to see the rest of the desktop. I've tried to set the... (1 Reply)
Discussion started by: counTnegaTive
1 Replies
Login or Register to Ask a Question