Gsmartcontrol cannot get working


(John Veness) #1

Hello,

I am a very new user of Homebrew, so please go easy on me!

I have a macOS 10.13 machine, upon which I’m trying to install gsmartcontrol. I have installed Homebrew with the command on the home page:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
I then did:
brew install gsmartcontrol
which seemed to do its thing without complaint.

Now, though, if I try to run gsmartcontrol, there is no such command. If I do tab completion I see there is a gsmartcontrol-root, but if I run that (with or without sudo) I get an error about a missing command “xmessage”.

Any ideas? Thanks in advance.


(Jacob Ledbetter) #2

Is gsmartcontrol an application?


(John Veness) #3

If you mean “does it show up in Applications in Finder”, no, it doesn’t.

In the end, I just ran the “smartctl” command-line version, but something is clearly not right with the gsmartcontrol formula.


(Wulph111) #4

I had the same problem. Here’s what I was able to figure out:

The gsmartcontrol-root script is unnecessary, as long as you run gsmartcontrol as root. The command is not exposed so you have to find it manually.

At the top of /usr/local/bin/gsmartcontrol-root you’ll find the path to the executable (yours may be different):

EXEC_BIN="/usr/local/Cellar/gsmartcontrol/1.1.3/sbin/gsmartcontrol";

Use the sudo command to launch the executable directly as root:

sudo /usr/local/Cellar/gsmartcontrol/1.1.3/sbin/gsmartcontrol

Supply your MacOS account password at the prompt…
…and if you’re (un)lucky you’ll get a window with an error (check behind your terminal):
2018-01-18 20_40_25-macpro24 - TightVNC Viewer

Now you just have to follow the on-screen instructions:

  • click OK to close the error message
  • go to Options | Preferences and update the path.
    (On my system it’s in /usr/local/sbin/smartctl)
  • click OK to close the preferences dialog
  • press Ctrl+R to re-scan the system

and you should be good to go.


(Abe) #5

After locating the new executable I created a symlink to it in /usr/local/bin so I could run it easily as before. Would be nice if someone could fix the formula. My 1.1.3 update landed in a dir named 1.1.3_1. Here’s the symlink command for my path (adjust for yours), run in /usr/local/bin:

sudo ln -s /usr/local/Cellar/gsmartcontrol/1.1.3_1/sbin/gsmartcontrol gsmartcontrol

It appears to run fine run as non-root. My install had no trouble finding smartctl.


(Aleksey) #6

thank you guys! symlink worked like a charm for me also

by the way do you also have error about missing xterm when trying to do Options - Update Drive Database ?