Skip to content

~ not pointing to /home/$user/ when used as root user instead points to /root/. startx not working as root user either.

When I login as root startx does not work, It pops up then closes bringing me back to console. But when I run it as my non-root user account it loads just fine bringing me to bspwm.

Also the tilde key does not point to /home/swer but instead to /root/ so I always have to manually type /home/swer.

0 points13 comments
Open on Reddit
About this post
Posted
Archived
Score
0 · 100% up
Kind
Text
ID
21cata

17 comments

Why would you try to startx as root...? You should never log in as the root user unless you absolutely have to. Starting a user graphical environment as root is not safe.

Also, ~ maps to the current logged in user's home directory. Root's home is /root/, not /home/$user.

I suspect you're looking for the sudo command which preserves the home directory while letting you execute commands as root. There's not much information here about what you're actually trying to accomplish so I can't say for sure.

10 points
unknown author4 hidden

Deleted before we saved it.

-2 points

You can have sudo in archlinux:

# pacman -S sudo

and then check the archlinux wiki article on sudo

3 points

If sudo is not on your machine you can install it with pacman -S sudo as root (if you have an active internet connection of course).

0 points

Root is a different user itself, and its home directory is /root.

As for startx not working, I'm not 100% sure, but it's probably because it's not configured for root at all. Check ~/.xinitrc, and see if the file even exists.

5 points
unknown author2 hidden

Deleted before we saved it.

-2 points

Personally, I use gdm rather than muck with startx, so I'm not sure. Check the arch wiki page on X11?

1 points
unknown author

Deleted before we saved it.

1 points

You should probably install Ubuntu.

-1 points

Good to hear that you never misunderstood anything about Linux.

3 points

Ah yes, so I'm sure you're in favor of making calculus an introductory math course?

There are beginner distributions for a reason. What's your advice? Keep running Arch on a computer OP may need to use, so that they are dead in the water when some major change occurs?

6 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.