Installing new working version of Telegram in Mageia 8 i586

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Installing new working version of Telegram in Mageia 8 i586

Postby artenox » Mar 24th, '23, 12:33

Installing a new working version of Telegram-Desktop in Mageia 8 i586 (32 bit)

Mageia maintainers do not build telegram-desktop from source code (unlike some other Linux distributions), instead Mageia uses the "get-telegram" package, which downloads a binary build from a Telegram server.
https://madb.mageia.org/package/show/name/get-telegram
However, Telegram developers stopped making 32-bit builds, so there is only hope for Linux distributions.
The "get-telegram" package downloads an old 2.4.4 version, which can no longer be used to log in. See screenshots:
Image
Image
I'll explain why. Telegram messenger has a lot of users and they couldn't get enough of 32 bit addressing, so at the end of 2021 they switched to 64 bit addressing of users/channels and the old applications were completely incompatible. Don't confuse 32/64 addressing with processor/system bits. It's more like an IPv4/IPv6 issue.
So, new working 32 bit builds for Linux are no longer supplied by Telegram. Neither by the developers of Mageia. What to do? You can build from source code yourself, but this is very hard (and long, requires a lot of memory), the project uses a lot of libraries.
There is another more hacker way. Get the package from another Linux distribution. Since, in the Linux world, packages built on a newer system usually won't run on an older system, we need a Linux distribution of a similar age to Mageia 8 or older. This is Debian 11 for example. Mageia 8 and Debian 11 released in 2021. There are also Rosa and ALT which provide Telegram, but I'm not sure, they are semi-rolling. So, let's pick Debian 11. It has two builds of Telegram, stable 3.1.1 (2021) and backport 4.6.5 (2023). I managed to run both builds on Mageia 8 i586 and I will tell you how.

https://packages.debian.org/bullseye/telegram-desktop
https://packages.debian.org/bullseye-ba ... am-desktop

I link to the web archive because versions may change on the Debian server and compatibility with Mageia may be degraded, other things may need to be done. I have checked these versions to make sure they work. You can remove the web archive reference from the URL or download a newer version from packages.debian.org
https://web.archive.org/web/20230323194 ... 2_i386.deb
https://web.archive.org/web/20230323183 ... 1_i386.deb

First, download and unpack the .deb packages. The easiest way to support deb is to install the "alien" package. This does not mean that you have to use it to convert deb to rpm, just "alien" will install the debian tools that the archiver will use, such as Engrampa.
Unpack at /home/user/telegram (where user is your username)
Create a folder /home/user/telegram/usr/lib

Install the following packages with urmpi:
Code: Select all
libminizip1 libjpeg62 libkf5wayland5 libdbusmenu-qt5_2 librlottie0 libkf5coreaddons5 libatomic1

There might be more, see the terminal output.

Run the command:
Code: Select all
cp /usr/lib/librlottie.so.0.2 /home/user/telegram/usr/lib/librlottie.so.0-1


For telegram-desktop 3.1.1, this is enough. For 4.6.5 you will also need to unpack this package https://web.archive.org/web/20230323192 ... 2_i386.deb and copy the .so files to /home/user/telegram/usr/lib

Run:
Code: Select all
LD_LIBRARY_PATH=/home/user/telegram/usr/lib XDG_DATA_DIRS=/home/user/telegram/usr/share /home/user/telegram/usr/bin/telegram-desktop

If you want to create a .desktop file, add "env" at the beginning. I.e. env LD_LIBRARY_PATH=...

Bugs:
Version 4.6.5 crashes when trying to call GTK dialogs (version 3.1.1 does not crash). It means you will be able to download files from Telegram (they will be automatically placed in the Downloads folder), but you will not be able to upload them (in 4.6.5).
3.1.1 and 4.6.5 crash when trying to play audio/video (autorun may be disabled, however). But the same behavior is observed on Debian 11.

I would prefer version 3.1.1, but older versions of Telegram are not fully compatible with new features. For example, you will be refused messages containing new smiles, emoji, DRM.
Telegram stores the profile in .local/share/TelegramDesktop. Try not to mix up these folders between versions, otherwise authorization will disappear.

Now let's talk about authorization. In the old days, you could register in the desktop version with a pushbutton phone. Now you have to have a mobile app to register (you can delete it later). SMS at registration can still come to the pushbutton phone. But codes for new logins are no longer sent to SMS, but to all applications (mobile, desktop, web versions). So, you'll need either a smartphone or a browser that is authorized in web.telegram.org for a new login (for example, you can copy the browser profile folder from another computer, if the paths match).

I would say that telegram-desktop works much faster than the web version, But you have to be aware of bugs.

It is a pity that the developers of Mageea do not compile telegram-desktop themselves and provide a broken 32-bit "get-telegram". Although, there are very few 32-bit Linux users (unlike Windows 32-bit), it is an endangered species, unfortunately.

In the next article I will explain how to get python 2 to work in Mageia 8+ using pip2.
artenox
 
Posts: 15
Joined: Mar 24th, '23, 11:08

Re: Installing new working version of Telegram in Mageia 8 i

Postby sturmvogel » Mar 24th, '23, 13:20

Sorry but you are contradicting yourself. Why do you try to blame Mageia when upstream developers ended support for ancient 32bit machines?

artenox wrote:It is a pity that the developers of Mageea do not compile telegram-desktop themselves and provide a broken 32-bit "get-telegram".

artenox wrote:However, Telegram developers stopped making 32-bit builds,

Mageia does not provide a 32-bit telegram. Mageia provides a noarch package which downloads and installs the upstream telegram (64/32bit). If upstream doesn't support ancient machine architectures anymore, there is nothing what Mageia can do about.


artenox wrote:It is a pity that the developers of Mageea do not compile telegram-desktop themselves and provide a broken 32-bit "get-telegram". Although, there are very few 32-bit Linux users (unlike Windows 32-bit), it is an endangered species, unfortunately.

Please try to inform yourself why Mageia doesn't provide a packaged version. There are valid reasons for it which can be found by reading the relevant bugreports and mailing list.



artenox wrote:In the next article I will explain how to get python 2 to work in Mageia 8+ using pip2.

So this will be the ultimate guide how to brick your system by installing a insecure software which is EOL since Jan 2020 whilst its successor python3 is available since 2006?
sturmvogel
 
Posts: 735
Joined: Jul 30th, '12, 00:39

Re: Installing new working version of Telegram in Mageia 8 i

Postby morgano » Mar 25th, '23, 15:31

Welcome to our forum, artenox, and thank you for your efforts.

A solution protecting your normal system is a mini install of Mageia on virtual machine, with telegram and insecure adjustments.
VirtualBox too is not supported on 32 bit anymore... but possibly alternatives we have is, see https://wiki.mageia.org/en/Virtualisation

That said, why not then in an emulator install a system that already have telegram?
Alternatively multiboot into it?

---

Ancient is a bit misplaced word here IMO.
Last week i repaired a 30+ year old 8 bit control system CPU card, and one much elder processorless control system (wire wrapped backplane with may IC free analog / discrete components logic boards.)
The analogue machine had NO problem with the controller unit, it was an aged magnet sensor/magnet in combination with bad alignment distance for tolerance when it was mounted many years ago. Everyone can make mistakes...
While at it I did also replace a bunch of display lamps and put in LEDs, and replaced capacitors, so it will work another 30+ years.

One interesting design choice on that old machine was that instead of one transformer (plus rectifier and capacitor) for 24VDC, they used 3 transformers, one per phase, each with full bridge rectifier, so no need for a capacitor that could age. They really clearly prioritised multi decade year lifetime over initial cost!

Most problems nowadays are flimsy software and chips from this millennia, while old AND WELL DESIGNED machinery just chew along...

I hate modern crap.
- That said I do also see modern well designed systems sometimes :)

---

You are warm welcome to contribute to Mageia https://wiki.mageia.org/en/Contributing

Some of us may seem a bit harsh sometimes but we are all helpful ;)
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1475
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Installing new working version of Telegram in Mageia 8 i

Postby artenox » Mar 26th, '23, 16:00

I tried to use packages from Rosa, ALT, Arch Linux 32, but they don't work in Mageia 8.
Telegram gave up 32 bit because they used to use CentOS 6 to build their static binaries, and then switched to CentOS 7, which does not support 32 bit.

sturmvogel wrote:Please try to inform yourself why Mageia doesn't provide a packaged version. There are valid reasons for it which can be found by reading the relevant bugreports and mailing list.

Still, I don't understand why Mageia doesn't pack telegram-destop. I heard a version that some non-free components are used there, but I don't know what they are. I think only the server code is closed. And the complexity of the build, of course. In the past, Telegram was hard to build in shared form and developers didn't help the maintainers. Now there is a cmake option for shared builds. But it needs a lot of memory. I think the developers of Telegram mentioned that it takes 4 hours to build.

Python 2 is still in the Mageia 8 repository, but without submodules.

morgano wrote:Welcome to our forum, artenox, and thank you for your efforts.
You are warm welcome to contribute to Mageia https://wiki.mageia.org/en/Contributing

Thanks. I once translated several articles on a local blog.
artenox
 
Posts: 15
Joined: Mar 24th, '23, 11:08

Re: Installing new working version of Telegram in Mageia 8 i

Postby sturmvogel » Mar 26th, '23, 16:44

artenox wrote:Still, I don't understand why Mageia doesn't pack telegram-destop.

It seems you did not even search for the reason in our bugzilla.
"Telegram is developing their protocol pretty fast and Cutegram is unable to keep up with
that pace + I can't update/upgrade that application so often. So, to provide the latest
features to our users I've created a downloader script for the official client."

Telegram has over 600! releases, sometimes every day of a week a new (pre-)release.. So try to figure...
Providing a downloader which always downloads the latest upstream version (and autoupdates itself) is way better than providing a static version which lacks behind upstream development (feature- and securitywise)...
And if you do only a little bit of research you will find that there is only one linux distribution (PCLinuxOS) which ships an actual telegram version...the others are using outdated versions. And the other actual Telegram version is in a Fedora 3rd party repo...

artenox wrote:Telegram gave up 32 bit because they used to use CentOS 6 to build their static binaries, and then switched to CentOS 7, which does not support 32 bit.

Telegram gave up 32bit support as according their server statistics the market share of 32bit Linux was 0,1%.
Telegram 2.4.4 from Oct 2020! was the last version with a 32bit Linux binary...
sturmvogel
 
Posts: 735
Joined: Jul 30th, '12, 00:39

Re: Installing new working version of Telegram in Mageia 8 i

Postby artenox » Mar 26th, '23, 18:30

Yes, I understand. Providing an official static 64 bit build makes sense in terms of functionality and reliability. Although, it is unclear why other distributions do Sisyphus labor.

But right now there is no working 32 bit build for Mageia at all (and you still support i586 architecture). Although, I heard that 2.4.4 works for old users who didn't do logout. And even 1.8.15 on XP. But they can't contact new users and visit new channels (created after 2021). Unfortunately, I deleted my old account because I fell for the hater fashion, and now I am a new user.

Constantly creating new builds is tedious. But you could make one more or less working 32 bit build, for example - the latest in the 3.x branch (3.7.3). That would be better than nothing. Although, of course, it would be easier for you to remove the get-telegram package for i586.

Percentages percentages. Yes, this is sad. 5% of desktop Linux users. Of that 5% are another 5% of 32 bit Linux users. And the percentage of Mageia compared to other distributions is small. It's an endangered species, like I said.

But I don't like the development of Telegram either. In the past it was a good messenger.
artenox
 
Posts: 15
Joined: Mar 24th, '23, 11:08

Re: Installing new working version of Telegram in Mageia 8 i

Postby artenox » Apr 4th, '23, 11:21

Offtop, but it might be useful to someone.
I finally found a way to run telegram-desktop on my old main Xubuntu 16.04 i386 (2016) at high speed without virtual machines and wine, using chroot:

Code: Select all
sudo -H chroot /media/user/Mageia
sudo -H -u user LD_LIBRARY_PATH=/home/user/telegram/usr/lib XDG_DATA_DIRS=/home/user/telegram/usr/share /home/user/telegram/usr/bin/telegram-desktop
exit


There is a problem: chroot can't read from /dev/random. Telegram uses random.
I solved it this way:
Code: Select all
touch /dev/urandom
touch /dev/random
touch /dev/null


The files /dev/urandom and /dev/random actually contain what I copied from:
Code: Select all
cat /dev/urandom | head

on Xubuntu.

Perhaps the contents of /dev will need to be removed before booting into Mageia.

So, Debian and Mageia helped the old Xubuntu!
Yes, my main operating system is from 2016, it's still supported. I like stability.

UPD:
The desktop file can be created like this:
Code: Select all
Exec=sudo -H chroot /media/user/Mageia ./home/user/telegram/chroot.sh


Contents of the /media/user/Mageia/home/user/telegram/chroot.sh
Code: Select all
sudo -H -u user LD_LIBRARY_PATH=/home/user/telegram/usr/lib XDG_DATA_DIRS=/home/user/telegram/usr/share /home/user/telegram/usr/bin/telegram-desktop

It is assumed that sudo in both systems without a password.
artenox
 
Posts: 15
Joined: Mar 24th, '23, 11:08


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron