You are not logged in.

#1 2010-03-21 01:00:43

phlex
Member
From: Germany
Registered: 2010-03-19
Posts: 6

[SOLVED] halt without login? && right way to use AUR/makepkg?

(  I ) Easy question first:
       Is there an equivalent to halt as <Ctrl><Alt><Del> is to reboot? A command or key that does not need a login?

( II ) And the second:
       I tried installing from the AUR and typed makepkg as root. There was a notice not to run it as root but as normal user.
       I am new to Arch and Linux but I thought I need root to install packages system wide. What should (or can) I execute as user, which needs root?
       And it confuses me, that every package has "Tarball  :: Files  :: PKGBUILD". Isn't the tarball all I need?

Thanks in advance,
       Felix

Last edited by phlex (2010-03-24 13:04:11)

Offline

#2 2010-03-21 01:10:55

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: [SOLVED] halt without login? && right way to use AUR/makepkg?

(I)
You have to edit your sudo file using visudo and add:

<username> ALL=(ALL) NOPASSWD: /sbin/shutdown

Then you can do 'shutdown -h now' to halt the system without asking for password.

Last edited by n0dix (2010-03-21 01:15:44)

Offline

#3 2010-03-21 01:20:30

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: [SOLVED] halt without login? && right way to use AUR/makepkg?

For question 2: makepkg just builds the package, but won't install the it when it's done at the end. To install you need pacman -U [package] or makepkg -i will install the package after asking for a password.  Since you don't need to have root permissions just to build the package it's safest to do so a regular user.

As for the links, the tarball contains all of the files and the PKGBUILD, so that's what you want to use when building a package.  The Files and PKGBUILD link is useful if you just want to look at what's in a file, but not necessarily download everything.

Offline

#4 2010-03-21 04:38:15

theapodan
Member
From: Virginia, USA
Registered: 2008-10-21
Posts: 116

Re: [SOLVED] halt without login? && right way to use AUR/makepkg?

I haven't tried it, but init has a function kbrequest that allows you to map keys to perform some action, like shutting down, without being logged in.

http://humanreadable.nfshost.com/howtos … utdown.htm

Offline

#5 2010-03-21 16:11:20

phlex
Member
From: Germany
Registered: 2010-03-19
Posts: 6

Re: [SOLVED] halt without login? && right way to use AUR/makepkg?

(II) I made sudo accessble for wheel group and just installed yaourt. After that I used yaourt as normal user and installed hwd and dependencies. Seems to work fine.

(I)
There was a commented line similar to your advice, n0dix. I just notice I missed the "NOPASSWD: " part and need to check it out again.

Theapodan, that is what I was looking for, but I need to look into that again. It doesn't look as easy as I expected.

Thanks for your help.

Offline

#6 2010-03-21 18:38:39

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] halt without login? && right way to use AUR/makepkg?

Slightly sidetracked, but I would actually recommend against using NOPASSWD:
It's not that much of a hassle to type in your password now and then, and it might save you from doing some silly mistake at some point in the future.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB