You are not logged in.
Hi guys,
I've installed Arch on my netbook and I'm using XFCE as my DE.
I also installed xscreensaver-arch-logo package from AUR.
I'm starting my DE like this:
1) boot.
2) from tty1 enter my login and password.
3) execute "startx" which loads XFCE and XFCE loads xscreensaver automatically for my understanding.
Now the problem is that while the PC is locked by xscreensaver I can just do "alt + ctrl + f1" to go back to tty1 and then just press "ctrl + c" and it will return to my logged in user in tty1,
and from there anyone can do what he wants with my user.
What can I do to block this from happening? After all it's not enough to just make the computer look like it's locked
Offline
So use a greeter and do not login to your console. I suggest lxdm.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
For Gentoo, but relevant:
http://www.gentoo-wiki.info/TIP_Fix_The … urity_Hole
Offline
exec startx
Offline
ZekeSulastin, can you please explain what it does when you prefix startx with exec?
Edit: Using exec solve half of the problem. Because now when I do "ctrl + c" in tty1 it exit's the DE and logout of the user. But what if I had somthing importent and unsaved running in the DE? It will be lost.
Last edited by LiranV (2012-10-12 19:07:14)
Offline
Edit: Using exec solve half of the problem. Because now when I do "ctrl + c" in tty1 it exit's the DE and logout of the user. But what if I had somthing importent and unsaved running in the DE? It will be lost.
Mumble-mumble...
So use a greeter and do not login to your console. I suggest lxdm.
...mumble.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
So use a greeter and do not login to your console. I suggest lxdm.
Thanks for the help but I don't want a graphical login manager.
By the way, I still didn't solved this issue so please share a sulotion if you have one.
Last edited by LiranV (2012-10-12 19:37:42)
Offline
I use this in my .bash_profile. You'll need to adjust it if you don't automatically startx on login (alias it most likely). Install vlock, which allows you to lock tty's. There are also other way's to accomplish this if you look at the Gentoo article I posted up above.
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
exec nohup startx &
sleep 10
vlock
fi
Offline
An interesting issue I just tried this, seems to work OK: In ~/.bashrc:
alias x='setsid /usr/bin/startx -- -nolisten tcp & logout'
Offline
An interesting issue I just tried this, seems to work OK: In ~/.bashrc:
alias x='setsid /usr/bin/startx -- -nolisten tcp & logout'
Thanks a lot! It's seems to work just fine!
Can you please share where did you find this solution? Shouldn't this be added to the wiki or something?
So if I understand the command correctly it goes something like:
start "startx" on new session seperate from tty1 with nolisten on tcp (which disables the option of connecting to the x server?) and then logout from the current session.
Is this right?
Edit:
There is one problem I found with this.
When I login using this method I'm unable to shutdown via XFCE's menu as "Switch User" "Suspend" & "Shut Down" are all greyed out.
Last edited by LiranV (2012-10-12 20:24:37)
Offline
where did you find this solution?
setsid startx is mentioned on Gentoo wiki.
The nolisten tcp is for a separate issue (remote connections).
Shouldn't this be added to the wiki
Sure, but note that I just tried this for the first time ever, 10 minutes ago
unable to shutdown via XFCE's menu
Probably an issue with polkit, which I have uninstalled anyway because it's gone nuts. The XFCE "log out" button works fine.
Offline
Also an idea - try 'exec startx -- vt1' as indicated on the wiki article Start X at Login (you can just make an alias if you don't need the line in bash_profile). No need to use vlock or sleep or w/e, and it keeps X on the tty you logged in from, a necessity for systemd-logind's session management if you're starting X from a console (you never did indicate if you were using systemd or initscripts+consolekit wrt XFCE's power menu).
graysky: don't do that 'mumble mumble' crap when you clearly only have a partial view of the problem and solution. Forgive me for not posting the rest of the line, as I'm rather used to X starting in the same tty.
Last edited by ZekeSulastin (2012-10-12 21:42:03)
Offline
For some reason 'exec startx -- vt1' starts the DE in "tty7" (like it normally do).
brebs, Yes the logout button is the only one who work but if I want to shutdown or reboot the system I don't want to do it from the terminal all the time and having to enter my root password everytime.
Offline
I know you don't want to but try lxdm. What is your aversion to using one? You have to login to a tty so why not login to a graphical one?
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
if I want to shutdown or reboot the system I don't want to do it from the terminal all the time and having to enter my root password everytime.
That's not necessary. Use the 3-fingered salute (keys Alt, Ctrl, Delete) to trigger a shutdown - no need to log in.
Offline
Also, did you actually read the link Pres provided in the 3rd post? It provides a couple of solutions to the problem when using console login and one solution for using a graphical (which I seem to gather you are staunchly opposed to). In any case, you could have found a solution quite a ways back in this thread.
Offline
Also, did you actually read the link Pres provided in the 3rd post? It provides a couple of solutions to the problem when using console login and one solution for using a graphical (which I seem to gather you are staunchly opposed to). In any case, you could have found a solution quite a ways back in this thread.
If you read the thread from top to bottom you shoul'd know that the solution 'brebs' gave me worked but raised other "problems".
And yes I did read the link in the 3rd post, and the solutions there didn't really helped me (I didn't try them all because I didn't like them all).
Offline
LiranV, I suggest you see if nohup works better for the XFCE shutdown button.
Best I've found so far:
alias x='setsid /usr/bin/startx -- -nolisten tcp &> ~/.xorg.log & logout'
Offline
This:
alias x='setsid /usr/bin/startx -- -nolisten tcp &> ~/.xorg.log & logout'
Is just like:
alias x='setsid /usr/bin/startx -- -nolisten tcp & logout'
But with saving xorg log to home folder?
Anyway, whats causing the greyed out Shut down etc. is the "& logout" at the end of the commands.
I think if I can get XFCE to start on the tty that I login from this will be just fine. Any idea how can I do that? (startx --vt1 doesn't seem to work - just starts in "tty7")
Offline
Have you tried vlock?
.xinitrc
exec startxfce4 --with-ck-launch
And an alias like
alias startx='exec nohup startx >/dev/null 2>&1 & vlock'
Offline
This starts to be painful to solve.
I initially thought that some people use this kind of login method and this should be quite easy to set. Apparently I was wrong
I guess I should consider using DM like Slim or LXDM.
I tried to avoid GUI login screens because I'm running on a slow netbook and I wanted to keep the boot time short as possible.
If anyone do use the startx method I would love to hear about it
Offline
I use systemd, and have it automatically drop me into an X session. I did this by creating a couple services, and it was actually super easy.
I found the necessary info here:
https://bbs.archlinux.org/viewtopic.php?id=147913
This way, there is no logged in tty, and certainly no DM. But it does drop you into the gui w/o asking for a password. But it seems like you are more worried about the computer inactivity thingy timing out and the access at that point.
Offline
This starts to be painful to solve.
If anyone do use the startx method I would love to hear about it
Have you even tried my solution?
Of course vlock should be installed...
Offline
@Radioactiveman, unfortunately, it seems as though the OP is kind of weeding through the suggestions, trying a couple here and there, then saying the untried are not optimal. I think there were two very real and good solutions in the gentoo link in the third post. If not an end solution, they were both good points to start with (actually, one of them was simply backgrounding, disowning, then logging out, which I see as super simple and definitely something that one could add to or fix).
Offline
one of them was simply backgrounding, disowning, then logging out
I've tried that... didn't seem to work.
Offline