DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 14th December 2017
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 555
Default chmod on /dev/ to persist through reboot

I thought this would be a 5 second google, and I haven't found it yet (trying terms like "openbsd" chmod dev reboot and similar.

I have /dev/drm0. Its default is root wheel, 600. I want it to be 660, as otherwise, mpv media player doesn't work properly. The user who runs it is a member of the wheel group.

An alternative would be change it root and audio, but again audio should have read write. (Hrrm, change ownership to audio? I'm open to suggestions.)

At any rate, on 6.2-current, I can make the change but it doesn't survive a reboot and I can't find how to have the chmod persist
Feel free to scoff, just remember I am currently an invalid and you will be making fun of a temporary cripple.

And I just found that if I do this as root, I get operation not permitted but user scottro, using doas can do it. Not sure if that's relevant.

Last edited by scottro; 14th December 2017 at 11:48 PM.
Reply With Quote
  #2   (View Single Post)  
Old 14th December 2017
shep shep is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,086
Default

Unless something has changed, section 1.6 of @J65nko's howto gave members of the operator group rw permissions
http://daemonforums.org/showthread.php?t=2232
Reply With Quote
  #3   (View Single Post)  
Old 15th December 2017
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 555
Default

Also forget that part that root can't change permissions. Some sort of typo on my part, root can change permissions.


I saw that howto, but thought it was for USB devices. /dev/drm0 is a special character and I wasn't sure what sysctl entry I should make for that.
Reply With Quote
  #4   (View Single Post)  
Old 15th December 2017
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 555
Default

On irc (freenode) someone said it's a bug and I should simply keep trying with later snapshots. Dec 14 snapshot still has it as crw------ though

Last edited by scottro; 15th December 2017 at 03:28 AM.
Reply With Quote
  #5   (View Single Post)  
Old 15th December 2017
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 769
Default

As a temporary workaround, would it help to put the desired chmod and chown commands into /etc/rc.local ?
Reply With Quote
  #6   (View Single Post)  
Old 15th December 2017
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 555
Default

That would work too. This is a -current install, and I keep breaking things. I don't play video on it enough to make it worthwhile, but yes, if this were going to be a serious workstation for me, that's definitely a possibility.
Reply With Quote
  #7   (View Single Post)  
Old 15th December 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,050
Default

The xenodm(1) display manager will change ownership of the /dev/drm0 device to the logged in user, without you having to provision anything special. See /etc/X11/xenodm/{GiveConsole,TakeConsole}
Reply With Quote
  #8   (View Single Post)  
Old 15th December 2017
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 555
Default

I prefer booting into text mode, so I gave up on that idea. It's not a big deal, I wonder if I should mark this solved since the question is, can it be done with chmod and the answer seems to be no.

I use -current for the newer Japanese input method--I got lucky for several days before I got the cannot resolve this (in my case, I think it was glib2) and didn't have to build from ports for awhile.

At this point in time, I'm just playing with OpenBSD on this laptop. Ironically, as it's usually the opposite, FreeBSD-CURRENT (with drm-next-kmod) actually runs better. To be honest, when using it for work, I use Linux as neither *BSD comes close to its wireless speed.

(Work is running a browser, openvpn and a few terminals to my workstation at work)

None of which means I don't GREATLY appreciate everyone's advice.
Reply With Quote
  #9   (View Single Post)  
Old 15th December 2017
johnR johnR is offline
Port Guard
 
Join Date: Nov 2017
Posts: 14
Default

Ownership of /dev/drm0 is set in /etc/fbtab to the user logged in on /dev/ttyC0 by default. That works for me as I log in on the text console and then use startx.
Reply With Quote
Old 15th December 2017
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 555
Default

AHA! As there are always a bunch of garbage messages on tty/C0 about the ELAN Touchscreen, which I've been unable to disable, I always log in on tty/C1. Ok, that's answered my question. I don't see a way to mark this as solved, am I overlooking something? (It's not in thread tools.

Thank you.
Reply With Quote
Old 16th December 2017
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 555
Default

Upon consideration, I think the easiest way to deal with this, for future reference, is to use xenodm. It solves 3-4 problems.
Problem one is the garbage on the screen about ELAN. (And, about uhidev if one doesn't disable that, therefore, 3-4 problems). It also solves the permissions issue on drm0, without having to sign in on the garbage message filled tty/C0. Problem 3, and possibly the one to push me over--if using inteldrm, I haven't found a way to increase terminal font size. Disabling inteldrm breaks X. (wsconfig doesn't work if using inteldrm). Therefore, practically speaking,I usually boot into X almost immediately. So, for this machine, I think I'm giving in and will have it boot into xenodm.

Again, thanks to all who helped me understand the problem.
Reply With Quote
Old 16th December 2017
johnR johnR is offline
Port Guard
 
Join Date: Nov 2017
Posts: 14
Default

A possible workaround might be to edit /etc/fbtab so that /dev/console stays assigned to /dev/ttyC0 and the other devices you need are assigned to /dev/ttyC1 instead (I'm assuming the ELAN messages are sent to /dev/console).

Edit: I just tried this on my own system and it appears to work. Console messages are sent to ttyC0 and I have /dev/drm0 ownership on ttyC1 login. I won't be using this as I like to see xconsole messages, but it could be useful if you don't need those.

Last edited by johnR; 16th December 2017 at 12:47 PM. Reason: Extra info.
Reply With Quote
Old 16th December 2017
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 555
Default

Thanks. Yes, ELAN goes to console. I don't really mind booting to xenodm, my bigger problems with OpenBSD on this are the lack of iwm being able to 802.11ac, and the fact that I can only get the Japanese input I want in -current, which has its own issues (such as packages being out of sync). I'll probably give this another major try when 6.3 comes out.
Reply With Quote
Old 17th December 2017
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 555
Default

By the way johnR, figured I'd mention that I wound up doing it your way, editing fbtab. I have a little article about the yoga2 where I mention this and gave you credit (just saying thanks to user johnR at daemonforums. ) I sometimes like to change window managers, and using xenodm makes that a bit harder (I have a rather lame script that rewrites .xinitrc).
Reply With Quote
Old 17th December 2017
johnR johnR is offline
Port Guard
 
Join Date: Nov 2017
Posts: 14
Default

Glad to be of help. I've been using startx since changing to Unix-type operating systems in the late '90s. Old habits die hard :-)
Reply With Quote
Old 17th December 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,050
Default

Quote:
Originally Posted by scottro View Post
.. I sometimes like to change window managers...
Quote:
Originally Posted by johnR View Post
...Old habits die hard :-)
It is possible for us old dogs to learn new tricks. All it takes is an epiphany.

I used to switch between a tiling window manager and a floating window manager, using the latter with applications that didn't work well -- or work at all -- with the former.

Until I discovered Xephyr(1). Now, when I need a floating window manager, I run one. But I do so from within a tiled window.
Reply With Quote
Old 17th December 2017
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 555
Default

johnR's comment di make me chuckle. Running OpenBSD on this yoga2 is more an exercise than a practical need, but it's interesting solving the various problems.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hello, how BSD reboot but keep memory misssir FreeBSD General 8 11th October 2011 02:43 PM
Apply TTYS changes with out reboot jjjustjjjay OpenBSD General 1 6th May 2010 09:24 PM
problem to first reboot after installation openbsd OpenBSD Installation and Upgrading 3 16th May 2009 06:30 PM
pf flush persist file ijk FreeBSD Security 5 3rd February 2009 01:42 PM
How do I a USB flashdrive so I can use chmod? Quaxo OpenBSD General 12 30th June 2008 10:57 AM


All times are GMT. The time now is 06:31 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick