Giter Club home page Giter Club logo

Comments (87)

Swordfish90 avatar Swordfish90 commented on May 12, 2024

Sadly I don't have a Mac and nor any knowledge related to Homebrew... Anyhow did anyone tried if this is is working on OSX?

from cool-retro-term.

benmoss avatar benmoss commented on May 12, 2024

I tried and got an error relating to KDE, I didn't delve into installing KDE on OSX.

file:///Users/moss/code/cool-old-term/app/main.qml:26 module "org.kde.konsole" is not installed

from cool-retro-term.

jpmhouston avatar jpmhouston commented on May 12, 2024

I believe this is inappropriate for homebrew. For OSX, the correct thing would be to package as an app, not as a command-line executable in /usr/local/
https://github.com/Homebrew/homebrew/wiki/Acceptable-Formulae

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

This software has absolutely no dependencies with KDE and the Konsole plugin is self contained.
The error you see happens because qmlscene can't locate the plugin. This could be caused by a build error (please paste the output of qmake && make && make install) or by a problem with the path.

I will leave this thread open if we have any news on cool-old-term on OSX. The problem of packaging it will be relevant only afterward.

from cool-retro-term.

tovbinm avatar tovbinm commented on May 12, 2024

I guess it's better to make a dmg instead, since installing qt and xcode on the machine will eat up to 10gb. A weekend project?! ;)

from cool-retro-term.

razum2um avatar razum2um commented on May 12, 2024

the project isn't compiled currently on macos 10.9 qt 5.3.1
see make log: https://gist.github.com/razum2um/0d40e89f3eddb2a5c8b5

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

Hello, I am having the same errors as razum2um. Can anyone help please? :(

from cool-retro-term.

 avatar commented on May 12, 2024

when I compile it I get the exact same errors as razum2um
http://dpaste.com/15Y2F3X
I might try to get this working on the weekend if i can find the time to do so.

from cool-retro-term.

ways avatar ways commented on May 12, 2024

Mac users can look at http://www.secretgeometry.com/apps/cathode/ while they wait. =)

from cool-retro-term.

 avatar commented on May 12, 2024

nice find ways.

from cool-retro-term.

AYastrebov avatar AYastrebov commented on May 12, 2024

The same issues on OS X
OS X 10.9.4, Qt 5.3.1

https://gist.github.com/AYastrebov/70e015ff49a5165fcfeb

from cool-retro-term.

haakonnessjoen avatar haakonnessjoen commented on May 12, 2024

One of the problems is that setutent() is not supported on BSD platforms, such as OS X. So one must manually open _PATH_UTMP etc. instead of using setutent(), if I don't recall wrong.

from cool-retro-term.

haakonnessjoen avatar haakonnessjoen commented on May 12, 2024

Look at the getutent()/setutent() routines in this file for example: http://ftp.ics.uci.edu/pub/centos0/ics-custom-build/BUILD/rsyslog-3.19.8/tools/omusrmsg.c

from cool-retro-term.

guitorri avatar guitorri commented on May 12, 2024

Can the missing functions be added for compatibility? It seems to have worked for this project: https://trac.osgeo.org/qgis/ticket/2021

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

OK, I followed guitorri suggestion and I was able to compile everything. However, I could not pass through linking phase. I get the following error:
Undefined symbols for architecture x86_64:
"KTerminalDisplay::banana(int, int, int, int)", referenced from:
KTerminalDisplay::qt_static_metacall(QObject_, QMetaObject::Call, int, void_*) in moc_TerminalDisplay.o

Indeed, I can see there's the declaration of the method called "banana" (What the hell is that btw??)
in file TerminalDisplay.h, although it is NOT implemented anywhere in TerminalDisplay.cpp. I wonder how this worked fine when I compiled this same application on Linux Mint. Does anyone have any ideas?

Actually, I know this is wrong but I did the following workaround: I simply put a dummy method banana in TerminalDisplay.cpp. Compiled again and it created the executable. The result is the file I attached. The terminal is all blurry, I can't read anything from it... Hope this helped you guys understand a little bit better what is missing.

screen shot 2014-07-31 at 11 38 36 am

from cool-retro-term.

guitorri avatar guitorri commented on May 12, 2024

Nice @aacalfa !
Can you share the changes you did so far?

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

Ahahah... When I experiment I sometimes use names of fruits that's definitely my bad!... It is really strange that this doesn't appear among the warnings in linux. Will fix that!

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

Anyway what you see is a huge progress. The blurriness is due to the fact that the main terminal is not drawn, but only the bloom effect. This means that the terminal itself works so maybe the c++ side is fine but there is a problem with one of the shaders. Can you post the output of the application?

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

Here are my changes: aacalfa@c612a1d

The output is this: Using an unsupported variable-width font in the terminal. This may produce display errors.
loadAllColorSchemes
Using an unsupported variable-width font in the terminal. This may produce display errors.
qml: Loading settings: {"fontIndexes":[0,2,0],"fontScalingIndexes":[5,1,1],"fps":0,"frameReflections":true,"show_terminal_size":true,"window_scaling":1}{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.5,"brightness":0.5,"brightness_flickering":0.2,"contrast":0.85,"fontIndex":2,"font_color":"#2fff91","frames_index":1,"glowing_line_strength":0.22,"horizontal_sincronization":0.08,"jitter":0.1,"motion_blur":0.65,"noise_strength":0.08,"rasterization":1,"screen_distortion":0.18,"windowOpacity":1}
QOpenGLFramebufferObject: Unsupported framebuffer format.
QOpenGLFramebufferObject: Framebuffer incomplete, missing attachment.
QOpenGLFramebufferObject: Unsupported framebuffer format.
QOpenGLFramebufferObject: Framebuffer incomplete, missing attachment.
QOpenGLFramebufferObject: Unsupported framebuffer format.
QOpenGLFramebufferObject: Framebuffer incomplete, missing attachment.

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

Ok good... Sadly I have no time right now. But open the file PreprocessedTerminal.qml and comment all the lines: format: ShaderEffectSource.Alpha (there should be three of them).

from cool-retro-term.

guitorri avatar guitorri commented on May 12, 2024

It might be necessary to wrap the compatibility functions to avoid redefinition errors.
Something like:

#if defined(__APPLE__)
  [compatibility functions]
#endif 

I'm getting Qt5 to see if I can help further...

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

IT WORKED! Thanks Swordfish90. I just commented those 3 lines and here's the result!!

I also pushed it to my version: d063e88

screen shot 2014-07-31 at 12 13 43 pm

from cool-retro-term.

guitorri avatar guitorri commented on May 12, 2024

Soooo coool! Can't wait to build it. Nice job @aacalfa ! 👍

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

Thank you very much for your contribution @aacalfa ... In just a day we have a working version for OSX. Awesome! When you are done please make a pull request (without the workaround, this issue seems more hardware/opengl related, so it needs a proper fix) and I will happily integrate that.
Thanks again.

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

No problem @Swordifish90 , I am really happy that I could help you with that! I don't really get what you mean though. Without which workaround? I'll list everything I did:
1 - Modified kpty.cpp, by putting the implementations of utmp.h functions.
2 - Created a dummy banana method to get through linking.
3 - Commented the 3 ShaderEffectSource.Alpha occurrences in PreprocessedTerminal.qml

Which workarounds do you mean?

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024
  1. This is awesome.
  2. This shows I'm an idiot, so leave it! :D I will clean it later.
  3. This is the workaround I was talking about. It is basically an optimization that saves a decent amount of GPU memory, but It is not compatible with some opengl implementations. So I need to find a way to set it depending on the hardware.

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

Done :)

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

Oh btw I see only one bug so far.As you can see from the last picture I uploaded, the terminal is not printing my current directory, it always print bash3.2$
What could it be?

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

The patch @aacalfa is now online in the osx branch: https://github.com/Swordifish90/cool-old-term/tree/osx . Please test it and let me know if it's safe to merge it in master. Thank you again @aacalfa and all the others.

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

@aacalfa No Idea why they behave differently. Will check that maybe next week.

from cool-retro-term.

e1senh0rn avatar e1senh0rn commented on May 12, 2024

Makefile within konsole-qml-plugin folder is created on linux box, and compilation fails:

cd konsole-qml-plugin/ && ( test -e Makefile || /usr/local/opt/qt5/bin/qmake /Users/eisenhorn/Projects/tmp/cool-old-term/konsole-qml-plugin/konsole-qml-plugin.pro -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile
/usr/lib/x86_64-linux-gnu/qt5/bin/qmake -o Makefile konsole-qml-plugin.pro
make[1]: /usr/lib/x86_64-linux-gnu/qt5/bin/qmake: No such file or directory
make[1]: *** [Makefile] Error 1
make: *** [sub-konsole-qml-plugin-make_first-ordered] Error 2

Should it be removed?

With that Makefile removed compilation still fails: https://gist.github.com/e1senh0rn/fc3bb3a3277bb6b29cc2

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

@e1senh0rn by running qmake it will generate the proper Makefile, so that you may run make and then make install. Did you follow the directions from Readme and put your qmake executable in $PATH? The command you wrote lists 2 different qmake paths, /usr/local/opt/qt5/bin/qmake and /usr/lib/x86_64-linux-gnu/qt5/bin/qmake. I believe there's something wrong there.

from cool-retro-term.

e1senh0rn avatar e1senh0rn commented on May 12, 2024

This is what I am saying. There is linux-generated Makefile in the repo.

~/Projects/tmp  (ruby-2.1.2)» export PATH=/usr/local/opt/qt5/bin:$PATH
~/Projects/tmp  (ruby-2.1.2)» export LDFLAGS="-L/usr/local/opt/qt5/lib"
~/Projects/tmp  (ruby-2.1.2)» export CPPFLAGS="-I/usr/local/opt/qt5/include"
~/Projects/tmp  (ruby-2.1.2)» git clone [email protected]:Swordifish90/cool-old-term.git
Cloning into 'cool-old-term'...
remote: Counting objects: 1472, done.
remote: Compressing objects: 100% (508/508), done.
remote: Total 1472 (delta 966), reused 1424 (delta 918)
Receiving objects: 100% (1472/1472), 12.74 MiB | 893.00 KiB/s, done.
Resolving deltas: 100% (966/966), done.
Checking connectivity... done.
~/Projects/tmp  (ruby-2.1.2)» cd cool-old-term
~/Projects/tmp/cool-old-term git:(master) (ruby-2.1.2)» git checkout osx
Branch osx set up to track remote branch osx from origin.
Switched to a new branch 'osx'
~/Projects/tmp/cool-old-term git:(osx) (ruby-2.1.2)» ls -l konsole-qml-plugin/Makefile
-rw-r--r--  1 eisenhorn  staff  237935 Aug  1 12:23 konsole-qml-plugin/Makefile
~/Projects/tmp/cool-old-term git:(osx) (ruby-2.1.2)» qmake
Info: creating stash file /Users/eisenhorn/Projects/tmp/cool-old-term/.qmake.stash
~/Projects/tmp/cool-old-term git:(osx) (ruby-2.1.2)» make
cd konsole-qml-plugin/ && ( test -e Makefile || /usr/local/opt/qt5/bin/qmake /Users/eisenhorn/Projects/tmp/cool-old-term/konsole-qml-plugin/konsole-qml-plugin.pro -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile
/usr/lib/x86_64-linux-gnu/qt5/bin/qmake -o Makefile konsole-qml-plugin.pro
make[1]: /usr/lib/x86_64-linux-gnu/qt5/bin/qmake: No such file or directory
make[1]: *** [Makefile] Error 1
make: *** [sub-konsole-qml-plugin-make_first-ordered] Error 2

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

Ok I guess you should disregard this Makefile that came with the checkout. The errors you got when you created the Makefile yourself and built are kinda odd. Do you have OS X 10.9 and Xcode command line tools installed? All the errors you got when compiling utmpmac.cpp mean that your build had not included the following headers:
#include <cstdio> #include <cstdlib> #include <cstring> #include <unistd.h> #include <limits.h> #include <fcntl.h> #include <sys/stat.h>
When I first created utmpmac.cpp, I had the same errors as you did, so I started including these files and the errors started to disappear. Can you verify that you indeed have those headers and that they were correctly included in your build?

from cool-retro-term.

e1senh0rn avatar e1senh0rn commented on May 12, 2024

Yes, I have headers you did mention.
I tried to include them into "utmpmac.h", and got past that error. Sadly, there is another one: https://gist.github.com/e1senh0rn/812d01bdddd41a2939ec

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

Hmm actually it is probably a better idea to put them in utmpmac.h file. I don't understand why your build procedure tried to access a file called app.pro. I don't have it here... Can you see anything suspicious in your Makefile?

from cool-retro-term.

e1senh0rn avatar e1senh0rn commented on May 12, 2024

I believe it is because of what is specified within cool-old-term.pro in SUBDIRS variable. From what I see in qmake description,

SUBDIRS
Creates a Makefile containing rules for the subdirectories specified using the SUBDIRS variable. Each subdirectory must contain its own project file.

So even make clean tries to use app/app.pro. Removing app directory from there allowed it to successfully finish build.

Still, after building I cannot run it:

~/Projects/tmp/cool-old-term git:(osx*) (ruby-2.1.2)» ./cool-old-term
file:///Users/eisenhorn/Projects/tmp/cool-old-term/app/main.qml:26 module "org.kde.konsole" is not installed

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

I don't think you should do that. It was actually not a successful build.

@benmoss I tried and got an error relating to KDE, I didn't delve into installing KDE on OSX.
file:///Users/moss/code/cool-old-term/app/main.qml:26 module "org.kde.konsole" is not installed

@Swordifish90 This software has absolutely no dependencies with KDE and the Konsole plugin is self contained.
The error you see happens because qmlscene can't locate the plugin. This could be caused by a build error (please paste the output of qmake && make && make install) or by a problem with the path.

I'm really sorry but my knowledge on Qt stuff is very limited. Hope someone can help you right away 👍

from cool-retro-term.

e1senh0rn avatar e1senh0rn commented on May 12, 2024

I'll keep digging. Thank you!

from cool-retro-term.

e1senh0rn avatar e1senh0rn commented on May 12, 2024

Ok, silly me - I didn't execute make install, so there was no imports dir. It works and looks awesome! I'll send all the corrections in a PR later today.

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

haha great to know! Well done :)

from cool-retro-term.

guitorri avatar guitorri commented on May 12, 2024

@aacalfa thanks for the hint. Adding the headers allowed the compilation. Nice :)

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

Hi everyone, the last pull request has been merged in branch osx. I tried it on linux and as expected there were no problems. So let me know if we are ready to merge it back to master. If so please also update the README with the instruction on how to build it for OSX (if there is anything specific), and maybe share a video to let me know how it looks under OSX, I'm curious :D . Thank you again to all the people helping with this!

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

@Swordifish90 It worked fine here, no adjustments necessary. I just would like to know if anyone else who managed to run it on OS X is getting the same bug as me by the terminal not showing my current directory, just "bash". I made a video https://www.youtube.com/watch?v=xcaGkmhcwL4 :)

from cool-retro-term.

zathey avatar zathey commented on May 12, 2024

Run this command.

login -f [user]

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

@zathey nice! That did the trick. Anyway, before I type this command, if I type "whoami", it already shows correctly my username, so I am already logged in right? Still, this behavior doesn't make much sense...

from cool-retro-term.

zathey avatar zathey commented on May 12, 2024

The login command configures the environment. You will get a similar result when running sudo bash vs. sudo login -f root in Terminal.

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

Hmm I understand. But my point is that I also installed cool-old-term on Linux Mint and I don't need to do that. Maybe the implementation of utmp functions I introduced to osx branch are kinda buggy?

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

@aacalfa thank you for the video. It definitely looks nice!... Why are there no decorations on the main window? Is that something you set or is it the default look?

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

@Swordifish90 you mean the menu items "File", "Edit" and "View" at the top? They appear at the upper bar in OS X, that's common for any application.

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

@aacalfa no, I meant the top bar that is used to drag the application. The one with the close, maximize and minimize button to be clear. I can actually see only the content.

from cool-retro-term.

zathey avatar zathey commented on May 12, 2024

I do not get a top bar on the qmlscene window and the window is not draggable.

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

Ok. I don't know how QtQuick behaves under OSX but I think this is a problem we need to investigate. Do you see any error message qmlscene prints?

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

same problem with me actually. I usually work with fullscreen so I didn't really notice this, but I can't drag the window. The only message I get is "Using an unsupported variable-width font in the terminal. This may produce display errors."

from cool-retro-term.

guitorri avatar guitorri commented on May 12, 2024

Concerning the utmp functions. They have deprecation warnings written all over the OSX headers. There is a bunch of redefinitions to use utmpx. Same goes for ktpy.[h,c]. Just mentioning in case it comes back...

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

I don't know why on OSX behave differently (bash instead of path and username), but I would not be so sure it depends on those utmp functions.

With respect to missing title bar please try to play with the flags in app/main.qml.

Replace the line "flags: Qt.WA_TranslucentBackground" with other combinations such as:
flags: Qt.WA_TranslucentBackground | Qt.Window | Qt.WindowMinMaxButtonsHint | Qt.WindowFullscreenButtonHint | Qt.WindowCloseButtonHint

All the other possible flags are available here: http://qt-project.org/doc/qt-5/qt.html#WindowFlags-typedef
If that doesn't work try removing Qt.WA_TranslucentBackground and the line: "color: "#00000000".

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

I tried a lot of combinations and none of them worked. I ended up managing to put the window decoration though. You just need to comment the "flags:" (you don't need to comment "color"). Here's the result:
screen shot 2014-08-04 at 10 51 10 am

from cool-retro-term.

LinusU avatar LinusU commented on May 12, 2024

Qt currently has a lot of problems on OS X 10.10 (developer preview) so I don't think it would build there. Could anyone upload the built binary? It would be really cool to test this out.

It would also be great if we could use appdmg (https://github.com/LinusU/node-appdmg) to automatically build a .dmg directly from make. If someone who's good with graphics could make a "Drag to Applications to install" background for the image that would be awesome.

from cool-retro-term.

guitorri avatar guitorri commented on May 12, 2024

@LinusU does appdmg handle the bundling and copying of Qt libraries? Otherwise macdeployqt which is already included on Qt should be the first alternative, IMHO.

from cool-retro-term.

LinusU avatar LinusU commented on May 12, 2024

No, all it does is creating a .dmg image around a .app file. I thought that macdeployqt was used to get the .app file (which really is a folder) and after that appdmg can be used to create the dmg. If macdeployqt does everything then that sounds like the best solution.

from cool-retro-term.

guitorri avatar guitorri commented on May 12, 2024

Yes macdeployqt has a -dmg option. I don't know how nice the generated .dmg looks compared to appdmg. The thing is that macdeployqt is not yet in use. The first thing is to create the Mac bundle and copy/deploy all the needed frameworks in there. Now there is just a bunch of .qml files. I am not yet familiar with Qt5 and QML... Someone?

from cool-retro-term.

 avatar commented on May 12, 2024

hmm I built mine on 10.10 DP4

from cool-retro-term.

LinusU avatar LinusU commented on May 12, 2024

@vs37nx Where did you get qmake from? Did you maybe install QT thru homebrew before updating to 10.10?

from cool-retro-term.

 avatar commented on May 12, 2024

yeah I did

from cool-retro-term.

keynslug avatar keynslug commented on May 12, 2024

It seems that utmpx family of functions are available on Mac OS X. That's the first thing I have tried when started to build the project being incapable of handling my curiosity.

Turning on -DHAVE_UTMPX, turning off -DHAVE_UPDWTMPX in the autogenerated Makefile and replacing occasional accesses to a ut_name with ut_user in the kpty.cpp were enough for me to make it work great, well if I could make such point yet considering my only 16 and counting minutes of overwhelming ecstasy.

from cool-retro-term.

LinusU avatar LinusU commented on May 12, 2024

qt5 seems to be working on 10.10 now, hurray! I couldn't get the actual app to build though.

I used the latest commit from @aacalfa's repository. @vs37nx which patches did you use to work around the utmp related problems?

from cool-retro-term.

LinusU avatar LinusU commented on May 12, 2024

Scratch that, got it working! 🎆

  1. brew install qt5
  2. PATH=/usr/local/opt/qt5/bin:$PATH

.

  1. Cloned this repo
  2. qmake
  3. Turning on -DHAVE_UTMPX, turning off -DHAVE_UPDWTMPX in the auto generated Makefile.
  4. Replacing occasional accesses to a ut_name with ut_user in the kpty.cpp
  5. Insert void KTerminalDisplay::banana(int x, int y, int z, int w) in src/TerminalDisplay.cpp

main.qml:26 module "org.kde.konsole" is not installed is fixed by running make install inside konsole-qml-plugin.

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

@aacalfa I think that simply commenting flags won't be a good solution. Transparency should not work anymore (surely not under linux).

Edit: I was wrong. Transparency works under linux even without flags. I think we are lucky enough and the solution is really to remove that line :D .

from cool-retro-term.

aacalfa avatar aacalfa commented on May 12, 2024

@Swordifish90 haha yeah well it still works in OS X too!

from cool-retro-term.

yackx avatar yackx commented on May 12, 2024

@LinusU With current master branch (#4a7e23), no need for steps 3, 4 and 5! Now it just works.

Cannot resize or move the window though. This is a very nice, super cool old terminal 😎

from cool-retro-term.

lwdallas avatar lwdallas commented on May 12, 2024

@Swordfish--THANK YOU! This is sweet--Atari ST page white. Any update on the move issue?
screen shot 2014-08-25 at 1 55 02 pm

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

@lwdallas You are welcome!... The missing topbar feature has been fixed but I've never pushed the patch. I will do that as soon as I can. Moreover you will be happy to know that I purchased a macbook pro to replace my old laptop. So, even though I'm mainly using ubuntu on it, I can now be an active part in the OSX port process.

from cool-retro-term.

sirgatez avatar sirgatez commented on May 12, 2024

MacOSX appear to expect a different type of shell than Linux in general.
Linux: interactive, non-login
MacOSX: interactive, login
Reference: https://github.com/sstephenson/rbenv/wiki/Unix-shell-initialization

To patch for MacOSX:
Edit: konsole-qml-plugin/src/Session.cpp
Goto function "void Session::run()"
Right below "arguments << exec;"
Add the following two lines:
arguments.append("-i");
arguments.append("-l");

This tells the designated shell to start with -i (interactive), and -l (login).
For: konsole-qml-plugin, make clean;make;make install
For cool-retro-term, make clean;make;open ./cool-retro-term.app

ToDo: Add check to see if host is MacOSX and add the arguments dynamically on start if so (that or define during compile time).
image

from cool-retro-term.

sirgatez avatar sirgatez commented on May 12, 2024

Update:
Add the following below: "arguments << exec;"

QString macosxver = "/usr/bin/sw_vers";
QFile excheck2(macosxver);
if ( excheck2.exists() ) {
    arguments.append("-i");
    arguments.append("-l");
}

"/usr/bin/sw_vers" is a MacOSX specific tool for reporting the OS version on the command line, it should only exist on such systems, so testing for it's presence is a good indicator of the system type we're running on. (if you rename the file and restart the app then it will assume non-apple and start without appending "-i -l" to the shell.)

from cool-retro-term.

maandree avatar maandree commented on May 12, 2024

Couldn't it be possible to use the uname function (uname(2))?

from cool-retro-term.

sirgatez avatar sirgatez commented on May 12, 2024

Yes, and no, uname will return the kernel information such as what kernel are we running, nothing about the Distro.

MacOSX: uname -a
Darwin XXXHOSTNAMEXXX 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64

The Darwin kernel however is not MacOSX, as Darwin can and is used for other distros besides MacOSX. I do not know if other Darwin based operating systems experience this same issue with login shells or not.

http://en.wikipedia.org/wiki/Darwin_(operating_system)

I do not think "-l -i" would interfere with other Darwin derivatives either, but I would rather not blanket all Darwin kernel systems the same way without testing and knowing for the same reason I would rather not append "-l -i" to all linux shells even though it would work.

Btw, the better way to define this is with compile time options to detect the OS and only enable the appends if the app was compiled (on/for?) MacOSX but I haven't tried that option yet. This is more of a hack to make it work when it should and not when it shouldn't for the time being.

from cool-retro-term.

maandree avatar maandree commented on May 12, 2024

Yeah, you are right, uname does not include the OS, it is just a GNU extension that the uname command prints GNU/Linu.x. However, I'm always for selecting the OS at compile-time.

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

@sirgatez Thank you for the suggestion. When I tested it I was forcing login with "login -f $USER" but this is way nicer. I agree that this should be decided at compile time and should not interfere with other OSs.

from cool-retro-term.

pajtai avatar pajtai commented on May 12, 2024

it built from the osx branch - very nice!

screen shot 2014-10-02 at 10 33 35

from cool-retro-term.

razum2um avatar razum2um commented on May 12, 2024

thanks, it works!

perhaps it should be noticed, that you must do "make install" but it would just copy console plugin in the right place, not touching the system

from cool-retro-term.

alexgorbatchev avatar alexgorbatchev commented on May 12, 2024

Could somebody make a DMG please? I tried installing qt5 and gave up after 1.5 hours of ./make... Thank you in advance!

from cool-retro-term.

miuirussia avatar miuirussia commented on May 12, 2024

Please, update to latest master branch

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

Yesterday, a patch has landed in master which makes crt build under osx with minimal changes (We are talking about 10 lines of code). So I suggest everyone from now on to take it directly from master. I'll leave the branch open until we take the good part from it.

from cool-retro-term.

miuirussia avatar miuirussia commented on May 12, 2024

We are talking about 10 lines of code.

Which changes need?

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

@miuirussia a78231e . Let's say that the previous solution was a little bit over-engineered :)

from cool-retro-term.

rjmunro avatar rjmunro commented on May 12, 2024

With the latest master 08ade0e I find that I can't type anything except by copying from elsewhere and pasting using the menu. The last version I tried (4a7e23f) didn't have this issue.

from cool-retro-term.

Swordfish90 avatar Swordfish90 commented on May 12, 2024

Hello everyone I think this ticked can be close right now. With the RC1 OS X support is finally complete.

https://github.com/Swordfish90/cool-retro-term/releases/tag/v1.0.0-RC1 (There is also a DMG file).

Thank you very much for all the people who helped with the porting!

from cool-retro-term.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.