• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

How to create your own Desktop Environment in Linux

AnonyViet by AnonyViet
January 24, 2023
in Network
0

Have you tried many desktop environments (Desktop Environment) but none suits your taste? Or maybe you like some components of DE and don’t like others. Then you should build your own Desktop Environment.

Join the channel Telegram of the AnonyViet 👉 Link 👈

How to build Desktop Environment in Linux

How to Build a Desktop Environment

You can easily build a desktop environment by assembling various components of an existing DE and other standalone programs. It is better to know the general components of the DE before building the environment, but this is not necessary. Here, I will show you how to build your own desktop environment.

Step 1: Create a Session Bash script

To create a desktop environment, you need to at least create a window manager. In this article, I will use kwin window manager. But you can use any window manager you want.

To install kwin on Ubuntu and Ubuntu-based systems, enter the following command in the terminal:

sudo apt install kwin --no-install-recommends

Without the –no-install-suggest option, apt will install the entire kde desktop environment.

In addition to the window manager, we also need to add the dock. To install it, type:

sudo apt install plank

Now let’s create the bash script session. If you don’t know, bash script is a regular text file in which you enter command lines. When the file is executed, it will initialize the commands contained in it line by line, saving you from having to type each command in the terminal yourself.

Our script will contain the programs that the DE will have. We will put the script in the /bin directory. So, open terminal and navigate to /bin by typing the following command:

cd /bin

Then create the script with the following command (we’ll call it custom_de.sh):

sudo touch custom_de.sh

Open the file as root with your text editor, e.g. nano

sudo nano custom_de.sh

You can replace nano with any text editor like gedit or xed.

Then put the following line at the top of the script.

#!/bin/bash

This line tells terminal to execute this script using bash.

Next, enter the command of the program you want using the window manager (in this case, kwin).

kwin &
plank

How to create your own Desktop Environment in Linux 6

The ampersand (&) after a command causes it to run in the background so that the next command is executed without waiting for the previous command to complete. We need to do this because the programs that create the desktop environment need to run at the same time.

This script represents the desktop session, as long as this script is running the session will continue to run. Once this script is disabled the session will exit and you will be directed to the login screen as if you were logged out.

That’s why it’s important not to put an ampersand (&) after the last command. If this happens and the last command is sent to the background, the script will exit and the session will exit as soon as it starts.

After saving the script, give it execute permission by entering the following command:

sudo chmod +x custom_de.sh

Step 2: Create a screen file

To display our custom screen during login, we have to create a .desktop file in /usr/share/xsessions, which will point to the script. To navigate to that directory, enter the following command:

cd /usr/share/xsessions

Then create the file and open it with the command:

sudo touch custom_de.desktop
sudo nano custom_de.desktop

Inside the file write the following lines:

[Desktop Entry]
Name=Custom DE
Comment=My awesome desktop environment
Exec=/bin/custom_de.sh
Type=Application

For Exec=, enter the location of the script you created earlier.

How to create your own Desktop Environment in Linux 7

Step 3: Launch the custom Desktop Environment

To launch your desktop environment, perform the following steps:

  1. Log out
  2. Find a list of installed desktop environments
  3. Select the newly created desktop environment
  4. Re-login

To exit this session, kill the last program in your session script with the pkill command:

pkill plank

Make your desktop environment more complete

You have successfully created your desktop environment.

But it still lacks some components. It’s time to add backgrounds and panels.

There are many ways to set the wallpaper but the best choice is Komorebi, which gives you the ability to set a video as wallpaper and it also displays icons on the desktop.

To install komorebi, download the installation package from GitHub repositoryinstall and run it.

For the console, I will use the lxqt console:

sudo apt install lxqt-panel

Don’t forget to put the lxqt-panel and komorebi commands in the session script, followed by an ampersand (&). Use full path for komorebi command (/System/Applications/komorebi).

How to create your own Desktop Environment in Linux 8

You can also add Ulauncher, a useful app launcher. This will make the desktop experience more complete:

sudo add-apt-repository ppa:agornostal/ulauncher && sudo apt update && sudo apt install ulauncher

You can add as many programs as you want, customizing the display to suit your needs. You should also consider adding a notification manager.

How to set GTK and Icon Themes

In other desktop environments, you can change the GTK and icon theme using a GUI utility like gnome-tweak or other Themes. In our case, we don’t have these utilities, but don’t worry because you can also change the theme from the terminal using the gsettings command.

For the setting to take effect, dbus must be running.

Dbus uses dbus-launcher. Just add bash dbus-launcher at the top of your script.

How to create your own Desktop Environment in Linux 9

Next, exit the session and log back in. To get the currently applied GTK theme:

gsettings get org.gnome.desktop.interface gtk-theme

For example, to set the GTK theme to the Canta theme, type:

gsettings set org.gnome.desktop.interface gtk-theme Canta

The theme you are going to install must be in the folder /usr/share/themes. The theme name is its folder name.

In addition, you can also see 5 more tips to decorate the Terminal interface here.

The article achieved: 5/5 – (100 votes)

Tags: createDesktopEnvironmentLinux
Previous Post

Lesson 111: Calculating conditional sum in Excel

Next Post

How to unlink iPhone with Apple ID

AnonyViet

AnonyViet

Related Posts

Guide to self -creation socket5 on Ubuntu
Network

Guide to self -creation socket5 on Ubuntu

May 28, 2025
How to create a separate mtproto proxy to use Telegram when blocked
Network

How to create a separate mtproto proxy to use Telegram when blocked

May 25, 2025
Script backup database and website on telegram
Network

Script backup database and website on telegram

May 2, 2025
Create 64GB RAM 16 core for free on Google IDX
Network

Create 64GB RAM 16 core for free on Google IDX

April 13, 2025
What is VPS running Vietnamese software? What is the reason for installing Vietnamese software on VPS?
Network

What is VPS running Vietnamese software? What is the reason for installing Vietnamese software on VPS?

February 17, 2025
Create Ronin wallet to play pixels on VPS Windows
Network

Create Ronin wallet to play pixels on VPS Windows

February 17, 2025
Next Post
How to unlink iPhone with Apple ID

How to unlink iPhone with Apple ID

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

What do you need to learn game programming? Is it difficult? How long does it take?

What do you need to learn game programming? Is it difficult? How long does it take?

June 6, 2025
Guide to search law with AI quickly and accurately

Guide to search law with AI quickly and accurately

June 6, 2025

Bắn Cá SV388 – Cuộc Săn Thưởng Trong Đại Dương Kỳ Thú

June 5, 2025

Bắn Cá 69VN – Game Đổi Thưởng Hấp Dẫn

June 5, 2025
What do you need to learn game programming? Is it difficult? How long does it take?

What do you need to learn game programming? Is it difficult? How long does it take?

June 6, 2025
Guide to search law with AI quickly and accurately

Guide to search law with AI quickly and accurately

June 6, 2025

Bắn Cá SV388 – Cuộc Săn Thưởng Trong Đại Dương Kỳ Thú

June 5, 2025
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

What do you need to learn game programming? Is it difficult? How long does it take?

What do you need to learn game programming? Is it difficult? How long does it take?

June 6, 2025
Guide to search law with AI quickly and accurately

Guide to search law with AI quickly and accurately

June 6, 2025
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí SHBET https://kubet88.yoga/ bj88

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí SHBET https://kubet88.yoga/ bj88

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply