Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Can a non-root user start KDE?

  1. #1
    Just burned his ISO
    Join Date
    Nov 2008
    Posts
    13

    Default Can a non-root user start KDE?

    As you know it starts at runlevel 3 by default. So, when I login as non-root user and try to 'startx' it does not start KDE. How could I setup KDE for a normal user can run KDE?

    Thanks for your attention

  2. #2
    Developer
    Join Date
    Mar 2007
    Posts
    6,126

    Default

    As root....

    bt~#echo "exec startkde" > /home/(user)/.xinitrc

    then log in as your user and start KDE

  3. #3
    Member
    Join Date
    Apr 2007
    Posts
    155

    Default

    Or just use Sudo or Su
    This is a hackers forum :P
    root ~# aircrack-ng pwnd-01.cap
    Lenovo Thinkpad R500, OS: Ubuntu 8.10, BackTrack3, Windows XP (VirtualBox), Windows Vista, Windows 7 beta

  4. #4
    Developer
    Join Date
    Mar 2007
    Posts
    6,126

    Default

    Quote Originally Posted by Shavx View Post
    Or just use Sudo or Su
    umm... that's not what he asked

  5. #5
    Just burned his ISO
    Join Date
    Nov 2008
    Posts
    13

    Default Sorry

    It didn't work.

    May be I didn't explain it well. I already use KDE. As root startx starts KDE. But I have create a user account, obviously with permissions of a normal user.

    At level 3 I log as user, but when invoke startx it says "Cannot move /var/log/Xorg.0.log to Xorg.0.log.old Giving up..." and doesn't start KDE. Obviously i gave 777 permission to that file but nothing seems to change.

    So my question is, where is supposed to configure KDE to run it as non-root user?

    Thanks again

  6. #6
    Developer
    Join Date
    Mar 2007
    Posts
    6,126

    Default

    Each user has to have a seperate .xinitrc file in their home directory in order to give startx a file to read and a command to run....

    Look here in the beginning of the startx script...
    Code:
    b4cktr4ck3 ~ # cat /usr/bin/startx
    
    
    #!/bin/sh
    
    # $Xorg: startx.cpp,v 1.3 2000/08/17 19:54:29 cpqbld Exp $
    #
    # This is just a sample implementation of a slightly less primitive
    # interface than xinit. It looks for user .xinitrc and .xserverrc
    # files, then system xinitrc and xserverrc files, else lets xinit choose
    # its default. The system xinitrc should probably do things like check
    # for .Xresources files and merge them in, startup up a window manager,
    # and pop a clock and serveral xterms.
    #
    # Site administrators are STRONGLY urged to write nicer versions.
    #
    # $XFree86: xc/programs/xinit/startx.cpp,v 3.16tsi Exp $
    userclientrc=$HOME/.xinitrc
    sysclientrc=/usr/lib/X11/xinit/xinitrc
    
    
    userserverrc=$HOME/.xserverrc
    sysserverrc=/usr/lib/X11/xinit/xserverrc
    defaultclient=xterm
    defaultserver=/usr/bin/X
    defaultclientargs=""
    defaultserverargs=""
    clientargs=""
    serverargs=""
    
    if [ -f $userclientrc ]; then
        defaultclientargs=$userclientrc
    elif [ -f $sysclientrc ]; then
        defaultclientargs=$sysclientrc
    See the part I highlighted in red? That is the name of the file the script is looking for to find out what desktop or window manager to excecute. This is how you can give every user their own desktop. For example here is mine...
    Code:
    pwnsauce ~ # cat /home/purehate/.xinitrc 
    sudo bash -c set > $HOME/.exports
    exec awesome
    I use awesome as a window manager so that's what my file says to execute. I'm fairly certain you have probably not properly configured the user properly or their is some other type of user error involved.

    My question is why are you trying to create a user? Backtrack is meant to be run as root and not run as a everyday operating system.

  7. #7
    Just burned his ISO
    Join Date
    Nov 2008
    Posts
    13

    Default Ok

    I have read thousands of times in this forum that Bt is not supposed to be the main operative system, but for a long time I desired to try Slackware because I'll always used Debian and OpenSuse. During this time I looked for a good security suite, so BT seemed to be the best option.

    Now it's easy to see the need of creating a non-root user. But, if you will I prefer to talk about the main question that now is why my user can't start a X session. I have a .xinitrc file in my /home/$user dir ending with 'startkde' and nothing of I've tried worked.

    Thanks again for your attention

  8. #8
    Developer
    Join Date
    Mar 2007
    Posts
    6,126

    Default

    Ok so first of all are you sure you know the proper way to create a user? If you want post your commands and Ill take a look.

    Next could you post the entire exact error that happens when you try to startx?

  9. #9
    Just burned his ISO
    Join Date
    Nov 2008
    Posts
    13

    Default News

    After some tries, it seemed to almost start XserverI, and I know that it makes not much sense but adding my user to sudoers what I obtain is
    Code:
    Fatal error
    
    ...Can't access to /dev/tty0 (Permision denied)
    But:
    Code:
    Morphy ~ # ls -l /dev/tty0
    lrwxrwxrwx 1 root root 4 Nov 17 17:47 /dev/tty0 -> vc/0
    It looks like I have no permission but is 0777


    Thanks to those who lost 1 second with this.

  10. #10
    Just burned his ISO
    Join Date
    Nov 2008
    Posts
    13

    Default Solved

    For the first error:

    xf860OpenConsole: Cannot open/dev/tty0 (Permission denied)
    Code:
    cd /dev/cv
    chmod 666 0
    and for the next:
    xf86OpenConsole: Cannot open virtual console 7 (Permission denied)
    Code:
    cp -Rfv /root/{./kde*,.local,.qt*} /home/tahl/
      chown -Rv tahl:users /home/tahl/
      chmod u+s /usr/X11R6/bin/Xorg
      ls -l /usr/X11R6/bin/Xorg
    Thanks again

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •