! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Open in Terminal not working
Status:
RESOLVED: FIXED
Product:
Xfce4-panel
Component:
Directory Menu

Comments

Description Math. 2011-10-05 17:52:11 CEST
When I try to open a folder using the option "Open in Terminal", nothing happens.
Example of opening my home directory, I get this:

Unknown option "/home/math"
Comment 1 Nick Schermer editbugs 2011-10-06 09:07:55 CEST
I think there is something wrong in your preferred application setting.
Comment 2 Math. 2011-10-06 09:43:38 CEST
(In reply to comment #1)
> I think there is something wrong in your preferred application setting.

That was also my first guess, but in my Preffered Applications -> Utilities -> Terminal Emulator, it's set to Xfce Terminal. Also on opening a terminal from out Thunar works just fine. It's only the "Directory Menu" application which doesn't open a terminal.
Comment 3 robb 2011-10-17 11:39:38 CEST
I am experiencing apparently the same issue.

Up until a few weeks ago, this worked as expected i.e. via:

    "Taskbar -> Directory Menu Plugin -> dir name -> Open in Terminal"

I could quickly launch a terminal and get a command line in any directory I wanted.

Recently however this Terminal style functionality has ceased to function.
Opening of "folders", i.e. via the File Browser application, does still work.

I straced a Taskbar process and it seems that Terminal is being exec-ed and then exiting almost immediately with an exit status of 1 because it is unhappy about the arguments being supplied e.g.

> write(2, "Unknown option \"/home/robb/bin\"\n", 32) = 32

The exec call looks like this:
> execve("/usr/bin/Terminal", ["/usr/bin/Terminal", "/home/robb/bin"], ["XDG_SESSION_ID=1", "SSH_AGENT_PID=1522", "HOSTNAME=think", "IMSETTINGS_INTEGRATE_DESKTOP=yes", "GPG_AGENT_INFO=/tmp/gpg-Os4OMV/S"..., "GLADE_PIXMAP_PATH=:", "XDG_MENU_PREFIX=xfce-", "TERM=dumb", "SHELL=/bin/bash", "HISTSIZE=1000", "XDG_SESSION_COOKIE=d"..., "TMPDIR=/home/robb/tmp", "IMSETTINGS_MODULE=none", "USER=robb", "GLADE_MODULE_PATH=:", "SSH_AUTH_SOCK=/tmp/ssh-H"..., "XDG_CONFIG_DIRS=/etc/xdg", "MAIL=/var/spool/mail/robb", "PATH=/home/robb/tools/exiftool:/"..., "DESKTOP_SESSION=/usr/bin/startxf"..., "QT_IM_MODULE=xim", "PWD=/home/robb", "XMODIFIERS=@im=none", "LANG=en_US.UTF-8", "SSH_ASKPASS=/usr/libexec/openssh"..., "HISTCONTROL=ignoredups", "SHLVL=2", "HOME=/home/robb", "LOGNAME=robb", "PRINTER=A4", "LC_CTYPE=en_GB.utf8", "DBUS_SESSION_BUS_ADDRESS=unix:ab"..., "XDG_DATA_DIRS=/usr/local/share:/"..., "LESSOPEN=||/usr/bin/lesspipe.sh "..., "PREFERRED=/usr/bin/startxfce4", "XDG_RUNTIME_DIR=/run/user/robb", "GLADE_CATALOG_PATH=:", "LIBGLADE_MODULE_PATH=:", "GTK_IM_MODULE=gtk-im-context-sim"..., "LC_TIME=en_GB.utf8", "G_BROKEN_FILENAMES=1", "XAUTHORITY=/home/robb/.Xauthorit"..., "_=/usr/bin/xfce4-session", "SESSION_MANAGER=local/unix:@/tmp"..., "DISPLAY=:0.0", "DESKTOP_STARTUP_ID=xfce4-panel/|"...]) = 0

It seems that the plugin or Taskbar is passing the full path of the users desired directory on the Terminal command line without any flag and the Terminal program does not accept this.

I can recreate apparently the same problem by doing:
> [think 10.17 10:49:08]$ /usr/bin/Terminal /home/robb/bin ; echo $?
> Unknown option "/home/robb/bin"
> 1

I don't know what changed to cause this problem i.e. if the plugin is now launching Terminal differently, or if the arguments supported by Terminal have changed.

It seems unlikely that a change in my configuration could cause this.

man Terminal describes an option "--default-working-directory=" which should be used to set the initial working directory of the shell.

I'm running:
> [think 10.17 11:28:34]$ /usr/bin/Terminal --version
> Terminal 0.4.8 (Xfce 4.8)

Preferences -> Preferred Applications -> Utilities -> Terminal Emulator is set to "Xfce Terminal". I assume that is correct.

Does XFCE have something like GNOME Do (http://do.davebsd.com/)? If I had that, then I could (probably) easily work around this problem and likely do [sic] a lot more as well...
Comment 4 Christoph Wickert editbugs 2011-10-23 18:08:46 CEST
I can reproduce the problem on Fedora 16 Beta. The analysis of robb is correct. The panel calls "Terminal <path>" rather than "Terminal --working-directory <path>".

However the question becomes: Terminals emulators have a different options for the working directory, others don't have it at all. How should this be implemented?  In exo? Or would it be reasonable to run "cd <path> && Terminal"?
Comment 5 Nick Schermer editbugs 2011-10-23 18:21:25 CEST
Should be fixed in master.
Comment 6 Christoph Wickert editbugs 2011-10-23 20:59:41 CEST
Confirmed, the fix works (tested in Xfce's Terminal, gnome-terminal, roxterm, rxvt-unicode and xterm).

Bug #8018

Reported by:
Math.
Reported on: 2011-10-05
Last modified on: 2011-10-23

People

Assignee:
Nick Schermer
CC List:
2 users

Version

Attachments

Additional information