The officially official Devuan Forum!

You are not logged in.

#1 2019-02-18 09:31:25

MiyoLinux
Member
Registered: 2016-12-05
Posts: 1,323  

Beowulf: Link sbin

After my latest stab at building a basic Openbox system on the Beowulf .iso, everything is working wonderfully. smile

I have one question, and I know that this is rather vague...

During the installation, there was an option to link sbin to bin (?). I can't remember exactly what it said...sorry. I'm bad about not reading things. LOL! tongue

Anyway...I chose the default answer of No. Later on, after setting everything up and adding a desktop-grub.png image, I tried to run update-grub and received an error in the terminal that the update-grub command wasn't found. Grrrrrr...

So...I opened the file manager as root, went to the sbin folder, and sure enough...update-grub was there. So I opened the terminal in that folder and ran update-grub successfully.

So my question is...despite the default answer of no, should sbin be linked to bin (or whatever that option was) in Beowulf? I just don't have it in me to go through another installation right now in order to read that message during the installation. sad  tongue


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#2 2019-02-18 09:52:19

Geoff 42
Member
Registered: 2016-12-15
Posts: 461  

Re: Beowulf: Link sbin

There is some discussion about merging some of the bins on the mailing list. I think it is /usr/bin and /bin as well as /usr/sbin and /sbin

https://lists.dyne.org/lurker/message/2 … fe.en.html

Geoff

Offline

#3 2019-02-18 15:44:47

Panopticon
Member
Registered: 2018-01-27
Posts: 306  

Re: Beowulf: Link sbin

^ probably a bad idea, what would the need be to symlink all that? Has to be something to do with systemd.

From "man hier"

/bin   This  directory  contains executable programs which are needed in single user mode and to bring
              the system up or repair it.
       /sbin  Like  /bin,  this directory holds commands needed to boot the system, but which are usually not
              executed by normal users.
       /usr/bin
              This is the primary directory for executable programs.  Most programs executed by normal  users
              which  are  not  needed  for  booting  or  for repairing the system and which are not installed
              locally should be placed in this directory.

Last edited by Panopticon (2019-02-18 15:51:32)

Offline

#4 2019-02-18 15:49:39

Geoff 42
Member
Registered: 2016-12-15
Posts: 461  

Re: Beowulf: Link sbin

Its a bit <tl;dr> and I was rather lazily hoping that someone would post the executive summary for us! I did try and work my way through it, but failed.

Geoff

Offline

#5 2019-02-18 15:54:59

Panopticon
Member
Registered: 2018-01-27
Posts: 306  

Re: Beowulf: Link sbin

^ I see, im not familiar with that message board but found more replies to the original message. Bit of light reading ahead maybe.

Offline

#6 2019-02-18 16:23:10

PedroReina
Member
From: Madrid, Spain
Registered: 2019-01-13
Posts: 267  
Website

Re: Beowulf: Link sbin

Panopticon wrote:

Has to be something to do with systemd.

I dont think so. Just remember the history of the split:
http://lists.busybox.net/pipermail/busy … 74114.html

Offline

#7 2019-02-18 18:11:14

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: Beowulf: Link sbin

The problem you're running into is the change in root's path when you run su in a terminal. That path no longer contains the sbins. If you use su - instead, you'll get the root path that you're used to. But then you won't be able to start graphical apps as root from that terminal. For that, you're supposed to use pkexec. When you figure all that out, I'll read your posts. Until then, or until someone gives me good reasons not to do this, I'm working around the problem.

# grep PATH /root/.bashrc
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

Oh yeah, the other workaround is to use the full path for commands.

/sbin/blkid
/usr/sbin/update-grub

Offline

#8 2019-02-18 20:07:52

PedroReina
Member
From: Madrid, Spain
Registered: 2019-01-13
Posts: 267  
Website

Re: Beowulf: Link sbin

fsmithred wrote:

But then you won't be able to start graphical apps as root from that terminal. For that, you're supposed to use pkexec.

I use an old trick for that:

cp /home/user/.Xauthority /root/

Offline

#9 2019-02-18 20:16:35

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: Beowulf: Link sbin

I tried copying .Xauthority and that didn't work for me in beowulf. Are you using that in beowulf now?

I also tried xhost + and that didn't work, either.

Offline

#10 2019-02-18 22:06:22

MiyoLinux
Member
Registered: 2016-12-05
Posts: 1,323  

Re: Beowulf: Link sbin

fsmithred wrote:

The problem you're running into is the change in root's path when you run su in a terminal. That path no longer contains the sbins. If you use su - instead, you'll get the root path that you're used to. But then you won't be able to start graphical apps as root from that terminal. For that, you're supposed to use pkexec. When you figure all that out, I'll read your posts. Until then, or until someone gives me good reasons not to do this, I'm working around the problem.

# grep PATH /root/.bashrc
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

Oh yeah, the other workaround is to use the full path for commands.

/sbin/blkid
/usr/sbin/update-grub

Thanks fsr. The "full path" answer is what I thought of after doing it the way that I did. I wasn't aware of su -. Thanks.

As for opening items with pkexec, I have a couple of apps in the "MiyoLinux Accessories" that run as root. PCManFM and Lxappearance. The way that I solved that was to add a file for both of them in /usr/share/policykit-1/actions/

I just used one of the existing ones as a template and changed each instance of the original application's name in the existing file to the appropriate name of the application that I wanted to use it for in the file I was creating; such as, if I were using the synaptic file as an example, I replaced every instance of synaptic with lxapppearance...hope that makes sense. Also, I changed the icon used and named both files similarly to how the existing files are named.

Anyway, I can now open both PCManFM (as root) and Customize Look and Feel (as root) from the menu using pkexec. smile

Last edited by MiyoLinux (2019-02-19 01:08:46)


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#11 2019-02-19 04:29:56

stanz
Member
From: Northern Earth ~ Brrrr
Registered: 2018-01-14
Posts: 162  

Re: Beowulf: Link sbin

MiyoLinux wrote:

update-grub ...
...file manager as root,

Yep ~ I donno reasons either, but always & still working is ..sudo update-grub.
Oh shoot, I'm in miyo-xtra/beowulf partition! ...better reboot to beowulf and check tongue


miyoisomix.i2p

Offline

#12 2019-02-19 12:50:11

PedroReina
Member
From: Madrid, Spain
Registered: 2019-01-13
Posts: 267  
Website

Re: Beowulf: Link sbin

fsmithred wrote:

I tried copying .Xauthority and that didn't work for me in beowulf. Are you using that in beowulf now?

No, in Beowulf no.

Offline

#13 2019-02-20 21:57:24

guuml.dev1
Member
Registered: 2018-12-09
Posts: 21  

Re: Beowulf: Link sbin

Just for the records, it may be off topic: I'm watching the testing of beowulf, but in the not to far future I want to distribute a stable operating system to others which I have to maintain!  Quoting my 2nd post to dev1galaxy:

guuml.dev1 wrote:

... minimalistic devuan/jessie with xfce ... You should remember that su - is your friend. BTW: the last few years on LMDE2 betsy I was used to type sudo su. Unfortunately some time ago a guy (new to GNU/Linux but interested to learn) asked me about the differences about su and sudo and why both packages are needed. My answer was not very helpful to him because it was much too detailed ...

#1: Devuan does the right thing: During installation you have to  give two passwords for two accounts. One for root and one for yourself (UID=1000). And there are two home directories, see /etc/passwd.

#2: Since decades i'm used to type su - and the right password to gain a root shell, where I can do everything. YES, including shot me knee and break every toe afterwards. You're warned.

#3: On the other hand sudo ... asks for confirmation with my own password. Just to remember that UID=1000 is able to ruin compromise the system, too.

Back to topic: IMHO there should be a link from /sbin/ to /usr/sbin/ (just in case the merge is done:-(

BTW: Some people are mounting the /usr via network, aka remote. And then mounting /usr/local from local?

PS: Should root be able to interact with user's X-server? I've had never heard about pkexec up to now but looks like policy-kit. I'm going RTFM ...

Last edited by guuml.dev1 (2019-02-20 22:11:04)


guuml is an abbrevation for g&uuml; in ASCII (1967),
focused on devuan and skipping epic poems like beowulf.
Has Gü spent his last raw DVD to a chimäre? No.

Offline

#14 2020-05-14 07:12:44

PedroReina
Member
From: Madrid, Spain
Registered: 2019-01-13
Posts: 267  
Website

Re: Beowulf: Link sbin

PedroReina wrote:
fsmithred wrote:

I tried copying .Xauthority and that didn't work for me in beowulf. Are you using that in beowulf now?

No, in Beowulf no.

I'm working with Beowulf beta3 for a couple of days. Coping .Xauthority to the root home works for me. I can start X Window programs as root: bare user -> su - -> program. YMMV. Mine is lightdm, webkit2 greeter and KDE without much further tinkering.

Offline

#15 2020-05-14 16:21:21

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: Beowulf: Link sbin

PedroReina wrote:
fsmithred wrote:

But then you won't be able to start graphical apps as root from that terminal. For that, you're supposed to use pkexec.

I use an old trick for that:

cp /home/user/.Xauthority /root/

Good to know, thanks. My current preferred method to revert to the old behavior is to add

ALWAYS_SET_PATH yes

to /etc/default/su. This is documented in 'man su'.  You can put the line in /etc/login.defs instead, but then you get an error message when you log in.

Offline

#16 2020-05-14 16:45:17

PedroReina
Member
From: Madrid, Spain
Registered: 2019-01-13
Posts: 267  
Website

Re: Beowulf: Link sbin

fsmithred wrote:

My current preferred method to revert to the old behavior is to add

ALWAYS_SET_PATH yes

to /etc/default/su.

There are a few methods. Years ago I decided to change almost all the configuration files of Bash of my systems. Now, with Devuan my modifications work well.

Offline

Board footer