Linux

69 readers
1 users here now

founded 2 years ago
226
 
 

Copied from Reddit because r/linux is still down. Reddit post: http://webcache.googleusercontent.com/search?q=cache:https://www.reddit.com/r/linux/comments/13nwha5/how_to_import_ringtones_from_linux_to_iphone_ios/
Required Software: libimobiledevice, ifuse, libplist, ffmpeg
Caveats: The ringtone will play from beginning to end without any time limit and will NOT loop. This is probably fixable but I don't know how. A restart is required to use new ringtone.

This guide describes how to covert a sound file and import it as a ringtone for iOS devices.

  1. Cut your sound file to the desired length. You can use any software for this.
  2. Convert your sound file to AAC and change its extension.
ffmpeg -i soundfile.extension soundfile.m4a
mv soundfile.m4a soundfile.m4r

  1. Connect your iOS device and pair it if necessary. This is usually done via a prompt on your iOS device.
  2. Mount your iOS device.
mkdir ~/ios
ifuse ~/ios

  1. Copy your ringtone to your iOS device.
cp soundfile.m4r ~/ios/iTunes_Control/Ringtones/

  1. Backup ~/ios/iTunes_Control/iTunes/Ringtones.plist and then convert it to plain text. If you don't have the file for some reason, there is an example in step 7.
cp ~/ios/iTunes_Control/iTunes/Ringtones.plist Ringtones.plist.bak
plistutil -i ~/ios/iTunes_Control/iTunes/Ringtones.plist -o Ringtones-text.plist

  1. Add your new ringtone to the plist file. This structure should be followed beneath 2 <dict> entries:
    <key>soundfile.m4r</key>
		<dict>
			<key>Name</key>
			<string>"Song Name Here"</string>
			<key>GUID</key>
			<string>"16 digit string, set to anything"</string>
			<key>Total Time</key>
			<integer>"Has no effect afaik"</integer>
			<key>PID</key>
			<integer>"A random long number"</integer>
			<key>Protected Content</key>
			<false/>
		</dict>

Here is an example with 3 manually added tracks:

    <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Ringtones</key>
	<dict>
		<key>RDGO.m4r</key>
		<dict>
			<key>Name</key>
			<string>bodies</string>
			<key>GUID</key>
			<string>B9753FD82AE718E2</string>
			<key>Total Time</key>
			<integer>28756</integer>
			<key>PID</key>
			<integer>4918251813855823051</integer>
			<key>Protected Content</key>
			<false/>
		</dict>
		<key>RDGO2.m4r</key>
		<dict>
			<key>Name</key>
			<string>Drowning Pool - Bodies (Full Song)</string>
			<key>GUID</key>
			<string>B9753FD82AE718E3</string>
			<key>Total Time</key>
			<integer>28756</integer>
			<key>PID</key>
			<integer>4918251813855823052</integer>
			<key>Protected Content</key>
			<false/>
		</dict>
		<key>letter.m4r</key>
		<dict>
			<key>Name</key>
			<string>Letter</string>
			<key>GUID</key>
			<string>B9753FD82AE718E4</string>
			<key>Total Time</key>
			<integer>2000</integer>
			<key>PID</key>
			<integer>4918251813855823053</integer>
			<key>Protected Content</key>
			<false/>
		</dict>
	</dict>
</dict>
</plist>

  1. Save file and convert it back to binary. This will overwrite the file in your iOS device.
plistutil -i Ringtones-text.plist -o ~/ios/iTunes_Control/iTunes/Ringtones.plist -f binary

At this point, you feel victorious. You have edited an iOS system file and copied your ringtone. It appears in your library and plays beautifully. You excitedly ask someone to call you and... The default ringtone plays. Because there is one last step.

  1. Reboot your iOS device. Hope this helps, please reply back if it works or doesn't work for you.
227
 
 

Void Linux's average rating soars high on DistroWatch, making it a must-try for advanced users. Learn why it is winning hearts.

228
 
 

Today I talk about the future of Xorg and Wayland.

229
 
 

Actually, the better question is: When will they replace most desktop Linux programs?

230
 
 

Valve released a new stable Steam Client update that that enables hardware acceleration on Linux and brings an overhauled user interface.

231
 
 

Here's why distro hopping can help find the perfect match between the user and the operating system.

232
 
 

If you're a Linux user looking to make your desktop a bit more efficient, ddgr is a tool that can help you.

233
 
 

If you're looking to enhance the quality of sound you hear on the Linux operating system, EasyEffects is the simplest way to go.

234
 
 

At this point you’ve heard a lot about Plasma 6, and each of my weekly “This week in KDE” brings news of a few new features, UI changes, or bugfixes that are only in Plasma 6. But…

235
 
 

NixOS is a Linux distribution that is completely and entirely reproducible. Everything you use is defined in a configuration file that is used to build your system. All the services, packages, options, partition layout, hardware, everything, is in this config file.

If you're a developer, your eyes might be sparkling right now: that's right, one config file to exactly replicate your entire development environment.

You also can never get into dependency hell. Packages all declare exactly which versions of each library they need, and these versions are all installed side by side and kept, not erased by newer versions.

NixOS sounds super cool. Has anyone tried it out on a RaspberryPi for a home server? I might try replacing Ubuntu as my home server.

236
 
 

One hundred weeks ago, on Friday 16 July 2021, “This Week in GNOME” was launched - the first post was "#1 Scrolling in the Dark".

Since then TWIG has grown into a vibrant community, and has become a weekly ritual for many people—both for developers who share their work, and for curious readers who want to follow the development of GNOME.

237
 
 

I'm very beginner of Linux server admin. Few days ago I set up snap version of nextcloud server app on my own Ubuntu VPS server, and I found that Snap system might be focused to build original file system hierarchy in /snap directory, and I felt a little weird about that.

For example, Linux file system hierarchy is defined to set server app config into /etc/app/conf.d or so.
But snap version app tend to set it into /snap/app/current/app/config or so.
It sounds so complicated for me.

So I want to know about how Snap is thought by others. I'm happy if you might tell me something here.

238
 
 

Trying to get this magazine going, and could use some help. Thanks!

I used Arch once, btw

239
 
 

He's short and fat, but he's not supposed to be that short and fat. The image's x-y ratio was altered.

240
 
 

Finally have a linux laptop and it's just great. It just works™

241
 
 

Initial tiling designs + rebasing the widget library = a group of happy System76 engineers.

242
 
 

Are there hardcore gamers there or is it mostly for coders?

243
 
 

It's been over a year since I switched to Linux full time - no dual booting. I've been playing games, making games, music, and videos, doing schoolwork, taking notes, and more, all with Linux software, and with very few issues.

It feels good to finally be free from windows. Anyone else exclusively use Linux? For how long?

244
 
 

A look at Flatpak madness

245
 
 

Why should you try Linux? This is why.

246
 
 

We have received the freshest batch of ProtonDB data and we are back with an analysis of how the distros have been doing over the past few years. Following our last article focusing on Manjaro (whose usage is dropping continuously)… Continue Reading →

247
 
 

After distro hopping for ages, a while back I found myself giving Tumbleweed a try and I have been here ever since. Really really liking the experience and don't think I'll be hopping anywhere anytime soon. The game changer for me was the btrfs file system, and using snapper to do a rollback due to a bad update, and everything just working SO SMOOTHLY.

The rolling release model is wonderful, and the zypper updates / package management is a breath of fresh air.

Overall just want to say how much I'm enjoying it here and thanks to the developers and community for making such a great distribution.

248