adding tk-8.6.8 package for cygwin - cygwin

I install and run PWgui-6.2 in cygwin, and get this message
"couldn't load file "/usr/bin/tk86.dll": No such file or directory
while executing
"load /usr/bin/tk86.dll Tk"
("package ifneeded Tk 8.6.8" script)".
I guess the package tk-8.6.8 is lacked in cygwin so I try to add this package. However I can't find out this package from repository.
Could you help me to solve this problem?

The answer is here: Cannot launch git gui using cygwin on windows, and this is essentially a duplicate question. The problem is that
gitk and git gui require X11 in Cygwin.
Solution
Install some of the Cygwin X11 packages:
Run the Cygwin installer again.
Install "xinit" under the X11 category, accepting all the dependencies.
(Windows Start menu should now include: Cygwin-X)
Start menu > run XWin Server
In Cygwin shell, run
export DISPLAY=:0.0
At this point I got "Authorization required, but no authorization protocol specified", so to fix that set
enable_xauth=0 in \bin\startxwin
(Note:)
Will need to run XWin Server every time you reboot, and set export DISPLAY=:0.0 every time you open a new Cygwin shell. (Run echo "export DISPLAY=:0.0" >>~/.profile to have it run automatically whenever a new shell is started).
If you get couldn't connect to display ":0.0", mouse over the X that should be in Windows taskbar tray, the pop-up should say something like Cygwin/X Server:1.0. Use that ":1.0" (or similar) instead as the value for export DISPLAY.

Install windows Git.
Uninstall git from cygwin repo.
Set the environment Path for Git "C:\Program Files\Git\cmd" and move it above C:\cygwin64\bin

Related

How can I run Gitk on WSL 2?

How can I run Gitk on WSL 2?
I already installed Gitk in WSL 2.
After I installed Gitk, I tried to run it but it failed with below error log:
application-specific initialization failed: no display name and no $DISPLAY environment variable
Error in startup script: no display name and no $DISPLAY environment variable
while executing
"load /usr/lib/x86_64-linux-gnu/libtk8.6.so Tk"
("package ifneeded Tk 8.6.8" script)
invoked from within
"package require Tk"
(file "/usr/bin/gitk" line 10)
Could you help me how can run Gitk on WSL 2?
You can install and run gitk straight from ubuntu terminal on Windows 11, using apt install.
I've just followed the steps from the following post and it worked:
https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps
I had to update not only the graphic driver but also the WSL.
Now, I can use either gitk or any linux app on Windows 11.
If git is installed on windows, you can find the gitk.exe by typing the following command to windows cmd:
where gitk
you can reach this folder from your wsl by changing the path e.g. from
C:\Git\cmd\gitk.exe
to
/mnt/c/Git/cmd/gitk.exe
and by typing this path to the terminal of your linux distribution, gitk can be opened.
UPDATE:
If you want to open gitk by typing it, you can add the path to ~/.bashrc with the following command (needed only once):
echo 'alias gitk="/mnt/c/Git/cmd/gitk.exe"' >> ~/.bashrc
And after that you can open gitk like:
gitk

How can I launch gitahed from terminal?

I enjoy using gitahed, and I would like to add a shortcut to lauch it, with github desktop I use github-desktop, but I can do the same with GA?
How can I launch gitahed from terminal?
GitAhead has a Terminal panel at Tools->Options. It has a button to install command line tools. It really just creates a symlink to the GitAhead binary in /usr/local/bin. If that doesn't work for some reason, you can create the symlink yourself or an alias. See command line options by running with the --help flag. There are only a few at the moment.

How to run Qtcreator from terminal in Ubuntu?

Hi I have QtInstalled with the official qt installer (I haven't used the package with the name "qtcreator").
I need to run QtCreator from terminal but I can't locate the executable.
I'm using Ubuntu 16.04.
Probably you can find the executable in opt directory the location will be as this /opt/Qt/Tools/QtCreator/bin and you can run it through terminal as ./qtcreator
Latest QtCreator should by default be installed in
${HOME}/Qt/Tools/QtCreator/bin/
And you have two start-up options, the executable qtcreator or the shell script qtcreator.sh
To run the executable, type
~/Qt/Tools/QtCreator/bin/qtcreator
To run the shell script, type
~/Qt/Tools/QtCreator/bin/qtcreator.sh
Whic one to use: From the top portion of qtcreator.sh, it states that if you have library name conflicts (such as having same library names used by qtcreator with your own LD_LIBRARY_PATH), you may want to start with the shell script, rather than the bare executable.
Windows linux subsystem users
In case you have ubuntu as a subsystem for win10, it's located in your AppData folder (installing with sudo apt install command):
Also, you cannot run qtcreator from terminal as graphical interface is not supported by defeault. You need to instal X-server app first (https://sourceforge.net/projects/xming/) and then you can run QT from terminal.
C:\Users\[YOUR_USERNAME]\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\usr\share\qtcreator
Or, it's in usr/lintian/overrides
But you should not modify anything inside this linux root, as it may lead to data loss.
For me it wasn't in the /opt directory, but rather the location I've chosen in the /home/user/ directory.
More specifically: /home/user/Qt5.12.1/Tools/QtCreator/bin/qtcreator

Trouble using QSerialport in Ubuntu

I made a full application in QT creator on my mac (tested and working) and now need to move the source code to my Ubuntu machine and recompile it in QT creator in ubuntu.
This problem is as soon as the project opens I get this error in the "general messages" log
Project ERROR: Unknown module(s) in QT: serialport
So I assumed that QSerialport isn't included in the ubuntu release of QT creator.
I tried to get it myself using these terminal commands I got from a tutorial for installing QSerialport (I don't know linux at all and this is my first time using it).
git clone git://code.qt.io/qt/qtserialport.git
cd qtserialport
git checkout qt5.x.y
This is where i get stuck. I have tried substituting 'x' and 'y' for every number and its returns that no such file can be found.
Have I made some simple mistake? Has anyone out there had to do this?
Try this for your self:
git clone git://code.qt.io/qt/qtserialport.git
mkdir qtserialport-build
cd qtserialport-build
qmake ../qtserialport/qtserialport.pro
sudo make install
Listed in the Ubuntu package repo is the libqt5serialport package, so it should be available but you may need to install the package manually: http://packages.ubuntu.com/trusty/libqt5serialport5
Found the solution:
If anyone else has this problem open "Maintain QT" (which can be found in the installation folder). Select "Add or remove components". In the version of QT you have installed there is a sub-heading called "Source components" and within the "Add ons" category you need to select Qserialport". Then just hit next and install.
Everything worked fine after this.

Package installed by Nix not in Mate desktop menu

I have used Nix package manager to install Abiword in a Slackware/Salix install with Mate desktop. The application runs fine but it has not appeared in the main Menu. Is this usual for applications installed by Nix?
I got this working on openSUSE plasma-desktop by adding the following to my bashrc
export XDG_DATA_DIRS=~/.local/share/:~/.nix-profile/share:/usr/share
cp -f ~/.nix-profile/share/applications/*.desktop ~/.local/share/applications/
Then logging out or running kbuildsycoca4 rebuilds the start menu.
When I only set the XDG_DATA_DIRS, the icons would appear in the start menu. However kdelibs is trying to make those .desktop files executable and add a xdg-open shebang to them, which does not work since .nix-profile is not writeable.
Thus it was also necessary to copy the desktop files to a ~/.local/share/applications/, which however also needs the XDG_DATA_DIRS set to ~/.nix-profile, because the application icons still reside there.

Resources