• Breaking News

    [Android][timeline][#f39c12]

    Saturday, September 18, 2021

    Linux My PC automatically connects to all wifi around my neighbourhood at once.

    Linux My PC automatically connects to all wifi around my neighbourhood at once.


    My PC automatically connects to all wifi around my neighbourhood at once.

    Posted: 18 Sep 2021 09:28 AM PDT

    I love KDE. It connects to all my neighbour wifi automatically.

    How to solve this?

    submitted by /u/nazar2sfive
    [link] [comments]

    Endevour OS: I have this glitch everytime I share my screen, for example on Skype. Any fix? It has something to do with my compositor?

    Posted: 18 Sep 2021 12:22 PM PDT

    What the heck is a GUI?

    Posted: 17 Sep 2021 06:53 PM PDT

    Hey all, I'm relatively new to the world of computer science and even newer to the world of Linux, and while I've been using computers for years, I gotta ask-

    What the hell is a GUI?

    I know what it stands for, but specifically- what parts of the stuff on the monitor in front of me make up the GUI and what parts are separate? Is everything I interact with visually the GUI? Even the CLI?

    And why do Linux users seem to collectively hate GUIs? (Mainly noticed in online communities that people love to complain about it)

    submitted by /u/blu3tu3sday
    [link] [comments]

    First time cron user - help!

    Posted: 18 Sep 2021 11:44 AM PDT

    I'm making an alarm clock to fit my shift patterns and I have a script for this alarm clock that plays a sound out the speakers.

    I just need it to run at 4:30am for 5 days, every 22 days.

    30 4 */22 * * <script> is the closest ive gotten, but can't figure it out!!

    please let me know if there is a way or any alternatives, thank you!

    submitted by /u/TTwelveUnits
    [link] [comments]

    What are your thoughts on Manjaro? Is it worth using nowadays?

    Posted: 18 Sep 2021 11:43 AM PDT

    I've been using Linux for well over a year, and can't find a distro to settle on lately. I like Fedora, it's rock solid with a great philosophy, but GNOME 40 simply makes me less efficient.. I could write up a whole essay on why I hate GNOME 40, but let's not descend into arguments. This brings up an issue - its KDE spin can be pretty iffy at times, so in case I can't fix it, I'm looking outwards on what KDE distro I could use.

    I definitely want to be on a rolling release due to the tremendous pace KDE improves at, and I want something that will "shut up" and just let me enjoy my day watching videos or get some work done. And of course, a good KDE experience is required. Manjaro seems to get a lot of love everywhere and seems to fit those 3 requirements, so I'm intrigued.

    I also saw many writeups on the technical flaws of Manjaro and why it could lead to more breakage, but then I wonder, could those be just blown out of proportion? I see *a lot* of people on Reddit claiming they've been happily using Manjaro for years with some minor hitches here and there that come with using a rolling release.

    As for distros like openSUSE and pure Arch? I don't really like openSUSE's package manager, and I'm not confident with trying to run pure Arch on a laptop - would hate to have screwed up battery life or Wi-Fi due to me missing a few things. On the other hand, I ran Arch multiple times on a desktop.

    These are just some thoughts I put together while brainstorming for distro ideas, so feel free to share your opinion and perhaps suggest an entirely different distro. I'd post this on r/findmeadistro but I also want this to be more of a discussion.

    submitted by /u/n988
    [link] [comments]

    Switching to modesetting; Light Display Manager fails to start without Intel driver or xorg.conf.d

    Posted: 18 Sep 2021 01:51 PM PDT

    Goal

    I wish to use the modesetting graphics driver instead of the intel graphics driver. (Ubuntu 18.04)

    Impetus

    My current graphics configuration results in two problems:

    • bizarre graphics flickering and artifacting when using three external monitors connected via a Thunderbolt 3 dock
    • the AMD GPU does not work (DRI_PRIME=1 glxgears yields only a black box)

    Problem

    LightDM fails to start if I perform any of the following:

    • apt remove xserver-xorg-video-intel-hwe-18.04 package
    • mv /usr/share/X11/xorg.conf.d /usr/share/X11/xorg.conf.d.backup (effectively removing the Xorg configuration; my understanding is that it is no longer necessary?)
    • change the Driver entry in my 10-intel.conf OutputClass from "intel" to "modesetting"

    LightDM complains:

    Failed to start Detect the available GPUs and deal with any system changes

    ➜ ~ journalctl -u lightdm.service ... < repeated five times before final failure > ... Sep 17 13:04:58 Precision-3540 systemd[1]: Starting Light Display Manager... Sep 17 13:04:58 Precision-3540 systemd[1]: Started Light Display Manager. Sep 17 13:04:58 Precision-3540 systemd[1]: lightdm.service: Main process exited, code=exited, status=1/FAILURE Sep 17 13:04:58 Precision-3540 systemd[1]: lightdm.service: Failed with result 'exit-code'. Sep 17 13:04:59 Precision-3540 systemd[1]: lightdm.service: Service hold-off time over, scheduling restart. Sep 17 13:04:59 Precision-3540 systemd[1]: lightdm.service: Scheduled restart job, restart counter is at 5. Sep 17 13:04:59 Precision-3540 systemd[1]: Stopped Light Display Manager. Sep 17 13:04:59 Precision-3540 systemd[1]: lightdm.service: Start request repeated too quickly. Sep 17 13:04:59 Precision-3540 systemd[1]: lightdm.service: Failed with result 'exit-code'. Sep 17 13:04:59 Precision-3540 systemd[1]: Failed to start Light Display Manager. ➜ ~ journalctl -u gpu-manager.service Sep 17 13:03:36 Precision-3540 systemd[1]: Starting Detect the available GPUs and deal with any system changes... Sep 17 13:03:36 Precision-3540 systemd[1]: Started Detect the available GPUs and deal with any system changes. ... < repeated many times before logging a failure > ... Sep 17 13:03:36 Precision-3540 systemd[1]: gpu-manager.service: Start request repeated too quickly. Sep 17 13:03:36 Precision-3540 systemd[1]: gpu-manager.service: Failed with result 'start-limit-hit'. Sep 17 13:03:36 Precision-3540 systemd[1]: Failed to start Detect the available GPUs and deal with any system changes. 

    Diagnostic Information

    ➜ ~ inxi --version inxi 3.3.06-00 (2021-07-21) ... < colophon and license elided > ... ➜ ~ DRI_PRIME=0 inxi -Gxxxz Graphics: Device-1: Intel vendor: Dell driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:3ea0 class-ID: 0300 Device-2: Advanced Micro Devices [AMD/ATI] Lexa XT [Radeon PRO WX 3100] vendor: Dell driver: amdgpu v: kernel bus-ID: 3b:00.0 chip-ID: 1002:6985 class-ID: 0380 Device-3: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo bus-ID: 7-3:2 chip-ID: 046d:0825 class-ID: 0102 serial: <filter> Display: x11 server: X.Org 1.20.8 compositor: gnome-shell v: 3.28.4 driver: loaded: amdgpu,ati,intel unloaded: fbdev,modesetting,vesa resolution: 1: 900x1600~60Hz 2: 900x1600~60Hz 3: 2560x1440~60Hz s-dpi: 96 OpenGL: renderer: Mesa DRI Intel UHD Graphics 620 (WHL GT2) v: 4.6 Mesa 20.0.8 compat-v: 3.0 direct render: Yes ➜ ~ DRI_PRIME=1 inxi -Gxxxz Graphics: Device-1: Intel vendor: Dell driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:3ea0 class-ID: 0300 Device-2: Advanced Micro Devices [AMD/ATI] Lexa XT [Radeon PRO WX 3100] vendor: Dell driver: amdgpu v: kernel bus-ID: 3b:00.0 chip-ID: 1002:6985 class-ID: 0380 Device-3: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo bus-ID: 7-3:2 chip-ID: 046d:0825 class-ID: 0102 serial: <filter> Display: x11 server: X.Org 1.20.8 compositor: gnome-shell v: 3.28.4 driver: loaded: amdgpu,ati,intel unloaded: fbdev,modesetting,vesa resolution: 1: 900x1600~60Hz 2: 900x1600~60Hz 3: 2560x1440~60Hz s-dpi: 96 OpenGL: renderer: AMD Radeon Pro WX3100 (POLARIS12 DRM 3.35.0 5.4.0-84-generic LLVM 9.0.1) v: 4.5 Mesa 19.2.2 direct render: Yes 

    I think it is weird that I have the nouveau driver as well, but that is the least of my concerns right now.

    ➜ ~ sudo apt list --installed | grep xserver-xorg-video xserver-xorg-video-all-hwe-18.04/bionic-updates,now 1:7.7+19ubuntu8~18.04.3 amd64 [installed,automatic] xserver-xorg-video-amdgpu-hwe-18.04/bionic-updates,now 19.1.0-1~18.04.1 amd64 [installed,automatic] xserver-xorg-video-ati-hwe-18.04/bionic-updates,now 1:19.1.0-1~18.04.1 amd64 [installed,automatic] xserver-xorg-video-fbdev-hwe-18.04/bionic-updates,now 1:0.5.0-1ubuntu1~18.04.1 amd64 [installed,automatic] xserver-xorg-video-intel-hwe-18.04/bionic-updates,now 2:2.99.917+git20171229-1ubuntu1~18.04.1 amd64 [installed] xserver-xorg-video-nouveau-hwe-18.04/bionic-updates,now 1:1.0.16-1~18.04.1 amd64 [installed,automatic] xserver-xorg-video-qxl-hwe-18.04/bionic-updates,now 0.1.5-2build2~18.04.1 amd64 [installed,automatic] xserver-xorg-video-radeon-hwe-18.04/bionic-updates,now 1:19.1.0-1~18.04.1 amd64 [installed,automatic] xserver-xorg-video-vesa-hwe-18.04/bionic-updates,now 1:2.4.0-1~18.04.1 amd64 [installed,automatic] xserver-xorg-video-vmware-hwe-18.04/bionic-updates,now 1:13.3.0-2build1~18.04.1 amd64 [installed,automatic] 

    Xorg Information

    The contents of /var/log/Xorg.0.log are too long to post in full. However, I can include a few highlights:

    [ 6.350] (==) Using system config directory "/usr/share/X11/xorg.conf.d" ... [ 6.377] (II) Applying OutputClass "Intel" to /dev/dri/card0 [ 6.377] loading driver: intel [ 6.377] (II) Applying OutputClass "AMDgpu" to /dev/dri/card1 [ 6.377] loading driver: amdgpu [ 6.377] (==) Matched intel as autoconfigured driver 0 [ 6.377] (==) Matched amdgpu as autoconfigured driver 1 [ 6.377] (==) Matched ati as autoconfigured driver 2 [ 6.377] (==) Matched modesetting as autoconfigured driver 3 [ 6.377] (==) Matched fbdev as autoconfigured driver 4 [ 6.377] (==) Matched vesa as autoconfigured driver 5 [ 6.377] (==) Assigned the driver to the xf86ConfigLayout [ 6.377] (II) LoadModule: "intel" [ 6.377] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so [ 6.379] (II) Module intel: vendor="X.Org Foundation" [ 6.379] compiled for 1.20.1, module version = 2.99.917 [ 6.379] Module class: X.Org Video Driver [ 6.379] ABI class: X.Org Video Driver, version 24.0 [ 6.379] (II) LoadModule: "amdgpu" [ 6.379] (II) Loading /usr/lib/xorg/modules/drivers/amdgpu_drv.so [ 6.383] (II) Module amdgpu: vendor="X.Org Foundation" [ 6.383] compiled for 1.20.5, module version = 19.1.0 [ 6.383] Module class: X.Org Video Driver [ 6.383] ABI class: X.Org Video Driver, version 24.0 ... < also loads ati, fbdev, vesa > ... [ 6.395] (II) LoadModule: "modesetting" [ 6.395] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so [ 6.397] (II) Module modesetting: vendor="X.Org Foundation" [ 6.397] compiled for 1.20.8, module version = 1.20.8 [ 6.397] Module class: X.Org Video Driver [ 6.397] ABI class: X.Org Video Driver, version 24.1 ... [ 6.420] (II) AMDGPU(G0): [KMS] Kernel modesetting enabled. ... [ 6.651] (II) UnloadModule: "modesetting" [ 6.651] (II) Unloading modesetting ➜ xorg.conf.d cat 10-amdgpu.conf && cat 10-intel.conf Section "OutputClass" Identifier "AMDgpu" MatchDriver "amdgpu" Driver "amdgpu" EndSection Section "OutputClass" Identifier "Intel" MatchDriver "i915" Driver "intel" EndSection 

    Booting from Ubuntu 20.04 or Kubuntu 21.04 live media leads to a flawless experience. Unfortunately upgrading or reinstalling is not an option at this time. I have to fix the configuration manually somehow.

    Thanks in advance!

    submitted by /u/AndrewParsons
    [link] [comments]

    KDE File Manager Dolphin, permissions to share a folder to network?

    Posted: 18 Sep 2021 01:18 PM PDT

    I'm trying to share a folder on my hard drive to my LAN, but according to dolphin I don't have permission to handle Samba user shares. This is what the share folder shows me:

    https://i.imgur.com/z9R0jsO.png

    I've tried running

    sudo dolphin 

    But you can't launch dolphin with sudo because of "unfixable security vulnerabilities".

    I'm (my user account) is the owner of the folder and the owner can view and modify content.

    How do I get permission to share folders in Dolphin?

    submitted by /u/Whitland
    [link] [comments]

    Arch linux zen installer vs calam installer

    Posted: 18 Sep 2021 07:20 AM PDT

    Hi,

    i'm confused in which option is better (got more options and installes pure arch) so any help would be great

    submitted by /u/esmail_el_bob
    [link] [comments]

    Swapping SSDs between computers with different OS.

    Posted: 18 Sep 2021 12:34 PM PDT

    So I have a 2015 MacBook and it has MacOS running on it. I have a spare SSD, with no OS or anything on it. I replaced the old SSD with the clean SSD and I want to install Linux on it. Although the old SSD contains some important files and I would need to go back to it at some point in time. Would it be as easy as just replacing the Old ssd even though they would both have different OS on it?

    Im worried that if I install Linux on it, the old SSD will no longer recognize it.

    Also I'm not referring to using both simultaneously, I'm strictly referring to replacing them and being able to go back to MacOS when I need to.

    submitted by /u/SnickerBarz12
    [link] [comments]

    How do I get my dedicated Nvidia GPU working on Wayland with Optimus?

    Posted: 18 Sep 2021 12:07 PM PDT

    I am using Arch Linux with the latest 470 driver. I followed this guide to get Nvidia only like I wanted, but only with X11. If I start a Wayland session, it runs only on the Intel GPU. Is there any current way at all to configure it to run Nvidia only and Wayland at the same time?

    submitted by /u/anh0516
    [link] [comments]

    exFAT drive unreadable after booting into Windows

    Posted: 18 Sep 2021 12:00 PM PDT

    So I have a hard drive in my PC that I only store Pictures/Dokuments/videos on (so no Programs or anything) which I recently copied all the files off of, formated it to exFAT(previously NTFS) and everything worked quite fine. Now today I booted back into Windows for the first time since that (about a week ago) and didn't really check to see if the Drive was still there however after then going back to Linux (Ubuntu 20.04 btw) I noticed that the drive wasn't there. Switching over to Windows it was also missing here. So since I still have a backup and the loss of data wouldn't be too great if I just did a Backup but before doing so I wanted to at least ask it this is a common/known issue and if there's any easy fix for it.

    Oh in case you are wondering the Error message in Gparted is only that "The contents of the Filesystem could not be read"

    submitted by /u/Kek-Jong-Un
    [link] [comments]

    Returning to Windows 10

    Posted: 18 Sep 2021 11:24 AM PDT

    When I first installed Debian, I chose the option to install the GRUB boot in my USB(I don't know why I did this) but now I'm trying to return to Windows because I'm not yet soo comfortable with Debian. So I installed the Windows ISO file and moved it on my other USB but when I'm trying to boot my PC it says: 'Attempting to boot from USB' and it does nothing! How do I return in Windows again?

    submitted by /u/genaratore
    [link] [comments]

    In a nutshell, what is the difference between all the main desktop environments?

    Posted: 18 Sep 2021 10:55 AM PDT

    I'm about to try ArcoLinux for the first time after using Ubuntu,Mint and Zorin over the last few years. The ArcoLinux installer lets me install many different desktop environments but I really don't know the difference between them and why I would pick one over the other.

    What are the differences? Are some more lightweight perhaps?

    submitted by /u/dirtymint
    [link] [comments]

    I have a script to build Mesa on Debian but I'm not sure I understand it.

    Posted: 18 Sep 2021 08:48 AM PDT

    https://gist.github.com/baryluk/1041204eff4cc4fad6f1508afe67b562

    Firstly I would like to know how to pull this off of github to my machine.

    Next, I run an AMD Radeon machine so I don't believe I need to compile Intel, swrast, or OpenCL etc.

    How do I disable these things?

    -OpenCL

    -Intel drivers

    -Zink

    -Software rendering (swrast and lavapipe?)

    -The DEBUG build (I don't need to compile two versions if I will not use it right?)

    The script instructions say modify MESA_COMMON_OPTS but to what?

    submitted by /u/AzZubana
    [link] [comments]

    Need Help with updating/upgrading POP_OS!

    Posted: 18 Sep 2021 07:56 AM PDT

    Hello community,

    Today I got a message from Pop!_Shop that there are available updates. So I went to the terminal and run sudo apt update and this is what I got:

    sudo apt update

    Reading package lists... Done

    E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1948 (packagekitd)

    N: Be aware that removing the lock file is not a solution and may break your system.

    E: Unable to lock directory /var/lib/apt/lists/

    Could someone provide some guidance on how to solve this issue?

    Thanks!

    submitted by /u/Murtux
    [link] [comments]

    Two GPUs, one of them runs really slow (when it shouldn't)

    Posted: 18 Sep 2021 07:38 AM PDT

    I plan to do a dual GPU setup. One GPU is an RX 560 for Linux and an RX 580 for my Windows VM.

    Unfortunately Linux runs terribly on 560 but runs flawlessly on 580. I want to run Linux on a 560, but can't because of the terrible performance. Mouse moves smoothly, but everything else runs as slow as possible.

    It's worth noting that I did use a 580 on Linux before when I installed it, but now I want to switch GPUs and I have no idea where to start. I did try updating my drivers, but nothing seemed to help. I even connected my monitor to one GPU or the other for testing and the results are always the same. Fast on 580, slow on 560.

    My specs:

    • OS: Ubuntu 20.04.3
    • CPU: AMD Ryzen 5 1600
    • GPU: AMD Radeon RX 580 and AMD Radeon RX 560
    • RAM: 16 GB
    submitted by /u/TheMikirog
    [link] [comments]

    What's the worst what can happen using proprietary google chrome on ubuntu/linux-distro?

    Posted: 18 Sep 2021 06:36 AM PDT

    Hi,

    I'm using Ubuntu for many months now ... and I'm trying to use as much FOSS as possible :)

    I'm not a real hardcore gamer- but I like two or three games- including csgo (from stream).
    Yes, I know, it's not a good idea having proprietary stores like steam installed. But I really need it for in my case (: The problem is: Using discord web while playing csgo.

    As Techlore mentions in his video "Dark Side of Discord" , to avoid installing proprietary discord client, you could use it in the web-browser version. But firefox is causing lags in csgo, only when I join a voice-channel in discord-web. I tried it with a portable chrome version (I feel kinda better if chrome isn't installed correct, idk why)- with chrome this doesn't happen. (Maybe because firefox is showing an annoying microphone-using pop up
    (Yes I know, mumble would be a better possibility, because it's open source. But almost no gamer I know is using it and I'll be a weirdo again if I want them to come to a mumble server- I already begged them to switch to signal messenger for me and so on ...)

    tl;dr

    what is the worst thing, that you could imagine, that google chrome could do on our linux-distro machines? You can run it without root rights- and it would be really crazy if chrome would try to manipulate or destroy some parts of the system. BUT what about scanning your files in the background and sending them (the hashes/checksums) to google? Just to check the hashes of the files a user has, to compare with other users and create profiles? I don't care in this case about what is happening while browsing- I'm just afraid chrome could spy on my computer and do other things then being a browser.

    Your opinions/thoughts? Maybe you can calm me down a little ^^'

    submitted by /u/little-rabbitO-O
    [link] [comments]

    Trouble appending numbers into an array

    Posted: 18 Sep 2021 02:46 AM PDT

    #!/bin/bash rand=() for i in {1..10}; do rand+=$(($RANDOM%100)) echo $rand done 

    ~/$ 32 3236 32360 3236023 323602354 32360235488 3236023548810 323602354881074 32360235488107447 3236023548810744745 

    It's appending it all into one single number for some reason. I'm unable to slice each element too.

    Any idea what the fix is? Thanks

    submitted by /u/_OSCP
    [link] [comments]

    Problems with VS code on Slax linux

    Posted: 18 Sep 2021 06:15 AM PDT

    I installed vs code on Slax by downloading .deb file and installing it. But then I try to run the application it just keeps loading and doesn't open. If I try to run it through terminal it says that it can't run as root. Any ideas?

    System information: Slax: 9.11.0 (debian: 9.13) Vs code: 1.60.0 RAM: 8Gb CPU: i3-6100 3.7GHz

    What have I tried: I tried switching to non root user, but then I didn't have permissions to edit .vscode and .config files.

    submitted by /u/HumanCalculator10
    [link] [comments]

    Adding a drive Pop OS

    Posted: 17 Sep 2021 04:27 PM PDT

    I'm adding another drive to system. How do I change permissions on drive so I can use it?

    submitted by /u/Impreza610
    [link] [comments]

    multiple window borders

    Posted: 18 Sep 2021 03:57 AM PDT

    Is there a way to check the color and size of two borders independently? Lets say you were 2bwm or wmutils, both allow you to set two borders with different thinknesses and colors. After you set them, how would you check how thick the 1st / inner border is or what color the 2nd /outer border is?

    submitted by /u/PersimmonOk9011
    [link] [comments]

    E2fsck error while cloning OMV 5 drive

    Posted: 18 Sep 2021 03:56 AM PDT

    Basically Trying to copy\clone an operating OMV5 on an SSD. With Clonezilla I got a Program Terminated error. I guessed it was cuz 2.5" HHD NTFS was not getting enough power or not able to write in that partition.
    Thinking I messed something up, popped disk back into NAS and boot. It seems to boot and run fine, ok cool.
    So I tried with Pi tools and gnome-disk-util. Create disk image seems ok.

    No errors when creating img but an error when trying to shrink img in Pi Power Tools

    e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/loop0p2 Could this be a zero-length partition? Filesystem appears corrupted before resize2fs

    So I'm stumped on how to fix it or what exactly it means

    submitted by /u/MrMotofy
    [link] [comments]

    Can you make background that shows current price chart for stock or crypto?

    Posted: 18 Sep 2021 03:23 AM PDT

    I was just curious if it was possible to have background that would update few times a day to show current price chart of stock or crypto (or even whole portfolio but not sure if that's possible). Or maybe just make widget that would be always on bottom layer of all apps? Thx

    submitted by /u/Zajlordg
    [link] [comments]

    I can't able to change my stock violet screen in Unbuntu 20.04��

    Posted: 18 Sep 2021 03:21 AM PDT

    I'm new to Ubuntu . I felt the login screen is so boring and I googled and found some steps to change it, but it doesn't woked for me . Pls help me to change it .

    I'm using Ubuntu 20.04 LTS , intel celeron 4000n processor .

    I also got some script to change it ,but I'm scared to run it as I'm completely a beginner.
    The script I got :-

    !/bin/bash

    Holy fuck this was such a headache to figure out. So I wrote a script.

    if [ -z "$1" ]; then echo "Usage: ./chgdm-bg <path/to/picture.png> [y/n]" exit 1 fi echo MAKE SURE YOUR PICTURE IS THE SAME RESOLUTION AS YOUR SCREEN. echo If you dont you will likely regret it. sleep 3

    if [ ! -f $1 ]; then echo Error: could not find file $1 exit 1 fi PIC=$1 WORKDIR=${HOME}/chgdm-bg-tmp DATE=$(date +"%Y-%m-%d_%T")

    if [ ! -d $WORKDIR ]; then mkdir -p $WORKDIR/theme fi cd "${WORKDIR}/theme" mkdir -p backups

    IFS='/' read -r -a array <<< "$PIC" cp $PIC . PIC=${array[-1]} chmod 777 $PIC

    SHARE=/usr/share/gnome-shell/ GRESOURCE=gnome-shell-theme.gresource CSS=gnome-shell.css XMLRES=gnome-shell-theme.gresource.xml

    if [ -f ${SHARE}${GRESOURCE} ]; then echo Backing up ${SHARE}${GRESOURCE}... cp ${SHARE}${GRESOURCE} "backups/${GRESOURCE}.bak.${DATE}" cp ${SHARE}${GRESOURCE} $GRESOURCE printf "Unpacking binary resource..." for r in gresource list $GRESOURCE; do printf "." gresource extract $GRESOURCE $r >$WORKDIR/${r#/org/gnome/shell/} done echo WORKDIR="${WORKDIR}/theme/"

    if [ -f ${XMLRES} ]; then echo Backing up ${XMLRES}... cp "${XMLRES}" "backups/${XMLRES}.bak.${DATE}" if [ -f "tmp" ]; then rm -f tmp fi touch tmp awk -v var="$PIC" '/gresource prefix="/org/gnome/shell/theme">/ { print; printf " <file>"; printf var; print "</file>"; next }1' $XMLRES > tmp && mv tmp $XMLRES #sed -n -i "/\ \ \ \ <file>$PIC</file>/d" $XMLRES #sed -n -i "/gresource prefix=\"/org/gnome/shell/theme\">/a \ \ \ \ <file>$PIC</file>" $XMLRES else echo Error: could not find file ${XMLRES} exit 1 fi if [ -f $CSS ]; then echo Backing up $CSS... cp $CSS "backups/${CSS}.bak.${DATE}" sed -i 's/#lockDialogGroup/#lockDialogGroup-old/' $CSS printf "#lockDialogGroup {\n background: #2e3436 url(${PIC});\n background-repeat: no-repeat;\n background-size: cover; }\n" >> $CSS else echo Error: could not find file $CSS exit 1 fi echo Compiling binary resources... glib-compile-resources $XMLRES echo Copying binary resources over to ${SHARE}... sudo cp $GRESOURCE "${SHARE}${GRESOURCE}" sudo cp $CSS "${SHARE}${CSS}" if [ -z $2 ]; then echo "Restart now? (y/n)" read ans fi if [ "$2" = "y" ] || [ "$ans" = "y" ]; then echo Restarting... for i in {1..5}; do echo $((6-i)) sleep 1 done #/usr/bin/gnome-session-quit --no-prompt #sudo pkill -u $USER sudo shutdown -r now else echo Restart to load your changes. fi else echo Error: could not find file ${SHARE}${GRESOURCE} exit 1 fi

    submitted by /u/pranav_COOL
    [link] [comments]

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel