You are not logged in.

#1 2009-02-20 12:36:34

Command Line Fu
Member
Registered: 2009-02-18
Posts: 11

New to Arch & have a few questions after getting a desktop installed

First of all I'd like to compliment the Arch devs and users on creating such a powerful and flexible DIY Linux distribution. I imagine Arch is much easier to learn than distributions like Slackware and Gentoo, but still provides the hands-on Linux experience that I was looking for. My favorite full-featured distribution to date was openSUSE, but once I read the philosophy of "The Arch Way", I realized I was missing out on what I really wanted from Linux. I feel much more gratified having to learn the functions of command line utilities and OS files. Knowing that the OS is nothing more than what I make it allows me a feeling of complete control over my installation. The documentation and utilities unique to Arch maybe provide the best combination of ease of use and bleeding edge open-source software of all the DIY distributions to install, configure, and maintain.

As of now I have completed the beginners guide pretty much verbatim and have a KDE4 desktop installed via KDEMod. I'm glad I was able to get this far without needing to ask for any help but there are a couple issues that are puzzling me that I would like to figure out before I go any further.

First, I was wondering if there was a way to do without having to type sudo, or to automate it so I don't have to type it for my primary user account. I want to be able to run a root-level command from a non-root account, but instead of having to prefix every root-level command with sudo, I just want the system to prompt me for the root password. Is there a way to eliminate the necessity to type sudo before a root-level command as a non-root account, but still be prompted for the root password to ensure there is still a similar level of security?

Second, when Arch is fully booted into the KDE login screen, there are several options in drop-down menus towards the bottom right of the screen. One of them is an option to login to the default black-and-white console screen, the same one you get before xorg or any GUI desktop environment is installed. For some reason, about 30 seconds to a minute after I select that option, whether I use that black-and-white full-screen console to login and start working, or if I just let it sit there, X restarts automatically and returns me to the GUI KDE login screen. I would like to turn off this automatic restarting of the X/KDE GUI when I select the option to login in console mode. I used the Inittab Method for loading the display manager described here instead of the Daemon method. It says the Inittab method will automatically restart the display manager in the event of a crash, but I hope that is not the reason it is restarting when I intentionally try to exit the display manager to use a non-GUI console. I would like to configure the system so the display manager will restart in the event of a crash while still allowing me to use a true console mode login when I choose.

Offline

#2 2009-02-20 13:00:39

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

Re: New to Arch & have a few questions after getting a desktop installed

Giving your user full root access trough sudo don't add one bit of security. But anyway, one solution is to sudo -i, do whatever you need in the shell, and then exit it. This would be the same as doing su -, but without the need to use the root password.


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

Offline

#3 2009-02-20 13:30:41

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

Re: New to Arch & have a few questions after getting a desktop installed

you could always setup aliases for these special commands in your ~/.bashrc file
example

alias pacman='sudo pacman'

this performs the exact behaviour you are looking for.

you can also edit the sudoers file to have your account NOT need a password for certain commands. this is more risky in the event of an intrussion, depending on which commands you want to unlock.

Offline

#4 2009-02-20 14:21:51

Command Line Fu
Member
Registered: 2009-02-18
Posts: 11

Re: New to Arch & have a few questions after getting a desktop installed

I think Mr.Elendig got what I wanted to do backwards. I do want to have to type my root password every time I use an admin command as a non-root user, I just don't want to have to type sudo before it. eldragon's alias solution seems to be the only way I've seen to do this, but I'd have to set up the .bashrc file for every possible admin command I would be using. I figured there would be an easier way, but since there doesn't seem to be I'll just get used to typing sudo before almost every command I enter as my non-root user. This is pretty much a non-issue as it's standard for every Linux distro I've tried.

My real problem now is that I can't keep the KDM login manager from automatically respawning if I select the console login option from the drop-down menu at the KDM login screen. All I want is when I boot Arch into the KDM login manager, and choose the console login option(bringing me to the default black screen bash login prompt), to have xorg and the KDM login manager NOT automatically respawn. There has to be a line in a editable file somewhere where I can turn off the display manager's automatic respawning, I just need to know where.

Offline

#5 2009-02-20 14:54:00

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: New to Arch & have a few questions after getting a desktop installed

I'm not a KDM user, so I'll make a more general suggestion: use Ctrl+Alt+F1(2,3..) to get to a console, and log in there. To get back to KDM, use Alt+F7.

Offline

#6 2009-02-20 15:17:26

Command Line Fu
Member
Registered: 2009-02-18
Posts: 11

Re: New to Arch & have a few questions after getting a desktop installed

But this problem should occur with any login manager, not just KDM.
If you click on this link to the wiki called Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup you will find a section that quotes:

Switching run-levels

If you want to test out the display manager without rebooting, or you want to change the X configuration and that pesky Display Manager keeps respawning.

Use this command:

/sbin/telinit <run-level>

To switch to run-level 3 (Multi-User):

/sbin/telinit 3

To switch to run-level 5 (X11):

/sbin/telinit 5

By switching you can avoid restarting the system during your testing.

Notice the bolded part, that is the exact problem I am talking about! I have read that entire page very carefully but I can't figure out a way to keep the "pesky display manager from respawning"(in my case KDM but from the looks of this wiki page, this problem will occur when exiting to a console login from any GUI display/login manager)

Another quote on that page is:

You have two easy methods to make the system load the display manager:

   1. Inittab Method
      The Display Manager will load automatically after start-up and will respawn in the event of a crash.
   2. Daemon Method
      The Display Manager will load automatically during the start-up as a daemon.
      (Currently only works with Entrance, GDM, KDM and SLiM)

Once again notice the bolded part, it applies to ALL Desktop Login Managers, and that is exactly what I want to disable.

I have tweaked and toyed around with my /etc/inittab and my /etc/rc.conf files as many ways as I can think of and this still occurs.

Offline

#7 2009-02-20 15:22:32

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: New to Arch & have a few questions after getting a desktop installed

switch 'respawn' in your kdm line to 'wait' or 'once'. trying myself right now.. you probably have to restart.


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#8 2009-02-20 15:22:33

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

Re: New to Arch & have a few questions after getting a desktop installed

Command Line Fu wrote:

I think Mr.Elendig got what I wanted to do backwards. I do want to have to type my root password every time I use an admin command as a non-root user, I just don't want to have to type sudo before it. eldragon's alias solution seems to be the only way I've seen to do this, but I'd have to set up the .bashrc file for every possible admin command I would be using. I figured there would be an easier way, but since there doesn't seem to be I'll just get used to typing sudo before almost every command I enter as my non-root user. This is pretty much a non-issue as it's standard for every Linux distro I've tried.

Sorry for misunderstanding you.
I havn't seen any distro at all that asks a user for the root password when the user tries to run a root only command.

My take on this is: Just use 'su -' when you are doing admin stuff, and exit the shell when you are done.


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

Offline

#9 2009-02-20 15:23:55

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: New to Arch & have a few questions after getting a desktop installed

Replacing 'respawn' with 'once' in the inittab KDM line should do it. man inittab for more details.

I still prefer my suggestion though. smile

Offline

#10 2009-02-20 15:24:19

Command Line Fu
Member
Registered: 2009-02-18
Posts: 11

Re: New to Arch & have a few questions after getting a desktop installed

tomk wrote:

I'm not a KDM user, so I'll make a more general suggestion: use Ctrl+Alt+F1(2,3..) to get to a console, and log in there. To get back to KDM, use Alt+F7.

I do appreciate the help, but this is a workaround, and I'm looking for a fix. Thanks though smile

Offline

#11 2009-02-20 15:31:48

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

Re: New to Arch & have a few questions after getting a desktop installed

Command Line Fu wrote:

My real problem now is that I can't keep the KDM login manager from automatically respawning if I select the console login option from the drop-down menu at the KDM login screen. All I want is when I boot Arch into the KDM login manager, and choose the console login option(bringing me to the default black screen bash login prompt), to have xorg and the KDM login manager NOT automatically respawn. There has to be a line in a editable file somewhere where I can turn off the display manager's automatic respawning, I just need to know where.

I've had the same 'problem' on one of my kde boxes. The first time I do login to console, it respawns kdm, but if I do it again, then it works.

My workaround to it was simple.

I just added another entry in menu.lst that booted into runlevel 3.


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

Offline

#12 2009-02-20 16:30:29

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: New to Arch & have a few questions after getting a desktop installed

Set up KDM with the inittab method, and then edit /etc/inittab.

Go to the part at the bottom where you uncommented the line to start KDM, and change the part of the line that says 'respawn'. Try both 'once' and 'wait'.

I'm not sure if that will take care of X respawning (I've never used this, just guessing).

Offline

#13 2009-02-20 17:57:24

Command Line Fu
Member
Registered: 2009-02-18
Posts: 11

Re: New to Arch & have a few questions after getting a desktop installed

I tried a whole slew of things, including changing every instance of the word "respawn" to "once", changed the kdm to wait, once, boot, uncommented the -daemon at the end, changed the kdm user level string to 3 and the initdefault string to match(which surprisingly worked), and added kdm to the DAEMONS list in rc.conf, all of these in basic process of elimination. None of them worked so i'm guessing its something that isn't solvable at the moment and will probably have to wait for software upgrades upstream.

I did however find one thing that seems pretty useful. If I set my kdm string in my /etc/inittab to boot(instead of respawn, wait, once, etc) my OS boots much quicker.

Offline

#14 2009-02-20 18:52:43

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: New to Arch & have a few questions after getting a desktop installed

according to http://olympus.het.brown.edu/cgi-bin/dw … /README.gz it seems that kdm needs to be compiled with --with-kdm-xconsole for that option to work.. this was for an old kdm though so who knows. the people with kdemod and a seperate kdm could try this and get back to us here..


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#15 2009-02-20 18:55:11

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: New to Arch & have a few questions after getting a desktop installed

not sure if this will help you but i was annoyed at the same behavior. 

my current solution is to put a duplicate grub entry in /boot/grub/menu.lst with a 3 at the end.  that way i can boot into "Arch X11" (which is a slim login via inittab) or just select "Arch CLI" from my modified grub menu to stay in init 3 (and fix whatever's just broken with X smile). 

if i'm in a running X session, as mentioned before, i use the Ctrl+Alt+F1,2,3... method, then back to F7 when i'm done.  in my mind, Ctrl+Alt+Del just means "logout" now, b/c it kicks me out to Slim.

Offline

#16 2009-02-20 19:38:31

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: New to Arch & have a few questions after getting a desktop installed

If you don't want to type sudo everytime, you might as well let readline do it for you:

bind '"\es":"\C-asudo \C-e\C-m"'

Now you can press Alt+s to prefix your commandline with "sudo " and run it.
But since you want to type the root password everytime anyways, you might also just use su -c instead:

bind '"\es":"\C-asu -c \x27\C-e\x27\C-m"'

Offline

#17 2009-02-21 06:36:16

viga
Member
Registered: 2007-06-12
Posts: 112

Re: New to Arch & have a few questions after getting a desktop installed

I am not sure what the big deal about using sudo is  how long does it take to type sudo?

remove your log in manager so that your system start in a console.  If you want to go to kde just type startx if you want to go back to the console just type control alt delete  You need to select Kde in your ~/.xinitrc file

Offline

#18 2009-02-21 14:00:12

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: New to Arch & have a few questions after getting a desktop installed

there's also 'op' in AUR which is a bit faster to type and have quicker-to-understand syntax, atlast on first look.


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#19 2009-02-21 18:11:09

Command Line Fu
Member
Registered: 2009-02-18
Posts: 11

Re: New to Arch & have a few questions after getting a desktop installed

Since a lot of times pacman is the reason i have to use sudo, I find the yaourt wrapper for it an invaluable tool from the AUR. First, it works like I wish ALL commands that need to be run as root would; you don't have to type sudo before hand, but it does prompt for password when run as a regular user. It also allows packages to be installed from the AUR almost as easily as they can be installed if they were binary and in the community repo. This is great because things like WINE are not available on x86_64 yet and I can get them installed without having to build the package myself. I'm very happy I found this tool and will vote for it to be included in community.:cool:

Offline

#20 2009-02-21 18:52:38

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: New to Arch & have a few questions after getting a desktop installed

You still do build them yourself. It's the same as when you do things the convential way: download the PKGBUILD and any other files from the AUR and makepkg (by the way, learn this first before using automated tools). Also, I'm pretty sure yaourt will never make it into community because of the fact that it is kind of anti-Arch-philosophy, so this way most people have to learn makepkg first to get yaourt. If you want a binary repo for it though, check out archlinuxfr.

Offline

Board footer

Powered by FluxBB