Terminal command to exit to prompt

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
Subito Piano
Posts: 75
Joined: Fri Sep 04, 2020 6:08 pm
Location: UPSTATE New York
Has thanked: 17 times
Been thanked: 11 times
Contact:

Terminal command to exit to prompt

Post by Subito Piano »

Hi! I'm writing a script to logout and exit X to the command prompt after so long a time. Does anyone know the command to quit X under JWM and get back to the prompt, so I can restart X by typing "xwin"? The command "jwm -exit" kills X but leaves only a blinking cursor, ditto for "wmexit," nor does "pkill" work.

Thanks!

"God is love" - I John 4:16
Member since 2007. Currently running Fossa on a 2012 MacBook Air.
Still using Xenial 32 on my trusty 2007 IBM T60 warhorse. ♥
(A/V Linux for live softsynth needs)

User avatar
Subito Piano
Posts: 75
Joined: Fri Sep 04, 2020 6:08 pm
Location: UPSTATE New York
Has thanked: 17 times
Been thanked: 11 times
Contact:

Re: Terminal command to exit to prompt

Post by Subito Piano »

Hmm -- it turns out there must be a kink in my system. On another install of XenialPup on the same laptop, "jwm -exit" exits X and drops to the command line. That said, am I logged out or still logged in as root?

FWIW, on my regular install of XenialPup, although "jwm -exit" does not drop to the command line, MENU>LOGOUT>EXIT TO PROMPT does do that....

"God is love" - I John 4:16
Member since 2007. Currently running Fossa on a 2012 MacBook Air.
Still using Xenial 32 on my trusty 2007 IBM T60 warhorse. ♥
(A/V Linux for live softsynth needs)

some1
Posts: 86
Joined: Wed Aug 19, 2020 4:32 am
Has thanked: 18 times
Been thanked: 15 times

Re: Terminal command to exit to prompt

Post by some1 »

Subito Piano wrote: Mon Jan 02, 2023 3:59 pm

nor does "pkill" work.

Did you mean
pkill x

williwaw
Posts: 1957
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 172 times
Been thanked: 370 times

Re: Terminal command to exit to prompt

Post by williwaw »

what puppy are you using? not all do the same. viewtopic.php?p=8353&hilit=tty+terminal+F2+getty#p8353

you might have to research how to find the keyboard command equivalent to use in a script

User avatar
gychang
Posts: 591
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 206 times
Been thanked: 64 times

Re: Terminal command to exit to prompt

Post by gychang »

Subito Piano wrote: Mon Jan 02, 2023 6:04 pm

Hmm -- it turns out there must be a kink in my system. On another install of XenialPup on the same laptop, "jwm -exit" exits X and drops to the command line. That said, am I logged out or still logged in as root?

try whoami

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

User avatar
Subito Piano
Posts: 75
Joined: Fri Sep 04, 2020 6:08 pm
Location: UPSTATE New York
Has thanked: 17 times
Been thanked: 11 times
Contact:

Re: Terminal command to exit to prompt

Post by Subito Piano »

@some1: "pkill x" reboots the system, not what I'm looking for.

@willwaw: I'm using xenialpup in both instances -- that is, my day-to-day xenialpup install is corrupted, but another xenialpup install that happens to be on the same laptop works fine. Of course, I can reinstall puppy or tweak the other install if it comes to that. (Also, I have poked around the net for an answer, I try to do that myself before posting on a forum for assistance. JWM is great, but relatively few use it, so there is not a lot of troubleshooting posts in the various distro forums)

@gychang: good to know, thanks. Why didn't I think of that? :lol:

"God is love" - I John 4:16
Member since 2007. Currently running Fossa on a 2012 MacBook Air.
Still using Xenial 32 on my trusty 2007 IBM T60 warhorse. ♥
(A/V Linux for live softsynth needs)

williwaw
Posts: 1957
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 172 times
Been thanked: 370 times

Re: Terminal command to exit to prompt

Post by williwaw »

That said, am I logged out or still logged in as root?

at the blinking cursor, try ctrl+c or crtl+d. if that drops you into a prompt, you may be in a login shell where you could try root then woof woof

I have run programs as no user at all, it's not really all that useful, but viewtopic.php?t=6335 may give you some ideas of the limited capabilities of terminal

User avatar
Subito Piano
Posts: 75
Joined: Fri Sep 04, 2020 6:08 pm
Location: UPSTATE New York
Has thanked: 17 times
Been thanked: 11 times
Contact:

Re: Terminal command to exit to prompt

Post by Subito Piano »

Well...CTRL+C and CTRL+D didn't work -- and at any rate, now it's a moot point. Experimenting, I renamed my .config folder and rebooted, to see if the issue was in my personalized configurations. When I rebooted I got the message that my Choices had been moved -- an easy fix to move them back, but silly me, I made a few mistakes (moving faster than thinking?) and now it will need a bit of work to get it tweaked the way I like....and it will still have the logout problem. At this point I'll either start over with a fresh install or take another xenialpupsave I keep on my USB stick and copy it to this laptop, then adjust as necessary. This is not my main laptop anymore, there's no rush for me, plus most of my files are on a separate partition, and I should still be able to access anything I need from my old pupsave, the one that won't exit to prompt.

Thanks to all for your thoughts. ;-)

"God is love" - I John 4:16
Member since 2007. Currently running Fossa on a 2012 MacBook Air.
Still using Xenial 32 on my trusty 2007 IBM T60 warhorse. ♥
(A/V Linux for live softsynth needs)

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: Terminal command to exit to prompt

Post by williams2 »

wmexit has a bug in Xenial and Bionic.

The bug is fixed in FoassaPup and later versions of Woof ce.

If the window manager is started from a script or from a compiled executable
wmexit can not kill the process because it is no longer executing.

oir example, if you type xwin jwn
it can try to run jwn but it's a typo,
it should be xwin jwm not xwin jwn

Puppy will try to execute the error,
but it can't, so it will execute jwm as the default.
But to shut down Xwindows it will try to kill the typo jwn

For common window managers like jwm, icewm, xfce. Puppy can kill them automatically.
from the wmexit script.

The bugfix kills X or Xorg if killing the window manager doesn't work.
before the bug fix, shutting down X would just hang,

The behaviour you are describing can be caused by a typo in /etc/windowmanager
among other problems.
FossaPup will shut down X normally.
XenialPup and BionicPup will hang

killall jwm should work in most Pups.

xwim contain some of the default interaction that you see on the command ine.

Post Reply

Return to “Users”