You are not logged in.

#1 2020-03-18 19:00:45

woistmeinauto
Member
Registered: 2020-03-18
Posts: 4

Command from the wiki does not work

if systemctl -q is-active graphical.target && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
        exec startx
      fi

I added this to my ~/.bash_profile

When I login to root I get these lines:

-bash: /root/.bash_profile: line 4: unexpected token '&' in conditional command
-bash: /root/.bash_profile: line 4: syntax error near '&D'
-bash: /root/.bash_profile: line 4: 'if systemctl -q is-active graphical.target && [[ ! &DISPLAY && &XDG_VTNR -eq 1 ]]; then'

all in -bash: /root/.bash_profile:

What am I doing wrong?

Offline

#2 2020-03-18 19:05:30

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,406
Website

Re: Command from the wiki does not work

For a start, you've added it to the root ~/.bashrc. Don't run X as root.

Secondly, you have typos -- you have used an ampersand (&) instead of a dollar ($).


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2020-03-18 19:18:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Command from the wiki does not work

While the above to points are certainly the most important, don't overlook the third that the command in the wiki is crap anyways.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2020-03-18 19:37:16

woistmeinauto
Member
Registered: 2020-03-18
Posts: 4

Re: Command from the wiki does not work

WorMzy wrote:

For a start, you've added it to the root ~/.bashrc. Don't run X as root.

Secondly, you have typos -- you have used an ampersand (&) instead of a dollar ($).

Thank you so much, that seems to be it.
As for first suggestion, well i'm just testing out things, going to reinstall proper when i get a hold of this thing.


Unfortunately the wiki is a bit overrated. It jumps from one topic to another, i need a step by step approach.
I just want to build arch-xfce version of my xubuntu.

See here :
https://imgur.com/BqMAhnp
https://imgur.com/kGWjKJ5

Pictures doesn't tell much but i really tweaked lots of stuff on that OS. Luckily i recorded almost every change i made so i have a good backup , i just need to get the xfce working and i'll add my stuff right back in, i mean hopefully.

Offline

Board footer

Powered by FluxBB