awesome

Welcome to awesome bug tracking system.
Tasklist

FS#922 - "manual" menu entry in default rc.lua is incompatible with Terminator

Attached to Project: awesome
Opened by Wladyslaw Zbikowski (ModernHacker) - Thursday, 25 August 2011, 21:25 GMT
Task Type Bug Report
Category Core
Status Unconfirmed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version 3.4.10
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

When "terminal" refers to "Terminator" in rc.lua, the syntax
terminator -e man awesome
is not accepted by terminator. Instead use
terminator -e 'man awesome'

diff --git a/rc.lua b/rc.lua
index 49e8543..9c355f0 100644
--- a/rc.lua
+++ b/rc.lua
@@ -56,7 +56,7 @@ end
-- {{{ Menu
-- Create a laucher widget and a main menu
myawesomemenu = {
- { "manual", terminal .. " -e man awesome" },
+ { "manual", terminal .. " -e 'man awesome'" },
{ "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
{ "restart", awesome.restart },
{ "quit", awesome.quit }
This task depends upon

Comment by Wladyslaw Zbikowski (ModernHacker) - Saturday, 27 August 2011, 04:52 GMT
On further study I see this bug is only in the Debian packaging; in the awesome git "xterm" is used instead of "x-terminal-emulator" so there is no problem. On my system x-terminal-emulator resolves to Terminator. Personally I would suggest applying both the Debian patch below to awesomerc.lua.in for using x-terminal-emulator instead of xterm, and the patch above to use quotes with -e (since this works fine with xterm as well).

commit 1c539c2d7c0ff9e58bdc462ae7147cd4604288d3
Author: Julien Danjou <julien@danjou.info>
Date: Mon Jul 27 15:30:01 2009 +0200

Bump standard version


diff --git a/awesomerc.lua.in b/awesomerc.lua.in
index 6254446..c1a0093 100644
--- a/awesomerc.lua.in
+++ b/awesomerc.lua.in
@@ -19,8 +19,8 @@ theme_path = "@AWESOME_THEMES_PATH@/default/theme.lua"
beautiful.init(theme_path)

-- This is used later as the default terminal and editor to run.
-terminal = "xterm"
-editor = os.getenv("EDITOR") or "nano"
+terminal = "x-terminal-emulator"
+editor = os.getenv("EDITOR") or "editor"
editor_cmd = terminal .. " -e " .. editor

-- Default modkey.
Comment by Julien Danjou (jd) - Saturday, 27 August 2011, 09:08 GMT
This is more likely a "bug" in Terminator. It's not really a bug, but what I mean is that most terminal emulators are supposed to get the -e option as xterm does.

Anyhow, x-terminal-emulator is Debian specific, so it will not work in other distribution. There's no good way to fix this issue I guess, unless XDG can come to our rescue here, I'm not sure.
Comment by Wladyslaw Zbikowski (ModernHacker) - Saturday, 27 August 2011, 15:41 GMT
Indeed xdg-terminal could be a solution except it's not quite ready for prime time.

1. It relies on $TERM which is nonsense. This is why it has not been picked up by Debian.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=604959
(this bug needs to be upstreamed to freedesktop)

2. In the current git, xdg-terminal cannot open an xterm from a generic desktop.
I just opened a bug for this.
https://bugs.freedesktop.org/show_bug.cgi?id=40418

3. There does not seem to be a standard way to pass command line arguments to the terminal. This probably requires some design / specification work which has not yet been addressed.


Comment by Wladyslaw Zbikowski (ModernHacker) - Saturday, 27 August 2011, 16:37 GMT
Issues 2 and 3 were addressed in Bug 40418. It is now possible to do

TERM=xterm xdg-terminal "man awesome"
TERM=terminator xdg-terminal "man awesome"

This still leaves the issue that xdg-terminal is not all that useful, since nobody uses TERM to set the name of their preferred terminal executable :)

Loading...