Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Emong
May 31, 2011

perpair to be annihilated


Mr. Crow posted:

if your using any sort of joystick or wireless controller or headset you are probably touching udev

i'm a gentoo using weirdo and i have never had to touch udev even once

Adbot
ADBOT LOVES YOU

Mr. Crow
May 22, 2008

Snap City mayor for life

Emong posted:

i'm a gentoo using weirdo and i have never had to touch udev even once

well yea your probably still waiting for the kernel to compile

Progressive JPEG
Feb 19, 2003

i have a few udev configs sitting around for fixing permissions on:
- raphnet usb adapters
- SDRs

sure am glad that udev is there to make sure nobody can see what my n64 controller is doing, not even myself

sb hermit
Dec 13, 2016





Sapozhnik posted:

it's a pre-release feature that's still in testing, so it's not going to be prominently documented since it is intended for use by developers at the moment.

there are plenty of other obtuse hidden configuration things in linux to complain about, like fontconfig, or polkit.

want to mount this random flash drive you found in the parking lot? sure, no problem buddy. want to mount an encrypted volume? whoa there friend i'm going to need you to enter your account password (no, not the volume passphrase, you need your account password as well) to authorize that. want to change that behavior? simple, you merely need to write a supplementary authorization policy in javascript to automatically authorize this particular action code. why yes i did just tell you to go gently caress yourself.

you can use “gio mount -d” to mount encrypted volumes from the command line without entering the account password or requiring root privileges, I think. Not sure if it requires you to be in a specific group or if you’re in the console logged-in group though, but I expect that to be the case.

mycophobia
May 7, 2008

Mr. Crow posted:

if your using any sort of joystick or wireless controller or headset you are probably touching udev

????

outhole surfer
Mar 18, 2003

i use udev to assign useful device names and permissions to usb serial devices

outhole surfer
Mar 18, 2003

sb hermit posted:

you can use “gio mount -d” to mount encrypted volumes from the command line without entering the account password or requiring root privileges, I think. Not sure if it requires you to be in a specific group or if you’re in the console logged-in group though, but I expect that to be the case.

gnome let's you do all sorts of poo poo you'd expect to need root for

you can change a systems loving hostname without auth

Mr. Crow
May 22, 2008

Snap City mayor for life
post em if you got em

code:
> ls /etc/udev/rules.d/*
/etc/udev/rules.d/50-my-passport.rules  /etc/udev/rules.d/99-headphones.rules
/etc/udev/rules.d/51-android.rules      /etc/udev/rules.d/99-my-partitions.rules
/etc/udev/rules.d/65-yealink.rules      /etc/udev/rules.d/99-saitek-x52pro.rules
/etc/udev/rules.d/71-gnupg-ccid.rules

Truga
May 4, 2014
Lipstick Apathy
i did have a sennheiser headset where they updated the wifi dongle to be compatible with a switch, which broke windows/linux support. they of did released an updated driver. for windows

i had to touch udev and pulse audio then, and do some kernel bullshit because the usb device ids changed, but that was years ago and probably the last time i had to touch udev lol

Woolie Wool
Jun 2, 2006


Emong posted:

i'm a gentoo using weirdo and i have never had to touch udev even once

Same but I'm an arch weirdo, all my USB poo poo just works

Cybernetic Vermin
Apr 18, 2005

i don't care how many guys you try it, i am not falling for this "touch udev" burn setup

Mr. Crow
May 22, 2008

Snap City mayor for life
apparently i buy all the lovely usb devices, but you can take my xbox one wireless controller from my cold dead hands. the wireless dongle is hella good as i get zero input latency across the house. steam remote play on the couch but with my controller still direct connected to pc, its great, bluetooth however is not

FlapYoJacks
Feb 12, 2009

Woolie Wool posted:

Same but I'm an arch weirdo, all my USB poo poo just works

Fedora 39, the only udev rule I have is for a JTAG which is to be expected.

AnimeIsTrash
Jun 30, 2018

Cybernetic Vermin posted:

i don't care how many guys you try it, i am not falling for this "touch udev" burn setup

shackleford
Sep 4, 2006

Mr. Crow posted:

post em if you got em

code:
> ls /etc/udev/rules.d/*
/etc/udev/rules.d/50-my-passport.rules  /etc/udev/rules.d/99-headphones.rules
/etc/udev/rules.d/51-android.rules      /etc/udev/rules.d/99-my-partitions.rules
/etc/udev/rules.d/65-yealink.rules      /etc/udev/rules.d/99-saitek-x52pro.rules
/etc/udev/rules.d/71-gnupg-ccid.rules

code:
$ cat /etc/modprobe.d/my-cdc-blacklist.conf
blacklist cdc_ncm
blacklist cdc_mbim
blacklist cdc_ether
blacklist cdc_wdm

$ cat /etc/udev/rules.d/999-local-usb-realtek-net.rules
# This is used to change the default configuration of Realtek USB ethernet adapters
# (From: https://raw.githubusercontent.com/bb-qq/r8152/master/50-usb-realtek-net.rules)

ACTION!="add", GOTO="usb_realtek_net_end"
SUBSYSTEM!="usb", GOTO="usb_realtek_net_end"
ENV{DEVTYPE}!="usb_device", GOTO="usb_realtek_net_end"

# Modify this to change the default value
ENV{REALTEK_MODE1}="1"
ENV{REALTEK_MODE2}="3"

# Realtek
ATTR{idVendor}=="0bda", ATTR{idProduct}=="815[2,3,5,6]", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="0bda", ATTR{idProduct}=="8053", ATTR{bcdDevice}=="e???", ATTR{bConfigurationValue}!="$env{REALTEK_MODE2}", ATTR{bConfigurationValue}="$env{REALTEK_MODE2}"

# Samsung
ATTR{idVendor}=="04e8", ATTR{idProduct}=="a101", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"

# Lenovo
ATTR{idVendor}=="17ef", ATTR{idProduct}=="304f", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="17ef", ATTR{idProduct}=="3052", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="17ef", ATTR{idProduct}=="3054", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="17ef", ATTR{idProduct}=="3057", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="17ef", ATTR{idProduct}=="3062", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="17ef", ATTR{idProduct}=="3069", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="17ef", ATTR{idProduct}=="3082", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="17ef", ATTR{idProduct}=="3098", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="17ef", ATTR{idProduct}=="7205", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="17ef", ATTR{idProduct}=="720a", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="17ef", ATTR{idProduct}=="720b", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="17ef", ATTR{idProduct}=="720c", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="17ef", ATTR{idProduct}=="7214", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="17ef", ATTR{idProduct}=="721e", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="17ef", ATTR{idProduct}=="8153", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="17ef", ATTR{idProduct}=="a359", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="17ef", ATTR{idProduct}=="a387", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"

# TP-LINK
ATTR{idVendor}=="2357", ATTR{idProduct}=="0601", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"

# Nvidia
ATTR{idVendor}=="0955", ATTR{idProduct}=="09ff", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"

# LINKSYS
ATTR{idVendor}=="13b1", ATTR{idProduct}=="0041", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"

LABEL="usb_realtek_net_end"
iirc there are popular 2.5 GbE realtek USB dongles that perform like poo poo with the default generic cdc_ether driver (like ~0.5 Gbps) but acceptably with the native chipset-specific driver (like ~2.3 Gbps). the kernel developers' position is something like, the device supports multiple modes, therefore it's a policy decision (i.e. userspace problem) about selecting whether you want to replace the dumb slow lovely driver with the good performance driver

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN

outhole surfer posted:

gnome let's you do all sorts of poo poo …
you can change a systems loving hostname without auth

really? how?

i actually have gnome set up (and mostly not working because of udev) on iSH (though things based on gtk like xfce/mate do work), but i can't change the hostname because of two reasons really. for one, the hostname service won't start without udev. secondly, there aren't any real network interfaces, it's just a bare minimum bridge to your system's en0

like, ifconfig even fails like so

code:
ifconfig: /proc/net/dev: No such file or directory
ifconfig: ioctl 0x8912 failed: Not a tty
so i'd like to try this other method of changing hostnames, just to see if it would work. tbh i don't really care if it does, i'm just curious about this. it defaults to using its root account so i'd likely have permission to do whatever anyway

outhole surfer
Mar 18, 2003

open the control panel, go to about this system or whatever its called (bottom section in control panel), click on the hostname and edit away

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN

outhole surfer posted:

open the control panel, go to about this system or whatever its called (bottom section in control panel), click on the hostname and edit away

ah the gnome control panel doesn't run. oh well. maybe it works with xfce or something, i'll give it a try when i feel like loving with it

you have to use a local xvnc or xrdp, and, well, that's not ideal on ios because it suspends background processes, so you have to use a workaround and blah blah nobody cares

Sapozhnik
Jan 2, 2005

Nap Ghost
hostnamectl set-hostname whatever

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN

Sapozhnik posted:

hostnamectl set-hostname whatever

i don't have a hostnamectl anywhere, what package might have it? (on iSH you have to use apk, which, again, far from ideal)

Sapozhnik
Jan 2, 2005

Nap Ghost
it's a systemd thing

Mr. Crow
May 22, 2008

Snap City mayor for life
can't you just write it to /etc/hostname?

Mr. Crow
May 22, 2008

Snap City mayor for life
echo "big-fart" | sudo tee /etc/hostname

pseudorandom name
May 6, 2007

that just changes a file on disk

Woolie Wool
Jun 2, 2006


You shouldn't be able to change a hostname without root or sudo anyway, if you want a system with no security try windows 95 :colbert:

pseudorandom name
May 6, 2007

you can't

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN

Sapozhnik posted:

it's a systemd thing

lol systemd isn't even available as a package (it seems to be able to use regular 32-bit x86 alpine repos, but it uses http://apk.ish.app/v3.19-2024-01-28/main/x86/APKINDEX.tar.gz as a default)

Mr. Crow posted:

can't you just write it to /etc/hostname?

sure, but it doesn't actually change the hostname afaict

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Beeftweeter posted:

sure, but it doesn't actually change the hostname afaict

"hostname" means like a dozen different things on linux

there's what's in /etc/hostname, what's in /etc/hosts which can be a lotta stuff and often has a short and long (more qualified) name, what your local router's dhcp thinks you are, what dns thinks you are, all the shorter/not fully qualified versions of the last two...

heck, there's probably something in dbus too or something equally asinine

Sapozhnik
Jan 2, 2005

Nap Ghost
Hostname is a kernel thing. Why the kernel needs to know or care about machine host name I don't know but that's what people are usually referring to when they talk about a machine host name.

Anyway if you're using some dumb hobbyist Linux userland that doesn't include systemd then that's on you.

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN

Visions of Valerie posted:

"hostname" means like a dozen different things on linux

there's what's in /etc/hostname, what's in /etc/hosts which can be a lotta stuff and often has a short and long (more qualified) name, what your local router's dhcp thinks you are, what dns thinks you are, all the shorter/not fully qualified versions of the last two...

heck, there's probably something in dbus too or something equally asinine

well, i mean what's reported to dhcp (and like i said, that's actually a bridge to ios's en0 in this case), what you get with `hostname`, dns, mdns, etc.

i set /etc/hostname to "ish-ipad.local" and everywhere i can think of to check still just says "localhost"

Sapozhnik posted:

Anyway if you're using some dumb hobbyist Linux userland that doesn't include systemd then that's on you.

yeah like i said i'm not actually using this for anything, it's just an interesting project imo that i was having some fun playing around with. it's honestly pretty impressive as is, but a lot of poo poo doesn't work (which is understandable if you know how it works under the hood). you can check it out here if interested: https://github.com/ish-app/ish (the app is on the app store, or you can try the testflight dailies)

Celexi
Nov 25, 2006

Slava Ukraini!

Visions of Valerie posted:

"hostname" means like a dozen different things on linux

there's what's in /etc/hostname, what's in /etc/hosts which can be a lotta stuff and often has a short and long (more qualified) name, what your local router's dhcp thinks you are, what dns thinks you are, all the shorter/not fully qualified versions of the last two...

heck, there's probably something in dbus too or something equally asinine

whenever ive changed hostname in a linux it changes it in all of those, I can override it with my router though for local connections or make sure it stays correct

Mr. Crow
May 22, 2008

Snap City mayor for life

Beeftweeter posted:

sure, but it doesn't actually change the hostname afaict

well yes youd need to reboot probably if you dont have access to any of the standard utils to do it.

Mr. Crow
May 22, 2008

Snap City mayor for life
if that doesnt work after reboot you have a dhcp server handing you localhost for some reason, i would check your dhclient configs or whatever dhcp client your using, https://unix.stackexchange.com/questions/145395/spoofing-or-removing-dhcp-client-hostname-in-response-to-dhcp-server

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender
iirc if you want to change the kernel's idea of the hostname and for some reason you don't have the standard linux tooling available, then you just write to /proc/sys/kernel/hostname

pseudorandom name
May 6, 2007

Mr. Crow posted:

well yes youd need to reboot probably if you dont have access to any of the standard utils to do it.

that seems like a lot of work, it'd be easier to just use hostnamectl

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN

Mr. Crow posted:

if that doesnt work after reboot you have a dhcp server handing you localhost for some reason, i would check your dhclient configs or whatever dhcp client your using, https://unix.stackexchange.com/questions/145395/spoofing-or-removing-dhcp-client-hostname-in-response-to-dhcp-server

no no, you're not getting it: it's an entirely emulated interface. there's no dhcp server, the dns resolver is also emulated, and dhclient doesn't work because there is no network device (meaning there's no corresponding interface either)

ShoulderDaemon posted:

iirc if you want to change the kernel's idea of the hostname and for some reason you don't have the standard linux tooling available, then you just write to /proc/sys/kernel/hostname

neat idea, but there's no /proc/sys either. i don't know what it's doing for procfs because while it's actually populated (barely), the procfs service doesn't start because it can't grep /proc/filesystems (i guess i can look at the rc script to see if i can get it to start anyway, but i'm not sure it would make any difference)

Beeftweeter fucked around with this message at 05:50 on Feb 1, 2024

Beeftweeter
Jun 28, 2005

OFFICIAL #1 GNOME FAN

Mr. Crow posted:

well yes youd need to reboot probably if you dont have access to any of the standard utils to do it.

also a reboot is force-closing the app, but it didn't work to change it either (and yes, /etc/hostname is still the modified version)

shackleford
Sep 4, 2006

you're talking about the node name, call the sethostname() system call to set it

Share Bear
Apr 27, 2004

so dumb q re the hostname question

under what manpages and order of operations are you supposed to figure that out

Adbot
ADBOT LOVES YOU

shackleford
Sep 4, 2006

Share Bear posted:

so dumb q re the hostname question

under what manpages and order of operations are you supposed to figure that out

sethostname(2)

https://linux.die.net/man/2/sethostname

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply