hostbutler.blogg.se

Terminal opens in bash on mac
Terminal opens in bash on mac









terminal opens in bash on mac
  1. TERMINAL OPENS IN BASH ON MAC UPDATE
  2. TERMINAL OPENS IN BASH ON MAC WINDOWS

'xdotool type "./ssh-activity"', # Suspend after 15 minutes 'xdotool type "cd ~"', # Change to home directory # 'move 2100 1000', # triple monitor setup 'sleep '+str(BASHRC_TIME), # Bash command wait a sec 5 # Secpmds fpr window to appearĬommands = [ 'gnome-terminal &', # Launch terminal in background # dellstart - Autostart GUI applications on Dell Fileserverįrom _future_ import print_function # Must be first importīASHRC_TIME = 2 # Seconds to load ~/.bashrc

terminal opens in bash on mac

The python program: #!/usr/bin/env python Opens gedit and last five opened files in separate tabs.

TERMINAL OPENS IN BASH ON MAC WINDOWS

Moves windows to preferred position on desktop.Runs on autostart to setup GUI applications frequently used after login.There are some extra features not requested by OP but beneficial to me: I wrote a python program for this answer. gif below I launched the program from an existing terminal with screen recorder running to show what it would look like at login: Customize to your heart's content.Īlmost a decade late to the party but, here's my answer using Python. we then start back over at the -tab part to produce tab 2, then again for tab 3.I, however, want the tab to stay open so I can go make programming magic. If you want the shell to open, run your command, then close, simply remove this part. $SHELL = this cryptic tidbit is required to keep the shell open so you can work with it.ls = 'l'i's't contents of this directory.cd /etc = 'c'hange 'd'irectory into the "/etc" path.-command="bash -c 'cd /etc ls $SHELL'" = run the bash -c 'cd /etc ls $SHELL' command, which is a command I just made up as an example here's what it does:.-title="tab 1" = title this tab "tab 1".-tab = open up a unique tab for what comes next.

terminal opens in bash on mac

  • gnome-terminal = open up a gnome-terminal.
  • terminal opens in bash on mac

    Here's a breakdown of that command above: This is exactly the type of thing my desktop shortcut does so I can open up a bunch of programming windows at once: gnome-terminal -tab -title="tab 1" -command="bash -c 'cd /etc ls $SHELL'" -tab -title="tab 2" -command="bash -c 'cd ~ ls $SHELL'" -tab -title="tab 3" -command="bash -c 'cd ~/temp3 ls $SHELL'" Here's a more complicated example which opens up 3 separate tabs in the same gnome-terminal. The $SHELL part at the end forces the shell to stay open so you can then see its output and continue using it (I learned this somewhere else on Stack Overflow): gnome-terminal -tab -title="test" -command="bash -c 'cd /etc ls $SHELL'" Here's a contrived example, which opens up a single tab, titles it "test", then runs the simple command cd /etc ls inside it. I use this type of approach so I can double-click a single icon on my desktop and have it open up a bunch of terminals (with various tabs named according to what work I'm going to do in them) and programs to set up my programming environment, for instance, for daily work. Or, you can just add a symlink to this script to your desktop. usage: this is really useful to add to your startup programs so this script will run, open a terminal, create and name a tab in the terminal, and run a command for you.

    TERMINAL OPENS IN BASH ON MAC UPDATE

    UPDATE : this answer is now perhaps obsolete.Ĭonsider clicking this link and using this other answer of mine instead: Open Terminal with multiple tabs and execute applicationĪided by answer, and my own comment under his answer, and inspired by upvote of my comment, here's my preferred way to do it, especially when I want the terminal to stay open so I can then manually use it.Įx.











    Terminal opens in bash on mac