Xfce Forum

Sub domains
 

You are not logged in.

#1 2011-08-01 08:54:33

clubsoda
Member
Registered: 2011-08-01
Posts: 1

Running desktop starters in terminal using konsole as default terminal

Hi@all,

Edit: I'll never listen to my co-workers again as they told me it's Xfce 4.4 running on that computer. But now I actually looked myself and it says  Version 4.7.0 (Xfce 4.6). Thanks for hinting at that!

I'm using Xfce 4.7.0 with OpenSUSE 11.3 (the computer has no internet access for security reasons, and I only got the packages from the SUSE DVD). I really like using Xfce, but I need to use a terminal with the ability to search through the terminal output. So I changed the default terminal (under "Preferred Applications") from Xfce-terminal to KDE's "konsole". When I now open a terminal, it works fine and konsole is started. But when I click a starter from the desktop that should be "run in terminal", for example a link to a script which starts JBoss and continuously outputs its log, it starts konsole without doing anything else, not even in the background. The konsole terminal just pops up, nothing else happens. Is that a bug or a feature or is it fixed in the newer versions? Is there a workaround?

Thanks in advance,

clubsoda

Last edited by clubsoda (2011-08-01 09:30:05)

Offline

#2 2011-08-01 09:16:25

Nick
Dev
From: ~
Registered: 2005-02-17
Posts: 1,144
Website

Re: Running desktop starters in terminal using konsole as default terminal

4.4? That's like ages ago, I can't even remember how we implemented it at the time...

Offline

#3 2012-06-10 05:59:06

wojtek
Member
Registered: 2012-06-10
Posts: 7

Re: Running desktop starters in terminal using konsole as default terminal

Apologies upfront for bumping up old topic, but I'm now on xfce4.10 and have the same issue... I've tried setting :: /usr/bin/konsole "%s" :: but this doesn't work and I always end up in default directory... How can this be resolved?

Offline

#4 2012-06-10 14:40:30

secipolla
Member
Registered: 2012-01-15
Posts: 393

Re: Running desktop starters in terminal using konsole as default terminal

What distribution do you use?
In Debian, for instance, in those cases it uses the configured x-terminal-emulator with update-alternatives (i.e. the system-wide settings).

Offline

#5 2012-06-10 14:45:21

wojtek
Member
Registered: 2012-06-10
Posts: 7

Re: Running desktop starters in terminal using konsole as default terminal

ArchLinux, I changes the defaults using Settings -> Preferred Applications -> Utilities and then selected desired Terminal emulator.

I don't think there is something similar to 'update-alternatives' on arch...

Offline

#6 2012-06-10 16:01:14

secipolla
Member
Registered: 2012-01-15
Posts: 393

Re: Running desktop starters in terminal using konsole as default terminal

I don't know if it's the same issue but I use sakura as the default terminal. Then if I try to use the run box built-in actions (which uses exo-open) it also just opens the terminal but fails to launch the command.
It's an exo-open issue. sakura uses common options to launch commands (-x or -e to be compatible with xterm) so maybe it's some bug here.

Offline

#7 2012-06-10 17:23:35

wojtek
Member
Registered: 2012-06-10
Posts: 7

Re: Running desktop starters in terminal using konsole as default terminal

Looks like the exo-open is the culprit but then - how to resolve the issue?

Offline

#8 2012-06-10 19:02:44

secipolla
Member
Registered: 2012-01-15
Posts: 393

Re: Running desktop starters in terminal using konsole as default terminal

There aren't many terminal apps that have desktop files.
What you can do is copy the ones you have from /usr/share/applications to ~/.local/share/applications then edit them.
For example, if you had an htop.desktop file with
Exec=htop
Terminal=true

Then you would leave it like this
Exec=/usr/bin/konsole -e htop
Terminal=(true or false, I don't know if it would make any difference)

*I'm assuming konsole uses -e for executing, but it may be -x or something else (look at the manual if you don't know).

Offline

#9 2012-06-11 12:30:50

secipolla
Member
Registered: 2012-01-15
Posts: 393

Re: Running desktop starters in terminal using konsole as default terminal

As always, when resting I figured it.
Open the Preferred Applications settings, go to the terminal emulator option, click to add Other... and you will be presented the current '/usr/bin/konsole "%s"', then edit it to /usr/bin/konsole -e "%s"

As for if it's a bug or not, if it automatically appends the "%s" then it should ask for the executable option too, but if it doesn't do it automatically then we should figure the correct command to enter (but it at least should have a tooltip or something telling us to append the executable option).

Last edited by secipolla (2012-06-11 12:34:03)

Offline

#10 2012-06-11 14:17:24

wojtek
Member
Registered: 2012-06-10
Posts: 7

Re: Running desktop starters in terminal using konsole as default terminal

unfortunately this doesn't seem to work either sad

Offline

#11 2012-06-11 15:57:03

secipolla
Member
Registered: 2012-01-15
Posts: 393

Re: Running desktop starters in terminal using konsole as default terminal

It works for exo-open and the run dialogue. But if it isn't working for the desktop files (menu items) then use the suggestion I gave on the earlier post.

Offline

#12 2012-06-12 08:17:50

wojtek
Member
Registered: 2012-06-10
Posts: 7

Re: Running desktop starters in terminal using konsole as default terminal

OK, I don't know how editing .desktop file would allow me to have an application open specific path. For example I'm browsing in thunar some path and decide I want an terminal window with this path so from the context menu I select "Open terminal here" and it should open given path...
Also - the same issue happens with dolphin (I find it more convenient than thunar - for example tree in both panel and file list).

Offline

#13 2012-06-12 13:15:19

secipolla
Member
Registered: 2012-01-15
Posts: 393

Re: Running desktop starters in terminal using konsole as default terminal

You mean that when you click on "Open Terminal Here" it doesn't open on the current directory?
Then maybe your ~/.config/Thunar/uca.xml is corrupted.
The command is

exo-open --working-directory %f --launch TerminalEmulator

But probably the one below would work too

konsole %F

Note that the format changed from 4.8 to 4.10 (but it should work fine with the old format). I'll post mine so you can use what you like:

<?xml encoding="UTF-8" version="1.0"?>
<actions>
<action>
	<icon>utilities-terminal</icon>
	<name>Open Terminal Here</name>
	<command>exo-open --working-directory %f --launch TerminalEmulator</command>
	<description>Open terminal in this directory</description>
	<patterns>*</patterns>
	<startup-notify/>
	<directories/>
</action>
<action>
	<icon>accessories-text-editor</icon>
	<name>Edit as root</name>
	<command>beesu leafpad %F</command>
	<description>Edit files as root</description>
	<patterns>*</patterns>
	<startup-notify/>
	<other-files/>
	<text-files/>
</action>
<action>
	<icon>Thunar</icon>
	<name>Open root Thunar</name>
	<command>beesu Thunar %F</command>
	<description>Open Thunar here as root</description>
	<patterns>*</patterns>
	<startup-notify/>
	<directories/>
</action>
<action>
	<icon>gksu-root-terminal</icon>
	<name>Open root Terminal Here</name>
	<command>beesu sakura -%F</command>
	<description>Open terminal here as root</description>
	<patterns>*</patterns>
	<startup-notify/>
	<directories/>
</action>
<action>
	<icon>imagemagick</icon>
	<name>Edit Image</name>
	<command>display %f</command>
	<description>Edit image with ImageMagick</description>
	<patterns>*</patterns>
	<startup-notify/>
	<image-files/>
</action>
<action>
	<icon>stock_folder-copy</icon>
	<name>Copy To...</name>
	<command>cp %F $(zenity --file-selection --directory)</command>
	<description>Copy this item</description>
	<patterns>*</patterns>
	<startup-notify/>
	<directories/>
	<audio-files/>
	<image-files/>
	<other-files/>
	<text-files/>
	<video-files/>
</action>
<action>
	<icon>stock_folder-move</icon>
	<name>Move To...</name>
	<command>mv %F $(zenity --file-selection --directory)</command>
	<description>Move this item</description>
	<patterns>*</patterns>
	<startup-notify/>
	<directories/>
	<audio-files/>
	<image-files/>
	<other-files/>
	<text-files/>
	<video-files/>
</action>
</actions>

Last edited by secipolla (2012-06-12 13:18:47)

Offline

#14 2012-06-12 13:45:25

wojtek
Member
Registered: 2012-06-10
Posts: 7

Re: Running desktop starters in terminal using konsole as default terminal

> You mean that when you click on "Open Terminal Here" it doesn't open on the current directory?

exactly, and my uca.xml is along the lines of yours (same command).

I've changed it to <command>/usr/bin/konsole --workdir  %f</command> and now it works. However an issue remain - I have (and love it) directory menu in my panel and again - I have a link to open file browser and terminal for given path but dolphin and konsole open default path -- where can this be fixed?

Offline

#15 2012-06-12 14:16:01

secipolla
Member
Registered: 2012-01-15
Posts: 393

Re: Running desktop starters in terminal using konsole as default terminal

Try changing in the Preferred Applications the terminal emulator to /usr/bin/konsole --workdir -x "%s" and see if Dolphin has any similar option that it needs to be opened.
I think it doesn't but what may be interfering is that Dolphin (IIRC) remembers the last opened directory so maybe you have to disable that in its preferences.

Offline

#16 2012-06-12 14:36:47

wojtek
Member
Registered: 2012-06-10
Posts: 7

Re: Running desktop starters in terminal using konsole as default terminal

/usr/bin/konsole --workdir -x "%s" -- nope, still doesn't work.

as for doplhin simply passing a path during startup works like a charm.

bottomline - is there a way to force xfce/preferrend applications to set it so when I want terminal it will be simply executed with given parameter and variable substituted accordingly? however for now it only doesn't work for 'directory menu' in the panel...

Offline

#17 2012-06-12 15:07:03

secipolla
Member
Registered: 2012-01-15
Posts: 393

Re: Running desktop starters in terminal using konsole as default terminal

The helper files are in ~/.local/share/xfce4/helpers
There you may try to edit the one for konsole (TerminalEmulator) and put the --workdir in the X-XFCE-Commands line.
As for Dolphin, all I can think of is if you play with its settings and see if something is interfering.
Also see if starting/not starting KDE services in the Session and Startup settings make any difference.

I use the Directory Menu plugin too but it works fine with Thunar/sakura.

Offline

#18 2012-06-16 18:11:16

secipolla
Member
Registered: 2012-01-15
Posts: 393

Re: Running desktop starters in terminal using konsole as default terminal

Wojtek, I just noticed that I was talking about the 'Directory Menu' plugin and you were talking about the 'Places' plugin.
I don't have the latter installed here (although I may install it to see if it suits me) so I actually don't know how well it works.

Offline

Board footer

Powered by FluxBB