You are not logged in.

#1 2021-09-29 15:41:15

int3g3r
Member
Registered: 2021-09-29
Posts: 9

Change default Terminal emulator

I installed Arch linux for the first time with a graphical interface.

- LightDM as display manager
- Openbox window manager
- LXDE

I have now additionally installed htop.
When starting htop this wants to start xterm.
I want to use lxterminal as default terminal emulator system wide.
How can this be set?
Where do I have to set this (X11, LightDM, Openbox, LXDE configs)?

The following did not work:
https://wiki.archlinux.org/title/I3#Terminal_emulator

Regards Int3g3r

Offline

#2 2021-09-29 16:08:59

jonno2002
Member
Registered: 2016-11-21
Posts: 706

Re: Change default Terminal emulator

run "lxsession-default-apps"

or "default applications for lxsession" under "preferences" in the menu

Offline

#3 2021-09-30 06:05:55

int3g3r
Member
Registered: 2021-09-29
Posts: 9

Re: Change default Terminal emulator

jonno2002 wrote:

run "lxsession-default-apps"

or "default applications for lxsession" under "preferences" in the menu

The terminal manager is already set to lxterminal. I want to change this in a script, so I need a command/config file.

The following error is displayed when starting htop in GUI:
Child process "xterm" could not be executed.

Regards Int3g3r

Offline

#4 2021-09-30 06:33:35

seth
Member
Registered: 2012-09-03
Posts: 58,807

Re: Change default Terminal emulator

When starting htop this wants to start xterm.

Child process "xterm" could not be executed.

printenv

Offline

#5 2021-09-30 14:16:26

int3g3r
Member
Registered: 2021-09-29
Posts: 9

Re: Change default Terminal emulator

seth wrote:

When starting htop this wants to start xterm.

Child process "xterm" could not be executed.

printenv
[test@arch01 ~]$ printenv
SHELL=/bin/bash
COLORTERM=truecolor
XDG_CONFIG_DIRS=/etc/xdg
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_MENU_PREFIX=lxde-
_LXSESSION_PID=373
XDG_DATA_HOME=/home/test/.local/share
XDG_CONFIG_HOME=/home/test/.config
DESKTOP_SESSION=LXDE
GTK_MODULES=canberra-gtk-module
XDG_SEAT=seat0
PWD=/home/test
LOGNAME=test
XDG_SESSION_DESKTOP=LXDE
XDG_SESSION_TYPE=x11
XAUTHORITY=/home/test/.Xauthority
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/test
MOTD_SHOWN=pam
HOME=/home/test
LANG=de_CH.UTF-8
XDG_CURRENT_DESKTOP=LXDE
VTE_VERSION=6402
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
TERM=xterm-256color
USER=test
DISPLAY=:0
SHLVL=1
XDG_VTNR=7
XDG_SESSION_ID=2
XDG_RUNTIME_DIR=/run/user/1000
LC_TIME=de_CH.UTF-8
XDG_DATA_DIRS=/usr/local/share:/usr/share:/usr/share/gdm:/var/lib/menu-xdg
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
GDMSESSION=LXDE
SAL_USE_VCLPLUGIN=gtk
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
MAIL=/var/spool/mail/test
LC_NUMERIC=de_CH.UTF-8
_=/usr/bin/printenv

I've already changed once the $TERM variable to lxterminal.
Still wanted to start xterm instead of lxterminal.

Last edited by int3g3r (2021-09-30 15:38:05)

Offline

#6 2021-09-30 14:22:38

seth
Member
Registered: 2012-09-03
Posts: 58,807

Re: Change default Terminal emulator

Please use code tags, https://bbs.archlinux.org/help.php#bbcode (edit your post)

Changed how and where? And why is it "xterm-256color" to begin with, given that you apparently don't have xterm even installed?

Offline

#7 2021-09-30 15:52:44

int3g3r
Member
Registered: 2021-09-29
Posts: 9

Re: Change default Terminal emulator

seth wrote:

Please use code tags, https://bbs.archlinux.org/help.php#bbcode (edit your post)

Changed how and where? And why is it "xterm-256color" to begin with, given that you apparently don't have xterm even installed?

1) Yes i don't have xterm installed. I don't need it. xterm-256color is maybe default set in LXDE?
I've installed the default lxde package with pacman.

2) I tried follow:
https://itectec.com/superuser/arch-linu … -terminal/
https://wiki.archlinux.org/title/I3#Terminal_emulator
-> /etc/inittab -> doesn't exist
-> /etc/profile -> export TERM=lxterm
-> /etc/bash.bashrc -> export TERM=lxterm
-> Setting $TERMINAL enviroment variable

I didn't try

bindsym $mod+Return exec i3-sensible-terminal

because bindsym is not installed and i would like to set it in a config file.

Regards Int3g3r

Offline

#8 2021-09-30 15:57:43

jonno2002
Member
Registered: 2016-11-21
Posts: 706

Re: Change default Terminal emulator

aparently lxterminal returns:

TERM=xterm-256color

i just tried it.

and if i use my usual terminal (urxvt) i get:

TERM=rxvt-unicode-256color

also just tried htop on my media pc which runs lxde and has lxterminal set as default in the settings and it works as expected when opened via the menu (gui)

maybe try looking for a config setting of xterm:

cd
grep -ir xterm .config
cd
grep -i xterm *

Offline

#9 2021-09-30 15:58:38

seth
Member
Registered: 2012-09-03
Posts: 58,807

Re: Change default Terminal emulator

bindsym is a keyword in the i3 config; you're not running i3, this doesn't apply to you.
How excatly are you running htop? From the openbox menu?

Offline

#10 2021-09-30 16:23:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: Change default Terminal emulator

Never set TERM, it's not for what you seem to think it's for.  Some programs use the environment variable TERMINAL to identify a terminal emulator to run, but not TERM.  TERM is set by the terminal emulator to tell cli programs about it's capabilities.  Manually setting TERM results in all sorts of problems in text-mode programs.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#11 2021-10-04 12:00:03

int3g3r
Member
Registered: 2021-09-29
Posts: 9

Re: Change default Terminal emulator

grep -ir xterm .config

[xxx@arch01 ~]$ grep -ir xterm .config
.config/lxpanel/launchtaskbar.cfg:x-terminal-emulator=lxterminal
.config/openbox/lxde-rc.xml:    <!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
.config/lxsession/LXDE/desktop.conf:terminal_manager/command=lxterminal
.config/lxsession-default-apps/settings.conf:terminal_manager/installed=LXTerminal,lxterminal,lxterminal,/usr/share/applications/lxterminal.desktop,;
[xxx@arch01 ~]$

seth wrote:

bindsym is a keyword in the i3 config; you're not running i3, this doesn't apply to you.
How excatly are you running htop? From the openbox menu?

Thank you for the clarification.
I assume the start-menu is the openbox menu.
I try to start htop from the start menu -> system tools -> htop

Trilby wrote:

Never set TERM, it's not for what you seem to think it's for.  Some programs use the environment variable TERMINAL to identify a terminal emulator to run, but not TERM.  TERM is set by the terminal emulator to tell cli programs about it's capabilities.  Manually setting TERM results in all sorts of problems in text-mode programs.

I noticed that the text editor in tty did not work properly after setting the TERM variable.

Offline

#12 2021-10-04 15:11:36

seth
Member
Registered: 2012-09-03
Posts: 58,807

Re: Change default Terminal emulator

The openbox menu feeds out of  ~/.config/openbox/menu.xml - if by "start-menu" you mean a menu that pops up when you click a nice icon on a panel, that's more likely an LXDE provided menu and probably should™ honor ".config/lxpanel/launchtaskbar.cfg:x-terminal-emulator=lxterminal"

It's really important that we know eaxctly what menu is being used here, though your grep doesn't suggest that a user config is at fault.

grep -ir xterm ~/.local

?

Offline

#13 2021-10-05 09:08:25

int3g3r
Member
Registered: 2021-09-29
Posts: 9

Re: Change default Terminal emulator

seth wrote:

The openbox menu feeds out of  ~/.config/openbox/menu.xml - if by "start-menu" you mean a menu that pops up when you click a nice icon on a panel, that's more likely an LXDE provided menu and probably should™ honor ".config/lxpanel/launchtaskbar.cfg:x-terminal-emulator=lxterminal"

It's really important that we know eaxctly what menu is being used here, though your grep doesn't suggest that a user config is at fault.

grep -ir xterm ~/.local

?

I mean with start menu the "panel with the nice icon" so it should be a LXDE config -> launchtaskbar.cfg

[special_cases]
synaptic=synaptic-pkexec
soffice.bin=libreoffice
x-terminal-emulator=lxterminal

start-menu.png

Last edited by int3g3r (2021-10-05 09:11:32)

Offline

#14 2021-10-05 10:45:44

gnu
Member
From: $HOME
Registered: 2021-10-05
Posts: 1
Website

Re: Change default Terminal emulator

In your files $HOME/.profile or $HOME/.bash_profile:

export TERM=lxterm

PS: Are you using bash or zsh, ksh, fish, etc?

Offline

#15 2021-10-05 11:14:41

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,257

Re: Change default Terminal emulator

@gnu multiple people in this very thread have shown that this does not do what you think it does and you should never set TERM yourself, please don't give advice like that. The underlying shell should be irrelevant as well.

Last edited by V1del (2021-10-05 11:26:18)

Offline

#16 2021-10-05 13:28:18

seth
Member
Registered: 2012-09-03
Posts: 58,807

Re: Change default Terminal emulator

@int3g3r did you grp ~/.local ?

Offline

#17 2021-10-07 06:32:51

int3g3r
Member
Registered: 2021-09-29
Posts: 9

Re: Change default Terminal emulator

I'm using bash as shell.

@seth what do you mean by "grp ~/.local" ?
grp -> command not found
but a folder "~/.local" exists.

thanks for the patience.

Offline

#18 2021-10-07 07:56:23

seth
Member
Registered: 2012-09-03
Posts: 58,807

Re: Change default Terminal emulator

Sorry, typo but see  #12

Offline

#19 2021-10-07 11:14:57

int3g3r
Member
Registered: 2021-09-29
Posts: 9

Re: Change default Terminal emulator

seth wrote:

grep -ir xterm ~/.local

Nothing gets returned.

Last edited by int3g3r (2021-10-07 11:15:31)

Offline

#20 2021-10-07 14:12:33

seth
Member
Registered: 2012-09-03
Posts: 58,807

Re: Change default Terminal emulator

Let's pick up the broadsword:
1. create a new user account: same issue?
2. grep your entire $HOME, "grep -ir xterm ~"

Offline

#21 2021-10-08 07:26:02

int3g3r
Member
Registered: 2021-09-29
Posts: 9

Re: Change default Terminal emulator

seth wrote:

Let's pick up the broadsword:
1. create a new user account: same issue?
2. grep your entire $HOME, "grep -ir xterm ~"

1) yes, same issue when i execute htop.
xterm.png

2) "grep -i $HOME" ?
get's stuck, hangs.

3) "grep -ir xterm ~"

[lx01@arch01 ~]$ grep -ir xterm ~
grep: /home/lx01/.mozilla/firefox/8c59utdb.default-release/sessionstore-backups/recovery.baklz4: Übereinstimmungen in Binärdatei
grep: /home/lx01/.mozilla/firefox/8c59utdb.default-release/sessionstore-backups/recovery.jsonlz4: Übereinstimmungen in Binärdatei
/home/lx01/.cache/lxsession/LXDE/run.log:** Message: 09:11:12.574: settings.vala:373: Settings default for Session, terminal_manager, command : lxterminal
/home/lx01/.cache/lxsession/LXDE/run.log:lxterminal
/home/lx01/.cache/menus/bf9e2aa154987d2c2233e44431b202db:-lxterminal.desktop
/home/lx01/.cache/menus/bf9e2aa154987d2c2233e44431b202db:LXTerminal
/home/lx01/.cache/menus/bf9e2aa154987d2c2233e44431b202db:lxterminal
/home/lx01/.cache/menus/bf9e2aa154987d2c2233e44431b202db:lxterminal
/home/lx01/.cache/menus/bf9e2aa154987d2c2233e44431b202db:lxterminal
/home/lx01/.config/openbox/lxde-rc.xml:  <!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
/home/lx01/.config/lxsession/LXDE/desktop.conf:terminal_manager/command=lxterminal
/home/lx01/.config/lxpanel/launchtaskbar.cfg:x-terminal-emulator=lxterminal
/home/lx01/.local/share/recently-used.xbel:  <bookmark href="file:///home/lx01/xterm" added="2021-10-08T07:16:43.656534Z" modified="2021-10-08T07:16:43.656541Z" visited="2021-10-08T07:16:43.656535Z">
/home/lx01/.local/share/recently-used.xbel:  <bookmark href="file:///home/lx01/xterm.png" added="2021-10-08T07:16:57.587549Z" modified="2021-10-08T07:16:57.587555Z" visited="2021-10-08T07:16:57.587550Z">

Offline

#22 2021-10-08 07:44:41

seth
Member
Registered: 2012-09-03
Posts: 58,807

Re: Change default Terminal emulator

grep your entire $HOME, "grep -ir xterm ~"

is the same thing, but since it happens w/ a new user, it' not a userconfig anyway.

Please paste /home/lx01/.cache/menus/bf9e2aa154987d2c2233e44431b202db - are there more files in /home/lx01/.cache/menus ?
LXDE uses menu-cache and likely /usr/lib/menu-cache/menu-cache-gen - you could run the latter in verbose mode (-v, check -h for more options) to see whether it spits out errors.

Offline

Board footer

Powered by FluxBB