Posts Tagged ‘reset’

1. Gnome Appearance modify command in Linux instead – Intro

It is always handy to do stuff in console and as a GNU / Linux long time GNOME user I found it interesting to share here some nice tips on how Theme could be changed using command line.

Why would you ever want to change themes through console / Terminal? Well lets say you have to administrate remotely a bunch of GNU / Linux Desktop machines and you have to change themes simultaneously on a multiple hosts, changing theme using the command line then comes really handy.

Besides that in GNOME 3.X.X branch with Unity (yackes) if you have chosen to use GNOME (Flashback /Fallback) or Mate you might find it difficult to change some specifics of the default theme, that is especially true for GNOME (flashback) Fallback like me.

If you heard GNOME Flashback but you never used i and wonder what it is I think it is worthy to say few words about it:

GNOME Flashbackis a session for GNOME 3 which was initially called "GNOME Fallback", and shipped as a stand-alone session in Debian and Ubuntu. It provides a similar user experience to the GNOME 2.x series sessions. The differences to the MATE project is that GNOME Flashback uses GTK+ 3 and tries to follow the current GNOME development by integrating recent changes of the GNOME libraries. The development currently lags behind a little but a lot of progress has been made in bug fixing lately. So in short GNOME Fallback is for anyone who wants to stick to GNOME 2.X interface but doesn't want to stick to Mate and wants still to use some more graphical goodies that comes with GNOME 3.

In MATE nowadays there is possibility to relatively Easy add / change appearance and add new themes, there is also the graphical tool called Appearance accessible via mate-control-center command or menus. Using Appearance you can modify themes and Window Decorations, however there is much more that can be done or tuned missing in the MATE GUI using a couple of GNOME desktop environment native commands.

3. Change GTK Theme

Below commands are for GNOME 3 based desktop environments this includes also any other GNOME based Graphical Environments or components of GNOME 3 such as (Ubuntu Unity, GNOME 3 Shell/Classic, Cinnamon), and even the old GNOME 2 desktop.

In GNOME 2 it was possible to set various variables directly from gconf-editor including GTK Themes but in GNOME 3 somehow this is no more … so to do we need to use some cryptic commands or use gnome-tweak-tool or MyUnity (Ubuntu Linux users with Unity) but configuration that can be made with them is unfortunately partial so in any case knowing below commands is a necessity to be able to tune up nicely your Linux Gnome Desktop.

And yes it is crazy why on Earth gnome developers scaped out the configuration from gconf-editor and left us with this user unfriendly method. Could it be that someone (Like the big corporations) has the interest to ruin Free Software?? What do you think…

Before we start I recommend you check out what is the current installed and enabled theme, you might want decide to keep it after checking the number of themes available. To check your current installed GNOME theme run:

gsettings get org.gnome.desktop.interface gtk-theme
'Adwaita'

You see I have 'Adwaita' theme as a default.
Next lets change the gnome GTK theme interface.

What about colors, well the #444444 and #22222 and #eeeeee, #333333 seen as color codes in above examples can easily decrypted if you don't know them using a tiny tool called gcolor2
The tool is installable on most Linux distributions with a simple apt-get install gcolor2 or yum install gcolor the tool is convenient and a must have for anyone using Linux for basic design or graphic operations with some program as GIMP / Krita / Inkscape / Vectr / Karbon etc.

All gcolor2 does is to make easy for you to get HTML color codes and convert existing ones into colors for you, here is shot:

While talking about setting color another interesting Graphical tool related to article, that gives you abilities to change colors in GNOME is gnome-color-choose, the tool is really awesome and allows you to do many of the color tunings shown in above examples

Debian and other deb based distro users can easily download and install with:

linux:~# dpkg -i ultimate-edition-themes-.0.0.7_all.deb
…

Other Linux users such as Fedora ones and Slackware users (if anyone on Slack uses Gnome since KDE is default by default there), use alien tool to install it or directly open the file with Midnight Commander (mc) and copy the files to the /usr/share/themes dir.

If you travel frequently and use your Windows 7 OSed PC in Coffee Clubs and various locations including Airports or public places, you might want to also obfuscate Windows's login screen to prevent it to be easily recognizable you're on a Windows by its default Blue and all known Login and Lockout screns for security or just for personal fun show off your l337 Skills to your colleagues at work and in this article I'll shortly explain how this is possible on Windows 7 the same is easily possible to do also on Windows 8 and Win 10 and I'll explain this as well in a separate article some time I have time in future.

In Windows 7 by default the Login Screen background is identical to its Lock Screen, one that appears on Windows (button) + L combination and through which if the computer is once locked you can login by pressing CTRL + ALT + DEL key combination, after which standardly you're either prompted for your password or if its a Domain connected corporate PC you're asked for your PIN or picture password.

Windows 7 Users: Set a Custom Login Background

To use a custom login background in Windows 7, you need to

1. Do Windows Registry edit – in order to enabled custom backgrounds2. And then store the image you want in a special Windows folder.

Step One: Enable Custom Backgrounds in Windows 7

For Windows 7, the ability to set a custom logon background is intended for original equipment manufacturers (OEMs) to customize their systems, but there’s nothing stopping you from using this feature yourself.

As I said prior Windows 7 background change feature is disabled by default, so you’ll have to enable it from the Registry Editor. You can also use the Group Policy Editor if you have a Professional version of Windows (or you're configuring the background for a a whole bunch of Domain run Windows PCs).

In the right pane, you’ll see a value named OEMBackground. Note that, If you don’t see that value, you’ll need to create it by right-clicking the Background key, choosing

New -> DWORD (32-bit) Value

and then naming the new value “OEMBackground.”

Double-click the OEMBackground value to open its properties window, set its value to 1 in the “Value data” box, and then click “OK.”

!! Be Aware that !!:
If at any point you decide to select a new theme in the Appearance and Personalization window, this will reset above already made registry value.
Selecting a theme will change the value of the key to the value stored in the theme’s .ini file—which is most likely 0.
Thus in case you do change theme, to have the background be the custom set make sure you don't forget to perform the Registry tweak again.

If you're running a Windows Professional or Windows Enterprise alternative way to set custom background is to directly change using the Local Group Policy Editor instead. The advantage of using Local Group Policy Editor to set a custom Login or Lockout screen background is it will be kept persistent even if you change your themes.

To do it via LGPE,

Launch Local Group Policy Editor by pressing Start, typing “gpedit.msc,” and then hitting Enter.

drill down to the following location:

Computer Configuration\Administrative Templates\System\Logon

On the right, you’ll find a setting named “Always use custom login background.” Double-click that setting and, in the setting’s properties window, select “Enabled” and then click “OK.”

Next step is to actually set the image you want to use.

Finally Set the Custom Background Image of choice

You can use any image you like, but there are two things you’ll need to keep in mind:

!!Your image must be less than 256 KB in size. !!

You may need to convert your image to something like JPG format to make that happen.
Try find image that matches the resolution of your monitor so it doesn’t look stretched.

Windows looks by default for the custom logon screen background image in the following directory:

C:\Windows\System32\oobe\info\backgrounds

Also defaultly, “info” and “backgrounds” folders donesn't exist, so you’ll need to navigate to C:\Windows\System32\oobe folder and create the subfolders on your own.

After creating the foldersC:\Windows\System32\oobe\info\backgrounds

Copy whatever background image_whatever.jpg you want to the backgrounds folder and rename the image file to “backgroundDefault.jpg.”

Some time ago on one of the Database MySQL servers, I've configured replication as it was required to test somethings. Eventually it turned out replication will be not used (for some reason) it was too slow and not fitting our company needs hence we needed to disable it.

It seemed logical to me that, simply removing any replication related directives from my.cnf and a restart of the SQL server will be enough to turn replication off on the Debian Linux host. Therefore I proceeded removed all replication configs from /etc/my/my.cnf and issued MySQL restart i. e.:

sql-server:~# /etc/init.d/mysql restart
....

This however didn't turned off replication,as I thought and in phpmyadminweb frontend interface, replication was still appearing to be active in the replication tab.

Something was still making the SQL server still act as an Replication Slave Host, so after a bit of pondering and trying to remember, the exact steps I took to make the replication work on the host I remembered that actually I issued:

mysql> START SLAVE;

Onwards I run:

mysql> SHOW SLAVE STATUS;
....

and found in the database the server was still running in Slave Replication mode

Hence to turn off the db host run as a Slave, I had to issue in mysql cli:

My sister has forgotten the administrator account for her wordpress blog as she did not blogged for a while.
I decided to help her and reset the WORDPRESS blog password to another one.
The easiest way of course in normal circumstances is to use wordpress's Lost your password password reset via email.

However with this blog it seems I used an email address which I forgot so I couldn't really use this as a mean to reset the blog password.

Therefore as I'm addicted to command line 😉 I decided to do it straight via connecting to mysql server with mysql cli and change the encrypted password value directly there. Here is how I did it:

One important note here is that in step 3
I've used the MD5(); mysql embedded function to generate the MD5 crypted password which is inserted in above's sql query, however the MD5 function is only available in MySQL servers version 5.x, therefore in older releases of MySQL e.g. ver 4.x, one will have to first generate the md5 password with let's say md5sum linux command or bsd's md5 cmd like so:

Being a remote system administrator for many years from now, I’ve experienced many times sudden Linux crashes, mostly caused by system hardware overloads.

This is a common thing especially on busy Web Servers with (Apache/MySQL). Situations like this are really messy and many times in order to bringt the server back online, one has to either physically go to the Data Center or contact the Technical support to request a server reboot.

In this terrible times, data loss might occur if the Server reset button is used to cold reboot it.

Happily in 99% of the cases the data loss which might occur could be prevented with Linux’s kernel capability to support the Magic SysRQ key !

Having the Magic SysRQ key functionality being supported in Linux in past times wasn’t that common, thanksfully these days this has changed andlmost every Linux distrubution supports this handy feature.

Now you might wonder what is the magic with those Magic SysRQ key ?

Let me explain, Magic SysRQ is a kernel level functionality which supports even completely crashed Linux systems with the horrifying:

Kernel Panic
message to be properly shutdown.

Using Magic SysRQ instead of the mostly used indiced cold reboots is really advantageous, as all the opened files by programs on the crashed server which hanged will be properly saved and closed and thus possible data loss caused by the sudden server crash will be minimized.

One other good thing about the Magic SysRQ Key keyboard combination is that initiating the Magic SysRQ could be made blindly (no need for server monitor or display to present any error messages on the failed server).

Now to check if the magic sysrq is enabled on a server one should issue the command:

Here are some Magic SysRQ keyboard combinations one can use in case of server failure:

ALT+SYSRQ+M to dump memory info;
ALT+SYSRQ+P to dump processes states;
ALT+SYSRQ+S to sync disks;
ALT+SYSRQ+U to unmount all mounted filesystems;
ALT+SYSRQ+E to terminate processes;
ALT+SYSRQ+I to kill all processes
ALT+SYSRQ+U to try to unmount once again;
ALT+SYSRQ+B to reboot.

I would skip to explain what each of the keyboard combinations will do as I believe the above description explains it well.

One classics of combinations one might want to issue on a failed Linux server supporting the Magic SysRQ would be:

Recently I was in the Pomorieâ€™s Monastery â€“ St. George .
One layman left his notebook (maybe as a donation) to the monks. However the notebook was protected by both: fingerprint check, as well as administrator password and therefore the notebook was completely unusable and was thrown away with many other unused belongings.
When the abbot of the monastery found out Iâ€™m adept with computers, he asked if I can fix up the notebook and somehow remove the password, or reinstall the machine to make it usable.
So here I decided to blog what I undertook to reset the windows password with the hope somebody else could benefit from that as well.

Following the walkthrough literally prooved to be quite succesful for me and I was able to properly reset the administrator password!
So Hooray it works again! The monks can now benefit of the cute Toshiba satellite machine.