<SOLVED> gnome-terminal only prompt $, no history, arrow keys fail

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
keithterrill
Level 1
Level 1
Posts: 41
Joined: Fri Jun 20, 2014 12:02 pm

<SOLVED> gnome-terminal only prompt $, no history, arrow keys fail

Post by keithterrill »

I am not sure how to explain this exactly. I copied my /home drive to another disk, then did a fresh install of 20.2, created each user with their UID, then restored the /home drive.

Most of the programs are working correctly and with the users setups. But, there is trouble with terminal (gnome-terminal 3.36.2). It works fine for the administrator account, but not for any of the other user accounts. Even if those users are given administrator rights, it doesn't work correctly.

The problem: it doesn't show the prompt with name, etc. only the $ prompt. Tab just tabs over, and does not complete the program/file name. The up, down, left, right arrows show

Code: Select all

^[[A^[[B^[[D^[[C
..... No mater what I do, I cannot get it to work.

I have discovered that if I run "bash" or "/bin/bash" the shell behaves correctly. So, it appears that when launching this, bash is not being called.

If I run "/bin/sh" it launches with the problems.


My system....

Code: Select all

System:    Kernel: 5.4.0-91-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 5.0.7 wm: muffin 5.0.2 
           dm: LightDM 1.30.0 Distro: Linux Mint 20.2 Uma base: Ubuntu 20.04 focal 
Machine:   Type: Desktop System: Hewlett-Packard product: HP Compaq 8200 Elite CMT PC v: N/A serial: <filter> Chassis: type: 6 
           serial: <filter> 
           Mobo: Hewlett-Packard model: 1494 serial: <filter> BIOS: Hewlett-Packard v: J01 v02.24 date: 09/20/2013 
CPU:       Topology: Quad Core model: Intel Core i5-2400 bits: 64 type: MCP arch: Sandy Bridge rev: 7 L2 cache: 6144 KiB 
           flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 24740 
           Speed: 1596 MHz min/max: 1600/3400 MHz Core speeds (MHz): 1: 1596 2: 1596 3: 1596 4: 1596 
Graphics:  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics vendor: Hewlett-Packard driver: i915 
           v: kernel bus ID: 00:02.0 chip ID: 8086:0102 
           Display: x11 server: X.Org 1.20.11 driver: modesetting unloaded: fbdev,vesa resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 2000 (SNB GT1) v: 3.3 Mesa 21.0.3 compat-v: 3.0 direct render: Yes 
Audio:     Device-1: Intel 6 Series/C200 Series Family High Definition Audio vendor: Hewlett-Packard driver: snd_hda_intel 
           v: kernel bus ID: 00:1b.0 chip ID: 8086:1c20 
           Sound Server: ALSA v: k5.4.0-91-generic 
Network:   Device-1: Intel 82579LM Gigabit Network vendor: Hewlett-Packard driver: e1000e v: 3.2.6-k port: f080 
           bus ID: 00:19.0 chip ID: 8086:1502 
           IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Drives:    Local Storage: total: 1.82 TiB used: 971.64 GiB (52.2%) 
           ID-1: /dev/sda vendor: Western Digital model: WD1002FAEX-00Z3A0 size: 931.51 GiB speed: 6.0 Gb/s serial: <filter> 
           rev: 1D05 scheme: MBR 
           ID-2: /dev/sdb vendor: Western Digital model: WD1003FZEX-00K3CA0 size: 931.51 GiB speed: 6.0 Gb/s 
           rotation: 7200 rpm serial: <filter> rev: 1A01 scheme: GPT 
Partition: ID-1: / size: 118.71 GiB used: 12.29 GiB (10.4%) fs: ext4 dev: /dev/sda5 
           ID-2: /boot size: 944.6 MiB used: 309.9 MiB (32.8%) fs: ext4 dev: /dev/sda1 
           ID-3: /home size: 767.58 GiB used: 332.64 GiB (43.3%) fs: ext4 dev: /dev/sda7 
           ID-4: swap-1 size: 28.61 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda6 
Sensors:   System Temperatures: cpu: 26.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Repos:     No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/google-chrome.list 
           1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb http://packages.linuxmint.com uma main upstream import backport #id:linuxmint_main
           2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
           3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
           4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
           5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
           6: deb http://archive.canonical.com/ubuntu/ focal partner
           Active apt repos in: /etc/apt/sources.list.d/spotify.list 
           1: deb http://repository.spotify.com stable non-free
Info:      Processes: 356 Uptime: 6h 05m Memory: 11.59 GiB used: 1.90 GiB (16.4%) Init: systemd v: 245 runlevel: 5 Compilers: 
           gcc: 9.3.0 alt: 9 Shell: sh running in: gnome-terminal inxi: 3.0.38 
I have searched for something like this, but cannot find anything.

Any help?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
keithterrill
Level 1
Level 1
Posts: 41
Joined: Fri Jun 20, 2014 12:02 pm

Re: gnome-terminal only prompt $, no history, arrow keys fail

Post by keithterrill »

This was suggested by someone on the Linux Mint Group on Facebook ----> use chsh to change the shell to /bin/bash.

I did, and then logged out, then back in.... and that fixed the problem.
mikeflan
Level 16
Level 16
Posts: 6974
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: <SOLVED> gnome-terminal only prompt $, no history, arrow keys fail

Post by mikeflan »

Hmm. I sure would like to know why you had to do that. I have only one user on my system.
User avatar
keithterrill
Level 1
Level 1
Posts: 41
Joined: Fri Jun 20, 2014 12:02 pm

Re: <SOLVED> gnome-terminal only prompt $, no history, arrow keys fail

Post by keithterrill »

mikeflan wrote: Sat Dec 04, 2021 10:13 pm Hmm. I sure would like to know why you had to do that. I have only one user on my system.
Why I had to do that? I am thinking you mean, why do I have multiple users on my system? If that is the question, the answer is because I segmented the use into: administration, multi-media streaming service, game playing, virtual box service, and a programming environment.

As, such the administration only has what is needed to administer the system, nothing more.

The multi-media streaming service is the only user that has access to the multimedia drives which have my movies, music, etc and the streaming server is maintained there, nothing more. Except when adding additional content to the multimedia drives I access the server from a different computer on my intranet.

The game playing user has steam as well as a couple of simulation games that I access from time to time. I do not want to mix it with anything else so it resides in its own /home/<the game user> directory.

The virtual box service is solely for testing various operating systems. It also runs a few servers in the background.

The programming environment is for all my programming. I also access this from one of my other computers in the intranet.

Each user has its own set up, desktop setup, and unique resources that are not necessary for the other users areas. Also, except for a complete OS upgrade, backup and restore only needs to be focused on an individual user. (Yes, I also use timeshift for the over all OS.)

To play the games or test a system in a virtual machine, I make my way down to the "server room", otherwise, I access this from a different computer on the intranet.

Does that explain it?
mikeflan
Level 16
Level 16
Posts: 6974
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: <SOLVED> gnome-terminal only prompt $, no history, arrow keys fail

Post by mikeflan »

No - I meant why did you have to use chsh to change the shell to /bin/bash. I would like to hear more about that from the people who know.
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: <SOLVED> gnome-terminal only prompt $, no history, arrow keys fail

Post by rene »

mikeflan wrote: Tue Dec 07, 2021 6:32 am No - I meant why did you have to use chsh to change the shell to /bin/bash. I would like to hear more about that from the people who know.
I expect poster added the additional users with useradd rather than adduser or some graphical tool. If a user's home directory already exists that doesn't complain and/but does indeed set their shell to /bin/sh, i.e., dash rather than bash. useradd is the basic, "system" type tool and needs explicit options for niceties such as giving the user a useable shell.
User avatar
keithterrill
Level 1
Level 1
Posts: 41
Joined: Fri Jun 20, 2014 12:02 pm

Re: <SOLVED> gnome-terminal only prompt $, no history, arrow keys fail

Post by keithterrill »

mikeflan wrote
No - I meant why did you have to use chsh to change the shell to /bin/bash. I would like to hear more about that from the people who know.
So, I misunderstood your question.
rene wrote
I expect poster added the additional users with useradd rather than adduser or some graphical tool.
rene, you have the answer. Looking back in history library to see which command was used, it turns out that useradd was how the users were created.

Code: Select all

sudo useradd -u <uid> <login> 
I was unaware of adduser, let alone the difference in setting up the shell. It appears that for my next computer upgrade (going from 17.3 to 20.2) I will use

Code: Select all

sudo adduser --uid <uid> <user> 
man shows that --shell may be something to consider.

rene, thank-you for the insight. It helps explain what occured.
Locked

Return to “Software & Applications”