Lädt...


🔧 How to dualboot Hyprland with Gnome Desktops on Linux


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

Linux desktops are like a box of chocolates - you never know what you’re going to get. One day, you’re working on a sleek and stylish desktop, and the next day, you’re staring at a screen that looks like it was designed in the 90s. But that’s the beauty of Linux - it’s unpredictable, quirky, and always keeps you on your toes.

Personally, I find Gnome the most usable desktop. Things just works - it stays out of my way, and apps work together with harmony, without causing any issues. Want to login to Vscode with Github? Just click yes, and gnome will open your preffered default browser automatically, login to Github, close the tab, and switch back to vscode app and log you in successfully.

However, sometimes I prefer Hyprland over Gnome. Maybe its because it looks cool, maybe you can customize it a lot, maybe it just has quality of life animations and customizable keybinds. But for me, its because Hyprland doesn't hook any keybind by default. And that includes the Win/Super key. It's just perfect for VM Guis and passing my inputs like the win key to open the windows start menu pretty easily, whereas Gnome would open its own overview panel when clicking the win key.

So, without further ado - Start by having GNOME preconfigured/already installed and ready to use.
I suggest using Fedora Workstation, it comes with Gnome desktop by default, unless you choose some other flavour.

BTW, many suggest to use other login display managers like SDDM, but I didn't find any problems using the default GDM login manager that comes with GNOME desktop by default.

For illustration purposes, I will be running Fedora Default/Gnome flavour ISO inside a VM (but dont worry, I still use Fedora on the real setup too lol)

So anyways, after setting up Gnome desktop properly, you should start by installing Hyprland package.
On Fedora, its as easy as installing sudo dnf install hyprland .

Installing Hyprland on Fedora

If everything goes perfect, you can log out to the login screen of GDM. Select your account if not already, and you will see a small "cog" icon at the bottom right. Clicking it will show available Desktops that you can use.

Select Hyprland

We now need to setup gnome polkit integration. Hyprland docs suggested kde integration, but since we want Gnome one, start by pressing win+Q to open up kitty terminal. Type in sudo dnf install polkit-gnome to do so. For other linux distros out there, consider finding a similar package by search online.

If you are setting Hyprland for the first time, you will get a yellow warning popup at the top of the screen. To remove it, you need to install a code editor like vim, edit the config file at ~/.config/hypr/hyprland.conf and remove the autogenerated=1 line.

Now the hard part - We need to setup passwords to be synced with Gnome desktop too.

If you had previously googled it, ArchWiki would say the binary was installed at /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1, however that's not the case here in Fedora.

ArchWiki Page

I found out that Fedora installs the binary at /usr/libexec/polkit-gnome-authentication-agent-1 (Thank me later). So you can run that command, and then open another terminal to try whether Gnome will ask password now back - win+Q to open another kitty terminal & type in pkexec whoami

Gnome Polkit Asking Password

If you provide the correct password, it will run the command as root user, and so it will return root to the terminal ;p

pkexec command ran successfully

So, now that we know that this polkit for gnome works successfully, we should write it to the hyprland config file to run this command everytime on logging into hyprland. To do so, open ~/.config/hypr/hyprland.conf.

gnome polkit

Now, save it and press win+M to crash/stop Hyprland, which will take you back to GDM login screen. Login back to Hyprland, and open up the terminal and run back pkexec whoami to find out that the Gnome UI like popup will ask the password back again - which confirms that Hyprland already ran that command which we asked it to.

But, its not over...
If you were already using your favorite browser on Gnome desktop before, I bet you logged into some of the sites. But if you try to open the same browser on Hyprland, you lose all your logged in passwords and such. Wonder why? It's because all those browsers and third party apps dont know what Hyprland environment is, and since they aren't inside gnome environment, they can use gnome password manager to login your online accounts. Wondering what's the solution? I did too. I searched all across the internet, and couldn't find any solution. However, I got a feeling that I should mess with the environment variables to check whether I can fake like as if I was in a Gnome environment - and to my suprise, I had succeeded!
After looking into Hyprland docs back again, I found a small spoiler alert that Hyprland sets up some envs which says to every app that they're in Hyprland environment.

oh well...

"however it is not a bad idea to set them explicitly" - oh wow... who knew the answer was put up like this?
Since we are using Wayland on both the desktops, we don't need to change the 2nd option. However, we need to set the other two envs to fake the whole environment that we are in Gnome.

Type in this to the ~/.config/hypr/hyprland.conf file, just on top/before any exec-once statements, so any command ran will have these envs setup already:

env = XDG_CURRENT_DESKTOP,GNOME
env = XDG_SESSION_DESKTOP,gnome

Wondering where did I find these two variables? I just opened the terminal in Gnome desktop and echo'ed it back to me ;)

gnome envs

You can run any applications now, and they will be synced & logged in on both the desktops! Congrats, you have your (soon to be) dream setup! Happy ricing your Hyprland!

Never gonna...

...

🔧 How to dualboot Hyprland with Gnome Desktops on Linux


📈 74.14 Punkte
🔧 Programmierung

🐧 Why do you use linux as a casual user?Do you use linux only or do you dualboot?


📈 30.26 Punkte
🐧 Linux Tipps

🐧 Dualboot w11 and Linux


📈 27.78 Punkte
🐧 Linux Tipps

🪟 Dualboot von Oracle Linux 8 und Windows Server | ComputerBase Forum


📈 27.78 Punkte
🪟 Windows Server

🐧 can i dualboot windows after linux


📈 27.78 Punkte
🐧 Linux Tipps

🐧 New GNOME versioning scheme: Succeeding GNOME 3.38 Will Be GNOME 40


📈 25.43 Punkte
🐧 Linux Tipps

📰 GNOME Devs to Users: Desktop Icons Are Moving to GNOME Shell with GNOME 3.28


📈 25.43 Punkte
📰 IT Security Nachrichten

📰 GNOME Tweak Tool Renamed to GNOME Tweaks, Will Learn New Tweaks for GNOME 3.26


📈 25.43 Punkte
📰 IT Security Nachrichten

📰 Ubuntu GNOME 16.10 Beta 1 Released with GNOME 3.20 and GNOME 3.22 Beta Apps


📈 25.43 Punkte
📰 IT Security

📰 Ubuntu GNOME 16.10 Beta 1 Released with GNOME 3.20 and GNOME 3.22 Beta Apps


📈 25.43 Punkte
📰 IT Security

🐧 Embracing my first non-dualboot workstation tomorrow.


📈 25.3 Punkte
🐧 Linux Tipps

🪟 iWork10 Pro Tablet mit Windows 10/Android Dualboot im Amazon Blitzdeal


📈 25.3 Punkte
🪟 Windows Tipps

🐧 How to Dualboot NixOS and Windows


📈 25.3 Punkte
🐧 Linux Tipps

🐧 Dualboot with 2 drives, but use part of the second drive for windows


📈 25.3 Punkte
🐧 Linux Tipps

🐧 Ajuda com dualboot


📈 25.3 Punkte
🐧 Linux Tipps

🐧 Allocated drives show as unallocated in Windows(DualBoot)


📈 25.3 Punkte
🐧 Linux Tipps

🐧 Can I use a 4gb usb to set up dualboot on my pc?


📈 25.3 Punkte
🐧 Linux Tipps

🐧 Windows 10 and Pop os dualboot


📈 25.3 Punkte
🐧 Linux Tipps

🐧 Dualboot/live stick


📈 25.3 Punkte
🐧 Linux Tipps

🐧 Is it possible to dualboot retroarch and kodi?


📈 25.3 Punkte
🐧 Linux Tipps

🐧 How to solve dualboot


📈 25.3 Punkte
🐧 Linux Tipps

🐧 Wpaperd 1.0.0: modern wallpaper manager for sway and Hyprland


📈 24.63 Punkte
🐧 Linux Tipps

🐧 Hyprland creator Vaxry is now banned from contributing to freedesktop


📈 24.63 Punkte
🐧 Linux Tipps

🐧 [HYPRLAND] Finally a rice i can hold on to.


📈 24.63 Punkte
🐧 Linux Tipps

🐧 Adventures in Hyprland


📈 24.63 Punkte
🐧 Linux Tipps

🐧 Come help shape Hyprland!


📈 24.63 Punkte
🐧 Linux Tipps

🐧 Adventures in Hyprland


📈 24.63 Punkte
🐧 Linux Tipps

🐧 Hyprland - A dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks


📈 24.63 Punkte
🐧 Linux Tipps

🐧 Anyone tried hyprland with cosmic yet


📈 24.63 Punkte
🐧 Linux Tipps

🐧 Hyprland 0.42 has been released


📈 24.63 Punkte
🐧 Linux Tipps

matomo