lubuntu-default-settings does not specify the proper command to execute in terminal

Bug #975152 reported by Louis M on 2012-04-06
100
This bug affects 20 people
Affects Status Importance Assigned to Milestone
lubuntu-default-settings (Ubuntu)
Low
Unassigned

Bug Description

STEPS TO REPRODUCE:
1. Create a simple shell script, e.g.:
   #!/bin/sh
   leafpad
2. Mark it as executable
3. Open pcmanfm
4. Double click the file in pcmanfm
5. Click "Execute In Terminal"

ALTERNATE STEPS TO REPRODUCE:
1. Create a .desktop file, for e.g. leafpad
2. Add "Terminal=true"
3. Double click on the desktop file

EXPECTED RESULTS:
Terminal window opens and command runs.

ACTUAL RESULTS:
Terminal window opens and nothing happens.

WORKAROUND:
In pcmanfm preferences, under the advanced tab, change the terminal to "x-terminal-emulator -e %s". You can also change the "terminal" value in ~/.config/libfm/libfm.conf.

AFFECTED VERSIONS:
11.10 to 14.10

Louis M (tioui) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pcmanfm (Ubuntu):
status: New → Confirmed
Christophe C (batra3) wrote :

hi, i've the same problem on lubuntu 12.04. I don't know for 11.10.

Peter Curtis (secondary) wrote :

Same problem after I switched to Lubuntu from Ubuntu.

I keep a few scripts on the desktop for common actions such as rebuilding wifi drivers so this is inconvenient.

A workround until this is fixed is to create launchers (.desktop files) on the Desktop for the scripts which explicitly start the script in the terminal by an entry such as Exec=lxterminal -e "bash /home/yourusername/rtl8192cu.sh" - Note ~/ and $HOME do not seem to work in the path to the script. lxshortcut can be used to create launchers.

Peter Curtis (secondary) wrote :

I think I have found the problem - the default setting for the terminal is wrong in Lubuntu. Do Edit -> Preferences -> Advanced Tab and add the option -e to the string so it reads "x-terminal-emulator -e %s" - this calls lxterminal with the -e option which opens the terminal and executes the command line in %s. See man lxterminal. For more clarity change the string to "lxterminal -e %s"

jahst (christopherbowhuis) wrote :

Peter Curtis' solutions worked for me.

pcmanfm -> Edit -> Preferences -> Advanced Tab

I just had to change

x-terminal-emulator %s
into
x-terminal-emulator -e %s

changing

x-terminal-emulator -e %s
into
lxterminal -e %s

also works... any advantage to one over the other?

*** NOTE:
I had to use /bin/bash (NOT /bin/sh) to initiate the script
/bin/sh just opened the terminal and closed it regardless if using x-terminal-emulator or lxterminal mentioned above.

tested with

#!/bin/sh
echo 'see me'
read

#!/bin/bash
echo 'see me'
read

Christophe C (batra3) wrote :

Lubuntu 12.04 : i confirm changing (pcmanfm / edit / pref / Advanc../)
x-terminal-emulator %s
   into
x-terminal-emulator -e %s

work. Perfect.

The solution is known. Why Lubuntu team doesn't fix that bug ?

Walter Lapchynski (wxl) wrote :

Interestingly, the bleeding edge version of pcmanfm happily opens lxterminal with no problem and the preferences show NOTHING for terminal. This is to say it works fine out of the box. I'd call this fix committed.

$ apt-cache policy pcmanfm lxterminal
pcmanfm:
  Installed: 1.0.1+bzr801+201210081425~quantal1
  Candidate: 1.0.1+bzr801+201210081425~quantal1
  Version table:
 *** 1.0.1+bzr801+201210081425~quantal1 0
        500 http://ppa.launchpad.net/lubuntu-dev/lubuntu-daily/ubuntu/ quantal/main i386 Packages
        100 /var/lib/dpkg/status
     1.0.1-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ quantal/universe i386 Packages
     1.0.1-0ubuntu1~ppa1 0
        500 http://ppa.launchpad.net/lubuntu-dev/staging/ubuntu/ quantal/main i386 Packages
lxterminal:
  Installed: 0.1.12~bzr580+201210071556~quantal1
  Candidate: 0.1.12~bzr580+201210071556~quantal1
  Version table:
 *** 0.1.12~bzr580+201210071556~quantal1 0
        500 http://ppa.launchpad.net/lubuntu-dev/lubuntu-daily/ubuntu/ quantal/main i386 Packages
        100 /var/lib/dpkg/status
     0.1.11-4ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ quantal/universe i386 Packages

Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/975152

tags: added: iso-testing
thedoctar (thedoctar) wrote :

I'd also like to say that Curtis's solution worked for me as well. I changed
x-terminal-emulator %s
to
lxterminal -e %s

Narcis Garcia (narcisgarcia) wrote :

Neither
x-terminal-emulator -e %s
nor
lxterminal -e %s
Works for me in Lubuntu 12.10

I've tested the parameters passed with this only string:
xmessage

And deduced that there is no % variable substitution. Then, seems enough with this:
x-terminal-emulator
(works for me)

Steve (steve-launchpad) wrote :

This is still a bug/problem for me in Lubuntu 13.04, pcmanfm 1.1.0.

I can confirm that changing

x-terminal-emulator %s

to

x-terminal-emulator -e %s

works as a work around or fix for me too.

Steve (steve-launchpad) wrote :

Correction:

I wrote a moment ago that x-terminal-emulator -e %s seems to work as a work around. That actually brings up a blank terminal window with nothing visible in it, that has to be manually closed.

lxterminal

seems to work for me. A terminal window opens, and closes when the job has finished.

I can confirm that this same problem is still present in Lubuntu 13.04 with all updates available as of today (Aug 08, 2013) installed.

The only way I can workaround it was to use just lxterminal under PCManFM -> Prefernces -> Advanced.

The previously suggested -e and/or %s results in just an open, inactive terminal.

netrick (netrick) wrote :

The simplest fix: change the command in pcmanfm to "lxterminal -e %s" and problem fixed. I can't believe that such an important and easy to fix issue remains unfixed for LTS release!

hamish (hamish-b) wrote :

confirmed still broken in lubuntu 14.04. Packages such as R statistics and GRASS GIS which have Terminal=true in their .desktop files just open an empty LXTerminal.

the 'x-terminal-emulator -e %s' fix in pcmanfm works, will locally patch /etc/xdg/lubuntu/libfm/libfm.conf

thanks,
Hamish

hamish (hamish-b) wrote :

DIY patch (untested)

sed -i -e 's|lxsession-default-terminal %s|x-terminal-emulator -e %s|' \
   /etc/xdg/lubuntu/libfm/libfm.conf

hamish (hamish-b) wrote :

argh, the libfm.conf edit in the previous comment works for ~/Desktop icons, but not for lxpanel menu items, they still open to an empty lxterminal.

is that hardcoded in the lx menu C code somewhere? or is it another edit to a config file?

If I right click on the lx "start button" in Preferences I see an Advanced tab, with Terminal emulator: "lxsession-default terminal". maybe that needs to be replaced with the same 'x-terminal-emulator -e %s' teatment?

thanks,
Hamish

hamish (hamish-b) wrote :

yes, replacing "lxsession-default terminal" with "xterm" or "x-terminal-emulator" works.

Hamish

hamish (hamish-b) wrote :

the file to change for the menu one looks like /usr/share/lxpanel/profile/Lubuntu/config

(untested)

Hamish

Artemgy (artemgy) wrote :

Thanks for your research, Hamish. I can confirm that your DIY patch works around the main issue, providing I sudo it...

sudo sed -i -e 's|lxsession-default-terminal %s|x-terminal-emulator -e %s|' \
   /etc/xdg/lubuntu/libfm/libfm.conf ;

Artemgy

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libfm (Ubuntu):
status: New → Confirmed
Walter Lapchynski (wxl) wrote :

confirmed in 14.10.

Changed in lubuntu-default-settings (Ubuntu):
status: New → Triaged
importance: Undecided → Low
no longer affects: libfm (Ubuntu)
no longer affects: pcmanfm (Ubuntu)
summary: - Execute in terminal not working
+ lubuntu-default-settings does not specify the proper command to execute
+ in terminal
Walter Lapchynski (wxl) wrote :

it does not appear that changing the systemwide libfm.conf file fixes anything. even when removing the libfm.conf file in the home directory at ~/.config/libfm, it does not copy the libfm.conf from /etc/xdg/libfm.

marked as low due to existent workaround.

description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers