Setting proxy servers via the command line

I am looking to find out how to set up the system to use http and https proxies via the command line instead of through system preferences. How do I do this. I have basic command line knowledge.

This information is stored in a plist file and is easiest to manipulate with PlistBuddy. For example, to set the HTTP proxy name, use:
/usr/libexec/PlistBuddy -c "Set NetworkServices:6CFBA910-E4A0-4418-82E5-66A6480EBC71:Proxies:HTTPProxy http://my.proxy.com" /Library/Preferences/SystemConfiguration/preferences.plist
Note: 6CFBA910-E4A0-4418-82E5-66A6480EBC71 is a UUID and likely to be unique on each machine. I don't have another Mac handy to check this. If so, you'll need to do some heavy to find out which one is the interface you need to address.
Try man PlistBuddy and/or a web search for more information on how this tool can be used.
Try man PlistBuddy or a web searc for more info on using it.

Similar Messages

  • Can I manage resource designates via the command line?

    I would like to manage resource designates via the command line and
    the <i>"unires"</i> command does not seem to have this function. Could I use
    <i>"uniadmrights"</i>?
    # uniadmrights -e -add -resrc -n 10000
    <br>
    -e modify user rights, search filter
    <br>
    -add set user right on (-e only, default)
    <br>
    -resrc resource administration
    <p>
    The <I>uniadmrights</I> command is not able to assign designate rights. You can assign
    rights such as the ability to create and manage public and administration
    groups. The "Resource administration" flag exists so far only on the
    server side, and it is currently not used by the client. This is for future use.
    <p>
    There are two ways to assign a designate to a resource:
    <ol>
    <LI>Log on as the resource via the client. There are only a few commands
    available, one of them being the "Access Rights".
    <P>
    <LI>On the server side:
    <P>
    Edit the /users/unison/misc/resource.ini
    file and create a new section to specify the resource designate.
    <P>
    [DES]
    Designate0 = S=Lastname/G=Firstname
    <P>
    Run the unires command as follows:
    <P>
    % unires -mod "R=resourcename" -s DES 10000
    [sysOpPsw]
    </OL>
    <P>
    <B>Note:</B> The full resource name should be used eg. "R=Resource/N=1/CA=2/ID=2
    57"

    This sounds like a job for wget . You'll have to build and run it on Unix or Cygwin.
    You could also build a test suite to do this in various testing tools. You could even write a short Perl or Groovy script to do this, or a slightly longer Java class.

  • How to initialize consumer from supplier via the command line ?

    We have a small directory that gets loaded from scratch every night.
    We also setted up replication to a couple of consumers (read only).
    The problem is that since the data is loaded everynight, we get compliants in logs "Replica has a different generation ID than local database"
    I can initialize the consumers via the gui. But how to do it from the command line from the master ? I know that an option is to do a db2ldif and then an ldif2db on the consumer but it's not an option for us.
    I also tried setting the nsds5beginreplicarefresh to start, but that doesn't seem to do a full init.
    There must be a way, as the gui actually does it.
    TIA

    Basically it's very simple. Supposing your replication is already setup and you reload data to your master. If you want the initialization pushed to all the replicas automatically, you can simply setup a flag in all the agreements. This flag is called nsDS5BeginReplicaRefresh.
    Please check the link:
    http://docs.sun.com/source/816-6699-10/confattr.html#18194
    nsDS5BeginReplicaRefresh
    Allows you to initialize a replica. This attribute is absent by default. However, if you add this attribute with a value of start, the server reinitializes the replica and removes the attribute value.
    Property
    Value
    Entry DN
    cn=ReplicationAgreementName,cn=replica,cn="suffixName",
    cn=mapping tree,cn=config
    Valid Range
    stop | start
    Default Value
    N/A
    Syntax
    DirectoryString
    Example
    nsDS5BeginReplicaRefresh: start
    Please note that this value is absent by default and will disappear whenever initialization to replica finished. Next time whenever you want it to happen again, use ldapmodify to set this flag up.
    Also, if you want this happen to all the master's replicas, you have to setup for all the agreements.
    I already tested and it turns out very magic.
    So what you should do is whenver your master get reloaded, when it gets finished, call ldapmodify to set the attribute to be "start".
    Hope it helps!

  • How do I open a PDF to a specific page via the command line?

    Several questions about opening PDFs from the Mac OS X command line:
    1) How do I use the "open" command to open a PDF to a specific page? (I know I can open a document via: open doc_name.pdf)
    2) How do I use the "open" command to pass multiple arguments (page no, zoom scale, view mode, etc...) to open a PDF file in a specific manner?
    3) Does Preview handle the same parameters as Acrobat Reader? If not, what are the differences in options?
    I've spent hours searching for this answer and have come up dry. I've downloaded Adobe's "PDF Open Parameters" document -- it lists all of the parameters I need, however I can't get any of them to work from the command line.
    My goal: Open a PDF from the command line to a specific page. At first glance, I thought this would be simple to do and find -- however, after a lot of searching I haven't found an example on how to do it.
    Anyone have any experience doing this, and care to share?
    Much appreciated! ---> Kelsey

    I don't know of any way to do what you want using the 'open' command. It can probably be done with Applescript, which you could call from a shell script. The Preview application doesn't seem to be scriptable. I don't use Acrobat, so I can't tell you anything about that. Looking through the dictionaries of the apps I do have, it seems that Skim (another PDF viewer) has an AS 'page' class. Below are a couple of links that may get you started. Look for more specific guidance in Applescript forums.
    http://sourceforge.net/apps/mediawiki/skim-app/index.php?title=AppleScript
    http://links.tedpavlic.com/shell_scripts/skim

  • Sending Reporting Services report via the command line

    I would like to either execute a subscription that sends a report via email on demand.  That or just email the report without having to edit the subscription date.  Can this be done from the command line?  I see there is the rs.exe utility
    that allows you to deploy reports and run configuration commands, but I would like to execute and email the report.  Is this possible?

    The easiest way to run a subscription manually is to run the agent job in SQL server that is associated to the subscription.  You'll need to know the subscription ID to do that.  So, you could either run it through SSMS, or if it needs to be in
    command line, interact with SQL Server via command line and do so.
    You can use the ReportService2010 API methods and and powershell script to identify the subscription ID
    https://msdn.microsoft.com/en-us/library/reportservice2010.reportingservice2010.aspx?f=255&MSPPError=-2147217396

  • Visualizer via the command line?

    Does anyone know of a way to start iTunes from the command line with the Visualizer engaged? (preferably in full screen mode). My mother-in-law likes to have the Visualizer running even when not listening to music, so I was wondering if it possible to activate it as a type of screen saver.

    Not being able to browse is a common problem under Sno. Adding a new location has worked for some.
    Go System Preferences > Network > Location.
    Edit location (whatever name you want).
    Click + and then click done.
    Try your browser.
    And, here is another possibility that has worked for others.
    Go Finder > Your HD > Library > Preferences > SystemConfiguration.
    Move the SystemConfiguration folder to your Desktop.
    Restart.
    Try your browser.
    Keep your System Configuration folder for a while just in case.

  • Rollbak of SPAM transaction via the command line

    Hi All,
    Can you please tell me, what command line can I exucute in order to rollbak the installation of an addon via SPAM?
    I can't not connect to my SAP solution manager via SAP GUI because the installation of the Addon failed.
    Thanks

    Once applied you cant uninstall the patch. So its better to open an OSS call with SAP to resolve your issue
    Thanks
    Prince Jose

  • Using DHCP via the command line

    Hi,
    I'm using a PowerMac G4 with OSX 10.4 as a home server machine. This weekend, my ISP did some kind of network change and now this computer isn't able to connect to the internet. I use DHCP to connect, and on two other Macs I was able to go to network settings, turn off DHCP and turn it back on - and they can connect just fine now.
    However, I have no display connected to the PowerMac and thus I can only connect to it locally over SSH and VNC. This means that if I were to turn off DHCP, my connection to the machine would die and I wouldn't be able to do anything.
    So now I'm looking for a way to make a script that will turn off DHCP and re-enable it. The problem is that I have no idea what the GUI preferences actually do. Are there command-line commands I can use for this? Any help would be greatly appreciated.
    Thanks in advance,
    Cosmo

    You could use the ifconfig command to bring the network interface down and back up again.
    sudo ifconfig en0 down
    sudo ifconfig en0 up
    however this will of course break your connection if remotely administrating the mac.
    So you would be best writing a script that would carry out both commands.

  • Need to delete urlbar history via the command line

    I need to embed a line in our login script that deletes the url bar history from Firefox, as part of our needs to keep browsing histories private. How can I do this?

    The only way to do that would be to delete places.sqlite in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder].
    Places.sqlite also stores the bookmarks, but Firefox will restore those from the most recent JSON backup in the bookmarkbackups folder.

  • Is there a tool to execute an swf via the command line?

    I have two video cameras connected to a linux box via usb and I want to send the streams from those cameras to a flash media server. But to do that I don't want to have to run X and a browser, because I'm running on an embedded system, I can't afford those processor cycles.
    Please Help!

    On Thursday 24 Apr 2008, John Brahy wrote:
    > I have two video cameras connected to a linux box via usb and I want to
    > send the streams from those cameras to a flash media server. But to do that
    > I don't want to have to run X and a browser, because I'm running on an
    > embedded system, I can't afford those processor cycles.
    Please
    > Help!
    I'd look at non-Flash solutions here, such as the many webcam/security system
    Linux has available.
    Tom Chiverton
    This email is sent for and on behalf of Halliwells LLP.
    Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority.
    CONFIDENTIALITY
    This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500.
    For more information about Halliwells LLP visit www.halliwells.com.

  • Instructions: easy roaming wifi via the command line

    First off, you don't need netcfg, wicd, or networkmanager for this. All you need is ifplugd, wpa_supplicant, and the Arch initscripts.
    If you don't already have ifplugd and wpa_supplicant, install them.
    # pacman -S ifplugd wpa_supplicant
    Now put this in /etc/wpa_supplicant.conf (replace the file if it's already there):
    ctrl_interface=/var/run/wpa_supplicant
    ctrl_interface_group=network
    eapol_version=1
    update_config=1
    fast_reauth=1
    ap_scan=1
    network={
    key_mgmt=NONE
    and this in /etc/rc.local, replacing "wlan0" with the name of your wireless interface:
    # Start wpa_supplicant on wireless interface
    echo "Starting wpa_supplicant"
    wpa_supplicant -iwlan0 -Dwext -c/etc/wpa_supplicant.conf -B || echo " ... FAILED"
    In /etc/ifplugd/ifplugd.conf, uncomment the section relating to wlan0, and if necessary rename it. Add wlan0 (or whatever) to the interfaces controlled by ifplugd.
    Finally, in /etc/rc.conf, add your wireless interface (in my case wlan0) to the INTERFACES list:
    wlan0="dhcp"
    INTERFACES=(foo bar baz ... wlan0)
    Add ifplugd to your daemons list and remove network (or wicd or networkmanager). And that's it, you're done. wpa_supplicant will auto-associate with the nearest open network, and when it does, ifplugd will run dhcpcd and connect you. To select another network you can use wpa_cli or wpa_gui, and ifplugd will connect you automatically. Simple, fast, and it works.

    This should go on the wiki, not the forums

  • How can I start a second window of a second profile through the command line?

    I have two profiles set up, 'default' and 'second'. If both are already running how can I start a second window of profile 'second'?
    firefox -p 'second' : opens a new window of the default and,
    firefox -p 'second' -no-remote : tells me that firefox is already running.

    I don't think that this is possible.<br />
    You need to open this second instance (Firefox profile folder) with the -no-remote command line switch and that makes it impossible to open external links via the command line or via a double-click.<br />
    You can only open a link in such an instance by dragging the link on the tab bar of that Firefox window.

  • Fail to build SSIS/SSAS projects via VS2012 command line (devenv.exe) with SSDT BI tool installed

    Hello,
    I installed recently released SSDT BI tools for VS2012 and I can work on my existing SSIS/SSAS projects all well in VS2012. But when I try to build my SSIS/SSAS projects via the command line of VS2012, such as
    devenv.exe mySolution.sln /rebuild Release /out "C:\temp\buildLog.txt"
    I will get the error like below in the log file.
    Error: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
    Is this a known issue? If yes, any fix has been planned?
    Thanks
    Jimmy

    Hi Jimmy Jin,
    This sounds like .NET framework problem, please refer to:
    http://bchavez.bitarmory.com/archive/2007/08/23/catastrophic-failure-exception-from-hresult-0x8000ffff-e_unexpected.aspx
    http://bchavez.bitarmory.com/archive/2007/08/23/catastrophic-failure-exception-from-hresult-0x8000ffff-e_unexpected.aspx
    Thanks,
    Eileen
    If you have any feedback on our support, please click
    here
    Eileen Zhao
    TechNet Community Support

  • Is there a way to switch between workspaces in Spaces from the command line?  I want to write a script to set up certain applications in certain workspaces (without having to do it manually each time)...

    Is there a way to switch between workspaces in Spaces from the comnand line?  I use several workspaces from Spaces, each workspace having a certain number of fixed applications running.  Rather than set all this up each time I log on, I'd like to write a script from the command line (I use gawk) to automate this. Currently I have a gawk script that, given a directory, opens a few xterms whose working directory is the given directory, and opens "preview" applied to a certain file in that directory.  However, at present I have to manually move an xterm through each workspace and run my gawk script in each workspace (applied to each directory that I'm working on).
    There must be a better way...

    Addendum: Can this be done via:   open -a Spaces --args xxx  , where xxx is some set of arguments (or something like this)?

  • I am trying to set an open DNS using the MacAir. But when I tried to flush the existing one at utilities/terminal, it will not work.  I am using Yosemite.  May I know what should be the command line so that I can shift to an open DNS?  Thanks

    I am trying to set an open DNS using the MacAir. But when I tried to flush the existing one at utilities/terminal, it will not work.  I am using Yosemite.  May I know what should be the command line so that I can shift to an open DNS?  Thanks

    >SystemPreferences>Network>DNS

Maybe you are looking for

  • I can't set shortcut for „Application windows"

    System Preferences → Exposé & Spaces → Exposé I can't set shortcut for „Application windows" - first column with Fn key is OK, but the second column with mouse button doesn't work. If I set „secondary mouse button" for „application windows", it doesn

  • HS between Oracle 8.1.7 and MS-SQL Server

    Hi all, I'm using one Oracle database 8.1.7 in Linux, and in another server MS-SQL Server 2000. This Ora817 i'm using only for source. My procedure select data from ora817 to insert in sql server 2000, using HSODBC, and the system frezee. But, when i

  • Create routine issue in transformation

    Hi Gurus, I am trying to create a routine in transformation. I am getting an error "CLASS CL_RSTRAN_GEN" not found. The class "CL_RSTRAN_GEN" was adressed in the ABAP program  "CL_RSTRAN_STEP_ROUT===========CP". However, no class definition was found

  • Do you know e-mail or contact number to Vodafone in Spain?

    do you know e-mail or contact number to Vodafone in Spain? for unlocking my iphone 4??? it's possible if i do from in indonesia???

  • How to disable screensaver in HTML5 full screen

    Hi all people Already, sorry for my english, I'm french and I do what I can. I'm in windows 8.1, not debian or other linux based OS. In streaming, my firefox not disable the screensaver in html5 full screen. I search in the web a solution, I found th