Jump to content

hadifarnoud

Member
  • Posts

    16
  • Joined

  • Last visited

Posts posted by hadifarnoud

  1. used who in terminal i got Ahmed.  so after %admin ALL=(ALL) ALL

    ahmed ALL = NOPASSWD: /usr/sbin/bless

    ahmed ALL = NOPASSWD: /usr/bin/osascript

    i tried this with capital A and still didnt work. Do i have to restart my computer for changes to take affect?

    also is there a way so that it changes the startup disk to windows instead of booting back in os x?

     

    this might be an obvious thing, but did you actually download the workflow and installed it? 

     

    even if you did the sudoer part wrong, it must still work and ask for your password. it worth nothing that your windows partition must be named as BOOTCAMP (where you see /Volumes/BOOTCAMP/ in script).

     

    if all that failed, you can change the script to the one below:

    tell application "Finder"
    	set iconPath to (get name of startup disk) & ":Applications:Utilities:Boot Camp Assistant.app:Contents:Resources:DA.icns" as alias
    end tell
    
    do shell script "bless -mount /Volumes/BOOTCAMP/ -legacy -setBoot -nextonly; shutdown -r now" password "YOURPASSOWRD" with administrator privileges
    

    this one have your account password in it. Remember to change YOURPASSOWRD.

  2. yes i tried this with the new version.  It might be my user name.  My user name is firstname lastname with a space in between. example would be Mike Larry ALL = NOPASSWD: etc/sbin/bless but when doing that i get syntax error i tried Mike_Larry didnt work, i tried just Mike didnt work either. Also can i make it so that it changes my startup disk to windows? 

     

    I tried changing my username to just my first name but that didnt work either

    your username does not have a space in it. it's impossible. just use your username all lowercase without any space in it.

  3. Hi folks,
     
    I often find myself in an usecure wifi network. I don't want to go though the hassle of building a VPN server and I don't like hotspot shield.
    I ssh tunnel to my server and set socks proxy. it's a hassle so I figured many others may like this workflow too.
     
    however, I have a tiny issue. my scripts ask for user's password too many times. if only they could set password in workflow or change script to include the password. It's a shell script.

     

    Get it here
    PS: is there any way to ask user to configure this workflow after installing? like setting their ssh user and server?

  4.  

    I changed the Apple Scripting in the above example to the following, and I now no longer have to enter a password.

     

    do shell script "bless -mount /Volumes/Windows -legacy -setBoot -nextonly" password "[YourPassword]" with administrator privileges
    do shell script "shutdown -r now" password "[YourPassword]" with administrator privileges
     
    Windows is the name of my Bootcamp volume.
    Replace [YourPassword] with the appropriate password.
     
    Works a treat. Thanks to the original author for the inspiration. :)

     

    it would be great if I can change this workflow to ask user for password once.

     

    anyone?

  5. Hey, I don't know if anyone else has experienced this, but I thought I'd just chip in and let you know.

    When using this workflow to restart into windows 7, it stops me from being able to turn my brightness up and down.  However if I manually boot into windows it's fine, same goes for choosing windows as my startup disk.  At first I thought it was to do with windows update updating my drivers, but it's not.

     

    I was wondering if there was a fix for this workflow so that my brightness would work?  If not I just wanted to highlight the problem for other people that might of experienced the same thing and not known why it was happening.

     

    This is what I discovered regarding the problem. Original Discussion

     

    I also see this problem on a MacBookPro 8,2 (late2011):

    *When booting Windows 7 with rEFIt, brightness control does NOT work.

    *When booting Windows from the option menu at startup, brightness WORKS.

    *When booting Windows using Startup Disk pref. pane in OS X, brightness WORKS.

    *When booting Windows from the Windows Boot Camp program, brightness WORKS.

    When the brightness works, both the keyboard shortcuts and Windows Control Panel controls work. When it doesn't work, neither the shortcut keys nor the Control Pane controls work. Based on this, I infer that it's something to do with rEFIt.

    I wonder if anyone who uses rEFIt has the skills to debug and code up a fix for this type of thing. I don't :(

    it might be rEFIt. I have the same macbook. let me know if you found the root of the problem. finding out what's wrong is one thing, fixing it another.

  6. Great workflow. I agree that is would be better to not have to type the password, but this is a good compromise.

     

    I love the fact that within 2 minutes of thinking "Hmm.. It would be handy if Alfred could..", I've found a workflow that does pretty much what I need. You guys rock.  :)

     

    Thanks

     

    You don't have to enter password everytime. please follow these instructions: http://hadifarnoud.tumblr.com/post/44852828042/painless-restart-to-windows-with-alfred-shell-script

     

    EDIT: Please note that is the old version of the workflow. you just follow this part:

     

    First, you need to edit your sudoer file to allow bless command to run without needing password.

    sudo nano /etc/sudoers

    just after %admin  ALL=(ALL) ALL add this line (replace Username with your username)

    Username ALL = NOPASSWD: /usr/sbin/bless
    Username ALL = NOPASSWD: /usr/bin/osascript
  7. I created a workflow that restarts you into windows without changing your startup disk. that means if you simply restart in windows, it goes back to OS X again.

     

    Download

     

    I can improve it with your help. right now you have to change your disk (i.e. /dev/disks0p4) by hand. it could get better if we can detect it automatically.

     

    thoughts?

×
×
  • Create New...