Posts

Showing posts with the label Defaults

Setting default text alignment in blogger html view

Image
By default the text alignment of the blogger is left alignment. But I feel that the justify alignment looks better, and most of the time I write blog using "HTML view" since most of the time I share some kind of source code, which, I feel, is better using html view compared to compose view. So it will be better for me if I can add default text alignment to justify for whole document instead of doing for each paragraph. Here I am sharing how I do it in blogger. Solution One of the easiest way is to use the <style> function in the head secetion of html and setting the body to justify alignment using the body{text-align: justify} . So basically add the following section at the start of the document. <head> <style> body{text-align: justify} </style> </head> Now start writing your post inside the <body> section, the text will be aligned accordingly. Your will look something like thi: <bo...

X Server and Display Problem With sudo

Image
Some time it happens that when you run any graphical window with sudo command like $sudo gedit /etc/apt/apt.conf you may get error message like: ** (gedit:8392): WARNING **: Command line `dbus-launch --autolaunch=720d86dbc34b24ba21ce446600000009 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n Cannot open display: Run 'gedit --help' to see a full list of available command line options. or any error message involving launching x-server. To get rid of this kind of error message first open terminal and then run the following command $sudo visudo Then add the following line at the end of the file. Defaults env_keep="DISPLAY XAUTHORITY" Now if you are adding more than one variable in this form then use "+=" instead "=" (without quote). Hope this will solve the problem. Cheeres APaul