Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#38544 closed defect (worksforme)

Kate cannot be launched from the command line

Reported by: rob.edgerley@… Owned by: NicosPavlov
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc:
Port: kate

Description

Hi all,

After downloading kate, I was expecting to be able to launch the application by simply writing 'kate' into the terminal. However, this turns out not to be the case. Ive made sure to do all of the following:

sudo chown -R $USER ~/Library/Preferences/KDE sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist

but alas, no joy. Any ideas here?

Furthermore: as a workaround I made an alias in my .bash_profile as follows:

alias kate='open -a kate'

which kind of works, but it's quite odd. If I then type into the terminal....

kate <file_i_want_to_open_and_edit>

....then kate launches, but not with the file I specified. Instead, an untitled blank file.

Any suggestions how I might go about solving this problem will be greatly appreciated.

  • Rob

Change History (6)

comment:1 Changed 11 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to nicos@…
Port: kate added
Summary: KDE - Kate LaunchKate cannot be launched from the command line
Type: requestdefect

Please remember to fill in the Port field and Cc the maintainer.

comment:2 Changed 11 years ago by NicosPavlov

KDE ports usually install binaries as application bundles in the macports application directory, so there should be an application bundle in /Applications/MacPorts/KDE4/ (if you use default settings) that can be double-clicked on.
So, if there is really a need to launch kate through the Terminal instead of through the Finder, running

/Applications/MacPorts/KDE4/kate.app/Contents/MacOS/kate

should work.

Additionally, I think the command

sudo chown -R $USER ~/Library/Preferences/KDE

is not needed. You can also refer to Installing KDE for details.

Does this answer the question, or is there an issue I am missing ?

comment:3 in reply to:  2 Changed 11 years ago by rob.edgerley@…

Hi, thanks for the reply!

No, this doesn't really help. I don't see the advantage of launching kate via the terminal using:

/Applications/MacPorts/KDE4/kate.app/Contents/MacOS/kate

over the method I have already noted. i.e.

alias kate='open -a kate'

they both behave in the same, and both do not open the file I have specified to open. Your suggestion also seems to launch an additional terminal window.

I simply want to launch kate using the terminal, as I already use it for most things. If it's not possible, it's ok, i'll just continue to use nedit.

Thanks for taking the time to reply though!

comment:4 Changed 11 years ago by rob.edgerley@…

Hi nicos@…,

Sorry and sorry again. I was in a rush and I didn't test this correctly. Indeed, this does exactly what I want.

Thanks!

comment:5 Changed 11 years ago by NicosPavlov

Resolution: worksforme
Status: newclosed

Good it works, I was just answering. I put it down here for the sake of completeness, or if someone else runs into this.

Adding the file as an argument should open it. So by putting

alias kate='/Applications/MacPorts/KDE4/kate.app/Contents/MacOS/kate'

in the .profile file for the case of default MacPorts paths, it should be possible to run

kate <file>

to open it through the Terminal.

comment:6 in reply to:  5 Changed 11 years ago by rob.edgerley@…

Hi again,

Indeed that works.The way I actually solved it, rather than adding yet another alias to the .profile file, was to add a logical link to

/Applications/MacPorts/KDE4/kate.app/Contents/MacOS/kate

in the following

/opt/local/bin

I did this by navigating to the above location, and typing (as root) the following command:

ln -s /Applications/MacPorts/KDE4/kate.app/Contents/MacOS/kate kate

Now simply typing:

kate <file> &

in the terminal (or X11) does the trick.

Hope this helps someone out there!

Last edited 11 years ago by rob.edgerley@… (previous) (diff)
Note: See TracTickets for help on using tickets.