Re: Spec to define the default terminal?

2017-07-25 Thread Vladimir Kudrya

  
  
 I would very much like to receive some additional feedback and a
  rough assessment of whether this concept has any chance of being
  turned into a spec.

2017-05-25 18:21, Vladimir Kudrya
  пишет:


  
  Script updated.
  Now the list of config files is pregenerated based on
$CONFIG_HIERARCHY and $XDG_CURRENT_DESKTOP treated as lists.
  
  
  2017-05-25 17:07, Vladimir Kudrya
пишет:
  
  

From here: https://specifications.freedesktop.org/mime-apps-spec/latest/ar01s02.html
 
This is determined from taking the
  ascii-lowercase form of a component the environment variable
  $XDG_CURRENT_DESKTOP, which is a colon-separated list of names
  that the current desktop is known as.
I'll make the changes accordingly.



2017-05-25 17:02, Roman
  Chistokhodov пишет:


  
There's already lowercase version in XDG_MENU_PREFIX
  variable (it also usually includes trailing '-') which is
  part of menu spec. But I'm not sure if it's applicable
  here.

  
  
On Thu, May 25, 2017 at 4:59 PM,
  Vladimir Kudrya 
  wrote:
  

  Merged, thanks!
  $XDG_SESSION_DESKTOP... Not sure. Probably it's
from pam_systemd. 
It would be more reliable to take lowercase of
$XDG_CURRENT_DESKTOP then.
  
  
  2017-05-25
16:53, Roman Chistokhodov пишет:
  
  

  

  I found error in processing TryExec. Made
pull request.
  
  
  What the specification is XDG_SESSION_DESKTOP
  part of?

  On Thu, May 25, 2017
at 2:03 PM, Vladimir Kudrya 
wrote:
I'm backing
  up my proposal with some code:
  
  https://github.com/Vladimir-csp/xdg-terminal-exec
  
  Please test.
  
  
  2017-05-25 10:09, Vladimir Kudrya пишет:
  

   So now
xdg-termial is a collection of
workarouds to tie different DE's
approaches together. Just like
xdg-open.
IMHO, there should be a movement
towards proper standards.

@Simon, with your remarks taken into
accout, here is an update:
Using desktop entries to define
terminals gives advantages to
downstream tools (selector GUIs,
etc.) by providing proper
descriptions, l10n.
Places to look could be extended
beyond /usr, into a proper
${XDG_DATA_[HOME|DIRS]} hierarchy,
so it would look like this:

Terminal descriptios:
~/.local/share/xdg-terminals
($XDG_DATA_HOME)
{/usr/local/share,/usr/share}/xdg-terminals
($XDG_DATA_DIRS)

Configs:
~/.config/$desktop-xdg-terminals.list
($XDG_CONFIG_HOME)
~/.config/xdg-terminals.list
/etc/xdg/$desktop-xdg-terminals.list
($XDG_CONFIG_DIRS)
/etc/xdg/xdg-terminals.list

If this logic would be embeded into
xdg-terminal, that would be a 

Re: Spec to define the default terminal?

2017-05-25 Thread Vladimir Kudrya

  
  
Script updated.
Now the list of config files is pregenerated based on
  $CONFIG_HIERARCHY and $XDG_CURRENT_DESKTOP treated as lists.


2017-05-25 17:07, Vladimir Kudrya
  пишет:


  
  From here:
https://specifications.freedesktop.org/mime-apps-spec/latest/ar01s02.html
   
  This is determined from taking the
ascii-lowercase form of a component the environment variable
$XDG_CURRENT_DESKTOP, which is a colon-separated list of names
that the current desktop is known as.
  I'll make the changes accordingly.
  
  
  
  2017-05-25 17:02, Roman Chistokhodov
пишет:
  
  

  There's already lowercase version in XDG_MENU_PREFIX
variable (it also usually includes trailing '-') which is
part of menu spec. But I'm not sure if it's applicable here.
  


  On Thu, May 25, 2017 at 4:59 PM,
Vladimir Kudrya 
wrote:

  
Merged, thanks!
$XDG_SESSION_DESKTOP... Not sure. Probably it's from
  pam_systemd. 
  It would be more reliable to take lowercase of
  $XDG_CURRENT_DESKTOP then.


2017-05-25
  16:53, Roman Chistokhodov пишет:


  

  
I found error in processing TryExec. Made
  pull request.


What the specification is XDG_SESSION_DESKTOP
part of?
  
On Thu, May 25, 2017 at
  2:03 PM, Vladimir Kudrya 
  wrote:
  I'm backing up
my proposal with some code:

https://github.com/Vladimir-csp/xdg-terminal-exec

Please test.


2017-05-25 10:09, Vladimir Kudrya пишет:

  
 So now
  xdg-termial is a collection of
  workarouds to tie different DE's
  approaches together. Just like
  xdg-open.
  IMHO, there should be a movement
  towards proper standards.
  
  @Simon, with your remarks taken into
  accout, here is an update:
  Using desktop entries to define
  terminals gives advantages to
  downstream tools (selector GUIs, etc.)
  by providing proper descriptions,
  l10n.
  Places to look could be extended
  beyond /usr, into a proper
  ${XDG_DATA_[HOME|DIRS]} hierarchy, so
  it would look like this:
  
  Terminal descriptios:
  ~/.local/share/xdg-terminals
  ($XDG_DATA_HOME)
  {/usr/local/share,/usr/share}/xdg-terminals
  ($XDG_DATA_DIRS)
  
  Configs:
  ~/.config/$desktop-xdg-terminals.list
  ($XDG_CONFIG_HOME)
  ~/.config/xdg-terminals.list
  /etc/xdg/$desktop-xdg-terminals.list
  ($XDG_CONFIG_DIRS)
  /etc/xdg/xdg-terminals.list
  
  If this logic would be embeded into
  xdg-terminal, that would be a great
  start.
  
  2017-05-25 09:16, Simon Lees wrote:
   We already
have the xdg-terminal binary which
launches the terminal
based off the currently running
desktop. I think a better 

Re: Spec to define the default terminal?

2017-05-25 Thread Vladimir Kudrya

  
  
From here:
https://specifications.freedesktop.org/mime-apps-spec/latest/ar01s02.html

  This is determined from taking the
ascii-lowercase form of a component the environment variable
$XDG_CURRENT_DESKTOP, which is a colon-separated list of names
that the current desktop is known as.
  I'll make the changes accordingly.




2017-05-25 17:02, Roman Chistokhodov
  пишет:


  
There's already lowercase version in XDG_MENU_PREFIX
  variable (it also usually includes trailing '-') which is part
  of menu spec. But I'm not sure if it's applicable here.

  
  
On Thu, May 25, 2017 at 4:59 PM,
  Vladimir Kudrya 
  wrote:
  

  Merged, thanks!
  $XDG_SESSION_DESKTOP... Not sure. Probably it's from
pam_systemd. 
It would be more reliable to take lowercase of
$XDG_CURRENT_DESKTOP then.
  
  
  2017-05-25
16:53, Roman Chistokhodov пишет:
  
  

  

  I found error in processing TryExec. Made
pull request.
  
  
  What the specification is XDG_SESSION_DESKTOP part
  of?

  On Thu, May 25, 2017 at
2:03 PM, Vladimir Kudrya 
wrote:
I'm backing up my
  proposal with some code:
  
  https://github.com/Vladimir-csp/xdg-terminal-exec
  
  Please test.
  
  
  2017-05-25 10:09, Vladimir Kudrya пишет:
  

   So now
xdg-termial is a collection of
workarouds to tie different DE's
approaches together. Just like xdg-open.
IMHO, there should be a movement towards
proper standards.

@Simon, with your remarks taken into
accout, here is an update:
Using desktop entries to define
terminals gives advantages to downstream
tools (selector GUIs, etc.) by providing
proper descriptions, l10n.
Places to look could be extended beyond
/usr, into a proper
${XDG_DATA_[HOME|DIRS]} hierarchy, so it
would look like this:

Terminal descriptios:
~/.local/share/xdg-terminals
($XDG_DATA_HOME)
{/usr/local/share,/usr/share}/xdg-terminals
($XDG_DATA_DIRS)

Configs:
~/.config/$desktop-xdg-terminals.list
($XDG_CONFIG_HOME)
~/.config/xdg-terminals.list
/etc/xdg/$desktop-xdg-terminals.list
($XDG_CONFIG_DIRS)
/etc/xdg/xdg-terminals.list

If this logic would be embeded into
xdg-terminal, that would be a great
start.

2017-05-25 09:16, Simon Lees wrote:
 We already
  have the xdg-terminal binary which
  launches the terminal
  based off the currently running
  desktop. I think a better approach
  would
  be to integrate with that existing
  infrastructure, it could be modified
  for example to check for the existence
  of a config file in 1 maybe
  several dirs (I guess a sysadmin may
  want to configure a default
  

Re: Spec to define the default terminal?

2017-05-25 Thread Roman Chistokhodov
There's already lowercase version in XDG_MENU_PREFIX variable (it also
usually includes trailing '-') which is part of menu spec. But I'm not sure
if it's applicable here.

On Thu, May 25, 2017 at 4:59 PM, Vladimir Kudrya 
wrote:

> Merged, thanks!
>
> $XDG_SESSION_DESKTOP... Not sure. Probably it's from pam_systemd.
> It would be more reliable to take lowercase of $XDG_CURRENT_DESKTOP then.
>
> 2017-05-25 16:53, Roman Chistokhodov пишет:
>
> I found error in processing TryExec. Made pull request.
>
> What the specification is XDG_SESSION_DESKTOP part of?
>
> On Thu, May 25, 2017 at 2:03 PM, Vladimir Kudrya 
> wrote:
>
>> I'm backing up my proposal with some code:
>>
>> https://github.com/Vladimir-csp/xdg-terminal-exec
>>
>> Please test.
>>
>>
>> 2017-05-25 10:09, Vladimir Kudrya пишет:
>>
>> So now xdg-termial is a collection of workarouds to tie different DE's
>>> approaches together. Just like xdg-open.
>>> IMHO, there should be a movement towards proper standards.
>>>
>>> @Simon, with your remarks taken into accout, here is an update:
>>> Using desktop entries to define terminals gives advantages to downstream
>>> tools (selector GUIs, etc.) by providing proper descriptions, l10n.
>>> Places to look could be extended beyond /usr, into a proper
>>> ${XDG_DATA_[HOME|DIRS]} hierarchy, so it would look like this:
>>>
>>> Terminal descriptios:
>>> ~/.local/share/xdg-terminals ($XDG_DATA_HOME)
>>> {/usr/local/share,/usr/share}/xdg-terminals ($XDG_DATA_DIRS)
>>>
>>> Configs:
>>> ~/.config/$desktop-xdg-terminals.list ($XDG_CONFIG_HOME)
>>> ~/.config/xdg-terminals.list
>>> /etc/xdg/$desktop-xdg-terminals.list ($XDG_CONFIG_DIRS)
>>> /etc/xdg/xdg-terminals.list
>>>
>>> If this logic would be embeded into xdg-terminal, that would be a great
>>> start.
>>>
>>> 2017-05-25 09:16, Simon Lees wrote:
>>>
 We already have the xdg-terminal binary which launches the terminal
 based off the currently running desktop. I think a better approach would
 be to integrate with that existing infrastructure, it could be modified
 for example to check for the existence of a config file in 1 maybe
 several dirs (I guess a sysadmin may want to configure a default
 terminal for all his users).

 That config file would contain the path to the terminal followed by the
 exec command. This approach is less secure as someone could modify the
 config file without you realising (I guess this could happen anyway).

 I don't like the idea of describing exec arguments only somewhere in
 /usr, it would mean that if I was working on a machine that I didn't
 have root access to and I wanted to use some less popular or new
 terminal that hadn't been added to the list yet I wouldn't be able to. I
 also wouldn't be able to use a terminal that I had built from source in
 my home dir and added to my path.

 I also think in the days of the X11 / wayland transition prefixing the
 config files with xdg- rather then x- is a better approach, I may be on
 my own with that though.

 Cheers


>>> ___
>>> xdg mailing list
>>> xdg@lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/xdg
>>>
>>
>> ___
>> xdg mailing list
>> xdg@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/xdg
>>
>
>
>
___
xdg mailing list
xdg@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/xdg


Re: Spec to define the default terminal?

2017-05-25 Thread Vladimir Kudrya

  
  
Merged, thanks!
$XDG_SESSION_DESKTOP... Not sure. Probably it's from pam_systemd.
  
  It would be more reliable to take lowercase of
  $XDG_CURRENT_DESKTOP then.


2017-05-25 16:53, Roman Chistokhodov
  пишет:


  
I found error in processing TryExec. Made pull request.


What the specification is XDG_SESSION_DESKTOP part of?
  
On Thu, May 25, 2017 at 2:03 PM,
  Vladimir Kudrya 
  wrote:
  I'm
backing up my proposal with some code:

https://github.com/Vladimir-csp/xdg-terminal-exec

Please test.


2017-05-25 10:09, Vladimir Kudrya пишет:

  

  So now xdg-termial is a collection of workarouds to
  tie different DE's approaches together. Just like
  xdg-open.
  IMHO, there should be a movement towards proper
  standards.
  
  @Simon, with your remarks taken into accout, here is
  an update:
  Using desktop entries to define terminals gives
  advantages to downstream tools (selector GUIs, etc.)
  by providing proper descriptions, l10n.
  Places to look could be extended beyond /usr, into a
  proper ${XDG_DATA_[HOME|DIRS]} hierarchy, so it would
  look like this:
  
  Terminal descriptios:
  ~/.local/share/xdg-terminals ($XDG_DATA_HOME)
  {/usr/local/share,/usr/share}/xdg-terminals
  ($XDG_DATA_DIRS)
  
  Configs:
  ~/.config/$desktop-xdg-terminals.list
  ($XDG_CONFIG_HOME)
  ~/.config/xdg-terminals.list
  /etc/xdg/$desktop-xdg-terminals.list
  ($XDG_CONFIG_DIRS)
  /etc/xdg/xdg-terminals.list
  
  If this logic would be embeded into xdg-terminal, that
  would be a great start.
  
  2017-05-25 09:16, Simon Lees wrote:
  
We already have the xdg-terminal binary which
launches the terminal
based off the currently running desktop. I think a
better approach would
be to integrate with that existing infrastructure,
it could be modified
for example to check for the existence of a config
file in 1 maybe
several dirs (I guess a sysadmin may want to
configure a default
terminal for all his users).

That config file would contain the path to the
terminal followed by the
exec command. This approach is less secure as
someone could modify the
config file without you realising (I guess this
could happen anyway).

I don't like the idea of describing exec arguments
only somewhere in
/usr, it would mean that if I was working on a
machine that I didn't
have root access to and I wanted to use some less
popular or new
terminal that hadn't been added to the list yet I
wouldn't be able to. I
also wouldn't be able to use a terminal that I had
built from source in
my home dir and added to my path.

I also think in the days of the X11 / wayland
transition prefixing the
config files with xdg- rather then x- is a better
approach, I may be on
my own with that though.

Cheers

  
  
  ___
  xdg mailing list
  xdg@lists.freedesktop.org
  https://lists.freedesktop.org/mailman/listinfo/xdg


___
xdg mailing list
xdg@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/xdg
  

  


  


  

___
xdg mailing list
xdg@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/xdg


Re: Spec to define the default terminal?

2017-05-25 Thread Roman Chistokhodov
I found error in processing TryExec. Made pull request.

What the specification is XDG_SESSION_DESKTOP part of?

On Thu, May 25, 2017 at 2:03 PM, Vladimir Kudrya 
wrote:

> I'm backing up my proposal with some code:
>
> https://github.com/Vladimir-csp/xdg-terminal-exec
>
> Please test.
>
>
> 2017-05-25 10:09, Vladimir Kudrya пишет:
>
> So now xdg-termial is a collection of workarouds to tie different DE's
>> approaches together. Just like xdg-open.
>> IMHO, there should be a movement towards proper standards.
>>
>> @Simon, with your remarks taken into accout, here is an update:
>> Using desktop entries to define terminals gives advantages to downstream
>> tools (selector GUIs, etc.) by providing proper descriptions, l10n.
>> Places to look could be extended beyond /usr, into a proper
>> ${XDG_DATA_[HOME|DIRS]} hierarchy, so it would look like this:
>>
>> Terminal descriptios:
>> ~/.local/share/xdg-terminals ($XDG_DATA_HOME)
>> {/usr/local/share,/usr/share}/xdg-terminals ($XDG_DATA_DIRS)
>>
>> Configs:
>> ~/.config/$desktop-xdg-terminals.list ($XDG_CONFIG_HOME)
>> ~/.config/xdg-terminals.list
>> /etc/xdg/$desktop-xdg-terminals.list ($XDG_CONFIG_DIRS)
>> /etc/xdg/xdg-terminals.list
>>
>> If this logic would be embeded into xdg-terminal, that would be a great
>> start.
>>
>> 2017-05-25 09:16, Simon Lees wrote:
>>
>>> We already have the xdg-terminal binary which launches the terminal
>>> based off the currently running desktop. I think a better approach would
>>> be to integrate with that existing infrastructure, it could be modified
>>> for example to check for the existence of a config file in 1 maybe
>>> several dirs (I guess a sysadmin may want to configure a default
>>> terminal for all his users).
>>>
>>> That config file would contain the path to the terminal followed by the
>>> exec command. This approach is less secure as someone could modify the
>>> config file without you realising (I guess this could happen anyway).
>>>
>>> I don't like the idea of describing exec arguments only somewhere in
>>> /usr, it would mean that if I was working on a machine that I didn't
>>> have root access to and I wanted to use some less popular or new
>>> terminal that hadn't been added to the list yet I wouldn't be able to. I
>>> also wouldn't be able to use a terminal that I had built from source in
>>> my home dir and added to my path.
>>>
>>> I also think in the days of the X11 / wayland transition prefixing the
>>> config files with xdg- rather then x- is a better approach, I may be on
>>> my own with that though.
>>>
>>> Cheers
>>>
>>>
>> ___
>> xdg mailing list
>> xdg@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/xdg
>>
>
> ___
> xdg mailing list
> xdg@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/xdg
>
___
xdg mailing list
xdg@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/xdg


Re: Spec to define the default terminal?

2017-05-25 Thread Vladimir Kudrya

I'm backing up my proposal with some code:

https://github.com/Vladimir-csp/xdg-terminal-exec

Please test.


2017-05-25 10:09, Vladimir Kudrya пишет:
So now xdg-termial is a collection of workarouds to tie different DE's 
approaches together. Just like xdg-open.

IMHO, there should be a movement towards proper standards.

@Simon, with your remarks taken into accout, here is an update:
Using desktop entries to define terminals gives advantages to 
downstream tools (selector GUIs, etc.) by providing proper 
descriptions, l10n.
Places to look could be extended beyond /usr, into a proper 
${XDG_DATA_[HOME|DIRS]} hierarchy, so it would look like this:


Terminal descriptios:
~/.local/share/xdg-terminals ($XDG_DATA_HOME)
{/usr/local/share,/usr/share}/xdg-terminals ($XDG_DATA_DIRS)

Configs:
~/.config/$desktop-xdg-terminals.list ($XDG_CONFIG_HOME)
~/.config/xdg-terminals.list
/etc/xdg/$desktop-xdg-terminals.list ($XDG_CONFIG_DIRS)
/etc/xdg/xdg-terminals.list

If this logic would be embeded into xdg-terminal, that would be a 
great start.


2017-05-25 09:16, Simon Lees wrote:

We already have the xdg-terminal binary which launches the terminal
based off the currently running desktop. I think a better approach would
be to integrate with that existing infrastructure, it could be modified
for example to check for the existence of a config file in 1 maybe
several dirs (I guess a sysadmin may want to configure a default
terminal for all his users).

That config file would contain the path to the terminal followed by the
exec command. This approach is less secure as someone could modify the
config file without you realising (I guess this could happen anyway).

I don't like the idea of describing exec arguments only somewhere in
/usr, it would mean that if I was working on a machine that I didn't
have root access to and I wanted to use some less popular or new
terminal that hadn't been added to the list yet I wouldn't be able to. I
also wouldn't be able to use a terminal that I had built from source in
my home dir and added to my path.

I also think in the days of the X11 / wayland transition prefixing the
config files with xdg- rather then x- is a better approach, I may be on
my own with that though.

Cheers



___
xdg mailing list
xdg@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/xdg


___
xdg mailing list
xdg@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/xdg


Re: Spec to define the default terminal?

2017-05-25 Thread Vladimir Kudrya
So now xdg-termial is a collection of workarouds to tie different DE's 
approaches together. Just like xdg-open.

IMHO, there should be a movement towards proper standards.

@Simon, with your remarks taken into accout, here is an update:
Using desktop entries to define terminals gives advantages to downstream 
tools (selector GUIs, etc.) by providing proper descriptions, l10n.
Places to look could be extended beyond /usr, into a proper 
${XDG_DATA_[HOME|DIRS]} hierarchy, so it would look like this:


Terminal descriptios:
~/.local/share/xdg-terminals ($XDG_DATA_HOME)
{/usr/local/share,/usr/share}/xdg-terminals ($XDG_DATA_DIRS)

Configs:
~/.config/$desktop-xdg-terminals.list ($XDG_CONFIG_HOME)
~/.config/xdg-terminals.list
/etc/xdg/$desktop-xdg-terminals.list ($XDG_CONFIG_DIRS)
/etc/xdg/xdg-terminals.list

If this logic would be embeded into xdg-terminal, that would be a great 
start.


2017-05-25 09:16, Simon Lees wrote:

We already have the xdg-terminal binary which launches the terminal
based off the currently running desktop. I think a better approach would
be to integrate with that existing infrastructure, it could be modified
for example to check for the existence of a config file in 1 maybe
several dirs (I guess a sysadmin may want to configure a default
terminal for all his users).

That config file would contain the path to the terminal followed by the
exec command. This approach is less secure as someone could modify the
config file without you realising (I guess this could happen anyway).

I don't like the idea of describing exec arguments only somewhere in
/usr, it would mean that if I was working on a machine that I didn't
have root access to and I wanted to use some less popular or new
terminal that hadn't been added to the list yet I wouldn't be able to. I
also wouldn't be able to use a terminal that I had built from source in
my home dir and added to my path.

I also think in the days of the X11 / wayland transition prefixing the
config files with xdg- rather then x- is a better approach, I may be on
my own with that though.

Cheers



___
xdg mailing list
xdg@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/xdg


Re: Spec to define the default terminal?

2017-05-25 Thread Simon Lees


On 05/25/2017 12:12 PM, Vladimir Kudrya wrote:
> Hello everyone!
> 
> Any news on this?
> 
> I'll expand my previous proposal of xsession-like approach:
> 
> - Terminal emulators with their exec arguments should be described by
> desktop entries in /usr/share/x-terminal-emulators
> - Preferred terminal is configured in
> ${XDG_CONFIG_[HOME|DIRS]}/[$desktop-]x-terminal-emulator.list (hierarchy
> similar to the one in mime-apps-spec)
> - Format would be a simple newline-separated list of desktop entries.
> - Implementations should choose the first available entry in top
> priority config. Move to next priority config if not found. Last
> priority would be a list generated by `ls /usr/share/x-terminal-emulators`.
> 

We already have the xdg-terminal binary which launches the terminal
based off the currently running desktop. I think a better approach would
be to integrate with that existing infrastructure, it could be modified
for example to check for the existence of a config file in 1 maybe
several dirs (I guess a sysadmin may want to configure a default
terminal for all his users).

That config file would contain the path to the terminal followed by the
exec command. This approach is less secure as someone could modify the
config file without you realising (I guess this could happen anyway).

I don't like the idea of describing exec arguments only somewhere in
/usr, it would mean that if I was working on a machine that I didn't
have root access to and I wanted to use some less popular or new
terminal that hadn't been added to the list yet I wouldn't be able to. I
also wouldn't be able to use a terminal that I had built from source in
my home dir and added to my path.

I also think in the days of the X11 / wayland transition prefixing the
config files with xdg- rather then x- is a better approach, I may be on
my own with that though.

Cheers

> 
> 2015-11-03 16:47, Bastien Nocera пишет:
>> On Wed, 2015-10-21 at 19:30 +0200, Per Olofsson wrote:
>>> On 2015-10-20 15:10, Bastien Nocera wrote:
> Apparently GNOME removed the UI for choosing terminal so you have
> to
> use
> the gsettings command to change it.
 No, it doesn't have anything to change it because nobody who might
 care
 has made the changes:
 https://bugzilla.gnome.org/show_bug.cgi?id=627943
>>> I believe GNOME 2 had a UI for choosing the terminal emulator. But I
>>> guess the settings UI was completely rewritten in GNOME 3. Sorry.
>>>
> I was sceptical at first but now I think it might be a good idea,
> although strictly speaking it is an abuse of MIME types. It is
> similar
> to how URIs are handled, with x-scheme-handler/.
 Not really. See the bug above.
>>> I can't find any argument in the bug report for why having a MIME
>>> type
>>> for terminals would be more wrong than x-scheme-handler. Only you
>>> stating so :-)
>> Both mime-type and scheme are metadata to the URL. I'd be fine having a
>> "x-scheme-handler/terminal" mime-type added if they could all handle
>> those URLs. They can't though.
>>
>>> But you're right, it is more of a stretch. At least x-scheme-handler
>>> is
>>> about applications opening stuff.
>>>
>> ___
>> xdg mailing list
>> xdg@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/xdg
> 
> ___
> xdg mailing list
> xdg@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/xdg

-- 

Simon Lees (Simotek)http://simotek.net

Emergency Update Team   keybase.io/simotek
SUSE Linux   Adelaide Australia, UTC+10:30
GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B



signature.asc
Description: OpenPGP digital signature
___
xdg mailing list
xdg@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/xdg


Re: Spec to define the default terminal?

2017-05-24 Thread Vladimir Kudrya

Hello everyone!

Any news on this?

I'll expand my previous proposal of xsession-like approach:

- Terminal emulators with their exec arguments should be described by 
desktop entries in /usr/share/x-terminal-emulators
- Preferred terminal is configured in 
${XDG_CONFIG_[HOME|DIRS]}/[$desktop-]x-terminal-emulator.list (hierarchy 
similar to the one in mime-apps-spec)

- Format would be a simple newline-separated list of desktop entries.
- Implementations should choose the first available entry in top 
priority config. Move to next priority config if not found. Last 
priority would be a list generated by `ls /usr/share/x-terminal-emulators`.



2015-11-03 16:47, Bastien Nocera пишет:

On Wed, 2015-10-21 at 19:30 +0200, Per Olofsson wrote:

On 2015-10-20 15:10, Bastien Nocera wrote:

Apparently GNOME removed the UI for choosing terminal so you have
to
use
the gsettings command to change it.

No, it doesn't have anything to change it because nobody who might
care
has made the changes:
https://bugzilla.gnome.org/show_bug.cgi?id=627943

I believe GNOME 2 had a UI for choosing the terminal emulator. But I
guess the settings UI was completely rewritten in GNOME 3. Sorry.


I was sceptical at first but now I think it might be a good idea,
although strictly speaking it is an abuse of MIME types. It is
similar
to how URIs are handled, with x-scheme-handler/.

Not really. See the bug above.

I can't find any argument in the bug report for why having a MIME
type
for terminals would be more wrong than x-scheme-handler. Only you
stating so :-)

Both mime-type and scheme are metadata to the URL. I'd be fine having a
"x-scheme-handler/terminal" mime-type added if they could all handle
those URLs. They can't though.


But you're right, it is more of a stretch. At least x-scheme-handler
is
about applications opening stuff.


___
xdg mailing list
xdg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xdg


___
xdg mailing list
xdg@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/xdg


Re: Spec to define the default terminal?

2015-11-03 Thread Bastien Nocera
On Wed, 2015-10-21 at 19:30 +0200, Per Olofsson wrote:
> On 2015-10-20 15:10, Bastien Nocera wrote:
> > > Apparently GNOME removed the UI for choosing terminal so you have
> > > to
> > > use 
> > > the gsettings command to change it.
> > 
> > No, it doesn't have anything to change it because nobody who might
> > care
> > has made the changes:
> > https://bugzilla.gnome.org/show_bug.cgi?id=627943
> 
> I believe GNOME 2 had a UI for choosing the terminal emulator. But I
> guess the settings UI was completely rewritten in GNOME 3. Sorry.
> 
> > > I was sceptical at first but now I think it might be a good idea,
> > > although strictly speaking it is an abuse of MIME types. It is
> > > similar 
> > > to how URIs are handled, with x-scheme-handler/.
> > 
> > Not really. See the bug above.
> 
> I can't find any argument in the bug report for why having a MIME
> type
> for terminals would be more wrong than x-scheme-handler. Only you
> stating so :-)

Both mime-type and scheme are metadata to the URL. I'd be fine having a
"x-scheme-handler/terminal" mime-type added if they could all handle
those URLs. They can't though.

> But you're right, it is more of a stretch. At least x-scheme-handler
> is
> about applications opening stuff.
> 
___
xdg mailing list
xdg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xdg


Re: Spec to define the default terminal?

2015-10-21 Thread Per Olofsson
On 2015-10-20 15:10, Bastien Nocera wrote:
>> Apparently GNOME removed the UI for choosing terminal so you have to
>> use 
>> the gsettings command to change it.
> 
> No, it doesn't have anything to change it because nobody who might care
> has made the changes:
> https://bugzilla.gnome.org/show_bug.cgi?id=627943

I believe GNOME 2 had a UI for choosing the terminal emulator. But I
guess the settings UI was completely rewritten in GNOME 3. Sorry.

>> I was sceptical at first but now I think it might be a good idea, 
>> although strictly speaking it is an abuse of MIME types. It is
>> similar 
>> to how URIs are handled, with x-scheme-handler/.
> 
> Not really. See the bug above.

I can't find any argument in the bug report for why having a MIME type
for terminals would be more wrong than x-scheme-handler. Only you
stating so :-)

But you're right, it is more of a stretch. At least x-scheme-handler is
about applications opening stuff.

-- 
Pelle
___
xdg mailing list
xdg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xdg


Re: Spec to define the default terminal?

2015-10-20 Thread Jerome Leclanche
This is something I tried solving quite a few times. There was an
intents spec (a la android) in the works which was subsequently picked
up by GNOME, I don't know where it's at now but it's the more correct
fix.

On 20 October 2015 at 13:37, Thomas Gläßle  wrote:
>
> Thomas Gläßle wrote on 10/20/2015 12:23 PM:
>> 1 a) invent a new variable e.g. $TERMINAL or similar that works like
>> $BROWSER, i.e. something of the form TERMINAL=urxvt:gnome-terminal:xterm
>>
>> 1 b) invent a new variable e.g. $TERMINAL or similar that works like the
>> one used by mimeopen, i.e. TERMINAL="xterm -e"
>>
>> 2) encourage the use of (and possibly semi-mandatory dependency on)
>> gvfs-open/kde-open
>>
>> 3). invent a mimetype for terminal applications so available terminals
>> can be iterated via .desktop files and a default can be requested in the
>> mimeapps.list file, e.g.:
>
> I forgot to mention option 4 which I saw lurking around:
>
> 4) use the binary x-terminal-emulator which is to be symlinked to
> whatever terminal one wants to use.
>
>   - [+] nice and simple
>   - [+] possibly already supported by several subsystems?
>   - [-] system-wide config (you have to modify PATH in order to change
> it for users)
>
>
>
>> concerning 1 a)
>>
>>   - [+] nice and simple
>>   - [-] have to hardcode command line options, e.g. terminator uses "-x"
>> rather than "-e"
>>   - considering $TERMINAL is already used in a different fashion by
>> mimeopen (and mimeopen is used as fallback by xdg-open), I'd rather tend
>> towards a different name for the variable, e.g. $TERMCMD which would be
>> upward compatible to how its used by terminator
>>
>>
>> concerning 1 b)
>>
>>   - [+] no need to hardcode command line options
>>   - [+] compatible with existing mimeopen behaviour
>>   - [-] contains more than just a executable name, may be less simple to
>> analyze
>>
>>
>> concerning 2)
>>
>>   - [+] easy out without much coding for xdg-open
>>   - [-] doesn't really solve the problem that "everyone uses their own
>> mechanism"
>>   - [-] I didn't look at gvfs-open/kde-open so far, but I'm afraid, they
>> don't allow the user to specify their preferred terminal as easily
>>   - [-] seems like a heavy dependency
>>
>>
>> concerning 3)
>>
>>   - [+] uses an established config format
>>   - [+] can configure multiple terminals with correct command line
>> options and the default
>>   - [-] not sure if the mimetype concept applies to this problem very well
>>   - [-] maybe too complex for such a simple goal
>
>
>
> ___
> xdg mailing list
> xdg@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xdg
>
___
xdg mailing list
xdg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xdg


Re: Spec to define the default terminal?

2015-10-20 Thread Bastien Nocera
On Tue, 2015-10-20 at 14:57 +0200, Per Olofsson wrote:
> 

> > - not sure what desktop environments are doing in their code base,
> > maybe
> > hardcoding their own terminals
> 
> Many use gsettings or config files.
> 
> Apparently GNOME removed the UI for choosing terminal so you have to
> use 
> the gsettings command to change it.

No, it doesn't have anything to change it because nobody who might care
has made the changes:
https://bugzilla.gnome.org/show_bug.cgi?id=627943


> > 3). invent a mimetype for terminal applications so available
> > terminals
> > can be iterated via .desktop files and a default can be requested
> > in the
> > mimeapps.list file, e.g.:
> > 
> >  [Desktop Entry]
> >  name=terminator
> >  GenericName=X Terminal Emulator
> >  Exec=terminator -x %F
> >  MimeType=x-terminal-emulator
> 
> I was sceptical at first but now I think it might be a good idea, 
> although strictly speaking it is an abuse of MIME types. It is
> similar 
> to how URIs are handled, with x-scheme-handler/.

Not really. See the bug above.
___
xdg mailing list
xdg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xdg


Re: Spec to define the default terminal?

2015-10-20 Thread Per Olofsson

Hi,

Den 2015-10-20 12:23, Thomas Gläßle skrev:

- xdg-open does not know how to spawn terminals (leading to the
application aborting or even worse: suppressed output)


Only in generic mode. When running under a desktop environment xdg-open 
calls e.g. gvfs-open, kde-open5, exo-open. In that case it is their 
responsibility to open a terminal window.



- not sure what desktop environments are doing in their code base, maybe
hardcoding their own terminals


Many use gsettings or config files.

Apparently GNOME removed the UI for choosing terminal so you have to use 
the gsettings command to change it.



- xdg-terminal (unreleased, part of xdg-utils) currently even looks at
$TERM and uses xterm as hardcoded fallback


Again, only in generic mode.


1 a) invent a new variable e.g. $TERMINAL or similar that works like
$BROWSER, i.e. something of the form TERMINAL=urxvt:gnome-terminal:xterm


Again, the variable would be mostly for generic mode, not DEs.


3). invent a mimetype for terminal applications so available terminals
can be iterated via .desktop files and a default can be requested in the
mimeapps.list file, e.g.:

 [Desktop Entry]
 name=terminator
 GenericName=X Terminal Emulator
 Exec=terminator -x %F
 MimeType=x-terminal-emulator


I was sceptical at first but now I think it might be a good idea, 
although strictly speaking it is an abuse of MIME types. It is similar 
to how URIs are handled, with x-scheme-handler/.


The Exec field would need to be specified differently though. %F is 
defined as a list of files, not a command.


Also it needs to be implemented in desktop environments. There's no 
point in only implementing it in xdg-open/xdg-terminal.



concerning 1 a)

   - [+] nice and simple
   - [-] have to hardcode command line options, e.g. terminator uses "-x"
rather than "-e"


There's nothing stopping you from using commands with arguments. It 
works in $BROWSER and $MAILER.


--
Pelle
___
xdg mailing list
xdg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xdg


Re: Spec to define the default terminal?

2015-10-20 Thread Thomas Gläßle

Jerome Leclanche wrote on 10/20/2015 01:21 PM:
> This is something I tried solving quite a few times. There was an
> intents spec (a la android) in the works

I assume you are referring tot (sorry, I didn't do my homework earlier):

http://lists.freedesktop.org/archives/xdg/2014-January/013068.html

I didn't have time to read the whole thread so far, I'll have to go
through it in more depth tonight.


> which was subsequently picked
> up by GNOME, I don't know where it's at now but it's the more correct
> fix.

All I was able to find In terms of actual implementation for gnome was a
section in the glib sources using a hardcoded list of terminals:

https://git.gnome.org/browse/glib/tree/gio/gdesktopappinfo.c#n2434

(but I admit, I didn't look too long, so I'm not entirely sure that's
the code being used for gvfs-open)






signature.asc
Description: OpenPGP digital signature
___
xdg mailing list
xdg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xdg