Help with Linux

for all subjects/topics not covered by the other forum categories
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Help with Linux

Post by geraldholdsworth »

I'm thinking of installing Linux, for the sole purpose of installing Lazarus and compiling my various projects for the platform. I have a spare Dell laptop (about 7 years old-ish) which currently has Windows 10 on it.

But, I have almost zero experience with Linux, aside from using Mac OS X. So, what is the best flavour of Linux to install? And where do I get it?

A desirable application I'd like to install is OneDrive - and I see that someone has written a client for Linux for it. But that is just desirable - I'd use a USB stick if need be.
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
User avatar
BigEd
Posts: 6261
Joined: Sun Jan 24, 2010 10:24 am
Location: West Country
Contact:

Re: Help with Linux

Post by BigEd »

Mint is popular
https://www.linuxmint.com/download.php

But probably Ubuntu is still the most obvious choice, and therefore might be the one which it will be easiest to find recipes for:
https://ubuntu.com/download/desktop

If you want to put a toe in the water, it should be relatively easy to boot from a USB stick and have a go without overwriting the hard drive at all. I think both UNetbootin and Rufus tools will automatically download a selected linux and put it on a bootable USB stick. (But I personally don't have experience with Windows 10)
User avatar
ash73
Posts: 223
Joined: Wed Feb 03, 2016 10:51 pm
Location: Cheshire, UK
Contact:

Re: Help with Linux

Post by ash73 »

I prefer Mint because it's more lightweight and runs better on an old PC, but they're much the same tbh. Best thing you can do is buy a little Raspberry Pi and install the CLI on it then you can just dive in and try whatever commands you like, because it takes minutes to start again from a fresh install.
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Help with Linux

Post by geraldholdsworth »

Thank you - I've just started a download of both.

I'm not bothered about wiping the hard drive - there's nothing on it (apart from Windows 10...so, yes, there's nothing on it :lol: ).
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Help with Linux

Post by geraldholdsworth »

ash73 wrote: Wed Dec 09, 2020 6:14 pm I prefer Mint because it's more lightweight and runs better on an old PC, but they're much the same tbh. Best thing you can do is buy a little Raspberry Pi and install the CLI on it then you can just dive in and try whatever commands you like, because it takes minutes to start again from a fresh install.
I've actually got a RPi. I hadn't thought about that until about half hour ago...I've got a spare SD card too (bought to upgrade to the latest RISC OS 5).
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Help with Linux

Post by geraldholdsworth »

So I downloads both Mint Cinnamon and Ubuntu (two versions), burn Mint onto a DVD, then grab the Dell laptop ready to put the disc in the drive. However, there is one slight problem...


...no optical drive! #-o


Quick scout around fleabay, finds one and orders it. Should be with me in about a week.

I also downloaded one of those tools to create a bootable USB stick, but I haven't found a spare stick yet.
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
User avatar
JasonStonier
Posts: 451
Joined: Mon Dec 10, 2018 8:10 pm
Location: Dorset
Contact:

Re: Help with Linux

Post by JasonStonier »

I spent years playing with Linux flavours, and the one I finally stuck with was Linux Mint Mate. With Linux, you have the base operating system, then a desktop environment on top of it - Linux Mint is the OS and Mate is the Desktop Environment.

The Linux Mint forums are amazing for supporting newbies, and Mint "just works". Few new concepts to learn, but on the whole it's an easy transition.
User avatar
JasonStonier
Posts: 451
Joined: Mon Dec 10, 2018 8:10 pm
Location: Dorset
Contact:

Re: Help with Linux

Post by JasonStonier »

geraldholdsworth wrote: Wed Dec 09, 2020 8:58 pm ...no optical drive!
I also downloaded one of those tools to create a bootable USB stick, but I haven't found a spare stick yet.
You'll have a happier life if you make a bootable USB stick. On Windows, use Rufus for creating your USB. If you need any help, I'm happy to offer advice here (such as it is).
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Help with Linux

Post by geraldholdsworth »

JasonStonier wrote: Thu Dec 10, 2020 1:05 pm You'll have a happier life if you make a bootable USB stick. On Windows, use Rufus for creating your USB. If you need any help, I'm happy to offer advice here (such as it is).
I'm going to see if I've got a spare one, big enough, kicking around. I downloaded UNetBootin, mainly because it was listed first, but I'm using a Mac - just had a look at Rufus and it appears it is Windows only (although, does say other versions down the page, and I do have a Windows laptop). The laptop needs an optical drive anyway, and for the sake of 16 quid, I couldn't argue.

Thank you for your offer of advice. I'll let you know how it goes.

Cheers,

Gerald.
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
User avatar
BeebMaster
Posts: 7379
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Help with Linux

Post by BeebMaster »

I've been using Ubuntu since 2008, and I just did a fresh install of Ubuntu 20.04 to my new desktop PC. I did the install from the ISO copied onto a USB stick no problem, although there is a DVD drive in this computer. Possibly if you don't have USB stick big enough you could use an SD card in a USB card reader? I don't think you can boot from SD card slot on a laptop, I've never had it recognised in the boot menu.

It was by far the quickest and most straightforward Ubuntu install I've ever done. I think that's probably because I let it use all the recommended settings instead of setting up custom partitions as I've done in the past. I'm sure it used to be a thing that it was preferred to have your boot area, home user area and general data area on separate discs or partitions, but it doesn't seem to matter now.

I think I did try Mate when it was the only Linux option for the Pi 3, but I didn't like the desktop. I can't get on with anything that looks like the screen of a portable telephone.

Prior to this, my laptop was (still is) running Ubuntu 18.04 and my Raspberry Pi 4 is running Raspbian.

It's a moot point whether I am really running Ubuntu, as you can have different desktop interfaces so I use the XFCE4 desktop interface and generally prefer what they KDE applications over the usual Gnome ones (e.g. Dolphin for file manager, Kate for text editor, and probably a few others I don't even realise). They used to call using the XFCE4 interface Xubuntu, and using KDE Kubuntu, so who knows what I'm running!

You'll find that doing a lot of things we like to do on the forum is very much easier in Linux, there is a command line way of doing nearly everything that you could do on a 1980s PC that is impossible now with other operating systems.

And it's all free. And you're not perpetuating the hegemony of somebody else's OS.
Image
User avatar
BeebMaster
Posts: 7379
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Help with Linux

Post by BeebMaster »

P.S. if you extract your Win10 licence key (the full thing, not just the part that the system settings reports) you can use that to install it within a Virtual Box when you have Ubuntu running, in case you ever need to refer to it again. Downloading install ISOs is free, it's the licence key that you have to pay for, so keep the one you already own.
Image
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Help with Linux

Post by geraldholdsworth »

BeebMaster wrote: Thu Dec 10, 2020 4:22 pm P.S. if you extract your Win10 licence key
We won't go there...nudge nudge wink wink say no more! :wink:
BeebMaster wrote: Thu Dec 10, 2020 4:22 pm install it within a Virtual Box when you have Ubuntu running, in case you ever need to refer to it again.
I've done that on my Mac, for quick and easy access to Windows. But my main development PC is my Windows laptop...although a lot of the development tools are now appearing on my Mac. Just wish AMX, Extron and Crestron would produce Mac versions of their applications.

I've now got Linux Mint 20 Cinnamon running on my 'spare' Dell laptop, quite nicely. I've also managed to install Lazarus and OneDrive (well, Insync - gotta pay for that one :roll: ). Once Insync has finished syncing, I'll have a go at trying to compile my application on the machine.

Good thing about this 'spare' laptop is that I have a docking station with it...just no space to put it anywhere! :x
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Help with Linux

Post by geraldholdsworth »

I had to uninstall Insync - it started off OK, but then stopped syncing. Could not get it to carry on. Didn't start off right when the installer crashed before it started to install and then wouldn't quit. Guess they won't be getting my 30 quid - I had thought about paying for it, but I'll just use a USB stick.

On the subject of USB sticks - is it normal for programs (is that what executables are called in Linux?) not to run from a USB stick?
I had to copy the entire Lazarus project over onto the hard drive and compile from there. Not a big issue.

But, going back to Linux in general, I've found out how to Force Quit a running application, and how to uninstall applications. Another question - the word processor (LibreSomething) that comes with the OS...is it compatible with MS Word documents?
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
User avatar
BigEd
Posts: 6261
Joined: Sun Jan 24, 2010 10:24 am
Location: West Country
Contact:

Re: Help with Linux

Post by BigEd »

Yes, LibreOffice is pretty compatible - certainly compatible with straightforward documents.
User avatar
BeebMaster
Posts: 7379
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Help with Linux

Post by BeebMaster »

On the permissions setting, Linux files have an executable flag which you can set from the file manager by right clicking for Properties and then you'll find it in the Permissions tab.

If you want to be able to execute files held on a network share, the share will need to be mounted with the "user" option included in the mount line for the share in the fstab file or if mounting manually.

I've struggled with displaying doc and docx files properly for on Linux for a long time, but certainly in Ubuntu 20.04 I'm finding Libre Office is at lot better at this than I've experienced previously. I think finally they've got compatibility Word files sorted.
Image
User avatar
sweh
Posts: 3314
Joined: Sat Mar 10, 2012 12:05 pm
Location: 07410 New Jersey
Contact:

Re: Help with Linux

Post by sweh »

BeebMaster wrote: Thu Dec 10, 2020 10:15 pm If you want to be able to execute files held on a network share, the share will need to be mounted with the "user" option included in the mount line for the share in the fstab file or if mounting manually.
No, the "user" option means a non-privileged user (ie non-root and not via sudo or similar) can mount the filesystem. It has nothing to do with the execute option.

From `man mount`

Code: Select all

       The non-superuser mounts.
              Normally,  only  the  superuser can mount filesystems.  However,
              when fstab contains the user option on a line, anybody can mount
              the corresponding system.

              Thus, given a line

                     /dev/cdrom  /cd  iso9660  ro,user,noauto,unhide

              any  user  can  mount  the iso9660 filesystem found on his CDROM
              using the command

                     mount /dev/cdrom

              or

                     mount /cd
Rgds
Stephen
User avatar
sweh
Posts: 3314
Joined: Sat Mar 10, 2012 12:05 pm
Location: 07410 New Jersey
Contact:

Re: Help with Linux

Post by sweh »

geraldholdsworth wrote: Wed Dec 09, 2020 4:17 pm A desirable application I'd like to install is OneDrive - and I see that someone has written a client for Linux for it. But that is just desirable - I'd use a USB stick if need be.
FWIW, I use the onedrive client from https://github.com/abraunegg/onedrive on my Linux machines. It works... adequately. It sometimes fails (although my version is almost 2 years old, so they may have fixed some bugs) but mostly it works.

If you don't want a "live sync" then rclone.org is great for periodic syncs. This is how I copy my backups to Onedrive so I have a cloud copy of them. It can also encrypt automatically while it's doing it.
Last edited by sweh on Thu Dec 10, 2020 11:19 pm, edited 1 time in total.
Rgds
Stephen
User avatar
sweh
Posts: 3314
Joined: Sat Mar 10, 2012 12:05 pm
Location: 07410 New Jersey
Contact:

Re: Help with Linux

Post by sweh »

geraldholdsworth wrote: Thu Dec 10, 2020 8:51 pm On the subject of USB sticks - is it normal for programs (is that what executables are called in Linux?) not to run from a USB stick?
I had to copy the entire Lazarus project over onto the hard drive and compile from there. Not a big issue.
it depends on the filesystem on the USB stick, and how it's been mounted. Most USB sticks are formatted with VFAT so they an be used with Windows. Now VFAT doesn't do permissions the same way as Unix native filesystems so we have to kludge it. Mostly if the file is set in Windows to be executable then it will show as executable in Linux. If you formatted the stick on a Mac then it might easily have another filesystem on it.

BUT (there's always a but).

Filesystems can be mounted with options like "noexec" which turn off the ability to execute files on that filesyste,

To make things even more complicated there are other options such as "umask" which can _hide_ permissions (eg umask=0111 would remove the execute bit even if it's set on the filesystem); these are common when mounting from windows fileservers, for example.

So it's very likely the OS distribution you're using is trying to protect you from malware by not allowing you to execute commands directly from the stick. If you know what you're doing you can override this. But, for now, just copy the data :-)
Rgds
Stephen
User avatar
scruss
Posts: 653
Joined: Sun Jul 01, 2018 4:12 pm
Location: Toronto
Contact:

Re: Help with Linux

Post by scruss »

sweh wrote: Thu Dec 10, 2020 11:17 pm So it's very likely the OS distribution you're using is trying to protect you from malware by not allowing you to execute commands directly from the stick. If you know what you're doing you can override this. But, for now, just copy the data :-)
Noexec is as close to hardwired into the usb automount daemon as makes no difference. Most systems can't execute anything from USB, as well they shouldn't
sP1d3r
Posts: 769
Joined: Fri Aug 23, 2019 2:40 am
Contact:

Re: Help with Linux

Post by sP1d3r »

Ubuntu is now available for install on a Raspberry Pi, url:

https://ubuntu.com/blog/build-a-raspber ... N0RtIn0%3D

BTW

:P
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Help with Linux

Post by geraldholdsworth »

scruss wrote: Fri Dec 11, 2020 1:21 am
sweh wrote: Thu Dec 10, 2020 11:17 pm So it's very likely the OS distribution you're using is trying to protect you from malware by not allowing you to execute commands directly from the stick. If you know what you're doing you can override this. But, for now, just copy the data :-)
Noexec is as close to hardwired into the usb automount daemon as makes no difference. Most systems can't execute anything from USB, as well they shouldn't
I'm also thinking that it would be preferable just to copy the data off the USB stick, compile the code, then copy the resultant executable back onto the stick.
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Help with Linux

Post by geraldholdsworth »

sP1d3r wrote: Fri Dec 11, 2020 10:40 am Ubuntu is now available for install on a Raspberry Pi, url:
I spotted that on my Raspberry Pi Imager, which I downloaded a couple of weeks back. Problem is, mine is a RPi 2, so it is only 32bit. OK for RISC OS (which is the intention), but I'm wanting to compile for 64 bit Linux. I had thought of purchasing a new RPi...but I can't justify it (to the wife).
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
User avatar
BeebMaster
Posts: 7379
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Help with Linux

Post by BeebMaster »

Pi comes in a very small box, as long as you're at the letterbox to catch it first, she'll never know.

I think I was thinking of "exec" rather than "user" for execute permissions, I have both set in my fstab network mount for it all to work properly.
Image
User avatar
scruss
Posts: 653
Joined: Sun Jul 01, 2018 4:12 pm
Location: Toronto
Contact:

Re: Help with Linux

Post by scruss »

geraldholdsworth wrote: Fri Dec 11, 2020 1:37 pmProblem is, mine is a RPi 2, so it is only 32bit.
If yours is a later 2B v1.2, the SoC is a BCM2837 ARM Cortex-A53 which should be able to run 64-bit code.

The earlier v1.0 boards had a 32-bit only BCM2836.
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Help with Linux

Post by geraldholdsworth »

BeebMaster wrote: Thu Dec 10, 2020 10:15 pm On the permissions setting, Linux files have an executable flag which you can set from the file manager by right clicking for Properties and then you'll find it in the Permissions tab.
I've now installed Linux Mint into a VirtualBox on my Mac, as well as my 'spare' laptop (I actually thought last night that it's silly having to fire up another laptop, and copy across source code using a USB stick, just to compile an application for Linux, when I have VirtualBox installed on my machine and already with a Windows 10 setup). I've set up folder shares from VirtualBox and these now appear on my Linux desktop as shared drives, but I can't access them or change permissions so I can access them. They are owned by root (obvs). VirtualBox has been set for Full access permissions on both shares.

There is a setting, when adding these shares in VirtualBox, for mountpoint - I wasn't sure what to put so left it blank.
Screen Shot 2020-12-12 at 09.32.58.PNG
Screen Shot 2020-12-12 at 09.32.35.PNG
Screen Shot 2020-12-12 at 09.28.56.PNG
I have found the Users and Groups settings and added myself to the two 'root' groups, but no effect (BTW, the same two shares are fully accessible, using the same method, on the Windows 10 box).
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Help with Linux

Post by geraldholdsworth »

Don't worry...sorted it. Needed to add myself to the vboxsf group.
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
cmorley
Posts: 1867
Joined: Sat Jul 30, 2016 8:11 pm
Location: Oxford
Contact:

Re: Help with Linux

Post by cmorley »

Only just spotted this... if you have windows 10 why don't you just use WSL2?

edit: Indeed if cross compiling is your only goal then WSL1 would fine (not a full VM so lower resource usage).
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Help with Linux

Post by geraldholdsworth »

cmorley wrote: Sat Dec 12, 2020 10:30 am Only just spotted this... if you have windows 10 why don't you just use WSL2?

edit: Indeed if cross compiling is your only goal then WSL1 would fine (not a full VM so lower resource usage).
So I can also play with Linux. It's an OS I've never really got into, although I did install it on a PC years ago (found the DVD the other day - Linux Mint 17 KDE), but couldn't get the hang of it. Plus it gives me an excuse to use the laptop I've got spare sitting here. Installing Linux onto VBox is just, pretty much, purely for cross compiling - I then I was reading the Lazarus FAQs and how to compile for Linux on a Windows machine.

My Mac is my main machine - it's got a much nicer keyboard and I'm just used to the OS now. I've got a Windows 10 laptop which I mainly use for development, but I've since managed to configure macOS for Apache/PHP and now applications. I still use the Windows laptop for work stuff (even though work have given me a laptop, but it runs much slower than mine despite being 5 years younger), as Extron, AMX or Crestron haven't (and I doubt will) produce macOS versions of their software (and, for some reason, doesn't work properly in VBox).

And then there's the games - I still haven't managed to persuade Richard Hanson to compile PC Repton 1, 2 or 3 for macOS (although I'll have another go as Repton 1 and 2 were written in Delphi 7, so are an ideal candidate for porting across to Lazarus).

Oh, and then I have my RPi for RISC OS.
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
User avatar
geraldholdsworth
Posts: 1401
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Help with Linux

Post by geraldholdsworth »

geraldholdsworth wrote: Sat Dec 12, 2020 11:03 am Oh, and then I have my RPi for RISC OS.
Talking of which...
WhatsApp Image 2020-12-12 at 13.49.11.jpeg
I guess the VNC is working then. :D
Gerald Holdsworth, CTS-D
Extron Authorised Programmer
https://www.geraldholdsworth.co.uk
https://www.reptonresourcepage.co.uk
Twitter @radiogezza
sP1d3r
Posts: 769
Joined: Fri Aug 23, 2019 2:40 am
Contact:

Re: Help with Linux

Post by sP1d3r »

You could save yourself a lot of bother and go to 'Programs and features' in W10, enable WSL (Windows Subsystem for Linux) and install Ubuntu from the Windows store, there are several different Linux distros available.

Edit: needs 64-bit Windows 10.
Post Reply

Return to “off-topic”