How do I Ubuntu ? - GNU/Linux
Users browsing this thread: 2 Guest(s)
|
|||
So I finally managed to do everything I wanted, and get my very own configuration working. There are multiple key points, so I'll list them here:
X.org session startup Ubuntu 21.04 ships with GDM3 as its default session manager. On the login screen, you can spot a small gear icon that lets you select the type of session you want. There are 2 choices by default: "Ubuntu" and "Ubuntu on Xorg". I decided to add a 3rd entry: "xsession". Doing that was fairly easy. I created the following file as "/usr/share/xsession/xsession.desktop": Code: [Desktop Entry] Upon doing that, and selecting the entry on the login screen, GDM will run the "/etc/X11/Xsession" script, which (among other things) runs the "$HOME/.xsession" script, which you can use to start your session, just like you would do with ".xinitrc". X.org session This part was pretty easy. Now that I narrowed my whole session down to a single script, writing that script was easy: Code: #!/bin/sh Something worth mentioning about /etc/X11/Xsession: by default it tries to source "$HOME/.xsessionrc" before running your script, so it acts like $HOME/.profile. I use it to set my environment variables that are specific to the X session (mostly related to password manager). Networking This was the most complex part for me. It's probably because networking is a big part of my job, but I want my networking setup exactly the way I want it. My laptop (like most!) has 2 interfaces: wired and wireless. And I want to be able to seamlessly transition between both, and without disconnection. By default a different IP is assigned for each interface, and when you "switch" connection, you switch IP as well, thus killing all active connections. I used to run an active/passive bonded connection on my previous debian install: it's a virtual interface that aggregates both the wired and wifi connection, and activate them "on-demand". The mac address of the bonding is that of the primary interface (in my case, the wired one). This means that when I unplug the cable, the wifi becomes the primary interface, but keeps my current DHCP lease as the MAC address of the bonding interface remains the same. This worked great, and I wanted to replicate it under ubuntu. Unfortunately, Ubuntu dropped usage on /etc/network/interfaces with release 18.04 I think, so I couldn't just copy my debian config there. The "official" way of configuring the network under Ubuntu seems to be using NetworkManager, and its "nmcli" tool. I have yet to test if I can just drop a file in /etc/NetworkManager to make it work, but for now, I had to do it on the cli (note: bonding a wifi interface is unsupported by NetworkManager, so you need to create a bond with multiple connections: wired, wifi1, wifi2, wifi3, … and add wifi to the bonding as you encounter them. This is ugly, but it works ! Code: # create bonding interface And that's it ! I hope this would help someone someday. If not, I learnt something new at least, which is nice. |
|||
Messages In This Thread |
How do I Ubuntu ? - by z3bra - 06-08-2021, 12:36 PM
RE: How do I Ubuntu ? - by jkl - 06-08-2021, 02:40 PM
RE: How do I Ubuntu ? - by z3bra - 06-08-2021, 04:48 PM
RE: How do I Ubuntu ? - by venam - 08-08-2021, 02:41 AM
RE: How do I Ubuntu ? - by z3bra - 08-08-2021, 07:27 AM
RE: How do I Ubuntu ? - by pyratebeard - 09-08-2021, 05:20 PM
RE: How do I Ubuntu ? - by pkal - 19-08-2021, 07:13 PM
RE: How do I Ubuntu ? - by z3bra - 22-08-2021, 01:05 PM
RE: How do I Ubuntu ? - by pkal - 22-08-2021, 01:27 PM
RE: How do I Ubuntu ? - by z3bra - 22-08-2021, 01:34 PM
RE: How do I Ubuntu ? - by freem - 26-08-2021, 07:42 PM
RE: How do I Ubuntu ? - by z3bra - 30-08-2021, 06:51 AM
RE: How do I Ubuntu ? - by z3bra - 30-08-2021, 01:15 PM
RE: How do I Ubuntu ? - by pyratebeard - 02-09-2021, 10:27 AM
|