This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Proper way to start KDE

Tags: None
(comma "," separated)
User avatar
ethereal1m
Registered Member
Posts
81
Karma
0
OS

Proper way to start KDE

Sun Mar 28, 2010 2:23 pm
Dear all,
what is the proper way to start KDE in Linux? I do it from Linux prompt and executing startx in root account. In terms of security, is this a proper way? or should I start it in user account?

regards,
ethereal1m
User avatar
toad
Global Moderator
Posts
1258
Karma
7
OS

Re: Proper way to start KDE  Topic is solved

Sun Mar 28, 2010 3:40 pm
afaik you can:

- start KDE using any old login manager such as kdm, gdm, xdm or slim
- use your ~/.xinitrc and startx on the cli once you have logged yourself in

Personally I would NEVER run a desktop environment as root as it opens holes, your likely to surf the net and bingo, your system is compromised.

My advice:
Log in as normal user using either of the methods above and if you need to run something like kate, dolphin or systemsettings in root mode, call it up on the CLI and prepend kdesu like:

kdesu systemsettings

That way you've got the security of being a normal user and the convenience of having KDE programmes running as root under one hat.

My 2cs


Debian testing
User avatar
ethereal1m
Registered Member
Posts
81
Karma
0
OS

Re: Proper way to start KDE

Mon Mar 29, 2010 3:15 am
Very cool... :)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Proper way to start KDE

Mon Mar 29, 2010 3:53 am
Note that if you have problems with KDE applications running as root, "su -" to a root terminal, then run the applications.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
toad
Global Moderator
Posts
1258
Karma
7
OS

Re: Proper way to start KDE

Mon Mar 29, 2010 8:24 am
bcooksley wrote:Note that if you have problems with KDE applications running as root, "su -" to a root terminal, then run the applications.

This usually doesn't work as there is no X server available. I suppose you could set it up so it works?

And another thing: kdesu works for me, but kubuntu people need to use kdesudo


Debian testing
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Proper way to start KDE

Tue Mar 30, 2010 3:53 am
Hmm... "su -" works fine here, sudo doesn't, and neither does "su" ( which tries to screw up my normal user file permissions too.... )


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
airdrik
Registered Member
Posts
1854
Karma
5
OS

Re: Proper way to start KDE

Tue Mar 30, 2010 3:32 pm
If I understand correctly by what the help says about the "-" option on su (which is short for "-l" or "--login") is that "su" merely changes the userID for that process (to the root user), whereas "su -" will log in as that user (and execute the new user's .profile, if they have any, I believe).

I'm not sure how "su" would screw up normal user file permissions if "su -" doesn't, since applications launched under either will (or should, at least) run as the same user with the same permissions.

Alternatively, kdesu (or kdesudo) have the benefit of opening a nice dialog for entering the password which is nice particularly when creating desktop shortcuts.

As for su vs. sudo, there are plenty of articles which explain the difference, but basically su changes the running user to the new user (root by default) whereas sudo (after it has been set up, which it is by default in Ubuntu) allows a normal user to execute privileged processes, requiring only the user's password.


airdrik, proud to be a member of KDE forums since 2008-Dec.
User avatar
apachelogger
KDE Developer
Posts
525
Karma
5
OS

Re: Proper way to start KDE

Wed Mar 31, 2010 5:21 pm
toad wrote:And another thing: kdesu works for me, but kubuntu people need to use kdesudo


That is not quite right. Even though Kubuntu uses KDESudo instead of KDESu, it also integrates it so that the default workflows do not get disturbed. Even on Kubuntu you can call kdesu, which will be using kdesudo in the background.

What will not work is calling kdesu on a terminal, but that is a general limitation across distributions since kdesu itself is not stored in the standard binary paths, in those cases you can still run kdesudo on Kubuntu (or add the appropriate path to the binary search paths of course ;)).


Annoyed with bbcode since 1999.
User avatar
MercuryShadow
Registered Member
Posts
13
Karma
0

Re: Proper way to start KDE

Mon May 10, 2010 3:18 am
ethereal1m wrote:Dear all,
what is the proper way to start KDE in Linux? I do it from Linux prompt and executing startx in root account. In terms of security, is this a proper way? or should I start it in user account?

regards,
ethereal1m


As mentioned by others, you should never start a graphical session as root. Ever.

That said, do you want to use a graphical login? If so, here's what I do in Arch Linux:

1) Set runlevel 5 as the default in /etc/inittab:
Code: Select all
id:5:initdefault:


2) Also in inittab, start KDM using the following line:
Code: Select all
x:5:respawn:/usr/bin/kdm -nodaemon


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]