Command executing on Terminal startup
whenever i open Terminal, something is causing it to run a command:
/Applications/GravSim; exit
which invariably runs the command and exits, making the only way for me to actually get into a shell to be using the "New Command" option under "File". I've seen other posts with similar problems, but theres seemed to be fixable by editing a .cshrc or .login file, neither of which I can find using "ls -a" in any directories I would think would be normal (although I am somewhat new to terminal). The only thing I can figure is happening is that Terminal is for some reason running the last successful opening of Terminal (the last thing that may have opened terminal before this may have been me double-click-opening the shell program /Applications/Gravsim.
is there some file im missing or something i can edit that will just make terminal always open regularly? (and yes, i have tried editing my preferences to execute a specific command (/bin/zsh) upon opening a new terminal window)
Jason Merritt1 wrote:
okay... i don't seem to have that file... or at least not in /Library/Preferences, now what?
Try ~/Library/Preferences
You must have it in there
Similar Messages
-
Linux Commands Executable in Terminal?
Hello Unix & Terminal users,
I'm wondering if the following Linux commands can be executed in Terminal on OS X?
fdisk /dev/sde
d # delete the existing partition
u # switch units to: sectors
n # new partition
p # primary
1 # first partition
XXX # first sector = XXX
<enter> # press enter to select last sector automatically
t # change partition type
c # change it to FAT32
a # make it bootable (required for later firmware)
1 # first partition
w # write table and quit
After changing the partition table, reformat the memory card with
mkfs.vfat /dev/sde1
The commands are intended to be used on a memory card.
Thanks in advance,
Maximilianlooks like you should be able partiton with [fdisk(8)|http://developer.apple.com/documentation/Darwin/Reference/ManPages/ma n8/fdisk.8.html], at least the binary is present.
Other partitioning tools that are available are: [gpt(8)|http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8 /gpt.8.html] and [pdisk(8)|http://developer.apple.com/documentation/Darwin/Reference/ManPages/ma n8/pdisk.8.html]
as for creating a fat type filesystem. [newfsmsdos(8)|http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8 /newfsmsdos.8.html] -
Commands executed when Terminal opened
Hello.
I can't remember the file (i believe it's in /etc/) and it has a few commands that get executed with each terminal window that you create.
I put a few alias commands in there but want to modify them and forget the file.
Thanks.There are several possible files.
The exact one depends on several factors, including the shell you use.
The most likely candidates are ~/.cshrc ~/.bashrc ~/.tcshrc and ~/.profile, amongst others (all of these files are in your home directory, not /etc/)
You can try running the command:
grep alias ~/.*
which will give you a list of all the hidden files in your home directory that contain alias commands. Hopefully this will help identify the file you're after. -
Whenever a script or a command file is in startup item, it opens in xcode instead of executing
I am trying to execute script as startup menu items, but rather than executing, they open in an xcode window. How can I bypass this behavior?
Addendum: Can this be done via: open -a Spaces --args xxx , where xxx is some set of arguments (or something like this)?
-
What does "/usr/X11/bin/xstub ; exit;" command do in Terminal?
What does "/usr/X11/bin/xstub ; exit;" command do in Terminal?
The %U represents a URL. If you drag a URL to the shortcut then it'll open that URL in Firefox.
-
Capture the command executed by Eclipse
I have a Hibernate appps. It runs on Eclipse IDE (in class files format), it works fine. But when I packages it to jar file, and run it using command prompt, it hit error.
+{color:#0000ff}java.lang.NoClassDefFoundError: org/hibernate/Session+
at com.flextronics.fftester.Client.main(Client.java:103)
Caused by: java.lang.ClassNotFoundException: org.hibernate.Session
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
+... 1 more{color}+
My question is, how to capture the command executed by Eclipse, so that I cna re-use it on command prompt?Hi DrLaszloJamf , thanks and trying. One quick question: Can i specify path name instead of particular jar filename, from a simple test, I found the hibernate library path does not work. I need to specify the jar file, then only it works.
You specify classes to include in the Class-Path header field in the manifest file of an applet or application. The Class-Path header takes the following form:
Class-Path: jar1-name jar2-name directory-name/jar3-name.And If this one is true, that mean either we can use classpath externally or embedded in manifest, right?
By using the Class-Path header in the manifest, you can avoid having to specify a long -classpath flag when invoking Java to run the your application.Edited by: gkheng on Jul 21, 2008 7:42 PM -
Batch Loader Command Execute Export Parameters() not in Documentation
Hello,
I'm trying to use the Batch Loader Command Execute Export Parameters() command to export my shared library into a text file and do not see the any detailed references in the epma doc, although the doc does mention Export. We're on 11.1.1.3.
I tried to use something similar to the Import, but it is still not correct.
Execute Import Parameters(importtype, profilename, filename,waitforcompletion) Values('flatfile', 'Comma', '.\AppFiles\CommaApp.ads','true');
Has anyone any ideas on the required parameters to use? Many thanks.
regards.
Edited by: cg on Feb 29, 2012 6:14 AMJohn, thank you for your reply. Is there a way to automate the file generator to generate the ads file every night? Or by use of some other command?
Also, Export is mentioned in the doc, but perhaps that was added but never implemented for this version. -
"Run Command" executing upon opening file with explicit doctype
I have noticed that when I open a file that has the !doctype
explicitly set that it does a "Run Command." Why is this and how do
I get it to stop? Is it something in my code that's triggering it,
or is it because the !doctype is set?What line breaks? How is it changing them? Or are you talking
about how
you have formatted the code?
Sorry - I can't help you with that if you are. But are you
DMX6.0 or 6.1?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"anubia" <[email protected]> wrote in
message
news:[email protected]...
> When I open up a file in Dreamweaver MX that has the
!doctype explicitly
> set to
> transitional or strict, the "Run Command" executes and
changes all of my
> line
> breaks and I get the asterisk. I ran it through the W3C
validator and it
> validates, so why is this happening? Here is a sample
page (I've
> reintroduced
> spacing):
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Strict//EN"
> "
http://www.w3.org/TR/html4/strict.dtd">
> <html>
> <head>
> <title>San Francisco Black Firefighters:
Calendar</title>
> <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
> <link href="sheets/sfbfa.css" rel="stylesheet"
type="text/css">
> </head>
>
> <body id="sfbfa">
> <div id="container">
> <div id="header"><a
href="index.html"><img id="logoicon"
> src="images/logo_065.gif" alt="San Francisco Black
Firefighter's
> Association
> Logo" />
> <img id="logotext" src="images/sfbfa_short.gif"
alt="San Francisco Black
> Firefighter's Association" /></a>
> <!--end of header--></div>
>
> <div id="navbar">
>
>
<a href="message.html">President's
Message</a></li>
>
<a href="about.html">About</a></li>
>
<a href="board.html">Board</a></li>
>
<a href="yacademy.html">Youth
Academy</a></li>
>
<a href="news.html">Newsletters</a></li>
>
<a href="calendar.html">Calendar</a></li>
>
<a href="membership.html">Membership</a></li>
>
<a href="memorium.html">In Memorium</a></li>
>
<a href="links.html">Links</a></li>
>
<a href="contact.html">Contact Us</a></li>
>
> <!--end of navbar--></div>
>
> <div id="maincontent" class="calendar">
> <!--Do not change anything above this comment. You
may enter your edits
> below
> this comment-->
>
> <h1>Calendar</h1>
> <h2>Event Name<br />
> event date/time</h2>
> <p>At vero eos et accusamus et iusto odio
dignissimos ducimus qui
> blanditiis
> praesentium voluptatum deleniti atque corrupti quos
dolores et quas
> molestias
> excepturi sint occaecati cupiditate non provident,
similique sunt in culpa
> qui
> officia deserunt mollitia animi, id est laborum et
dolorum fuga.</p>
>
> <h2>Event Name<br />
> event date/time</h2>
> <p>rerum facilis est et expedita distinctio. Nam
libero tempore, cum
> soluta
> nobis
> est eligendi optio cumque nihil impedit quo minus id
quod maxime placeat
> facere
> possimus, omnis voluptas assumenda est, omnis dolor
repellendus. </p>
> <!--do not change anything below this comment-->
> <!--end of maincontent--></div>
>
> <div id="footer">
> <p class="copyright">© 2005 San Francisco
Black Fire Firefighters
> Association.
> All rights reserved</p>
> <!--end of footer--></div>
> <!--end of container--></div>
> </body>
> </html>
> -
Shortcut "Command + T" opens terminal instead a new tab of finder
Hi!
I'm a new member of forum and new user of OS X.
On my MacBook appeared a strange problem after cleaning OS X (Mavericks) by Onyx:
When I'm in a Finder window and using shortcut Command+T appears Terminal window instead a new tab in Finder.
I tried to reset to the default keyboard shortcuts in System Preferences but it didn't work.
Has anyone had a similar problem and already has a solution?
I will be grateful
BTW sorry for my ungrammatical EnglishTry this:
1) In the address bar, enter''' about:config''' and press '''Enter'''.
2) In the "'''Filter'''" type '''restriction'''
3) "browser.link.open_newwindow.restriction" should appear. '''Double-click''' it and enter 0
That will force everything to go to new tabs instead of Windows. -
[SOLVED] Why some commands run properly in startup script others don't
I am trying to finish setting up my MythTV box. I have the following commands to run at startup:
#!/bin/sh
# Stop spamming dmesg
echo -n 0000:00:06.1 > /sys/bus/pci/drivers/ehci_hcd/unbind
# Enable wake from remote
echo enabled > /sys/bus/usb/devices/4-5/power/wakeup
# Link optical drive to /dev/dvd (needed for myth)
if [ ! -e /dev/dvd ]; then ln -s /dev/cdrom /dev/dvd; fi
# Start LIRC
echo lirc > /sys/class/rc/rc0/protocols
ln -sf /run/lirc/lircd /dev/lircd
lircd -d /dev/lirc0 /etc/lirc/hipermc
# Start mythbackend
mythbackend &
# Start LCD server
LCDd &
I have tried making this part of rc.local and also as a startup item in XFCE (with script called using passwordless sudo since it requires root permissions). In each case, only some of the commands run properly (the dmesg, wake from remote, and start LIRC sections). The other commands don't seem to work. However if I run the script manually after the computer has finished booting, everything works perfectly. Can anyone help me figure out what's going wrong?
It seems like path is already set since some commands do work without the full pathname. Also please don't suggest using systemd for starting the daemons - it does not work for me with LIRC or lcdproc and there is a driver bug with my hardware that keeps me from using the mythbackend systemd service.
Thanks in advance for the help.
Last edited by mosquitogang201 (2012-12-16 14:42:11)The exec command was what I needed. Was able to follow the error messages to find out the command im using under "stop spamming dmesg" was messing everything else up. Also I am running systemd - just not using it to start these items since the systemd service files weren't working reliably.
Anyways this brings me to another question - is there a more elegant way to stop dmesg from getting spammed? About 5 times per second I get the error
hub 2-4:1.0: unable to enumerate USB device on port 3
which makes it very difficult to look through dmesg logs to find an actual problem.
EDIT: Just needed to add the sleep command after the dmesg section to give the kernel enough time to reload using ohci_hcd. Now script is working perfectly. Marking as SOLVED.
Last edited by mosquitogang201 (2012-12-16 14:48:47) -
See the detalis of DDL commands executing on oracle 10g
Hi,
how can i see the detail of DDL command executed on oracle 10g on ECC 6.0
ECC 6.0
HPUX
Regards,Did you activated the auditing mechanish on the Oracle? If it is active, you can query the audit table;
select * from sys.aud$;
Another way is using Oracle Log Miner. You can find the related information, on the link below;
http://docs.oracle.com/cd/B10501_01/server.920/a96521/logminer.htm
Best regards,
Orkun Gedik -
How to execute a Terminal command on startup?
Greetings!
Is it possible to automatically run a Terminal command at startup? (Specifically - a hwprefs command.)
If so, could you please detail the steps involved?
Many thanks!OK, then, that's pretty straight forward. You can write a small AppleScript like so:
set mystring to do shell script "Insert Command String Here" with administrator privileges
If you need to run the command with root permission then insert "sudo" before the command line, i.e., "sudo commandline". You will need to authenticate in this case so add "with adminstrator privileges" after the command string, i.e.,
do shell script "sudo command string" with administrator privileges
Compile the script as a run-only application then add the compiled script to your Login Items (Accounts preference pane.)
Note that your command line will need the fully qualified path to the command. -
So I was reading online about how to make Terminal run a command on startup. When entering the commands to make it run a command on the start of Terminal I guess I messed up, now whenever I start Terminal it says [Process Completed] and wont let me enter any more commands. It also does this when I open a new shell. I want to know if there is a way to delete this startup command so Terminal opens as it does out of the box.
Or this shell script->
#!/bin/sh
#showallfiles
# Description and usage message
usage () {
echo "
Description:
A simple shell script to reveal/conceal files
hidden in Mac OS X Finder application.
showallfiles excepts one option.
Usage: ${0##*/} [-h|--help] to show this help
${0##*/} [on|ON] to show hidden files
${0##*/} [off|OFF] to set the default hidden files
Example: ${0##*/} on
# Test for more than one option
if [ $# -gt 1 ]
then echo "${0##*/} -h to access help"; exit
fi
# Get the AppleShowAllFiles status in the domain com.apple.finder.plist or create the default off setting
STATUS=`defaults read com.apple.finder AppleShowAllFiles 2>/dev/null` || STATUS=`defaults write com.apple.finder AppleShowAllFiles OFF`
# Function to check AppleShowAllFiles status and change the status if necessary
finderfilesstatus () {
if [ "$STATUS" = "$SAF_OPT" ]
then
echo "AppleShowAllFiles is set to $SAF_OPT"
else
defaults write com.apple.finder AppleShowAllFiles $SAF_OPT
osascript -e 'tell application "Finder" to quit' -e 'delay 1' -e 'tell application "Finder" to launch'
fi
# Parse the command option
case "$1" in
'-h'|'--help') usage; exit;;
'on'|'ON') SAF_OPT="ON"; finderfilesstatus;;
'off'|'OFF') SAF_OPT="OFF"; finderfilesstatus;;
*) echo "${0##*/} -h to access help"; exit;;
esac -
Using Applescript to execute a Terminal command
I've looked at the possible answers that come up when I ask this question here, but none really fit my question.
I want to automate the Terminal command that cleans out obsolete entries in my right-click "Open with" menu, which I have to do often. Rather than copying the command each time I want it, then opening Terminal, pasting it in, etc., is there a way to automate this with Applescript? Thanks!Thanks for the fast reply, Niel. I understand this is a newbie Applescript question, but over the years I have just never used Applescript and other than this one thing, probably won't again. So rather than take hours to learn it, I hope you don't mind the additional question regarding this. Do I just put the following into the main Applescript editor?
do shell script "ls -l ~"
/System/Library/Frameworks/CoreServices.framework//Versions/A/\
Frameworks/LaunchServices.framework/Versions/A/Support/lsregister \
-kill -r -domain local -domain user;
killall Finder -
Open multiple shell window, each one with different command executed
Hi all,
I want to click on something in the dock and have three shell window opened. Each shell must connect to a ssh console, login and execute a command (like ps, top, etc..) and the stays there showing me the results.
I need the three window to open at exact positions (so I can see all of them at the same time) and with fixed width and height. I also want to make them a bit transparent and green on black...
Thank you so much for your time answering this!
See you.Sounds like you want an Applescript that will open multiple Terminal windows with custom colors that will execute timed sequence of commands.
Go over here and ask:
http://discussions.apple.com/forum.jspa?forumID=724
Maybe you are looking for
-
Hey everyone, I'm installing a Pioneer radio and I have to use the VGA to Lightning connector, that leaves me with a 2' long lightning cable. I could run an extension cable, then I'd just always have that cable hanging there, I wanted to see if I cou
-
im trying to hook up my astro mixamp to my pc using an optical cable, the pc doesnt detect the cable meaning i cant get any sound out of it. about a year ago i upgraded my pc to a new case but kept the motherboard, processor and hard drive from a hpe
-
Re-build Database from .DBF Files
I have the set of .dbf files which Veritas backed up daily in my production environment. Can any body tell me the steps how I can rebuild my database from these .dbf files. i) ACCT.BAK ii)ISACCTB_01.DBF iii)RBS1ACCT.DBF iii)RBS2ACCT.DBF iv)SYSTEM1.DB
-
Is it necessary to have photo stream "on" in ICloud?
Is it necessary to have "photo stream" turned ON in ICloud?
-
I Have received an email like this twice now and have tried to update my details but still been unsuccessful. Am just wondering if this is actually apple or a scam? Please help!