It's possible you could see more than one name, if another program happened to start under your user id during the time between the calls to ps. Should display the name of your file browser. Also in the terminal, type diff /tmp/$$.Back in your terminal window, type ps -u $USER -o comm > /tmp/$$B (Notice the B suffix, this is a different file than step 1).GitHub - Ji4n1ng/OpenInTerminal: Finder Toolbar app. In your terminal window, type ps -u$USER -o comm > /tmp/$$A Finder Toolbar app for macOS to open the current directory in Terminal, iTerm, Hyper or Alacritty.If you don't know of such a command in your window system, here's one way to find out on systems with a ps command that understands the options -u USER and -o FORMAT: Each of these will execute the configured file browser for your GUI environment. What if you don't know the executable name of your system's file browser? On OS X, as mentioned in comments, a similar command line program, open can be used. On KDE, there are two popular file browsers, I'm not aware of a command similar to gnome-open, though gnome-open can be executed within KDE, but by default it opens Gnome apps. On Gnome, you can run nautilus (the default file browser) directly, or on Gnome 2, you can use gnome-open to open any file (including directories) with the configured Gnome file handler application: $ nautilus. Here are some examples for some popular systems, most X based systems work similarly. Most file browsers take a directory as a command line argument, so you should usually pass. To open any GUI app, type the name of the executable at the shell prompt. >/dev/null 2>&1' can come in handy.Īlmost any GUI application (on X window systems) can be opened from a terminal window within that GUI. Binding this to an alias like filemanager='xdg-open. >/dev/null 2>&1 redirects the errors and the output. I usually get a bunch of error message printed to stderr, but I just ignore them.Īdding the arguments xdg-open. The application opens as a separate window, and you'll get a prompt back in your terminal and can issue other commands or close your terminal without affecting your new GUI window.
0 Comments
Leave a Reply. |