LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-18-2022, 03:34 AM   #16
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,658

Rep: Reputation: 255Reputation: 255Reputation: 255

Quote:
Originally Posted by lucmove View Post
I am not sure, but I believe in Windows you can run

Code:
> start SomeTextFile.txt
on a terminal and Windows will open the text file with whatever program is configured as the default one for opening .txt files.

Whether that is true or not, is there such a thing on Linux?

I remember there used to be such a command for KDE a very long time ago (like 15 years ago), but I don't know if it is still used and, anyway, I need some command that does not rely on KDE. It just has to assume the user has a graphical environment. Is that possible?

TIA

unfortunately linux has not such a script for that. you will end up in nothing likely on some boxes.

Solution: From Source is magic.

The best is that you think about X11 lib or other small size libs, and you can compile your notepad with GCC or CLANG. See BSD for instance, there are cool projects for that (small size and readily compilable).
 
1 members found this post helpful.
Old 09-18-2022, 03:42 AM   #17
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,658

Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by lucmove View Post
I am not sure, but I believe in Windows you can run

Code:
> start SomeTextFile.txt
on a terminal and Windows will open the text file with whatever program is configured as the default one for opening .txt files.

Whether that is true or not, is there such a thing on Linux?

I remember there used to be such a command for KDE a very long time ago (like 15 years ago), but I don't know if it is still used and, anyway, I need some command that does not rely on KDE. It just has to assume the user has a graphical environment. Is that possible?

TIA
Have a look ... a cool link: https://www.fltk.org/doc-1.3/editor.html

You can compile it on any linux

Try this if it works:

Code:
 wget -c --no-check-certificate   "https://termbin.com/ke4l"  -O editor.cxx ; g++ editor.cxx    -lfltk -o notepad ; ./notepad

Last edited by Xeratul; 09-18-2022 at 03:53 AM.
 
1 members found this post helpful.
Old 09-18-2022, 03:55 AM   #18
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,658

Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by dugan View Post
Just going to add that the OSX equivalent to "start" and "xdg-open" is "open".
xdg-open sucks totally. it is not low end.
 
Old 09-18-2022, 10:59 AM   #19
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,242

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322
Quote:
Originally Posted by Xeratul View Post
xdg-open sucks totally. it is not low end.
Eh?

Usually, when you say that something "sucks totally", you mean that it is "low end".
 
Old 09-18-2022, 11:26 AM   #20
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,689

Rep: Reputation: 2715Reputation: 2715Reputation: 2715Reputation: 2715Reputation: 2715Reputation: 2715Reputation: 2715Reputation: 2715Reputation: 2715Reputation: 2715Reputation: 2715
Quote:
Originally Posted by Xeratul View Post
xdg-open sucks totally. it is not low end.
I am having trouble parsing this for your meaning. Are you high-endian or low-endian?
 
Old 09-18-2022, 11:53 AM   #21
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by jmgibson1981 View Post
Can also do alias's. I don't use them but many do. Then you can type in whatever you want.
Seconded for aliases. Those -- and shell scripts in my ~/bin directory (in your PATH, of course) -- handle all the custom commands you can think of.

Re: xdg-open

When I issue "xdg-open some-text-file" (on Leap 15.3) it launches Kate BUT it also dumps
Code:
kf.sonnet.core: Unable to find any suggestion for "dummy to trigger identify"
kf.kio.core: We got some errors while running testparm "Weak crypto is allowed"
to stderr. Ugh. An alias that includes "2>/dev/null" is needed to clean things up.
Code:
$ alias open='xdg-open 2>/dev/null'
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to export just source/destination field of pcap file into a plain text file kikilinux Linux - Networking 5 11-27-2014 07:13 AM
NS2: Need of plain plain aodv.cc and aodv.h files chenil Linux - Software 1 07-10-2013 06:17 AM
The best way to convert from text/x-c++ iso-8859-1 to text/plain utf8. rm_-rf_windows Linux - General 1 10-03-2012 04:08 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration