Linux Mint or Linux Ubuntu for Livecode

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Linux Mint or Linux Ubuntu for Livecode

Post by bogs » Sat Jun 26, 2021 11:37 am

PaulDaMacMan wrote:
Sat Jun 26, 2021 3:34 am
The Pi is a single user (me) and I'm constantly changing OSes right now while testing it anyway, I don't need multi-user...
But that's besides the point, I'm saying that this easy way to make the Linux installer install, using the installer, and have it add shortcuts etc. in the process. I suppose running the installer with su / sudo would work too.
Right, it is a choice you can make, I was just a little confused by the "needed to..." part, I often go with single user on my rig as well, but as you say, sudo is how you would install system wide.

Btw, 'custom install' also works for either full admin install or single user install, and lets you determine where you want it put. By default, it socks the installation into 'home/user name/.runrev', but you can also install it to a share/remote location if you so needed.

Bonus tip, if you don't want to install it ever again, copy the main directory to any accessible drive, even a usb thumb drive, and you can run it from either Lin or Win without installation.

You will see the register pop up when starting for the first time, but afterwards it behaves as if it were installed locally.
PaulDaMacMan wrote:
Sat Jun 26, 2021 3:34 am
Know anything about making a stripped-down-to-LC-requirements (with a package manager of course) Linux build?
Sure, well, kinda. Start with a server version of the distro your targeting, this will give you the closest to a stripped down 'nix configuration without you actually manually building it, and will include of course a package manager.

In the older versions I work with, you add an x11 manager, and your done. From Rev 3 or 4.x I think to 7.x, you also for sure need the stdC6'ish & GTK2 libraries I've posted about previously in other threads, and your done. I don't believe the newer versions require any of those libraries, though, and I am pretty sure the 'nix requirements posted are not accurate for a long time now.

You can use the package manager to dump any cruft (apt purge), but generally I would leave the cruft in heh, you might find it is useful. Also, in the current versions, if you plan to play any media, I think you need a particular media player (mplayer?) I forget, but then, I don't use the current versions either.

The above is the long way, if you want probably the easiest version of the above, I'd say 1 of 3 things, 1.) minimal 'buntu server install or 2.) Antix minimal install or 3.) Q4OS install.

Antix -
Of the 3, Antix has by far the easiest configuraton and installer I've ever seen, as long as you know what you want / don't want.

Downside to Antix (or upside, depending on your point of view) is no systemD, it is an old style init system using the latest Debian stable. You can install it as slimmed down or loaded as you want, Lc during my testing runs well on it. Some of the default desktops aren't to everyone's tastes, but I like them all although I tend to use fluxbox (included by default) with XFCE Panels by default.

As a big bonus, it is designed to run on pathetic hardware with really low requirements, **AND you don't even have to install it as it comes with persistence options on the local and root level, so you run it "Live" style, everything is saved off remotely.

**Of course, you *can* install it, I'm just pointing out it isn't a necessity to have a system that acts like it is installed.

*Edit -- You would have to remaster for an arm install.

Q4OS
Again, a very configurable installer, lets you choose a stripped down core environment, gives you a choice of desktops, etc. , this is probably the easiest installer even if you don't know what you want.

Possible downside depending on the way you think about Linux is that by default, sudo privileges are always on, you have to configure them not to be. I should add though that this distro automatically uses those sudo privileges to do things like check for and install updates in the background, so...

When I was testing this out, I used the most minimal install it offered, which put me into a kde3 desktop. Ultimate configurability, Lc runs REALLY nicely on it (least, the versions I tested), and of all the 'nix desktops, auto-starting programs is super simple, you just add the program to the auto-start folder (right click menu).

After Anitx, Q4OS had the lightest impact on pathetic hardware and is fast and stable on almost nothing. I found that the kde4 desktop *does* require a bit more juice than the kde3 desktop, but if you like that kinda thing, knock yourself out.

Pi instructions.

'buntu Server minimal install
This actually requires a bit more 'nix knowledge to make the right choices, but next to Antix, it can be a good choice as you have a lot of control during and after the process.

IF you plan to use this for a desktop machine, *please* learn what servers you need / want BEFORE installing this. Then pick the 'buntu version you need (the latest is far ahead of Lc's official supported, but I think this is one case where I would certainly recommend using it).

Using 'buntu server for a desktop isn't terribly hard, but unlike the previous two descriptions, you will need to know what you want and you will have to go back and get rid of a lot of stuff you absolutely don't want. The upside is that Ubuntu *does* offer user specific task setups when you finally pick your desktop, the downside is they throw everything in the known universe into those.

Minimal server install certainly gives you the lightest 'buntu you can have, but it is still FAR AND AWAY heavier and harder on hardware than either of the two mentioned ahead of it.

Have fun :D
Image

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Linux Mint or Linux Ubuntu for Livecode

Post by mwieder » Sat Jun 26, 2021 9:50 pm

lemodizon-

Linux Mint has been my main system of choice for some ten years now. I'll just copy what others have said in that most linux distros should do the job for you.

But... you should be aware that in moving from Window$ to linux there are some caveats as far as things that don't work or may not work.
Printing
Browser support
Backdrop
Player controls
etc.

LiveCode basically ignores most linux problems, and since it's not much of a revenue stream for them it's hard to fault that. But you'll find you have to script workarounds for things.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Linux Mint or Linux Ubuntu for Livecode

Post by bogs » Sat Jun 26, 2021 10:10 pm

mwieder wrote:
Sat Jun 26, 2021 9:50 pm
But... you should be aware that in moving from Window$ to linux there are some caveats as far as things that don't work or may not work.
Printing
...
...
...Player controls
...
Printing doesn't work on 'nix ? When did that get fouled up? I thought the player works if you had one particular player, did that change?

*Edit -- just tested Q4OS with minimal installation (added codecs and FF), then dl'd 9.6.2 and set it to autostart , it works like what it sounds like you were looking for, even the backdrop worked correctly.
Image

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Linux Mint or Linux Ubuntu for Livecode

Post by mwieder » Sun Jun 27, 2021 1:50 am

Printing to pdf works, and as a workaround I print to pdf, then move the pdf file where the printer needs to find it, then do it again.
The bug report is here (and the workaround in comment #13)

https://quality.livecode.com/show_bug.cgi?id=21131

..as to the player, if I install mplayer I have been able to invoke it, but without controls. And in its own stack.
:

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Linux Mint or Linux Ubuntu for Livecode

Post by bogs » Sun Jun 27, 2021 9:18 am

Thanks Mark,

that it probably started around 8.x explains why it wasn't coming to my mind. Fascinating.

Since I installed 9.6.2 on the trinity facing vm to look at the other question Paul asked, I might as well install mplayer on it and explore player problems there as well heh. Not like I'll solve one, but I find it fascinating.
Image

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Linux Mint or Linux Ubuntu for Livecode

Post by mwieder » Sun Jun 27, 2021 5:39 pm

Here's a little test stack I cobbled together to play media files using mplayer or SMplayer as a proof of concept (note that you have to install either of these yourself). They work differently in the LC environment, and unfortunately neither one is tied to the parent stack because LiveCode doesn't give us a window id for stacks.
Attachments
Mplayer.livecode.zip
(1.53 KiB) Downloaded 140 times

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Linux Mint or Linux Ubuntu for Livecode

Post by FourthWorld » Sun Jun 27, 2021 5:55 pm

Mark, does your sample allow playback from a specified starting time?

In the few cases where I've been able to get video playback running in LC on Linux, that was all I could do: start it, and let it run.

For such a very limited use I could just as well use any player package as a helper app.

The custom apps I make need to customize playback, starting and stopping at specific times. I can find ways to do that through lower level APIs, but have not found a way to do that via script.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Linux Mint or Linux Ubuntu for Livecode

Post by bogs » Sun Jun 27, 2021 11:06 pm

mwieder wrote:
Sun Jun 27, 2021 5:39 pm
Here's a little test stack I cobbled together to play media files using mplayer or SMplayer as a proof of concept (note that you have to install either of these yourself). They work differently in the LC environment, and unfortunately neither one is tied to the parent stack because LiveCode doesn't give us a window id for stacks.
You know, I may have to start my test over from scratch, but I'm not sure I get what you mean (bold, underlined above).

The test I setup -
vm = Q4OS (Trinity Desktop - TDE) - Mplayer installed (and literally that and Syanptic is it other than the base KDE system heh)
Lc 9.6.2 stable

I created a new stack, and stuck a player object on it.

I used the sample movie included in Lc's resources folder as the source of the player.

Using the Msg. box, I typed "start player 1"

Result = the player played the sample movie.

Image

I am pretty sure you *can* get the id of a window in Lc, unless I am thinking of some other id than what you mean, or am I missing the point about the player and whether or not it works?

I know the controls don't show up, but it seems to me that you should be able to make your own buttons and use those for the controls (although it seems pretty needlessly harder than it has to be to me).
Image

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Linux Mint or Linux Ubuntu for Livecode

Post by mwieder » Mon Jun 28, 2021 2:43 am

bogs-

Well, when I assign a video to the player using the property inspector it immediately starts playing. Granted this is a one-time deal and won't affect things later, but even so... especially if I'm setting a long video. Have to wait until it gets to the end.

But "start" is the only thing the player will respond to. If you want to do things like pause or stop the media from playing you have to launch it as a process and then send commands to the process to control it. Mplayer has a lot of commandline options, so everything is doable, just not the way you'd expect a player control to act.

Oh... and I misspoke. A stack is the only thing you can get a windowID for. What you would need to control the player and associate it with the stack is the windowID of the player control.
Last edited by mwieder on Mon Jun 28, 2021 2:47 am, edited 1 time in total.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Linux Mint or Linux Ubuntu for Livecode

Post by mwieder » Mon Jun 28, 2021 2:45 am

Richard-

Check out the mplayer commandline options. The "ss" option will allow you to select a starting time in either seconds or "hh:mm"ss" format.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Linux Mint or Linux Ubuntu for Livecode

Post by FourthWorld » Mon Jun 28, 2021 4:30 am

mwieder wrote:
Mon Jun 28, 2021 2:45 am
Richard-

Check out the mplayer commandline options. The "ss" option will allow you to select a starting time in either seconds or "hh:mm"ss" format.
I will. Thank you. Does this also include pausing based on a user action, like something I could script from a mouseUp handler?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

wsamples
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 262
Joined: Mon May 18, 2009 4:12 am

Re: Linux Mint or Linux Ubuntu for Livecode

Post by wsamples » Mon Jun 28, 2021 5:16 am

Richard, you might also look into mplayer's slave mode. It can work very nicely with a helper app to handle the commandline startup and options. It could be a pretty deep rabbit hole as far as possible features and robustness but you might find it worth the adventure. I played with this some years ago and it has a lot of potential although I didn't take it to a point where it would have been worth sharing. Max has posted a working stack here somewhere.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Linux Mint or Linux Ubuntu for Livecode

Post by mwieder » Mon Jun 28, 2021 4:24 pm

Hmmm... slave mode could be an interesting possibility.
The problem with launching mplayer as a process is that it has no connection with the stack or player control. You move the mplayer control and the stack separately. SMPlayer, while it does have on-screen controls, is also unattached to the stack, and the player control only "supports" mplayer. If I could get the windowid of the player object it would be possible to glue the process to it.

Richard- my simple proof-of-concept stack has the ability to pause and resume playing via sending a "p" command to mplayer. See "mplayer --help" for some basic commandline options or "man mplayer" for a more complete list.

wsamples
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 262
Joined: Mon May 18, 2009 4:12 am

Re: Linux Mint or Linux Ubuntu for Livecode

Post by wsamples » Mon Jun 28, 2021 10:16 pm

mwieder wrote:
Mon Jun 28, 2021 4:24 pm
Hmmm... slave mode could be an interesting possibility.
The problem with launching mplayer as a process is that it has no connection with the stack or player control. You move the mplayer control and the stack separately. SMPlayer, while it does have on-screen controls, is also unattached to the stack, and the player control only "supports" mplayer. If I could get the windowid of the player object it would be possible to glue the process to it.
From an answer on StackOverflow:
wmctrl -l lists all windows that are actually visible on your desktop with (most importantly) their window ids and titles. -p adds PIDs and -x will add window classes.

You can run this command and grep the title of the window you want to attach mplayer to. Here are two items from mplayerhq.hu:

-wid (also see -gui-wid) (X11, OpenGL and DirectX only)
This tells MPlayer to attach to an existing window. Useful to embed MPlayer in a browser (e.g. the plugger extension). This option fills the given window completely, thus aspect scaling, panscan, etc are no longer handled by MPlayer but must be managed by the application that created the window.
and
-geometry x[%][:y[%]] or [WxH][+-x+-y]
Adjust where the output is on the screen initially. The x and y specifications are in pixels measured from the top-left of the screen to the top-left of the image being displayed, however if a percentage sign is given after the argument it turns the value into a percentage of the screen size in that direction. It also supports the standard X11 -geometry option format, in which e.g. +10-50 means "place 10 pixels from the left border and 50 pixels from the lower border" and "--20+-10" means "place 20 pixels beyond the right and 10 pixels beyond the top border". If an external window is specified using the -wid option, then the x and y coordinates are relative to the top-left corner of the window rather than the screen. The coordinates are relative to the screen given with -screen for the video output drivers that fully support -screen (direct3d, gl, gl_tiled, vdpau, x11, xv, xvmc, corevideo).
NOTE: This option is only supported by the x11, xmga, xv, xvmc, xvidix, gl, gl_tiled, direct3d, directx, fbdev, sdl, dfxfb and corevideo video output drivers.

EXAMPLE:
50:40 Places the window at x=50, y=40.
50%:50% Places the window in the middle of the screen.
100% Places the window at the middle of the right edge of the screen.
100%:100% Places the window at the bottom right corner of the screen.

I can't tell if you're talking about the native player control or using mplayer as an embedded control. This obviously doesn't help with the native control.

PaulDaMacMan
Posts: 616
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: Linux Mint or Linux Ubuntu for Livecode

Post by PaulDaMacMan » Mon Jun 28, 2021 11:43 pm

bogs wrote:
Sat Jun 26, 2021 10:10 pm
mwieder wrote:
Sat Jun 26, 2021 9:50 pm
But... you should be aware that in moving from Window$ to linux there are some caveats as far as things that don't work or may not work.
Printing
...
...
...Player controls
...
Printing doesn't work on 'nix ? When did that get fouled up? I thought the player works if you had one particular player, did that change?

*Edit -- just tested Q4OS with minimal installation (added codecs and FF), then dl'd 9.6.2 and set it to autostart , it works like what it sounds like you were looking for, even the backdrop worked correctly.
Thanks for the suggestions, I will check out those distros as soon as I get a chance.

----

I wonder if this WindowID thing on Linux is something that LiveCode Builder could help with. I've done similar with Stack windows, or making new windows and attaching an external (AU Audio Plug-In GUI actually) view to it in LCB on macOS. I assume there's an API to get that info from a Window Manager on Linux, or maybe just make an entirely new Player Widget that uses some library for playback.
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”