User avatar
Botspot
Posts: 1241
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Website

What file is responsible for the 'pi@raspberrypi'?

Thu Jun 04, 2020 4:38 pm

I'm trying to debug a strange problem with my RPi virtual machine script.
When opening a terminal, it just looks like this:
blank_terminal.png
blank_terminal.png (8.85 KiB) Viewed 428 times
  • Pressing Enter doesn't do anything.
  • It ignores anything I type in. (no text appears as I'm typing)
  • Strangely enough, running 'sudo lxterminal', that will work fine. And from there I can login as user pi and I get pi@raspberrypi like normal.
What to check first?

PS. This problem only occurs if I boot a RPiOS image. Raspbian Buster images didn't have this problem IIRC.
Want to make your own Raspbian image?
  • Hard way: Mess with confusing terminal commands.
  • Easy way: Let Pi-Power-Tools do it all for you!
Boot your image in a VM, Flash from the Internet at top speed, Mount (to drop files in), Edit partitions, Shrink/Expand, Repair, and more. Enjoy! :)
https://github.com/Botspot/Pi-Power-Tools

User avatar
thagrol
Posts: 2961
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: What file is responsible for the 'pi@raspberrypi'?

Thu Jun 04, 2020 10:50 pm

Assuming what you actualy want to know is what file sets the prompt to user@hostname the answer is: probably /etc/profile

However that may not be the question and answer you need.

At log in a number of scripts are run all of which call other commands. Any of which could be the problem.

Have a look at the following:
/etc/profile
All files in /etc/profile.d
The following files in your user's home directory: .profile, .bashrc, .bash_aliases

There may be others, especially if you're using a different shell. I've no idea if systemd fires anything on login.
Attempts to contact me outside of these forums will be ignored unless signed in triplicate, sent in, sent back, queried, lost, found, subjected to public enquiry, lost again, and finally buried in soft peat for three months and recycled as firelighters

User avatar
Botspot
Posts: 1241
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Website

Re: What file is responsible for the 'pi@raspberrypi'?

Fri Jun 05, 2020 12:27 am

thagrol wrote:
Thu Jun 04, 2020 10:50 pm
Assuming what you actualy want to know is what file sets the prompt to user@hostname the answer is: probably /etc/profile
Oh, I should have considered that. :roll:
Vdesktop mounts a customized version of /etc/profile to start the X session. Looks like time for a redesign. :roll:

Another question: chromium-browser works perfectly in the VM, as long as the host device is a Pi 3.
On a Pi4 running vdesktop, chromium-browser shows a "Aw, Snap!" error on every website. No idea why. Any pointers on what to check first? Thanks.
Want to make your own Raspbian image?
  • Hard way: Mess with confusing terminal commands.
  • Easy way: Let Pi-Power-Tools do it all for you!
Boot your image in a VM, Flash from the Internet at top speed, Mount (to drop files in), Edit partitions, Shrink/Expand, Repair, and more. Enjoy! :)
https://github.com/Botspot/Pi-Power-Tools

User avatar
thagrol
Posts: 2961
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: What file is responsible for the 'pi@raspberrypi'?

Fri Jun 05, 2020 12:48 pm

Botspot wrote:
Fri Jun 05, 2020 12:27 am
thagrol wrote:
Thu Jun 04, 2020 10:50 pm
Assuming what you actualy want to know is what file sets the prompt to user@hostname the answer is: probably /etc/profile
Oh, I should have considered that. :roll:
Vdesktop mounts a customized version of /etc/profile to start the X session. Looks like time for a redesign. :roll:

Another question: chromium-browser works perfectly in the VM, as long as the host device is a Pi 3.
On a Pi4 running vdesktop, chromium-browser shows a "Aw, Snap!" error on every website. No idea why. Any pointers on what to check first? Thanks.
No idea. Don't use the desktop or chromium. Sorry.
Attempts to contact me outside of these forums will be ignored unless signed in triplicate, sent in, sent back, queried, lost, found, subjected to public enquiry, lost again, and finally buried in soft peat for three months and recycled as firelighters

User avatar
Botspot
Posts: 1241
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Website

Re: What file is responsible for the 'pi@raspberrypi'?

Fri Jun 05, 2020 12:50 pm

thagrol wrote:
Fri Jun 05, 2020 12:48 pm
No idea. Don't use the desktop or chromium. Sorry.
No problem. So far nobody has had the slightest idea of what the problem could be.
Want to make your own Raspbian image?
  • Hard way: Mess with confusing terminal commands.
  • Easy way: Let Pi-Power-Tools do it all for you!
Boot your image in a VM, Flash from the Internet at top speed, Mount (to drop files in), Edit partitions, Shrink/Expand, Repair, and more. Enjoy! :)
https://github.com/Botspot/Pi-Power-Tools

pidd
Posts: 293
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK
Contact: Website

Re: What file is responsible for the 'pi@raspberrypi'?

Fri Jun 05, 2020 12:57 pm

Do you have to specify what to run inside the terminal eg bash or whatever you want? ie the terminal has to know what to connect to?

User avatar
Botspot
Posts: 1241
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Website

Re: What file is responsible for the 'pi@raspberrypi'?

Fri Jun 05, 2020 1:00 pm

pidd wrote:
Fri Jun 05, 2020 12:57 pm
Do you have to specify what to run inside the terminal eg bash or whatever you want? ie the terminal has to know what to connect to?
I don't understand your question.
Are you asking how my virtual machine script works?
Want to make your own Raspbian image?
  • Hard way: Mess with confusing terminal commands.
  • Easy way: Let Pi-Power-Tools do it all for you!
Boot your image in a VM, Flash from the Internet at top speed, Mount (to drop files in), Edit partitions, Shrink/Expand, Repair, and more. Enjoy! :)
https://github.com/Botspot/Pi-Power-Tools

Return to “Advanced users”