Building Bert's Native Client for Linux

  • New Wordpress Plug-In Forum
    Guest:

    Just a note that we have a new forum to contain discussions relating to the Wordpress plug-in which Daniel Persson originated and has been making great progress on. You'll find it under "Server-Side Solutions."

    /Steve.

Status
Not open for further replies.

Bert Put

Member
Jun 4, 2018
7
1
So my thanks go to Adam as well.
Yep. I could not have done it without his library. :)

and also Microsoft's own crippled free word processor (whose name escapes me).
WordPad :)


Don't worry about slow progress. We all have lives to lead. Is it practical for trying out yet - perhaps when Steve gets sqrl working on this forum? If you/moderators adopt PHolder's idea of a pinned thread you can give us the details.
It is absolutely ready to try but I have not implemented creating a SQRL identity yet, so you'll need to load a .sqrl file from your windows client to make it work. And yes, I will adopt PHolder's idea for a pinned thread. It will mainly point to the the github project, and the information for getting it going is all there in the README.md file. Basically, you get Adam's libsqrl and build it, then get my project and build it, and finally set up the sqrl.ini file to point to your .sqrl file (I used the one created by Steve's Windows client).

I use ubuntu and at the moment, I just copy/paste the sqrl link from grc.com to the command line so that the sqrl client takes it as a command line argument. There are ways to get firefox to fire it off when you click the link but I don't have that working yet. Some folks have had success -- maybe you could try it and report your results?

Cheers, Bert
 

rustleg

Active member
May 20, 2018
25
2
UK
It is absolutely ready to try but I have not implemented creating a SQRL identity yet, so you'll need to load a .sqrl file from your windows client to make it work. And yes, I will adopt PHolder's idea for a pinned thread. It will mainly point to the the github project, and the information for getting it going is all there in the README.md file. Basically, you get Adam's libsqrl and build it, then get my project and build it, and finally set up the sqrl.ini file to point to your .sqrl file (I used the one created by Steve's Windows client).

I use ubuntu and at the moment, I just copy/paste the sqrl link from grc.com to the command line so that the sqrl client takes it as a command line argument. There are ways to get firefox to fire it off when you click the link but I don't have that working yet. Some folks have had success -- maybe you could try it and report your results?

Cheers, Bert
I have a .sqrl file from a trial of Steve's client. I seem to have lost the .exe so I downloaded the one I found dated 2 May in case I need to run it again.

I had a look around github and found your github sqrl page, so I had a fiddle.

I'm using Linux Mint 18.3 for this experiment which appears to have GTK 2.0 libraries. I installed liburiparser. I got as far as the instructions to build libsqrl and libsodium until it said "cmake .." then I was stuck. I presume cmake is part of a c build package which I need to install?

It's been a little while since I used Steve's client so I don't remember what the grc link is that you mentioned. I had a look in the sqrl dev area but couldn't find the page. Maybe running the sqrl-installer-test.exe will find it?

I noticed that "/home/adam" is in cmake/cmake_uninstall.cmake so perhaps this needs to be edited?

I'll wait until you set up the pinned thread you mentioned and then have another look.
 

Bert Put

Member
Jun 4, 2018
7
1
I have a .sqrl file from a trial of Steve's client. I seem to have lost the .exe so I downloaded the one I found dated 2 May in case I need to run it again.
Yes, that .sqrl file will work. It did for me.


I'm using Linux Mint 18.3 for this experiment which appears to have GTK 2.0 libraries. I installed liburiparser. I got as far as the instructions to build libsqrl and libsodium until it said "cmake .." then I was stuck. I presume cmake is part of a c build package which I need to install?
I must have had liburiparser already installed on my machine because I did not need to install it to build and run libsqrl or sqrl.
Yes, you will need to use your package manager to install liburiparser and cmake. Then follow the instructions in Adam's project to build it. Daniel Persson wrote up a narrative of his build experience in the sqrl newsgroups (point your newsgroup reader at news.grc.com) and you should be able to find it. Hopefully Daniel can comment here as well. If I have to, I could copy/paste his post here.


It's been a little while since I used Steve's client so I don't remember what the grc link is that you mentioned. I had a look in the sqrl dev area but couldn't find the page. Maybe running the sqrl-installer-test.exe will find it?
The GRC link that I speak of can be copied from the sqrl login page. On my browser, I right-click on the "login with SQRL" button and select "Copy link location". Then I switch to the command line, type "sqrl " and paste in the link. That's usually enough to log me in. This is a temporary measure until I figure out how to trigger starting the sqrl client just by clicking on the "sqrl://" link directly.

I hope that gets you going. I'll try to get the pinned thread up here soon. Meanwhile, Adam's instructions to build libsqrl and Daniel Perssons' narrative are your best guide right now.

Cheers, Bert
 

rustleg

Active member
May 20, 2018
25
2
UK
Hi Bert

I had a go at this and wrote up my experience as follows:

My build experience as a github novice:
(I have some programming experience from long ago and a little basic Linux experience)

(Using Linux Mint 18.3)

The dependencies:
=================
"SQRL depends on GTK-2.0, libsqrl, libsodium, and liburiparser"

I think Mint 18.3 includes GTK-2.0

Use package manager (Synaptic) to install: cmake, liburiparser, liburiparser-dev

Open a terminal:

$ git clone https://github.com/Novators/libsqrl.git
$ cd ~/libsqrl
$ mkdir build
$ cd build
$ cmake ..

At this point it threw an error:
No CMAKE_CXX_COMPILER could be found.

After some googling I installed build-essential using the Synaptic package manager after which the cmake .. command succeeded
(Note: at first looking at the instructions I thought the .. was an ellipsis meaning I should substitute something such as libsqrl. Later flat of hand hits forehead and realised it was a literal reference to the directory)

Repeat
$ cmake ..
(final message)
-- Build files have been written to: /home/jr/libsqrl/build

$ make
various executables appear in ~/libsqrl/build/bin

$ sudo make install

Next?
=====
Having never used git (I lie but it was ages ago) I guessed this step

$ cd ~
$ git clone https://github.com/bertput/sqrl.git

A new folder appeared ~/sqrl

Looking at Daniel Persson's notes he mentions changing things in the Makefile. I looked in there and found reference to directories $(HOME)/projects/libsqrl. I was a bit reluctant to proceed further as my libsqrl folder was $(HOME)/libsqrl and I was unsure whether simply moving it to be a subdirectory of a projects directory would mess up some references.

This was enough for today, comments would be welcome.

Russell
 

Bert Put

Member
Jun 4, 2018
7
1
Next?
=====
Having never used git (I lie but it was ages ago) I guessed this step

$ cd ~
$ git clone https://github.com/bertput/sqrl.git

A new folder appeared ~/sqrl

Looking at Daniel Persson's notes he mentions changing things in the Makefile. I looked in there and found reference to directories $(HOME)/projects/libsqrl. I was a bit reluctant to proceed further as my libsqrl folder was $(HOME)/libsqrl and I was unsure whether simply moving it to be a subdirectory of a projects directory would mess up some references.

This was enough for today, comments would be welcome.

Russell
So far you've made good progress. You've successfully built libsqrl and installed it as a shared library in your system. Well done!

Your next step is to change the sqrl Makefile to point to the location of your libsqrl project ( $(HOME)/libsqrl in this case) , review any other instructions in the Makefile, and then build it. After that, a "make install" will copy the executable into your $(HOME)/bin directory, and will create a $(HOME)/.sqrl directory, where you will find a file: sqrl.ini.

Edit $(HOME)/.sqrl/sqrl.ini to point to your .sqrl file, and at that point you should be able to run sqrl. Most linux distros will include $(HOME)/bin in the path environment variable if it exists: you will need to verify that. If not, you will get "command not found" or similar.

The command line for sqrl is "sqrl sqrl://...." where the sqrl link is passed as a command line argument. You can copy that link from the www.grc.com sqrl login page (just copy/paste in the normal way). If all is well you should see the sqrl window appear as well as additional windows as it requests passwords, etc.

Cheers, Bert
 

rustleg

Active member
May 20, 2018
25
2
UK
I finally made it work, here are the additional steps.

First I moved ~/libsqrl and ~/sqrl into ~/projects as I figured using a projects directory would contain this better. So this meant I didn't have to change anything in the Makefile.

The following commands threw some errors which I fixed after googling and installing libgtk2.0-dev, libssl-dev, exuberant-ctags
(If people aren't developing on github they probably won't have these tools installed)

$ export LIBSQRL=/home/jr/projects/libsqrl
$ cd sqrl/src
$ make
$ make install

It took me some time to realise what you meant by "where the sqrl link is passed as a command line argument" (probably me being thick) so to be more specific:

Open the browser at https://www.grc.com/sqrl/demo.htm
Click "Proceed to the SQRL demonstration"
Instead of clicking "Sign in with SQRL" , copy the link behind the "Sign in with SQRL" hotspot using right click
for example the link will be sqrl://www.grc.com/sqrl?nut=xxxxxxxxxxxxxxxxxxxxxxxxx
In the terminal issue
$ sqrl sqrl://www.grc.com/sqrl?nut=xxxxxxxxxxxxxxxxxxxxxxxxx

This logged me in to the demo
----------------

Hopefully these notes will help you to document the procedure to install and test for people with some limited Linux experience but not familiar with github development.
Best wishes
Russell
 
  • Like
Reactions: 1 person

PHolder

Well-known member
May 19, 2018
918
124
Hey everyone. I thought I would extract the relevant content from the "Thanks" topic to a new thread. I hope you agree I did the right thing.
 
  • Like
Reactions: 1 person

Vela Nanashi

Well-known member
May 19, 2018
633
107
Sounds good, maybe it could all be consolidated into a new thread and cleaned up a bit, as it is a good thing to know about.
 
  • Like
Reactions: 1 person

Bert Put

Member
Jun 4, 2018
7
1
That works but it looks like the old thread has been messed up; it goes to a poll, or to new posts, or something.

Update: I messed up. I forgot that rustleg was experimenting with the old thread. :)

Cheers, Bert
 

Bert Put

Member
Jun 4, 2018
7
1
I finally made it work, here are the additional steps.
Great job, Russell! I'm happy to hear you got it working.


Hopefully these notes will help you to document the procedure to install and test for people with some limited Linux experience but not familiar with github development.
Thank you for the notes. I will modify the pinned thread and the README.md to make the build process clearer, especially for folks who are not as used to linux as I am. :)

Cheers, Bert
 
Status
Not open for further replies.