Please let user choose a username at first setup time

Please let the user choose a personal username at initial boot after installation!
Defaultuser is too long to type, and to say it honestly, it’s not a beautiful username. But it’s OK only in case the user doesn’t want to enter a personal username.

11 Likes

Yes. Or switch back to nemo, it was perfect: no personal details, short, easy to type and remember, immediately brings “captain” to mind, good name for first user…

3 Likes

What benefit does this serve?

Last I checked, all applications were programmed with “/home/defaultuser” as the $HOME variable in mind, and the last time a change like this was made (from nemo to defaultuser starting in 3.3) it caused tremendous headaches, requiring updates or symlinking nemo to defaultuser.

And at what points are you needing to even enter “defaultuser” into an application? Once again, what benefit does this serve, and how would it be worth breaking several applications that depend on these defaults?

1 Like

TBH -and assuming the phone supported avahi (cough cough)- i’d love to connect to it with my_name@my_hostname.local etc as i do to all the stuff around me.

2 Likes

@WedgeStratos :

  1. Why does an app depend on a username? On my (and on every) Linux computer there are a lot of applications running and none of them are designed for my username on this computer.
  2. i have to type ‘defaultuser’ every time I ssh or sftp to the phone from laptop. And that’s quite often.

IMHO better than ‘defaultuser’ is simply ‘user’. So there would be simply ‘user’ (normal user rights) or ‘root’ or ‘devel-su’ for admin (privileged rights).

Coul a host entry for ssh solve this part of your problems?

Add this to .ssh/config on you laptop/computer:

Host phone
  Hostname xperiaxa2
  User defaultuser

The connect with ssh phone

This works on most networks for me, sometimes i need to use the IP, but in these cases I just use USB then usually. I also have an entry for this:

Host phoneusb
  Hostname 192.168.5.15
  User defaultuser
1 Like

This is technically off-topic; but i can already do ssh defaultuser@Xperia10III with no config at all. Presumably it is my router picking up the hostname and adding it to dns, should be pretty normal…

2 Likes

@thigg : …and where in the phone is the name ‘Xperia10III’ set?
until now I always logged into the phone with ‘ssh defaultuser@192.168.0.x’, [enter] , then terminal asked me for password, then i was logged in. The host address (x) i read from Settings/developer tools.

edit: Does this also work, if the IP-address the phone gets from the router, changes sometimes?

This is the hostname, you can either see it in your router or in /etc/hostname. And it works, when the ip changes. Also for maximum convenience i would recommend using a ssh key.
For that, do on your computer:

ssh-keygen
ssh-copy-id phone

this deploys your newly generated key on your phone. (you can simply enter an empty password for ssh-keygen, if you deem files on your pc as secure)

afterwards you can just use ssh phone without ever typing your password again (from this user on this computer).
Also rsync, scp,… Work with all of these (keys and host entries)

1 Like

I didn’t have a ‘~/.ssh/config’ file on my computer (Ubuntu Linux), so I created one. But it doesn’t work. Computer reports: ‘ssh: Could not resolve hostname xperia10-dualsim: Temporary failure in name resolution’ , doesn’t find the IP-address of the phone.

So in your instance the computer doesn’t ‘know’ the device.

I set up a fixed ip address for devices like my PCs and phone on the router, then give them a name in my hosts file.
You can then ssh username@xperia10xiii
eg:
192.168.1.266 xperia10xiii

1 Like

I have not yet a real router, I use one of my Sailfish phones with its mobile access point as main internet gateway and have no other.

Connected to this access point are a TP-Link DAP-1325 WLAN range extender, via cable a printer, and another Sony and a Volla Sailfish phone also via WLAN.

So can I configure all this routing in the one phone thats the access point?
The TP Link has no option for such settings on it’s config page, it’s too simple.

Another way to set a static ip address is by defining it in the client.
There is a risk in a more ‘normal’ network of ip addresses being duplicated if the router provisions the same ip as defined by another client, but you should be ok.
In your case I would make a note of your phone ip (from the Developer tools section of Settings) and use that. I would also do the same on your computer and as many devices as possible in order to avoid the possibility of duplication.

I haven’t done this on a linux system (years ago I used to set static ips on my Windows devices, but since then I’ve used the router where required), but I assume something like this might work:

I would make backups of any files before editing them just in case
There’s a guide here

‘‘I didn’t have a ‘~/.ssh/config’ file on my computer’’

Not even in /etc?

@ric9k
No, the only file I have is :
/etc/ssh/ssh_config

and an empty folder:
/etc/ssh/ssh_config.d/

edit:
’ ~/.ssh/known_hosts’ is the only file in ~/.ssh/ , no other file present.

Hmm, not sure but ymmv depending the ssh version?
Maybe a hidden file or hidden dir in your home?
You are using ssh as usual user, aren’t you?
Do

find /home/[your dir name]/ -iname “*ssh*”

give nothing either?

There comes nothing. After a second, again input prompt, nothing else.

Hmm, knowledge lack at this point…
Have no computer atm to test/search.
But search the web,

how to use ssh config file

seems to give good fruits!

1 Like

This content in ‘~/.ssh/config’ works as long the phone has this dynamic IP address:

Host volla
Hostname 192.168.0.3
User defaultuser

So I have only to type ‘ssh volla’ and immediately there comes the password prompt. Thats very good, but i fear it will stop to work as soon the phone will get another dynamic IP address anytime later. But a first step is done. Thank you very much! :smiling_face_with_three_hearts:

Previous experiments with:
Host volla
Hostname VollaPhone
User defaultuser

did NOT work. (VollaPhone is the phones network name entered in 'Settings/WLAN/pulldown/advanced/Hostname )

1 Like