Starting openbox as user alpha

Post your comments, questions, bug reports or suggest new features for alphaOS
Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Starting openbox as user alpha

Postby Scooby » 14 Dec 2014, 21:54


* How to log in as user alpha?
First as root open file /etc/rc.conf and replace X_AUTOLOGIN="yes" with
X_AUTOLOGIN="no", save that file and click Logout. Now, when in tty1 type:
su alpha, and then alphaosx. This way you will start new openbox session as
regular user alpha with restricted permissions, meaning you can start and
use any of already installed programs and have read-write access only to
your home folder /home/alpha.


I can not get this to work. I get in /tmp/session-1000.log

Code: Select all

xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)


Is it not possible to start openbox as user alpha?


Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: Starting openbox as user alpha

Postby Scooby » 15 Dec 2014, 18:01

Anniekin wrote:did u try su alpha, and then startx?


I tried it with su alpha and alphaosx
but I guess startx is the same

I did chown /dev/tty0 and /dev/tty4 to alpha:alpha then
openbox starts but is frozen, keyboard and mouse unresponsive.

simargl
Site Admin
Posts: 466
Joined: 16 May 2013, 10:54
Contact:

Re: Starting openbox as user alpha

Postby simargl » 16 Dec 2014, 17:00

Scooby wrote:I can not get this to work. I get in /tmp/session-1000.log

Code: Select all

xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)


Is it not possible to start openbox as user alpha?


I've checked this and there is something definitely wrong, got that same error as yours with user alpha, but also when logging as root there is warning:

Code: Select all

libudev: udev_has_devtmpfs: name_to_handle_at on /dev: Function not implemented


That is in /tmp/session-0.log. Something has changed in newer versions of libudev or Xorg server.

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: Starting openbox as user alpha

Postby Scooby » 16 Dec 2014, 17:22

I checked a bit further. There is a Xorg.wrap now with suid
If I drop a file /etc/X11/Xwrapper.config with content

Code: Select all

allowed_users = console
needs_root_rights = yes


I can log in as user alpha however Xorg will be run by root

dunnow how to fix that, saw some leads about creating another semi-privileged user
to start xorg? will keep researching

ps I don't get that error in session-0.log

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: Starting openbox as user alpha

Postby Scooby » 22 Dec 2014, 00:30

I hacked extensively around alphaos and Xorg

Got it to log in as alpha and run xorg as another unprivileged user

With tty owned by root and /dev/input not reachable by user alpha

:)

There are some caveats to running as alpha though
alpha has not got enough rights to setup my wlan
although it's a member of group Network

What user rights is needed for alpha to negotiate network?

guyhighlander
Apprentice
Posts: 12
Joined: 17 Mar 2015, 00:04

Re: Starting openbox as user alpha

Postby guyhighlander » 26 Mar 2015, 01:55

Hi
i did exactly the same with user su alpha :like settings config
How to log in as user alpha?
First as root open file /etc/rc.conf and replace X_AUTOLOGIN="yes" with
X_AUTOLOGIN="no", save that file and click Logout. Now, when in tty1 type:
su alpha, and then alphaosx. This way you will start new openbox session as
regular user alpha with restricted permissions, meaning you can start and
use any of already installed programs and have read-write access only to
your home folder /home/alpha.

now i can't reboot or shutdown,with logout su alpha and alphsosx is not working.
i always loosing any savings,when i use the hard way to shutdown
thanks Wolf

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: Starting openbox as user alpha

Postby Scooby » 26 Mar 2015, 13:30

yes there is some permissions problem when shutting down
maybe it must be suid root?

I would classify this post as a work in progress but you probably could do
that is hackish

in terminal

Code: Select all

su root
wmpoweroff


I have not tried it but will do so now

guyhighlander
Apprentice
Posts: 12
Joined: 17 Mar 2015, 00:04

Re: Starting openbox as user alpha

Postby guyhighlander » 30 Mar 2015, 21:21

thanks works for now


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 8 guests

cron