this post was submitted on 23 Aug 2024
537 points (97.9% liked)

linuxmemes

21393 readers
1238 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't fork-bomb your computer.

    founded 1 year ago
    MODERATORS
     

    I do not have and addiction problem, you have a problem with my addiction.

    you are viewing a single comment's thread
    view the rest of the comments
    [–] [email protected] 7 points 3 months ago (2 children)

    I always ran startx & exit to prevent someone from VT switching to a logged in console if my screen was locked :)

    [–] [email protected] 3 points 3 months ago (2 children)

    Joke's on you. Ctrl-Alt-F1 Ctrl-z.

    [–] [email protected] 1 points 3 months ago

    Right, that's what the & exit is supposed to prevent, since it's already logged out.

    [–] [email protected] 0 points 3 months ago (1 children)

    I think that is supposed to work on startx && exit

    [–] [email protected] 1 points 3 months ago (1 children)

    If you switch to the VT with Ctrl-Alt-F1, and hit ctrl-z the process is suspended, but does not complete so it never gets to the exit.

    At least that is my suspicion. I'm going to try it when I'm in front of a machine.

    [–] [email protected] 1 points 3 months ago* (last edited 3 months ago) (1 children)

    In case of && , the second process waits for the first process to finish with error code 0, before it starts.

    In case of &, the second process starts without waiting for the first to finish. Meaning, by the time you are looking at the GUI, the exit command has already been executed.

    [–] [email protected] 2 points 3 months ago (1 children)

    Right. Yeah I didn't engage my brain on the & initially as i thought it was just a typo. But that should work, seems others on the internet think the same.

    I like 'exec startx', but really if someone has physical access, unless you are doing a lot of other security, you can't be safe.

    [–] [email protected] 0 points 3 months ago

    I tend to be lucky in that regard, as people around me who might get physical access, tend to not have Linux know-how, even if they think of pranking me.

    Also, I lock my room.