You are not logged in.
I've added the t todo list manager to my Openbox menu but it won't open. Terminator flashes and then disappears.
This is what I got in menu.xml:
<item label="todo list">
<action name="Execute">
<execute>
terminator --command="t"
</execute>
</action>
</item>And I got this alias in my bashrc:
alias t='python ~/.todo/sjl-t-1c496e933168/t.py --task-dir ~/.todo --list tasks'Opening t from terminator works fine but something goes wrong when executing it from the Openbox menu. Other terminal applications do open using the same syntax. For instance, newsbeuter happily opens with:
<item label="todo list">
<action name="Execute">
<execute>
terminator --command="newsbeuter"
</execute>
</action>
</item>I've tried adding the -e flag as suggested in this post and tried this solution, to no avail. Any help / suggestions appreciated!
Offline
What exactly is t.py? Is it a Python program that you created? If so, why don't you try renaming it to something else? As you've already demonstrated, the terminator --command="<app name>" works, so it must have something to do with either attempting to use an alias, the name of the Python program, or the program itself.
Perhaps you need super user privileges to run it. Change terminator --command="t" to gksudo terminator --command="t".
07/12/2013-01 edit: Also try using the same code for your alias for the terminator command...
terminator --command="python ~/.todo/sjl-t-1c496e933168/t.py --task-dir ~/.todo --list tasks"Last edited by KrunchTime (2013-07-13 02:24:06)
DAH | Linux Format | Linux Journal | Linux User & Developer | Linux Voice | LXer | PGLCESC
Offline
If you just want the todolist to open whenever you open a terminal window you can add it to the end of your ~/.bashrc file. I think the problem is that terminator opens, runs the program, then exits when the program does.
“I don't believe in charity. I believe in solidarity. Charity is so vertical. It goes from the top to the bottom. Solidarity is horizontal. It respects the other person. I have a lot to learn from other people.” - Eduardo Hughes Galeano
Offline
I believe you are using the wrong terminator option, try --execute instead:
Apologies, you did try that.
Ah I see the issue: man terminator
-e, --command=COMMAND
Runs the specified command **instead** of your default
shell or profile specified command
It is not an interactive shell and so does not load your aliases. Try put that command in the file ~/bin/t and make it executable, instead of an alias.
#!/bin/sh
python ~/.todo/sjl-t-1c496e933168/t.py --task-dir ~/.todo --list taskschmod 744 ~/bin/tNote: t seems like a ambiguous name for a command, todo might suit you better?
Last edited by kbmonkey (2013-07-13 08:23:11)
Offline
If you just want the todolist to open whenever you open a terminal window you can add it to the end of your ~/.bashrc file. I think the problem is that terminator opens, runs the program, then exits when the program does.
^^I'm pretty certain that annoyingegger has hit the nail on the head. You ARE running t, just not "holding" it open. I'm not sure that KB's suggestion will help, but it's worth a shot. I'd have to test this for myself, but if you run a script that isn't set to hold control of the terminal, it finishes and closes out. That's how it appears that t is designed.
Offline
Thanks for all your responses!
@KrunchTime, t.py is a Python shell script / simple todo list (see stevelosh.com/projects/t/).
I've tried renaming t.py, using gksudo and executing the full command as you suggested... but the same thing kept happening.
I first suspected the alias was the troublemaker as terminator shows the same behaviour (flash and disappear) when trying to execute a programme that doesn't exist (as a test I tried to execute terminator --command="blablablab"). However, after a bit more testing I think it might be the case that it's just not possible to run the Python script from the Openbox menu. As a test case I tried to execute this script (~/bin/pythontest) from the menu:
#! /usr/bin/env python
print "Hello World"This script just won't run from the menu, whether I use an alias or call it directly (terminator --command="~/bin/pythontest"). Calling either the alias or the script name directly from within terminator does work.
@kbmonkey, putting the command in ~/bin/t gives the same result again. So, it seems that Python scripts can't be executed from the Openbox menu unless they're able to "hold themselves", as annoyingbeggar and DebianJoe suggested.
Offline
^ annoyingbeggar
Looking in (default) menu.xml all other terminator commands wait for user interaction before finishing, good call.
Hittin super+t and t [return] would probably be quicker than navigating a menu anyway. Just saying 
Offline
How I do it :-
I run a script from my menu
keith@eeebox:~$ cat pysol
python PySolFC-2.0/pysol.py &
<item label="PySol">
<action name="Execute">
<command>
./pysol
</command>
</action>
</item>
Linux since 1999
Currently: AntiX, & Crunchbang.
A good general beginners book for Linux :- http://rute.2038bug.com/index.html.gz
A good Debian read :- http://debian-handbook.info/get/now/
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.