Ctrl+Alt+T opens Xterm

This is new.

Updated one of my 24.04 machines to Plucky (24.04 → 24.10, 24.10 → 25.04). It worked, but now, under both Unity and GNOME, pressing the hotkey for a terminal window opens Xterm.

My default terminal emulator is the Xfce Terminal. That’s there and works fine. Using this command to check the default:

$ sudo update-alternatives --list x-terminal-emulator

It’s Xfce4 Terminal.

But the keystroke opens Xterm.

Any guesses how I can turn it back?

I am using the Unity desktop, but GNOME got auto-installed during an update years ago. This installation is about 12 years old. I think it started out as Ubuntu 13.10 “Saucy Salamander” and back then Unity was the default. Normally I never use GNOME. (And if anyone has a script to uninstall GNOME without nuking Unity, I’d love to know about it!)

This may help:

sudo update-alternatives --set x-terminal-emulator /usr/bin/xfce4-terminal.wrapper

sudo update-alternatives --list x-terminal-emulator
[sudo] password for me: 
/usr/bin/gnome-terminal.wrapper
/usr/bin/koi8rxterm
/usr/bin/lxterm
/usr/bin/uxterm
/usr/bin/xfce4-terminal.wrapper
/usr/bin/xterm

Logout to see the change.

I have not tested this for a very long time, but it should work still:

List all GNOME-related packages:

dpkg -l | grep .gnome

This is on mine (XFCE4) that i will keep:

 dpkg -l | grep .gnome
ii  gnome-accessibility-themes                      3.28-4                                     all          High Contrast GTK 2 theme and icons
ii  gnome-disk-utility                              46.1-1ubuntu1                              amd64        manage and configure disk drives and media
ii  gnome-keyring                                   48.0-1                                     amd64        GNOME keyring services (daemon and tools)
ii  gnome-keyring-pkcs11:amd64                      48.0-1                                     amd64        GNOME keyring module for the PKCS#11 module loading library
ii  gnome-themes-extra:amd64                        3.28-4                                     amd64        Adwaita GTK 2 theme — engine
ii  gnome-themes-extra-data                         3.28-4                                     all          Adwaita GTK 2 theme and Adwaita-dark GTK 3 theme — common files
ii  language-pack-gnome-en                          1:25.04+20250410                           all          GNOME translation updates for language English
ii  language-pack-gnome-en-base                     1:25.04+20250410                           all          GNOME translations for language English
ii  libpam-gnome-keyring:amd64                      48.0-1                                     amd64        PAM module to unlock the GNOME keyring upon login
ii  network-manager-gnome                           1.36.0-3ubuntu2                            amd64        transitional package for network-manager-applet and nm-connection-editor
ii  pinentry-gnome3                                 1.3.1-2ubuntu3                             amd64        GNOME 3 PIN or pass-phrase entry dialog for GnuPG

This command lists all packages with “gnome” in their names, which are likely GNOME-related packages.

Remove the GNOME packages:

sudo apt-get remove --purge gnome*

This command will remove all packages that start with “gnome”, which are typically GNOME-related packages.
Clean up any unused dependencies:

sudo apt-get autoremove

This command removes any unused dependencies that were installed alongside GNOME.

Ensure that the Unity Display Manager (LightDM) is still installed and configured:

sudo apt-get install lightdm
sudo dpkg-reconfigure lightdm

This ensures that LightDM is set as the display manager, which is used by Unity.
Now I just have to check all my spelling…LOL

If you need this is all the Deps/recomends

ubuntu-unity-desktop

apt depends ubuntu-unity-desktop
ubuntu-unity-desktop
Depends: alsa-base
Depends: alsa-utils
Depends: anacron
systemd-cron
Depends: at-spi2-core
Depends: bc
Depends: ca-certificates
Depends: dbus-x11
Depends: dmz-cursor-theme
Depends: doc-base
Depends: eom
Depends: file-roller
Depends: fontconfig
Depends: fonts-dejavu-core
Depends: foomatic-db-compressed-ppds
Depends: ghostscript
Depends: gnome-menus
Depends: gnome-session-canberra
Depends: gnome-terminal
Depends: gstreamer1.0-alsa
Depends: gstreamer1.0-libav
Depends: gstreamer1.0-plugins-bad
Depends: gstreamer1.0-plugins-base-apps
Depends: gstreamer1.0-plugins-good
Depends: gstreamer1.0-plugins-ugly
Depends: gstreamer1.0-pulseaudio
Depends: inputattach
Depends: iw
Depends: language-selector-common
Depends: language-selector-gnome
Depends: libatk-adaptor
Depends: libnotify-bin
Depends: libsasl2-modules
Depends: libu2f-udev
Depends: lightdm
Depends: lightdm-gtk-greeter
Depends: notification-daemon
dunst
awesome
cinnamon
gnome-flashback
gnome-shell
lomiri
lxqt-notificationd
mako-notifier
mate-notification-daemon
notify-osd
phosh
plasma-workspace
python3-jarabe
xfce4-notifyd
Depends: notify-osd
Depends: openprinting-ppds
Depends: pluma
Depends: policykit-1-gnome
Depends: printer-driver-pnm2ppa
Depends: pulseaudio
Depends: qml-module-qtquick-window2
Depends: qml-module-qtquick2
Depends: rfkill
Depends: software-properties-gtk
Depends: spice-vdagent
Depends: ubuntu-artwork
Depends: ubuntu-drivers-common
Depends: ubuntu-release-upgrader-gtk
Depends: ubuntu-settings
Depends: ubuntu-sounds
Depends: ubuntu-unity-backgrounds
Depends: ubuntu-unity-settings
Depends: unity
Depends: unity-control-center
Depends: unity-lens-applications
Depends: unity-lens-files
Depends: unity-scopes-runner
Depends: unity-session
Depends: unity-settings-daemon
Depends: unzip
Depends: update-manager
Depends: update-notifier
gnome-package-updater
Depends: wpasupplicant
Depends: xdg-user-dirs
Depends: xdg-user-dirs-gtk
Depends: xfwm4
Depends: xkb-data
Depends: xorg
Depends: xterm
qterminal
Depends: yaru-theme-gtk
Depends: yaru-theme-icon
Depends: yaru-theme-unity
Depends: zeitgeist-core
Depends: zeitgeist-datahub
Depends: zenity
Depends: zip
Recommends: a11y-profile-manager-indicator
Recommends: activity-log-manager
Recommends: aisleriot
Recommends: atril
Recommends: avahi-autoipd
Recommends: avahi-daemon
Recommends: bluez
Recommends: bluez-cups
Recommends: branding-ubuntu
Recommends: brltty
Recommends: cheese
Recommends: cups
legacy-printer-app
Recommends: cups-bsd
Recommends: cups-client
Recommends: cups-filters
Recommends: dirmngr
Recommends: example-content
Recommends: fonts-liberation
Recommends: fonts-noto-cjk
Recommends: fonts-noto-color-emoji
Recommends: fonts-noto-core
Recommends: fonts-ubuntu
fonts-ubuntu-classic
Recommends: fwupd
fwupd-snap
Recommends: fwupd-signed
Recommends: gdebi
Recommends: gnome-accessibility-themes
Recommends: gnome-bluetooth-sendto
Recommends: gnome-disk-utility
Recommends: gnome-keyring
Recommends: gnome-mahjongg
Recommends: gnome-mines
Recommends: gnome-power-manager
Recommends: gnome-screensaver
Recommends: gnome-screenshot
Recommends: gnome-sudoku
Recommends: gnome-system-tools
Recommends: gpg-agent
Recommends: gsettings-ubuntu-schemas
Recommends: gtk3-nocsd
Recommends: gucharmap
Recommends: gvfs-fuse
Recommends: hplip
Recommends: ibus
Recommends: ibus-table
Recommends: im-config
Recommends: laptop-detect
Recommends: libgail-common
Recommends: libglib2.0-bin
Recommends: libnss-mdns
Recommends: libpam-gnome-keyring
Recommends: libproxy1-plugin-gsettings
Recommends: libproxy1-plugin-networkmanager
Recommends: libreoffice-calc
Recommends: libreoffice-gnome
Recommends: libreoffice-impress
Recommends: libreoffice-math
Recommends: libreoffice-style-breeze
Recommends: libreoffice-writer
Recommends: libwmf0.2-7-gtk
Recommends: mate-calc
Recommends: mate-system-monitor
Recommends: memtest86+
Recommends: mousetweaks
Recommends: nemo
Recommends: network-manager-gnome
Recommends: network-manager-pptp-gnome
Recommends: onboard
Recommends: orca
Recommends: overlay-scrollbar-gtk2
Recommends: packagekit
Recommends: pcmciautils
Recommends: plymouth-theme-ubuntu-unity
Recommends: policykit-desktop-privileges
Recommends: ppa-purge
Recommends: ppp
Recommends: pppconfig
Recommends: pppoeconf
Recommends: printer-driver-brlaser
Recommends: printer-driver-c2esp
Recommends: printer-driver-foo2zjs
Recommends: printer-driver-m2300w
Recommends: printer-driver-min12xxw
Recommends: printer-driver-ptouch
Recommends: printer-driver-pxljr
Recommends: printer-driver-sag-gdi
Recommends: printer-driver-splix
Recommends: pulseaudio-module-bluetooth
Recommends: remmina
Recommends: rhythmbox
Recommends: seahorse
Recommends: shotwell
Recommends: simple-scan
Recommends: snapd
Recommends: speech-dispatcher
Recommends: stacer
Recommends: synaptic
Recommends: system-config-printer
Recommends: transmission-gtk
Recommends: ubuntu-docs
Recommends: unity-accessibility-profiles
Recommends: unity-indicator-appearance
Recommends: unity-tweak-tool
Recommends: usb-creator-gtk
Recommends: vino
Recommends: vlc
Recommends: whoopsie
Recommends: xcursor-themes
Recommends: xdg-utils
Recommends: xul-ext-ubufox

Thanks! I will try it and report back.

If doing this gives you heart flutters, I know it would for me :wink: , then first do a dry run by adding the -s flag to the commands.

This will simulate what would happen if you ran them and give you a chance to observe any errors or removals that you do not want.

For example, sudo apt-get -s remove --purge gnome*

1 Like

sudo is not needed for a simulation. :slight_smile:

apt-get -s remove --purge gnome*
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!

I also use this as a test:

apt-get -s purge gnome* $(dpkg -l | grep '^rc' | awk '{print $2}')

Return snipped:

The following NEW packages will be installed:
  kwalletmanager libkf6statusnotifieritem-data libkf6statusnotifieritem6
0 upgraded, 3 newly installed, 13 to remove and 1 not upgraded.
Purg gnome-accessibility-themes [3.28-4]
Purg gnome-disk-utility [46.1-1ubuntu1]
Inst libkf6statusnotifieritem-data (6.12.0-0ubuntu1 Ubuntu:25.04/plucky [all])
Inst libkf6statusnotifieritem6 (6.12.0-0ubuntu1 Ubuntu:25.04/plucky [amd64])
Inst kwalletmanager (4:24.12.3-0ubuntu1 Ubuntu:25.04/plucky [amd64])
Purg gnome-keyring [48.0-1]
Purg gnome-keyring-pkcs11 [48.0-1]
Purg gnome-themes-extra [3.28-4]
Purg gnome-themes-extra-data [3.28-4]
Purg krusader
Purg libasound2-plugins
Purg libnvidia-compute-570
Purg linux-modules-nvidia-570-open-6.14.0-13-generic
Purg linux-modules-nvidia-570-open-6.14.0-15-generic
Purg phonon4qt6
Purg pulseaudio
Conf libkf6statusnotifieritem-data (6.12.0-0ubuntu1 Ubuntu:25.04/plucky [all])
Conf libkf6statusnotifieritem6 (6.12.0-0ubuntu1 Ubuntu:25.04/plucky [amd64])
Conf kwalletmanager (4:24.12.3-0ubuntu1 Ubuntu:25.04/plucky [amd64])
W: Unable to read /etc/apt/sources.list.d/brave-browser-release.sources - open (13: Permission denied)
W: Unable to read /etc/apt/sources.list.d/surfshark.sources - open (13: Permission denied)

Please Have Good Back-ups before hand.

2 Likes

Why not simply sudo apt purge xterm ? (nothing in a default install should depend on it anymore, it has been moved to universe a long time ago, if something you installed does depend on it anyway you can indeed always stop the removal, apt asks :wink: )

2 Likes

I so wanted to ask that very question, but thought the OP would have already done it.

Great Question I should have started with! :+1:

1 Like

Er, I thought that was obvious… Because I want to keep Xterm.

Its tiny window size is useful for running a monitoring process in a corner of the screen when something is running that will take a long time.

1 Like

Oh, lol, hi Liam, I didn’t even notice whom I’m talking to (only realized it now when you answered) :grin:

Edit: stating the other obvious question, did you check the keyboard shortcut settings?

1 Like

Nope. Didn’t work.

Turns out this is now on a per-user basis, determined by ~/.config/xdg-terminals.listbut this does not point to a binary or anything. The existing value was some GNOME variable: org.gnome.Terminal.desktop.

This, it emerges, is somehow linked to .desktop files in /usr/share/applications.

In my case it needed to point to /usr/share/applications/xfce4-terminal.desktop.

Now it’s working.

EDIT:

But the global menu bar isn’t. Some environment variable isn’t being passed through this way. As my screen is only 1366x768 I need all the space I can get…

Well that’s out of the way, but the below this is a new for me:

Dang so would I… Just the standard suggestions, check the graphics drivers, monitor settings, or try different monitor connections . That last one is kind of a mute point though.

I know it wanted to un-install all nvidia on my end.

No, none of those are relevant at all. This is a question of where a UI feature displays; it’s not connected with GPU problems at all.

This is a Thinkpad X220. No discrete GPU, no separate drivers, only Intel integrated graphics in the i7.

I’m trying to reproduce, but things are fine on my end ie:

apt policy indicator-appmenu
indicator-appmenu:
  Installed: 15.02.0+20.10.20200617.2-0ubuntu4
  Candidate: 15.02.0+20.10.20200617.2-0ubuntu4
  Version table:
 *** 15.02.0+20.10.20200617.2-0ubuntu4 500
        500 http://archive.ubuntu.com/ubuntu plucky/universe amd64 Packages
        100 /var/lib/dpkg/status

gsettings get com.canonical.Unity integrated-menus 
true

inxi -F|grep -e Desktop -e Display
  Desktop: Unity v: 7.7.0 Distro: Ubuntu Unity 25.04 (Plucky Puffin)
  Display: x11 server: X.Org v: 21.1.16 with: Xwayland v: 24.1.6 driver: X:
  Device-4: DisplayLink UOEOS Laptop Dock driver: cdc_ncm,snd-usb-audio


It’s very hard for me to tell what’s happening on your end though.

xdpyinfo | grep dimensions
  dimensions:    1920x1080 pixels (508x286 millimeters)

I also have nothing but Lenovo laptops Thinkpads (intel and nvidia)
Type: Laptop System: LENOVO product: 82JW v: Legion 5 15ACH6 is the only one not a Thinkpad

I will say cherry picking left over’s from Gnome is no small deed! :wink:

Now that’s interesting.

I get “false”.

But the behaviour is this:

  • If I launch xfce4-terminal with Ctrl+Alt+T it has menus in the window, not in the global menu bar.
  • If I launch with Super+A for the apps lens, then type “term” or pick it from recent items, it correctly uses the menu bar. No menus in the window.

If it’s already open, then a new window either way launches with the same settings as the existing copy. It’s not running a new instance, just opening another window. But I don’t think that helps.

I will say cherry picking left over’s from Gnome is no small deed! :wink:

What do you mean?

Given that Unity is actually GNOME (it is just replacing the shell), you can indeed not remove GNOME…

You could get rid of gnome-shell itself though, but Unity uses all the other GNOME infrastructure bits.

You could also look at the original Unity desktop seed (no idea where that lives nowadays, I guess some of the flavor maintainers know though) to see which bits are actually required and do some fine grained removal …

IIRC the handling of that is managed through an ugly hack that uses LD_PRELOAD to preload some override lib to handle menus differently and re-locate them to the top bar … Most likely the preload env var is not available when you use the key combo…

2 Likes

Meaning this time It was a lot more work to keep a pure Unity DE!

I don’t think I’ll offer this to anyone else anymore it’s gotten far to complicated.

1 Like