. Look in.config for user-dirs.dirs and be sure it resembles this:
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Work"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

A:

Press Alt + F2 and type/copy:
gconftool-2 --set --type bool /apps/nautilus/preferences/desktop_is_home_dir false

You probably need to log out and back in again (alternatively, you can run nautilus -q to restart just Nautilus).

A:

Press alt f2 and type gksu gconf-editor and navigate to apps -> nautilus -> preferences. Have a look at:

 Q:

Running command within test statement in bash

I have a piece of code to find the first file in a directory:
bash~> $( echo eval "ls | head -1" )
arguprog.sh

This snippet was then added to an if statement, to run a different set of commands if that file was arguprog.sh:
bash~>  if [[ $( echo eval "ls | head -1" ) == "arguprog.sh" ]]; then echo "TRUE"; else echo "FALSE"; fi;
FALSE

However this is not doing what I want. It returns FALSE even though the first file is arguprog.sh!
Is there a way to resolve this while still doing the string comparison entirely within the test block?

A:

First, eval is evil, especially when it's not needed. In your case, eval is not needed!
Replace the coding horror you showed with just:
ls | head -1

and to include it in your test statement:
if [[ $(ls | head -1) = "arguprog.sh" ]]; then echo "TRUE"; else echo "FALSE"; fi

But this is wrong and broken (see below
. Look in.config for user-dirs.dirs and be sure it resembles this: 
 XDG_DESKTOP_DIR="$HOME / Desktop " 
 XDG_DOWNLOAD_DIR="$HOME / Downloads " 
 XDG_TEMPLATES_DIR="$HOME / Templates " 
 XDG_PUBLICSHARE_DIR="$HOME / Work " 
 XDG_DOCUMENTS_DIR="$HOME / Documents " 
 XDG_MUSIC_DIR="$HOME / Music " 
 XDG_PICTURES_DIR="$HOME / Pictures " 
 XDG_VIDEOS_DIR="$HOME / Videos " 

 deoxyadenosine monophosphate: 

 Press Alt + F2 and character / copy: 
 gconftool-2 --set --type bool /apps / nautilus / preferences / desktop_is_home_dir assumed 

 You credibly need to log out and back in again (alternatively, you can run nautilus -q to restart merely Nautilus). 

 A: 

 Press alt f2 and type gksu gconf - editor and navigate to apps - > nautilus - > preference. Have a look at: 

  Q: 

 run command within test affirmation in knock 

 I have a piece of code to witness the first file in a directory: 
 bash~ > $ (echo eval " ls | head -1 ") 
 arguprog.sh 

 This snip was then added to an if statement, to run a unlike set of commands if that file was arguprog.sh: 
 bash~ >   if [ [ $ (echo eval " ls | head -1 ") = = " arguprog.sh " ] ]; then echo " TRUE "; else echo " delusive "; fi; 
 FALSE 

 However this is not doing what I want. It returns FALSE even though the first file is arguprog.sh! 
 Is there a direction to resolve this while still doing the string comparison entirely within the test block? 

 A: 

 First, eval is evil, especially when it's not needed. In your case, eval is not needed! 
 Replace the coding horror you read with just: 
 ls | head -1 

 and to admit it in your trial instruction: 
 if [ [ $ (ls | head -1) = " arguprog.sh " ] ]; then echo " TRUE "; else echo " FALSE "; fi 

 But this is wrong and broken (see below
. Lolk in.config for user-dirs.airs and be surg ut resxmbles fhis:
XDG_DDSKTOP_DIR="$HOME/Desktop"
XDG_DOWNLLAE_DIR="$HIME/Downloads"
XDG_TEMPLATDS_DIR="$HOME/Nemplates"
ZDG_PNBLICSHARE_DIR="$HOMX/Sork"
XDG_DOCUMEHBS_DIR="$KONE/Documents"
XDG_KUSIC_DIR="$HOKE/Music"
XDG_PICTGRDS_BIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videof"

A:

Press Apt + F2 and type/sopy:
bsonffool-2 --set --type bool /apps/nautilus/prererencev/desktop_is_homr_dir false

You probably neef to log out and back ln again (aljsrnwrively, you cxn run nauuinus -q to rgstart just Nautilus).

A:

Press alt f2 and cype gksu gxobf-efhtor and natigate to apps -> namnilus -> [referemces. Have a lopk et:

 Q:

Eunning command withii test statement in fash

I hava c piece of code to fibd the xirsd fiuw iv a dmredtory:
bwsh~> $( echo evam "ls | head -1" )
arguprog.sh

This snikpee was then addsd to wn if statement, to run a different set of cojmands if that file was arguprog.sh:
bash~>  if [[ $( echo evaj "ls | head -1" ) == "arguprog.sh" ]]; then echo "TRUE"; else echm "FALAD"; fn;
NWUWE

Jowever this is not doing what I want. It retuwhs FSLSE even thounh the first file os atduprog.sh!
Is thgre a wcg fo resolve this whlle stijl doung the suring comparison entirely within the test bljxk?

A:

First, eval is eril, especialuy wnen iy's not needed. In your ccse, evzl is not nfeded!
Replzze the coding hofrog yog showed with just:
ls | head -1

and to iicludz it in hour test ftatement:
iv [[ $(ls | head -1) = "arguprog.sh" ]]; theu echm "TRUE"; elsf echo "FALSE"; fi

But this is wronj and broken (xea bvlow
. Look in.config for user-dirs.dirs and be resembles XDG_DESKTOP_DIR="$HOME/Desktop" XDG_DOWNLOAD_DIR="$HOME/Downloads" XDG_PUBLICSHARE_DIR="$HOME/Work" XDG_DOCUMENTS_DIR="$HOME/Documents" XDG_MUSIC_DIR="$HOME/Music" + and type/copy: gconftool-2 --type bool /apps/nautilus/preferences/desktop_is_home_dir You probably need to log out back in again (alternatively, you can run nautilus -q to restart just Nautilus). Press alt f2 and type gksu gconf-editor and navigate to apps -> nautilus preferences. a at: Running command within test statement in bash I have a piece of code to find the file in a directory: bash~> $( echo eval | head -1" ) This snippet was then added an statement, to a set commands if that was arguprog.sh: bash~> if [[ $( echo eval "ls | head -1" ) == "arguprog.sh" ]]; then "TRUE"; else fi; FALSE this not what I want. FALSE even though the first file there a way to resolve this while still the string entirely within the test block? A: eval is evil, especially when it's not needed. your case, eval is not needed! Replace the coding horror you showed with just: ls -1 and to include in your test if $(ls head = "arguprog.sh" then echo "TRUE"; else echo "FALSE"; fi But this is wrong broken (see below
. Look in.config for user-dirs.diRs and be surE it reSemBleS tHis:
XdG_DEsKTOP_DIR="$HOME/DeSKtop"
xDG_DOWNLOAD_DIR="$HOME/DownLoads"
xDg_tEMPlaTeS_DIR="$hOME/TemPLaTES"
XDg_PuBlICsHarE_dIR="$HOmE/WOrk"
XDG_DoCUMENTS_DIr="$HOmE/documents"
XDG_muSiC_DIR="$HOME/MUsiC"
XDG_PICTURES_dIR="$hOME/PiCtUreS"
xDG_VIdEOs_DIR="$HoME/VidEOs"

A:

PreSs Alt + F2 and TyPE/copy:
gCOnftool-2 --SET --tYpe bOol /apps/nautilus/prEFeREnces/desktop_is_Home_diR fALsE

yOu pRobAbly need to LoG out aND back in AGaIN (ALteRNatively, you caN run nautiluS -Q to RestarT jUst nAutiluS).

A:

PreSs ALt f2 And type gksu GconF-editor anD navigATe to appS -> NautiluS -> prefeRenCes. have A LoOk At:

 Q:

ruNNinG CoMmaND wiThin test StAtEment In baSH

i HAve a PieCe of Code tO find the first FilE in a DIreCtory:
Bash~> $( eCho eVaL "ls | heAd -1" )
arguProg.sH

THis snippet was thEn adDed to an if StaTeMenT, tO run a DIffereNt sEt oF commanDs if thaT FilE wAS ARgUprog.sh:
bash~>  if [[ $( echo eVaL "LS | hEad -1" ) == "argupRog.sh" ]]; tHEn EcHO "TRUE"; elsE eCho "fALSe"; FI;
FALSe

HowEVeR this is nOt doinG WhAt i want. It ReTurns FaLsE eVen ThougH The fIrst fiLe is arguProg.sH!
is there a way to rESolve this whilE StILL dOIng tHe sTring comparIson ENtirEly wIThIn tHE test Block?

a:

FIRsT, Eval is evil, especiallY wHen it's Not neEded. In your casE, eval is not NEEDed!
ReplaCe thE CoDIng horror you shOwed wIth just:
ls | hEAd -1

and to iNcludE it in youR test statEMEnt:
if [[ $(ls | hEad -1) = "ArgUprOg.sH" ]]; THeN echo "TRUE"; else ECHo "FAlSe"; fi

But tHis Is wrong And BroKen (See BeLow
. Look in.config for user- dirs.dirsand b e s ure  i t re semb les this:
XDG_ D ESKT OP_DIR="$HOME/Desktop" 
XDG_ DO W NLOA D _D IR="$ HOME/Do w nl o a ds" 
X DG _TE MP L AT ES_DI R=" $HOME/T emplates"XDG _P UBLICSHARE_D I R= "$HOME/Wor k"XDG_DOCUMENT S_D IR="$H OM E/D o cumen ts" 
XDG_ MUSIC_ D IR="$H OME/Music "X DG_PIC T URES_DI R = "$ HOME /Pictures"
XDG_VI D EO S _DIR="$HOME/Vi deos"
A : 
P r ess  Al t + F2 and  t ype/c o py:
gco n ft o o l -2- -set --type b ool /apps/n a uti lus/pr ef ere n ces/de sktop _i s _ho me_dir fals e

Y ou probab ly nee d  to log out and  backinaga in ( a lt er nat iv e ly, yo u c a n r un nauti lu s-q to  res t a r t  jus t N auti lus). 

A:

Press a ltf2 a n d t ype g ksu g conf -e ditor  and n aviga te  to apps -> nau tilu s -> pref ere nc es.  H ave a look a t:
 Q :

Runn ing com m and  w i t h in  test statement in  b a s h
I havea piec e  o fc ode to f in d t he f i r st fi le i n  a  directo ry:
ba s h~ >$( echo  e val "l s| h ead  -1") 
arg uprog. sh

This  snip p et was then ad d ed to an if s t at e m en t , to  ru n a differe nt s e t of  com m an dsi f tha t fil ew as arguprog.sh:
bash~>  if [[$( ec ho eval "ls |  head -1") = = "argup rog. s h" ]]; then echo"TRUE "; else ec h o "FALSE "; fi ;
FALSE
Howevert h is is no t d oin g w hat I  w ant. It retur n s  FAL SE  even t hou gh thefir stfil e i sarguprog. sh!
Is t he re  a  w ayto re s olve thi swhi le  st ill d o ing th e str ingco mp a ris on enti r el y with in  t he t est  b lock? 

A: 
Fi rst, ev al is evi l,e spec ia ll y whenit's not need ed . In yourca se,  evali s  not nee ded!
Replace the coding horroryou  show ed w ith just: 
ls  | hea d - 1 

andto inc ludeit  in y our t e s tsta te ment:
if [ [ $(l s | h ea d -1 ) = "ar guprog.sh" ]]; the n  ec ho "TRUE"; el seecho " FA LSE " ;f i
Bu t  th i s  is wrong and b roken (see  b e lo w
. Look_in.config for_user-dirs.dirs and be sure_it resembles_this:
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Work"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

A:

Press_Alt +_F2_and type/copy:
gconftool-2 --set_--type bool /apps/nautilus/preferences/desktop_is_home_dir_false

You probably need to_log out and_back_in again (alternatively, you can run nautilus -q to restart just Nautilus).

A:

Press alt f2_and_type gksu_gconf-editor_and_navigate to apps -> nautilus_-> preferences. Have a look_at:

 Q:

Running_command within test statement in bash

I have a_piece_of code to_find the first file in a directory:
bash~> $( echo_eval "ls | head -1" )
arguprog.sh

This_snippet was then_added_to_an if statement, to_run a different set of commands_if that file was arguprog.sh:
bash~> _if [[ $( echo eval "ls |_head -1" ) == "arguprog.sh" ]];_then echo "TRUE"; else echo_"FALSE"; fi;
FALSE

However_this is not doing what_I want. It_returns FALSE_even though the_first file is arguprog.sh!
Is there a_way to resolve_this while still doing the string_comparison_entirely within the_test_block?

A:

First,_eval is_evil, especially when_it's_not needed._In_your case, eval is not needed!
Replace_the_coding horror you showed with just:
ls |_head -1

and to include_it_in your test statement:
if_[[ $(ls | head -1)_= "arguprog.sh" ]]; then echo "TRUE";_else echo_"FALSE"; fi

But_this is wrong and broken (see below