Skip to content

Changes to make it run on Linux - #2271

Merged
joshaber merged 3 commits into
desktop:masterfrom
ptomato:linux-flatpak
Jul 19, 2017
Merged

joshaber merged 3 commits into
desktop:masterfrom
ptomato:linux-flatpak

Conversation

@ptomato

@ptomato ptomato commented Jul 19, 2017

Copy link
Copy Markdown
Contributor

With these changes, I can run the app on Linux with

npm install
npm run build:prod
npm run start:prod

First two commits are taken from @gengjiawen's fork, but without the updates to the build process.

@joshaber joshaber self-assigned this Jul 19, 2017

@joshaber joshaber left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a great start! Thanks so much @ptomato and @gengjiawen!

Run npm run prettify to prettify the files and I think this will be good to go.

gengjiawen and others added 2 commits July 19, 2017 10:09
Without this, you get the message "I dunno how to run on x64 :("
@ptomato

ptomato commented Jul 19, 2017

Copy link
Copy Markdown
Contributor Author

Sorry about that! Will do from now on. Here's an updated PR.

@joshaber

Copy link
Copy Markdown
Contributor

Looks good, thanks again @ptomato!

@joshaber
joshaber merged commit 3e84492 into desktop:master Jul 19, 2017
@probonopd

Copy link
Copy Markdown

Can you do an AppImage too? That way it will run also where Flatpak is not installed.

@ptomato

ptomato commented Jul 19, 2017

Copy link
Copy Markdown
Contributor Author

My understanding there was already an AppImage on @gengjiawen's fork. In any case, I'm really only interesting in packaging for Flatpak right now, but these improvements should help anyone else who wants to take on other packaging tasks.

@ptomato
ptomato deleted the linux-flatpak branch July 19, 2017 19:19
joshaber added a commit that referenced this pull request Jul 20, 2017
Comment thread app/src/lib/open-shell.ts

if (__LINUX__) {
const commandArgs = ['--working-directory', fullPath]
return spawn('gnome-terminal', commandArgs, { shell: true })

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@probonopd probonopd mentioned this pull request Jul 23, 2017
@gengjiawen

Copy link
Copy Markdown
Contributor

@djpate

djpate commented Jul 24, 2017

Copy link
Copy Markdown

I've been unsuccesul trying to build this.

[WEBPACK] Finished building main.js within 30.148 seconds

[at-loader] Checking started in a separate process...

[at-loader] Ok, 3.342 sec.
[WEBPACK] Build failed after 38.972 seconds
[WEBPACK] Errors building crash.js
Module not found: Error: Can't resolve '../build/Release/runas.node' in '/home/djpate/desktop/app/node_modules/runas/lib'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ compile:prod: `cross-env NODE_ENV=production parallel-webpack --config app/webpack.production.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ compile:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/djpate/.npm/_logs/2017-07-24T12_52_22_799Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ build:prod: `npm run compile:prod && cross-env NODE_ENV=production node script/build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ build:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/djpate/.npm/_logs/2017-07-24T12_52_22_825Z-debug.log

I've tried to clean all my npm modules, install runas globally etc but no luck.

Any clues?

Comment thread app/src/lib/open-shell.ts
// the process of setting everything up. We trust this is available, so
// don't worry about looking for it here.
if (__DARWIN__) {
// I decide linux user have git too :)

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@gengjiawen

Copy link
Copy Markdown
Contributor

@shiftkey Do you think we can make Open in terminal function as a common npm library as like desktop/dugite?

@shiftkey

Copy link
Copy Markdown
Member

@gengjiawen without knowing about other use cases I'd rather it get refined and expanded on here (we've got #888 to tackle soon) before we extract, rather than doing it before it's ready.

@cromefire

Copy link
Copy Markdown

I mean I'm very late, but can't you simply use x-terminal-emulator? (x-terminal-emulator is configured by update-alternatives) It is at least on Ubuntu present and opens the preferred terminal and do the more complicated methods only, if not present? The problem with hard coding is that for example mate-terminal is not present although Ubuntu mate is a official distribution of Ubuntu.

@shiftkey

shiftkey commented Jan 9, 2018

Copy link
Copy Markdown
Member

@cromefire Desktop is currently interested in displaying a list of shells that it can find on your machine for your convenience. Please read our documentation about how this currently works on Linux (as well as the other platforms).

This issue was about changes to the whole app to make it work on Linux - we haven't really talked about "preferred shells" in any detail. Please read the documentation around our Linux testing effort as that explains the best place to leave additional feedback currently.

@cromefire

cromefire commented Jan 10, 2018 •

Copy link
Copy Markdown

Just meant because update-alternatives --list x-terminal-emulator lists the available shells.
The interface is by the way the same for all (gnome-terminal is also on the list so why don't replace gnome-terminal with x-terminal-emulator as it is the standard way)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants