Friday, February 14, 2025
Configure a Brother Printer in Fedora Linux
Friday, February 07, 2025
Stop Windows 11 from Changing Input Language
The default option when you have multiple keyboard languages is to present the default system language for every app.
If you want to stick with one language for all apps, go to Advanced Keyboard Settings and instead of "Use language list", choose your favorite language.
You can still change keyboard language from the taskbar.
Thanks to Sumit.
Friday, December 13, 2024
Firefox uses too much memory or CPU
Thursday, December 05, 2024
Disable Firefox Translation Pop-up
Saturday, November 23, 2024
Set up Credentials in Git for Windows
Wednesday, October 23, 2024
Remove an Account from Google Authenticator
Swipe from right to left to remove the selected Account.
Thanks to Parayil
Friday, October 11, 2024
Stop Seeing Unwanted Posts in Facebook
Are you still on Facebook and noticed the amount of undesired crappy fake AI-generated posts infesting your feed?
Instead of scrolling from Home, go to Feeds and choose more specialized feeds like Friends or Groups.
Thursday, October 03, 2024
Less and Less Space on Your Disk? Using Thunderbird?
If you see your free disk space going lower and lower and you are using Thunderbird, there's a good chance a bug is eating away a lot of it.
First step: disable automatic compacting of folders: uncheck "Compact all folders..."
Then go to:
C:\Users\xxx\AppData\Roaming\Thunderbird\Profiles\
Check the size if you have multiple ones, go inside and delete all "nstmp" files.
Those are the product of a bug:
"This sounds a lot like the folder compaction bug which can cause Thunderbird to drastically increase the size of temporary files (nstmp, nstmp-2, etc) if the process fails. We're currently rewriting the code for this (https://bugzilla.mozilla.org/show_bug.cgi?id=1890448) and a fix should be coming soon."
Thanks to https://www.reddit.com/user/killyourfm/
Thunderbird Eating Up My Hard Drive : r/Thunderbird (reddit.com)
Monday, September 30, 2024
Free up Space in Windows 11
Open "System" and go to Storage -> Temporary Files or search for "storage" and click on Temporary Files. Customize and get some space back.
Monday, August 26, 2024
Manually Edit the TortoiseHg Registry
Sometimes you have spurious entries that cannot be removed from the UI.
You can manually edit the Repository Registry by going to the local configuration directory--something like: C:\Users\username\AppData\Roaming\TortoiseHg--and editing the file:
thg-reporegistry.xml
If you have an empty group, there will be a line like:
<allgroup name="default"/>
which you can just delete.
Thursday, July 04, 2024
Thunderbird (115.x.y) Use Body Text Style by Default
Tuesday, July 02, 2024
Can not extract resource from com.android.aaptcompiler.ParsedResource
Sunday, May 05, 2024
Download Your Data from Instagam
The tricky part is to find how to start.
- Log in.
- Choose your account in the top right corner.
- Click on the Options icon, right of "View Archive".
- Choose "Settings and Privacy".
- In the "Accounts Center", choose "Personal Details".
- Now in the left side menu, choose "Your Information and Permissions".
- Choose "Download your Information" and proceed with customizing your request.
- Wait for Instagram to notify you when the data is ready to be downloaded.
The End
Wednesday, March 27, 2024
Thursday, February 15, 2024
Windows Explorer is Dead in Windows 11. How to Restart it.
Windows Explorer is dead. You cannot open the Taskbar, switch workspace or even summon an open application but the mouse is responsive.
This worked for me:
Press Ctrl + Shift + ESC to open the Task Manager.
You can now restart Windows Explorer clicking: Run new task (top left) and then typing: explorer.
That should do it!
Thursday, May 11, 2023
Android FragmentStateManager.createView IllegalArgumentException: No view found for id
I had this exception when replacing a fragment inside another fragment in a transaction where getParentFragmentManager() was called.
The solution was calling getChildFragmentManager():
Return a private FragmentManager for placing and managing Fragments inside of this Fragment.
Saturday, February 25, 2023
Disable "Do you want to open this file?"
It's really annoying that Windows 10/11? always asks this question when you try to open a file you created.
To disable for new files (old ones are not affected unfortunately):
Open the "Local Group Policy Editor" (search for it).
Go to "User Configuration" -> "Administrative Templates" -> "Windows Components" -> "Attachment Manager".
Double click on "Do not preserve zone information in file attachments" and set it to Enabled.
Trying to open all new files will not result in the dreaded pop up disturbing your work.
Thanks to this forum answer.
Friday, December 02, 2022
Show More Options by Default in Windows 11
To enable:
Go to Search and type Run to add the following to the registry entry:
reg add HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32 /ve /d "" /f
Then restart the file explorer to see the change.
To disable:
reg delete “HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}” /fReferences: allthings.how
Thursday, September 29, 2022
Windows 11: Edit the All Apps Start Menu
Right-click Windows and select Run.
Now
execute the following:
# Open the Startup Folder of All Users
%ProgramData%\Microsoft\Windows\Start Menu\Programs\StartUp
That's it!
Thanks to appuals.com
Monday, November 15, 2021
Add Shortcuts to Create Files on the Windows 10 Context Menu
Thursday, October 28, 2021
Win10: Frequent Folders and Recent Files Are Not Grouped Separately in Quick Access
Open File Explorer so that you are in the Quick Access view.
Right-click on Quick Access and choose Options.
Go to View -> Reset Folders
That should fix it.
Wednesday, October 13, 2021
Resize Thunderbird Columns
If the double arrow icon to resize the width of the columns in the email list does not appear, try doing this, it worked for me.
Click on the "Select Icons to Display" in the top right corner of the column title row and choose "Restore Column Order".
Then try again to position the mouse on the border of two columns and the double arrow should appear.
Thursday, July 08, 2021
Manage Entries from the "New" Context Menu in Windows 10
Sometimes when you install a program, you need to have it under the right-click menu New submenu. If it's not there you can easily add it using the Registry Editor.
- Open the Registry Editor: run regedit
- Under Computer\HKEY_CLASSES_ROOT, find the file extension you want to add.
- Select it, right-click and select New -> Key
- Name it ShellNew
- On the left panel, select New -> String Value
- Name it NullFile and change the value to 1 if you want to enable it. Actually setting the value is not necessary. The mere existence of the key makes it appear in the menu.
- If you want to disable an existing one, just remove the ShellNew entry. Setting the key to zero seems not to work for me.
That's all folks!
References
- https://www.thewindowsclub.com/remove-items-from-new-context-menu
Monday, April 20, 2020
Friday, April 03, 2020
Safely Remove Device Icon Not Showing in Windows 10
To remove a device:
- Go to Start Menu -> Settings
- Devices -> Other Devices.
- Select and click: Remove device.
Tuesday, March 31, 2020
Record Sound from Internal Source (Windows 10)
WASAPI loopback has an advantage over stereo mix or similar inputs provided by the soundcard that the capture is entirely digital (rather than converting to analog for playback, then back to digital when Audacity receives it). System sounds playing through the device selected for WASAPI loopback are still captured, however.
1st Method: Stereo Mix
If it's included in the drivers' list, it's usually disabled. Enable it and select it in Audacity as the Recording Device.Open the Sound Settings -> Sound Control Panel. Right-click and enable Show Disabled Devices. Enable the Stereo Mix.
2nd Method: WASAPI Loopback
In Audacity, choose the Windows WASAPI audio host, and then choose an appropriate loopback device, such as Speakers (loopback) or Headphones (loopback).Note! If this doesn’t work, you may also need to select the correct number of recording channels to match your device using the dropdown box to the right of device selection box. For example, If you have a 7.1 channel headset, select 8.
References
- Audacity Tutorial: Recording Computer Playback on Windows, https://manual.audacityteam.org/man/tutorial_recording_computer_playback_on_windows.html
- https://www.howtogeek.com/217348/how-to-record-the-sound-coming-from-your-pc-even-without-stereo-mix/
Thursday, March 19, 2020
Windows 10 Network Subsystem
> netsh interface ipv4 show subinterfaces
# Restart an interface
> Restart-NetAdapter -Name "WLAN"
Tuesday, March 17, 2020
Slow Wireless Connection on Windows 10
This was limiting the wireless speed to 2Mb instead of 50Mb.
When I disabled it, the speed went back to 50Mb.
This prevents the SonicWall VPN client from working and you need to use an alternative one like a SSLVPN connection with the SonicWall NetExtender.
References
- https://forums.lenovo.com/t5/ThinkPad-P-and-W-Series-Mobile-Workstations/P51-Very-slow-wifi/m-p/4374392
The other tips...
Drivers
Update the Wi-Fi drivers.Updates
Windows Update -> Advance Options -> Delivery Optimization:Disable: Allow downloads from other PCs.
Reserved Bandwidth
By default, Windows reserves 20% of your bandwidth for Windows Update, system apps and other purposes, leaving you with 80% bandwidth of Internet connection. If you don’t use Windows Update on a daily basis and the reservation limit slows your Internet down, then you can remove the limit by setting the value to 0.Task Manager -> File -> Run new task: gpedit.msc (ad Administrator)
Under Computer Configuration, double-click on Administrative Templates > Network > QoS Packet Scheduler. Then double-click on Limit reservable bandwidth.
Click the Enabled option and set Bandwidth limit (%) value to 0. Then click Apply > OK.
Window Auto-Tuning
It's a feature in our Windows 10 to allow for more efficient data transfers. But it can also interfere with the network and cause loss of connectivity.From the Power Shell (Admin):
> netsh interface tcp show global
> netsh int tcp set global autotuninglevel=disabled
Disable Large Send Offload
Specific to Lenovo ThinkPad T490:
Device Manager -> Network Adapters:Uninstall Intel Proset Driver.
Monday, February 03, 2020
Stop Automatic Redirect From HTTP to HTTPS
Chrome
- Go to chrome://net-internals/#hsts. Enter the domain under Delete domain security policies and press the Delete button.
- Go to
chrome://settings/clearBrowserData, tick the box Cached images and files and press click the button Clear data.
Firefox
or
Go to Library -> History -> Show all history.
Right-click on an entry for the site and choose: Forget about this site.
References
- https://superuser.com/questions/565409/how-to-stop-an-automatic-redirect-from-http-to-https-in-chrome
- https://stackoverflow.com/questions/30532471/firefox-redirects-to-https
Thursday, October 10, 2019
Automatically Mount Partition on Fedora
Run gnome-disks:
> gnome-disks --gapplication-service
Select the partition and click on the Settings button.
Right-click and select: "Edit Mount Options..."
Configure at will. Remember to choose a "Display Name".
Reference
Running a Graphical Application as root on Fedora
First check you belong to the wheel group (you can invoke sudo).
Create a file with the following script in a file named, for example, wsudo:
#!/bin/bash
# -*- ENCODING: UTF-8 -*-
#small script to enable root access to x-windows system
xhost +SI:localuser:root
notify-send "ALERT: Enable root user on xhost"
beesu $1
#disable root access after application terminates
xhost -SI:localuser:root
#print access status
notify-send "Disable root user on xhost"
> export DISPLAY=:0.0
then run the graphical application like this:
> ~/bin/wsudo appname
You will be prompted for your password and you're done!
Friday, July 12, 2019
Windows 10: You Don't Have Permission to Access
What I did to solve this is:
- Select the drive and open the Properties -> Security tab.
- Go to Advanced.
- Change ownership to "Everyone"
- Absolutely remember to check: "Replace all child object permissions entries with inheritable permission entries from this object."
Monday, December 31, 2018
Thunderbird Displaying Weird Characters Instead of UTF
Go to Options -> Advanced -> Config Editor (Accept Risk!).
Then search for "mail.strictly_mine" and double click on it to change from false to true.
That worked for me on newly received messages. The old ones still do not display correctly.
Saturday, September 01, 2018
Disable Automatic Adaptative Brightness Control on Windows 10
You should also check that in the Advanced Power Settings -> Display -> Enable Adaptative Brightness is disabled.
Choosing a Power Plan kept this option enabled even with Enable Adaptative Brightness disabled.
Update. Sometimes this doesn't work. I found an additional setting to try:
Run regedit and go to:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Intel\Display\igfxcui\profiles\Media\Brighten Movie and Darken Movie.
Then set ProcAmpBrithness to 0 (mine was respectively 30.00 and -30.00).
I'll let you know if it works...
Tuesday, June 12, 2018
Eclipse XML file Syntax colors
Either open the file with (Open with...) the XML editor or change the color scheme for the default editor.
Tuesday, April 17, 2018
Reopen Last Closed Window in Firefox
With the latest versions, you can use: cltr-shift-n. This will reopen the last closed window.
Tested with Firefox 59.
Thanks to NB_FF.
Friday, October 06, 2017
Skype Status in the Windows 10 App
- Do not disturb
- Do not share my presence (Invisible)
Friday, September 15, 2017
Fedora 26: Configure Middle Button Emulation
What you can do to do that is enable the emulation mode (press at once the left and right buttons).
Check your device ID with:
> xinput list
Virtual core pointer id=2 [master pointer (3)][...]
Logitech USB-PS/2 Optical Mouse id=12 [slave pointer (2)]
then use to list its properties:
> xinput list-props 12
[...]
libinput Scroll Method Enabled (293): 0, 0, 0
then enable it:
> xinput set-prop 12 297 1
or better (change-proof):
>xinput set-prop "Logitech USB-PS/2 Optical Mouse" "libinput Middle Emulation Enabled" 1
If you want to make this permanent, add it to your .bashrc or similar or to the configuration in /etc/X11/xorg.conf.d.
References
Updated from: https://ask.fedoraproject.org/en/question/47238/configure-auto-copy-paste/
Monday, October 17, 2016
java.net.SocketException: Connection reset
Wednesday, June 01, 2016
Access Denied on Windows File on External Drive
This is no recipe but you can try this:
- Open: Properties -> Security -> Advanced
- Change Owner to Everyone. How to do that depends on the type of user you are.
- Now in the security tab, select Everyone on Group or User Names.
- The Edit button on change permissions should be enabled.
- Select Full Control and save.
Friday, May 13, 2016
Using Google as the Default Search Engine for Thunderbird
If you want to use Google you can do it installing an add-on:
- Open "Add-ons" from the "tools" menu;
- Search for "google"
- Install "Google Search for Thunderbird"and restart.
- Google should have been automatically selected as the default search engine now!
Thunderbird 45 Create New Message: default style is Paragraph instead of Body Text
If you want to go back to "Body Text":
Open the Options window, go to Composition -> General and uncheck: "When using paragraph format, the Enter key creates a new paragraph".
Which is kind of obscure since no one told Thunderbird to start using paragraph format in the first place.
But that does it, so...
Tuesday, May 10, 2016
Persist Custom putty Settings
- Change your settings.
- Click once on "Default Settings" under "Load, save or delete a stored session" (in the "Session" category) to select it.
- Click "Save."
Thanks to Chad P
Tuesday, May 03, 2016
putty: Access Denied
Try disabling this setting:
Putty has GSSAPI enabled by default.
Turn it off if you are not using Kerberos (and chances are, you are not in your environment).
Explanation:
I dealt with a few weeks back with when a new administrator could not login to any ssh host with putty - even the one that I know should be working for him. It seems that with GSSAPI Auth enabled, Putty will attempt to login with non-existent kerberos credentials, which resulted in an immediate Access Denied message.
[...]
Source: http://serverfault.com/questions/317781/putty-access-denied
Monday, February 15, 2016
Removing $Windows.~BT & $Windows.~WS Folders
- Run a DOS (cmd) console as administrator.
- Execute:
- takeown /F C:\$Windows.~BT\* /R /A
- icacls C:\$Windows.~BT\*.* /T /grant administrators:F
- rmdir /S /Q C:\$Windows.~BT\
Thanks to TheWindowsClub.
Monday, November 23, 2015
Mercurial Tips
- Trashcan - [from the docs] The shelve tool is very conservative with your source and patch files. Before it modifies any file it makes a backup under .hg/Trashcan. This trashcan can be emptied by running the purge dialog from the Workbench Repository –> Purge menu option.
Monday, October 19, 2015
You don't currently have permission to access this folder
I never understood the philosophy of Windows security, probably because I'm used to Linux. I don't want to understand it anyway unless it gets in my way.
What I tried successfully is:
- Open the folder's Properties.
- Go to Security and click Advanced.
- Change Owner: Enter the object name to select and do Check Names.
- Check Replace owner on subcontainer and objects.
- Ignore the Windows security warning.
- You're done!
Monday, October 05, 2015
Restoring Audio Service in Windows 10
Someone suggested to:
> net stop audiosrv
> net stop AudioEndpointBuilder
> net start audiosrv
> net start AudioEndpointBuilder
After 5 minutes I'm still trying to see if the first command will ever end.
I'll never find out. I finally had to reboot. I tried the put-it-to-sleep solution but it went into eternal sleep.
That's always been Windows' solution: "reboot without saving your changes"!
Tuesday, June 02, 2015
DokuWiki Hrun Alerts About Update even When Done
Apparently there is a bug.
In some places they explain you can manually remove the file: data/cache/messages.txt.
For me this doesn't work since the file is recreated right away.
What I did was to empty the file and leave it there and that worked.
... for a while. Now it's there again.
More info here if you want to try something.
Thursday, May 07, 2015
Take Ownership and Assign Permissions to Yourself on Windows
Try this:
# Recursively take ownership of directory:
> takeown /f "c:\path"
# Reset permissions recursively
> icacls "c:\path" /reset /T
Monday, March 30, 2015
Dell Laptop: Plugged In, Not Charging
Don't know exactly what prompted it but the battery would not charge above 64%, no matter how I changed the settings of the power saving mode.
Here's how I solved it:
- Power off
- Remove the battery
- Restart Windows
- Go to Control Panel -> Hardware and Sound -> Device Manager
- Under Batteries, remove all Microsoft AC Adapter and Microsoft ACPI-Compliant Control Method Battery
- Power off
- Put the battery back in place
- Restart Windows
Thanks to nickscomputerfix!
On the contrary, a good reason not to keep it charged at 100%:
The third tip relates to when and by how much batteries should be charged. One of the more widely known aspects about battery life is the “memory effect”.
In older rechargeable battery chemistries, such as nickel cadmium, partial charging and discharging significantly decreases the energy capacity.
What is less known is that the memory effect in lithium-ion batteries, if it exists, tends to be very small. Instead, they have quite nuanced characteristics. When not in use, batteries degrade most when fully charged. So if left for several days or weeks without use, they should ideally be kept at a relatively low charging state, e.g around 20% charged.
Conversely, when being charged and discharged a lot, it is best to keep the batteries as close to the 50% mark as possible. So if you are only charging and discharging batteries a bit at a time, it is much better to do this between 45-55% than between 90-100%.
Full article.
Thursday, February 05, 2015
Windows Taskbar Does Not Hide
Welcome to the Windows way of doing things!
There is probably a notification from some process, which you cannot easily spot.
The quick way to solve this: kill and restart the file explorer.
Go to the Task Manager --> Processes, and kill explorer.exe.
Then File --> New Task (Run) and type explorer.exe.
Done!
Monday, January 12, 2015
iReport 5.6.0 Failing Silently
If you want to keep JAVA_HOME set to a JDK 1.8 installation, you can run it launching a batch file with something like this inside:
@echo off
set JAVA_HOME=C:\opt\java\jre1.7.0_71
"C:\Program Files (x86)\Jaspersoft\iReport-5.6.0\bin\ireport.exe"
Customize as needed.
Friday, December 12, 2014
Removing commons-logging Dependency from Spring with Ivy
First you need to remove the dependency from spring-core:
[TODO]
In the unlikely event you are already not loading transitive dependencies:
<dependency org="org.springframework" name="spring-core" rev="3.2.8.RELEASE" transitive="false"/>
you need to to nothing.
Then add the following dependencies to specify the framework you want to use:
<dependency org="org.slf4j" name="jcl-over-slf4j" rev="1.7.7" transitive="false"/>
<dependency org="org.slf4j" name="slf4j-api" rev="1.7.7" transitive="false"/>
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.7.7" transitive="false"/>
Ant: Class not found: javac1.8
Upgrade!
Worked for me.
Thanks to Kristian.
Wednesday, December 10, 2014
Find out which applications are using port x on Windows
Find out which applications are using port x on Windows:
> netstat -aon | findstr 0.0:8080
Tuesday, August 19, 2014
Google Drive: Failed to Schedule 1 File for Upload
Thanks to bbell67.
Friday, June 27, 2014
Wireshark: The NPF driver isn't running
You run Wireshark occasionally and don't want to start the NPF driver automatically at start up.
Open a command shell with administrator rights and type:
> sc start npf
You can [stop] the service in the same way.
Run a Command as Administrator on Windows
On windows, if you log in as a user with administrator privileges but want to run a command shell with administrator's rights, you still need to run it in a special way:
- Go to the start bar search box
- Type cmd
- Right-click on cmd.exe and choose "Run as administrator"
Tuesday, June 10, 2014
Building with Ant from Eclipse: "Specified VM install not found"
Specified VM install not found: type Standard VM, name jdk1.7.0_55
Yeah, right, OK, but where do I update the JDK that's used by Ant??
Here:
Run -> External Tools -> External Tools Configurations -> JRE
Thanks to Michael Borgwardt
Monday, June 09, 2014
Windows Keeps Forgetting the Wi-Fi Connection Password
Try to disable it and go back to Windows managing the connections.
Once you're opened the Intel WiFi connection utility, choose: Advanced, then something like Let Windows Manage the WiFi Connections.
You're done.
Wednesday, May 07, 2014
Windows 7 Taskbar Icons Not Displaying Properly After Repair
- Open the task manager in the processes tab.
- Kill explorer.exe.
- From the File menu in the task manager, choose New task (run...)
- Execute the following:
- cmd /c del %userprofile%\AppData\Local\IconCache.db /a
- And restart explorer running:
- explorer.exe
Tested on Windows 7
Thanks to bhadri.
Sunday, April 27, 2014
Add a Program to the Send To Menu
- Open Windows explorer and type: shell:sendto in the text field.
- Create a link, ehm shortcut for the program you plan to add in some place (directory, desktop).
- Cut and paste it into the Windows explorer directory.
- You're done!
Thursday, April 24, 2014
Specified VM install not found: type Standard VM ...
You installed a new JDK, configured Eclipse to recognize it but the old one still pops up when you compile or do something else.
Try removing the following file:
Thanks to Mujahed
Monday, March 17, 2014
Mercurial: abort: uncommitted local changes
If you're using TortoiseHg Workbench: go to Repository --> Terminal.Otherwise simply open a console and cd to the root directory of your repository. Type: > hg update --clean -r tipThat should solve the problem.Thanks to Mike here.
Friday, February 21, 2014
Annoying Eclipse Validation Errors
The Maven build is running fine even from within Eclipse but the messages won't go away even if you:
- Right-click on the project --> Validate
- Project --> Clean
- Close and re-open it
If there was no real reason for them to show up because in the meantime you had removed the reason for them to exist, then they'll not be generated again.
Thanks to pelotom!
Friday, November 08, 2013
Nexus 7 Not Showing Up on Windows 7 After Upgrade to Android 4.3
It was working before the last firmware upgrade.
After the upgrade the device simply doesn't show up in the file explorer.
If you go to the list of devices, it's there.
If you remove the driver, Windows will simply reinstall it automatically.
If you choose "Upgrade driver" Windows will tell you you have the most recent version.
What worked is:
- Go to Settings --> Storage
- Open the menu on the top left corner and select USB computer connection
- Choose Media device
It should...
Thursday, October 24, 2013
Forgot to Change Mercurial's Commit Comment?
Monday, October 21, 2013
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
- Start
regedit - Navigate to the following path
HKEY_LOCAL_MACHINE\Software\JavaSoft
- Right click on the JavaSoft folder and click on
New->Key - Name the new Key
Prefs
Friday, June 07, 2013
Reduce a Video Size with ffmpeg
> ffmpeg -i input_video.mp4 -ab 56k -ar 22050 -b 300k -r 15 -s 640x360 output_video.flv
If the original size was greater and you have the time to keep it bigger, YouTube suggests a size of 1280x720 for better reproduction.
More info to come... in the meantime:
Read the man page for more information.
FFmpeg documentation.
Saturday, May 25, 2013
Configure Sun's Java Plugin for Firefox
- Install the JRE or JDK as RPM or in your favorite location;
- Open a shell and go to: ~/.mozilla
- 64-bit platform: create the link: ln -s /opt/java/jdk1.7/jre/lib/amd64/libnpjp2.so . (the dot stands for the current directory)
- 32-bit platform: search for the directory: i386.
Reference:
http://www.java.com/en/download/help/index_installing.xml
Monday, April 22, 2013
Set Sun's JDK as Default on Fedora 18
# java
> alternatives --install /usr/bin/java java /opt/java/jdk1.7.0_21/jre/bin/java 20000
# javaws
> alternatives --install /usr/bin/javaws javaws /opt/java/jdk1.7.0_21/jre/bin/javaws 20000
# Java Browser (Mozilla) Plugin 64-bit
> alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /opt/java/jdk1.7.0_21/jre/lib/amd64/libnpjp2.so 20000
# Install javac only if you installed JDK (Java Development Kit) package
> alternatives --install /usr/bin/javac javac /opt/java/jdk1.7.0_21/bin/javac 20000
> alternatives --install /usr/bin/jar jar /opt/java/jdk1.7.0_21/bin/jar 20000
and then set it as the default:
> alternatives --config java
> alternatives --config javac
Source.
Monday, April 15, 2013
Add Installed JDK to Eclipse
If the JDK is already installed with the Linux standard directory structure, you should instead specify one of the directories you can find in /lib/jvm.
Create an Eclipse Git Maven Java Project
- Make sure you installed a Git plugin like EGit.
- Click on File --> Import --> Git --> Projects from Git
- Then follow the instructions...
- Specify a URI for the repository source. This will end with a file.git.
- Select a branch.
- Local destination (<Git's_local_repository
>/<project_name >) - Select Import existing project.
- Select create Java project.
- Select Use custom location. This should be the local Git repository location.
- Mavenize it: right-click on the project's name --> Configure --> Convert to Maven project.
Friday, April 12, 2013
Export Java Syntax Coloring Preferences from Eclipse Juno
These are the color preferences you set from Window --> Preferences --> Java --> Editor --> Syntax Coloring.
Theoretically you should do a File --> Export --> General --> Preferences, select Java Code Style Preferences (I don't have a Syntax coloring item) and get them in your favorite file.epf
They should be included in those.
It doesn't work. But you can get them if you select export all.
I don't know if this is a bug or not...
Thursday, February 21, 2013
rpm Features
> rpm -q -filesbypkg -p package_name.rpm
Extract RPM package files to current directory:
> rpm2cpio package_name.rpm | cpio -idmv
Sunday, February 10, 2013
Create Maven Project in Eclipse from Existing pom.xml
For some reason you need to import it:
File --> Import --> Maven --> Existing Maven projects
Maybe I'm wrong but with Ant you could create a new Ant project from an existing build.xml...
Thursday, January 17, 2013
Open a File in a Google Chrome Tab
Linux
Just type file:/// in the address bar.
The last / is the root directory of the filesystem.
In Windows: file://c:
Thursday, January 10, 2013
Performance Degradation of Gnome 3
At the end it's a total stall with memory usage skyrocketing to 99% and the system blocked.
I thought it was Firefox, then Gnome then I noticed the gnome-shell process was at the top of the resource-consuming processes.
A simple restart of Gnome (Alt-F-r) fixed the problem for good.
I'll check how often I need to do this.
It could be something connected with this particular release of Fedora or a general one with this Gnome (3.4.x).
Update! Another source of load is Chrome. Try to restart it to see if you gain some memory space.
Friday, December 21, 2012
Gnome 3 Extension: System Monitor
Go to the extension page with your favorite browser.
Install and enable the extension turning the button in the top left corner on.
Don't forget to configure the icon position clicking on the configure button or you'll find the calendar icon squeezed on the right and unreadable.
Tuesday, December 04, 2012
Fedora 17 Microphone not Working
- Open your sound settings and check the proper device is enabled.
- If yes, run alsamixer, select the sound card and make sure that the internal microphone and capture are enabled and that both Mic Boost and Capture have high volumes.
- Run arecord -D "hw:1,0,0" -f cd -d 4 test-mic.wav. The wav file created should have sound in it.
Thursday, November 29, 2012
gnome-tweak-tool to change Gnome 3 Settings
You can modify the gnome settings using gnome-tweak-tool
E.g. The clock/date settings
If you want to show the date in the clock on the top bar:
- Launch the gnome-tweak-tool
- Go to the "Shell" menu
- Enable "Show date in clock"
Wednesday, November 28, 2012
Fedora 17: em1 Instead of eth0?
That's what you will find instead of eth0, eth1, etc.
To get back the old name go to: /etc/default/.
There you'll find the configuration file for the default Fedora boot loader, GRUB: grub
Add the following command (bold) to the line with the key GRUB_CMDLINE_LINUX:
GRUB_CMDLINE_LINUX="rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8 biosdevname=0 rhgb quiet"
Go to /boot/grub2, make a backup copy of grub.cfg and regenerate the GRUB configuration file:
> grub2-mkconfig -o grub.cfg
Reboot and eth0 will be back!
Hints here and there.
Saturday, October 27, 2012
Get Delete Command in Nautilus File Manager Menu
If you want to, at least, have the delete context menu (right click) item to be able to bypass the send-to-trash behavior in the Nautilus file manager, you need to:
- Go to Edit --> Preferences
- Behavior Tab
- Check the Include a delete command that bypasses trash
Friday, October 19, 2012
Upgrading BIOS on an Asus Motherboard
Luckily this motherboard supports upgrading from the BIOS itself.
The problem was I got this error once the image was selected on a disk partition (strangely enough the BIOS saw only one of the two disks):
It turned out the file should reside on a FAT32 partition while the one it was on was NTFS.
I put the new BIOS on a pen drive and the BIOS saw it, finally ending the story.
Side note: the error message was pretty useless, once again.
Thursday, July 19, 2012
Order of Annotated Controllers When Matching @RenderMapping and @ActionMapping
When you invoke a Render or Action mapping, it might happen the default mapping is picked up instead of the correct one.
This happens when the controller with the default mapping is first in the list.
DEBUG [http-8080-1] (AbstractMapBasedHandlerMapping.java:74) - Key [view] -> handler [{org.springframework.web.portlet.mvc.annotation.DefaultAnnotationHandlerMapping$RenderMappingPredicate@2e19e=my.package.controller.DefaultController@12a8bad, ...
It's probably a bug or I don't understand the purpose yet.
This can be fixed by forcing Spring to put the controller with the default mapping last. First you scan all others and separately the default one:
<context:component-scan base-package="it.italiangrid.liferay.doclibadmin.controller" use-default-filters="true">
<context:exclude-filter type="regex" expression="EmiDocumentController"/>
</context:component-scan>
<context:component-scan base-package="it.italiangrid.liferay.doclibadmin.controller" use-default-filters="true">
<context:include-filter type="regex" expression="EmiDocumentController"/>
</context:component-scan>
Update I found out that if you use @RequestMapping instead of @RenderMapping and @ActionMapping in all methods of the controller with the default action, the problem seems to disappear.
You can use render and action mapping annotations in all other controllers.
Thursday, July 12, 2012
Gnome 3: Add a Custom Item to Favorites
- Create a new one in Alacarte with New Item in an existing or new menu.
- Check the Show checkbox.
- Go to Activities --> Applications and right click on the icon to add to the Favorites side bar.
Tuesday, July 10, 2012
Fedora 17: Disable Jetty
If you have updated from Fedora 16 and you had jetty installed, it was
automatically enabled to start on reboot. If you are are not using jetty for
serving web content, but it was installed as a dependency, please run the
following command as root user:
# systemctl disable jetty.service
This will stop jetty from running automatically on system reboot. If you also
want to stop the currently running jetty you can run following:
# systemctl stop jetty.service
Friday, June 29, 2012
BASH's Ctrl-r
Usage: type the command and start entering what you're looking for. Once found you can...
Ctrl-r + ENTER = Execute.
Ctrl-r + left/right arrow = put it on the command line to edit.
Ctrl-r + Ctrl-r = Get an older command starting with the same characters typed.
Wednesday, June 13, 2012
Weird Things With Spring, Eclipse and Tomcat?
It's not Spring's or Eclipse's or your sister's fault.
Check you inadvertently didn't start another instance of Tomcat.
That's what happened to me! And I don't have sisters to blame!
Thursday, June 07, 2012
hibernate3:hbm2ddl - Could not determine type for: java.util.List
@ElementCollection(targetClass = DocArea.class)
@CollectionTable(name = "area_doc",
joinColumns = @JoinColumn(name = "id_doc"))
@Column(name = "id_area")
public List
return areas;
}
where Area is an enumeration.
It was a version incompatibility between the hibernate3 plugin and Hibernate itself. I found out you can override a plugin's dependencies in the configuration of the plugin itself thanks to Ivar's post.
Thursday, May 17, 2012
Firefox 12 Way Too Slow on Fedora 16
Now, when I have time I need to test if they're working because in the meantime I switched to Chrome despite my lifelong appreciation for the Fox. This is to tell you how unusable it has become.
Monday, May 14, 2012
No Cascade Delete on a Collection Relationship
I wanted to propagate all persistence operations to the collection except DELETE. I didn't want an Answer to be deleted when all UserAnswers were removed.
This is how it worked for me:
@ManyToMany(targetEntity=Answer.class, cascade={CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH})
@Cascade(org.hibernate.annotations.CascadeType.SAVE_UPDATE)
@JoinTable(name="userAnswer_answers",
joinColumns=@JoinColumn(name="userAnswer_fk"),
inverseJoinColumns=@JoinColumn(name="answer_fk"))
@Sort(type = SortType.COMPARATOR, comparator = AnswerPositionComparator.class)
public SortedSet
return selectedAnswers;
}
Friday, May 11, 2012
Eclipse Code Templates
Go to Window --> Properties --> Java --> Code Styles --> Code Templates.
You can customize comments and code components in this way at Eclipse level or project level.
Monday, January 30, 2012
hbm2ddl SchemaExport: You have an error in your SQL syntax near type=InnoDB
I used to create my MySQL DBs with ant and everything was working. Now, moving to maven and hbm2ddl I get this error.
After some searching it comes out that it's a problem of incompatibility between the MySQL Java connector (5.1) and the MySQL version (5.5) where type InnoDB was dropped and replaced with engine.
The solution is to change the MySQL dialect from org.hibernate.dialect.MySQLInnoDBDialect to org.hibernate.dialect.MySQL5InnoDBDialect.
Places where this generally occurs are hibernate.cfg.xml and hibernate.properties.
Tested on MySQL 5.5.22
Wednesday, November 09, 2011
Maven + Subversion Enabled Eclipse Java Project
What I want for my Eclipse projects is to be Java projects, allow content revisions with Subversion and be managed by Maven.
This is what I need to do.
Eclipse version: Eclipse Juno
Subversion plugin: Subversive
Maven plugin: m2eclipse (m2e)
Support for Subversion and Maven is now integrated into Eclipse.
- Choose Help --> Install new software --> Work with: Juno - http://download.eclipse.org/releases/juno.
- Expand collaboration and check the m2eclipse and Subversive packages. Install all required components.
- Add the Polarion update site: http://community.polarion.com/projects/subversive/download/eclipse/2.0/juno-site/ (see step 1 for details) and install the Subversive SVN Connectors and a connector of your choice (I use SVNKit 1.7.4)
- Create a new project (Checkout Maven projects from SCM). Choose svn as SCM URL and type the URL. If svn does not appear in the list, check the global configuration under Window --> Preferences --> Team --> SVN --> SVN Connector. The connector you just installed must appear on that list.
- Once the project has been created, you might have a Java-Maven project only. If that's the case, to connect it to the SVN repository, right click on the project's name, choose Team --> Share --> SVN and follow the instructions to conncet your project to the SVN source.
You can further configure Maven under Window --> Preferences --> Maven. In particular you can add an external Maven installation and change the location of the repository which defaults to the user's personal repository and not the global one.
Monday, October 24, 2011
Liferay: Error Registering Portlets
08:48:56,725 ERROR [HotDeployUtil:112] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for MyPortlet
It seemd like the portlet was somehow still in the page for Liferay and the message saying the portlet needed to be removed from the page did not show any buttons to do that. After a while I didn't have the message anymore but only an error page.
Some googling brought me on a page in the Liferay forum where they suggested to remove the portlet-api-2.0.jar from the lib/ directory of the WAR and redeploy it:
> zip -d MyPortlet.war /WEB-INF/lib/portlet-api-2.0.jar
It actually worked. Don't ask me why.
Monday, August 08, 2011
Batch Resize on Linux
Now you can use mogrify.
Example: to resize to half the original size all the JPGs in a directory (keeping the aspect ratio of course):
> mogrify -resize 50% *.jpg
More here.
Eclipse Startup - Crash on Fedora 15
What you need to do is tell Eclipse to use Sun's JDK.
Open the eclipse.ini and add the path to the Java executable:
-vm
/opt/java/jdk1.6.0/bin/java
right before the -vmargs option.
More here.
[UPDATE] - Oh, the reason for the crash is not openJDK. It's a bug in Fedora. To circumvent it do the following:
- In Gnome3 the webkit library name changed to libwebkitgtk so you need to create one missing symbolic link: ln -s /usr/lib/libwebkitgtk-1.0.so.0 /usr/lib/libwebkit-1.0.so.2
- Add -Dorg.eclipse.swt.browser.UseWebKitGTK=true to the -vmargs options in eclipse.ini




