Posted: . At: 8:58 AM. This was 9 months ago. Post ID: 18328
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.



Sponsored



A few very useful tricks for Linux in 2023.


If the desktop environment loads incorrectly and you can not use the menus to log back out, press Control->Alt-F3, and once you have logged in a root, use this command to restart GDM.

(jcartwright@localhost) 192.168.1.5 ~  $ su
Password: 
[root@localhost jcartwright]# service gdm restart

This will log you out of your current Xorg session and then you may use GDM to log in again.

Search the package repositories for a certain package and return all matches.

(jcartwright@localhost) 192.168.1.5 ~  $ dnf search vim
Last metadata expiration check: 0:01:06 ago on Wed Aug  2 08:28:43 2023.
=================================================================================================== Name & Summary Matched: vim ===================================================================================================
awesome-vim-colorschemes.noarch : Collection of color schemes for Neo/vim, merged for quick use
beakerlib-vim-syntax.noarch : Files for syntax highlighting BeakerLib tests in VIM editor
boxes-vim.noarch : Vim plugin for boxes
neovim.x86_64 : Vim-fork focused on extensibility and agility
neovim-ale.noarch : Asynchronous NeoVim Lint Engine
notmuch-vim.x86_64 : A Vim plugin for notmuch
poke-vim.x86_64 : vim support for poke
python-neovim-doc.noarch : Documentation for python-neovim
python3-neovim.noarch : Python client to Neovim
vim-X11.x86_64 : The VIM version of the vi editor for the X Window System - GVim
vim-ale.noarch : Asynchronous Vim Lint Engine
vim-ansible.noarch : Vim plugin for syntax highlighting ansible's common filetypes
vim-common.x86_64 : The common files needed by any version of the VIM editor
vim-editorconfig.noarch : EditorConfig Vim Plugin
vim-enhanced.x86_64 : A version of the VIM editor which includes recent enhancements
vim-filesystem.noarch : VIM filesystem layout
vim-fugitive-gitlab.noarch : GitLab support for vim-fugitive plugin
vim-go.x86_64 : Go development plugin for Vim
vim-jellybeans.noarch : A colorful, dark color scheme for Vim
vim-mediawiki.noarch : Vim syntax highlighting for MediaWiki
vim-minimal.x86_64 : A minimal version of the VIM editor
vim-powerline.noarch : Powerline VIM plugin
======================================================================================================== Name Matched: vim ========================================================================================================
vim-fugitive.noarch : A Git wrapper so awesome, it should be illegal
vim-halibut.noarch : Syntax file for the halibut manual tool
====================================================================================================== Summary Matched: vim =======================================================================================================
kakoune.x86_64 : Code editor heavily inspired by Vim
ranger.noarch : A vim-like file manager

Find out which packages provide a certain server role.

(jcartwright@localhost) 192.168.1.5 ~  $ dnf repoquery --whatprovides webserver
Last metadata expiration check: 0:02:33 ago on Wed Aug  2 08:28:43 2023.
caddy-0:2.4.6-6.el9.x86_64
httpd-0:2.4.53-11.el9_2.4.x86_64
httpd-0:2.4.53-11.el9_2.5.x86_64
lighttpd-0:1.4.67-1.el9.x86_64
nginx-1:1.20.1-14.el9.alma.x86_64

Install the HTTP server on an Alma Linux system.

[root@localhost jcartwright]# dnf group install "Web Server"

Then start the HTTP server manually.

[root@localhost jcartwright]# systemctl start httpd.service

Regenerate the /boot/grub/grub.cfg

grub2-mkconfig -o /boot/grub/grub.cfg

Easily manage all of your Gnome Shell extensions with a very nice app. https://flathub.org/apps/org.gnome.Extensions. This is perfect to manage all addons for the Gnome Shell desktop.

Automatically set your wallpaper to the current Bing wallpaper on Bing.

https://extensions.gnome.org/extension/1262/bing-wallpaper-changer/.

Another way is to use a script to download the current Bing wallpaper and then set this as the current wallpaper.

wallpaper.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#----------------------------------------------------------------------
# Description:
# Author: John Cartwright <>
# Created at: Wed Aug  2 09:15:45 AEST 2023
# Computer: localhost.localdomain
# System: Linux 5.14.0-284.18.1.el9_2.x86_64 on x86_64
#
# Copyright (c) 2023 John Cartwright  All rights reserved.
#
#----------------------------------------------------------------------
 
#!/bin/bash
 
# Fetch Bing wallpaper JSON data
wallpaper_info=$(curl -s "https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US")
 
# Extract the image URL from the JSON data
image_url=$(echo "$wallpaper_info" | jq -r '.images[0].url')
 
# Bing wallpaper base URL
bing_base_url="https://www.bing.com"
 
# Full image URL
full_image_url="$bing_base_url$image_url"
 
# Download the image
curl -o ~/bing_wallpaper.jpg "$full_image_url"
 
echo "Bing wallpaper downloaded successfully!"
 
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep mate-session)/environ|cut -d= -f2- | tr -d '\0')
 
gsettings set org.mate.background picture-filename ~/bing_wallpaper.jpg
gsettings set org.mate.background picture-options 'zoom'

This is a very simple solution to set up a new wallpaper every day.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.