this post was submitted on 27 Nov 2023
14 points (88.9% liked)

Linux

48372 readers
1216 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I'm trying to connect a university ipad (air, usb 3 type c, not tb or lightning) to my laptop (Framework laptop, intel 12th gen) running Fedora workstation 39. On Windows, I used a nifty app called Duet Display. I just used a usb-c cable to plug the ipad into the laptop, launched the app on both devices, and windows would see an external monitor. Scaling and resolution worked fine, and latency wasn't perfect, but was more than enough for a secondary display. With settings tweaked, artifacting was minimal.

I know there are remote desktop protocols and apps, but I really want to avoid a wireless connection. Remote desktop over the internet is wasteful and unreliable, and as for local network, ,my university has some strict controls on its wifi network and I cannot reliably connect my devices. Even if I could, the reliability and latency are still bad.

Duet over usb always worked and didn't rely on a wireless connection, but it also is closed source and windows and mac only.

From what I can see online, the best way for an ipad to display content from another device is going to be a remote desktop protocol as it does not directly accept video signals like HDMI-in. The ipad can also connect to a network over usb c/ethernet.

It seems the best approach would be to create a local network on my PC and connect my ipad to it with the cable, and then use a remote desktop client on the ipad.

Is this a good approach? If so, how exactly would I make the usb connection share a local network connection?

Note I only want to connect the ipad to the laptop. I understand if the ipad will not connect to wifi while connected to ethernet, and I don't need to share the internet connection with the ipad. My computer still needs to be connected to wifi/ethernet to access my university network, however.

top 8 comments
sorted by: hot top controversial new old
[–] [email protected] 10 points 1 year ago (2 children)

Time to turn your laptop into a router! Let's say you've got 2 network interfaces on your laptop, eth0 and wifi0. wifi0 is joined to your university WiFi as normal. Connect your iPad to your laptop via ethernet (with a USB-C adapter).

iPad -> usb-c-ethernet -> eth0
wifi0 -> internet

Rather than setting up a DHCP server or IPv6 stuff, I'd just configure the wired interfaces manually. Let's use the network 192.168.69.0/24. Laptop will be 192.168.69.1, iPad will be at 192.168.69.2. On the laptop:

ip addr add 192.168.69.1/24 dev eth0

On your iPad, go to Settings -> Ethernet:

  • address: 192.168.69.2
  • subnet mask: 255.255.255.0
  • router: 192.168.69.1

Curious to see if that works. We haven't set up DNS or DHCP or done any sysctl for IP forwarding or any nftables.

How can we test if it works? We can set up a TCP listener using nc(1) on the laptop that the iPad's web browser could hit. On the laptop:

nc -l 8080

On your iPad, open Safari and browse to http://192.168.69.1:8080

Curious to see if that all works!


See also:

[–] Adonnen 3 points 1 year ago (1 children)

Will I need a usb-c to rj45 adapter (or realistically, 2 since my laptop does not have an ethernet port)? I was planning to use my TB4 type c - type c cable and use an ethernet connection over usb.

[–] [email protected] 2 points 1 year ago

Interesté Cool concept.

[–] Adonnen 2 points 1 year ago

Will try soon, thank you!

[–] [email protected] 2 points 1 year ago (1 children)

I've been looking for this too. Even a decent remote desktop for the iPad/Linux.

[–] Adonnen 1 points 1 year ago (1 children)

I think the app shouldn't be an issue. Plenty of clients, either on web or for rdp or vnc. My main struggle is the connection.

Does your iPad support usb 2 (lightning), usb 3 or thunderbolt?

[–] [email protected] 2 points 1 year ago (1 children)
[–] Spiralvortexisalie 0 points 1 year ago

If USB is a must, you may be able to work something up from the packages here: https://libimobiledevice.org/ . iPhones with hotspot enabled will show up as a standard ethernet device (with iphone acting as router) with usbmuxd/libusbmuxd installed. I don’t know if this would work exactly the same on an iPad but you may be able to use the above router suggestion (or possibly with the iPad acting as the router) with a USB cable if it does.