MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Archive for June, 2015

Mac SQL Developer Install

without comments

This how you install SQL Developer on Mac OS Yosemite. The first thing you need to do is download and install Java 8, not Java 7 on your Mac OS Yosemite as suggested on some web sites. You can determine whether or not Java is installed by running the following command:

Mac-Pro-3:~ username$ java -version
No Java runtime present, requesting install.

You must accept the Java license to install Java 8 on the Mac OS X operating system:

YosemiteInstallJava_01

You have the option of installing the Java SDK or JDK. I’ve opted to install Netbeans 8 with JDK 8u45, as you can tell from the screen capture after you launched the file:

YosemiteInstallJava_02

It is a standard Mac OS installation, which is why I didn’t bother showing any dialog messages. After installing the Java JDK or SDK, you should download SQL Developer 4.1 from Oracle’s web site. Below is a screen shot of the Oracle download web page where I’ve accepted the license agreement:

SQLDeveloperDownload

If you attempt to launch the installation and you’ve set your Mac Security to the “Mac App Store and identified developers” setting, you should raise the following exception:

SQLDeveloperInstall_01

If you reset the Mac Security to an “Anywhere” setting, you can install Oracle SQL Developer on Yosemite. Just make sure you reset it to the “Mac App Store and identified developers” setting after you install SQL Developer.

If you launch SQL Developer with the Security “Anywhere” setting, it displays the following dialog:

SQLDeveloperInstall_02

After you launch the program, you will see the following progress dialog:

SQLDeveloperInstall_03

The last step of the installation launches SQL Developer, as shown below:

SQLDeveloperInstall_04

Click the Connections icon to create an initial connection, like the following:

SQLDeveloperInstall_05

After connecting to the database, you can write and execute a query as shown in the next screen capture:

SQLDeveloperInstall_06

As always, I hope that this helps those who require an example to install SQL Server on a Mac OS.

Written by maclochlainn

June 12th, 2015 at 3:08 am

Run X11 Apps on Mac

without comments

It’s possible folks didn’t notice but Mac OS X no longer includes XQuartz by default from Maverick forward. You need to download XQuartz and install it. I’d recommend after you install Xcode.

Launch XQuartz and then either use the bash shell it opens or open a Terminal bash shell session. Inside the shell, you might start Secure Shell (ssh) like this:

Mac-Pro-3:~ michaelmclaughlin$ ssh student@192.168.2.170
student@192.168.2.170's password: 
Last login: Thu Jun  4 14:33:37 2015
[student@localhost ~]$ xclock &
[1] 10422
[student@localhost ~]$ Error: Can't open display:

Granted that’s a trivial error and running the xclock X11 applications isn’t crucial, an error that makes it more important is the following from Oracle’s old Designer/2000 application:

FRM-91111: Internal Error: window system startup failure.
FRM-10039: Unable to start up the Form Builder.

This is the desired behavior. Secure shell (ssh) can’t run it unless you make the connection with the -Y flag. You should use the following syntax:

Mac-Pro-3:~ michaelmclaughlin$ ssh -Y student@192.168.2.170
student@192.168.2.170's password: 
Last login: Tue Jun  9 14:56:55 2015 from 192.168.2.1
/usr/bin/xauth:  file /home/student/.Xauthority does not exist
[student@localhost ~]$ xclock &
[1] 10760

You can safely ignore the .Xauthority does not exist warning message because it’ll create a .Xauthority file and store the magic cookie after the warning message. You should see the xclock program running in the upper left hand corner of your console, like:

X11MacXclock

It’s terrific that you don’t get a font warning like you typically would using UTF-8 on Linux. Nice that the Mac OS fonts are so well done that there isn’t a raised exception.

Using xclock or xeyes isn’t very useful as a rule, but this method also lets you run any of the Linux GUI applications. For example, the following gedit command lets you run the gedit utility from a Mac OS console. If you’ve installed the gedit plug-ins, you also can use the Terminal console on the remote system.

X11GeditTerminal

The process sequence for the command-line is shown below:

1030     1  /usr/sbin/sshd -D     - The root process launches the ssh daemon
3145  1030  sshd: student [priv]  - The sshd launches a ssh session to manage a student ssh session
3152  3145  sshd: student@pts/1   - The ssh session launched to manage the ssh session
3166  3152  -bash                 - The bash shell launched by connecting through the ssh session
3240  3166  gedit                 - The gedit command issued inside a ssh session
3166  3240  gnome-pty-helper      - Launching the gedit session across X11 
3169  3240  /bin/bash             - Launching the Terminal session inside the gedit session across X11
3269  3884  ps -ef                - Command run inside the gedit Terminal session

Hope that helps those who want to use X11 applications on the Mac OS.

Written by maclochlainn

June 9th, 2015 at 4:51 pm

Fedora X11 Install

without comments

While working through getting my Mac OS X to work with X11, I stumbled on some interesting errors and misdirection solutions. Like most things, the solution was straightforward. Then, it struck me that I hadn’t installed it on my Fedora image. This blog post show you the errors I got the way to get it to work, and how to install X11 on Fedora.

The first step requires discovering the package. If you remember xclock or xeyes are X-Windows programs, it’s quite easy with this command (though it may take a moment or two to run):

repoquery -q -f */xclock

It will return something like this:

xorg-x11-apps-0:7.7-7.fc20.x86_64

You can then install X11 as a sudoer user with the yum utility like this:

sudo yum -y install xorg-x11-apps

It should return this to your console:

Loaded plugins: langpacks, refresh-packagekit
Resolving Dependencies
--> Running transaction check
---> Package xorg-x11-apps.x86_64 0:7.7-7.fc20 will be installed
--> Processing Dependency: xorg-x11-xbitmaps for package: xorg-x11-apps-7.7-7.fc20.x86_64
--> Running transaction check
---> Package xorg-x11-xbitmaps.noarch 0:1.1.1-6.fc20 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package                  Arch          Version             Repository     Size
================================================================================
Installing:
 xorg-x11-apps            x86_64        7.7-7.fc20          fedora        305 k
Installing for dependencies:
 xorg-x11-xbitmaps        noarch        1.1.1-6.fc20        fedora         37 k
 
Transaction Summary
================================================================================
Install  1 Package (+1 Dependent package)
 
Total download size: 341 k
Installed size: 949 k
Downloading packages:
(1/2): xorg-x11-apps-7.7-7.fc20.x86_64.rpm                  | 305 kB  00:01     
(2/2): xorg-x11-xbitmaps-1.1.1-6.fc20.noarch.rpm            |  37 kB  00:00     
--------------------------------------------------------------------------------
Total                                              252 kB/s | 341 kB  00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction (shutdown inhibited)
  Installing : xorg-x11-xbitmaps-1.1.1-6.fc20.noarch                        1/2 
  Installing : xorg-x11-apps-7.7-7.fc20.x86_64                              2/2 
  Verifying  : xorg-x11-apps-7.7-7.fc20.x86_64                              1/2 
  Verifying  : xorg-x11-xbitmaps-1.1.1-6.fc20.noarch                        2/2 
 
Installed:
  xorg-x11-apps.x86_64 0:7.7-7.fc20                                             
 
Dependency Installed:
  xorg-x11-xbitmaps.noarch 0:1.1.1-6.fc20                                       
 
Complete!

After you install the xorg-x11-apps libraries, you can launch xclock. You should use the following syntax:

xclock &

It should display something like the following on your console:

X11xclock

The warning message is typically because you’re running something like en_US.UTF-8 mode. You can find suitable X11 character sets by using the following command:

sudo yum search xorg-x11-fonts

You can install all of them with the following command:

sudo yum -y install xorg-x11-fonts*

However, at the end of the day the warning doesn’t go way. You should just ignore it.

Hope this helps those who want to install X11 on Fedora.

Written by maclochlainn

June 9th, 2015 at 3:53 pm